Mainline Linux on AmLogic SoCs
LinuxConf Australia 2018
Kernel MiniConf
Neil Armstrong - BayLibre
BayLibre is an embedded software engineering firm. We specialize in embedded Linux, custom firmware, SoC support and product development.
BayLibre is an embedded software engineering firm. We specialize in embedded Linux, custom firmware, SoC support and product development.
Amlogic designs System-On-Chips for :
Well Known SoCs :
The AXG family (A113D SoC) is designed for Smart Speakers with Amazon Alexa for example.
Amlogic GX Family (GXBB, GXL, GXM, AXG) has :
Kernel and U-boot source are available from the official Amlogic website :
Heavily changed 3.10/3.14 kernel for Android is available for up to GXM SoCs.
But since early 2017, a 4.9 port is also available for GXL and newer SoCs. New 4.9 kernel is used for "Linux" products, has support for Wayland Mali OpenGL acceleration.
Before 4.7, only some minimal support was pushed by some independent kernel hackers :
Minimal boot was supported on S805, AML7826MX and very early GXBB support. Community work started on :
BayLibre develops and maintains the AmLogic kernel upstream, along with community contributions.
Linux Maintainers are :
The DRM maintainance goes through the shared drm-misc git repository using the Intel DIM tools.
Work was concentrated on 64bit SoCs, but support for older SoCs is added if possible (i.e PWM, Reset, ...)
Support for GXBB landed and evolved since 4.7
Support for GXL and GXM landed on 4.10
Best support is from 4.14 with :
"Basic" support was pushed/fixed first :
System Control and Power Interface is the protocol implementation between the ARM Cortex cores and the "System Control Processor" usually implemented using a Cortex-M3 core in an Always-On power domain.
Having stable Firmware protocols seems a good idea, but in this case Amlogic based it's SCPI firmware implementation on an early Juno released to Cortex-A53 licensees.
But ARM reworked and pushed an updated version of the SCPI protocols upstream.
Hopefully (sic), Rockchip used the same SCPI version for their SCPI implementation.
All communications to the SCP firmware are required to use a Mailbox to synchronize.
The driver was pushed for Linux 4.9
SCPI now supports GXBB on Linux 4.10.
Support for GXL and GXM has been done in 4.11 by :
Kevin Hilman wrote a brand new MMC host driver from Amlogic's implementation and the provided public Datasheet.
The driver was updated for Linux 4.14 and supports :
In the end of 2016 Amlogic published the code for their GXL and GXM family variants.
These SoCs are enhanced version of the S905 with support for 4k VP9 and H.265 decoding.
Since these SoCs are very close to thre S905, a new hierarchical DT structure has been pushed for 4.10 :
Amlogic SoCs has a complex and feature-full Video Display pipeline that can easily match the Linux DRM structure.
Classic view in DRM Structure :
Mapping of Amlogic Video Processing Unit :
The Amlogic SoCs uses a Synopsys DesignWare HDMI Controller like multiple other SoCs.
Hopefully, a clean dw-hdmi bridge driver has been pushed a while ago.
HDMI Support for GXBB, GXL, GXM was merged in 4.2 :
Support for previous generations will need support for un Unknown HDMI Controller.
The new GXL and GXM SoCs features an embedded RMII 10/100 Ethernet PHY muxed with the external RGMII 10/100/1000 interface.
Support for 32bit mux registers for MDIO has been pushed along the PHY support for Linux 4.10
Lately, a fix to fix stability and reliability has been pushed for stable and 4.16.
CEC is a single-line multi-master network protocol used between all HDMI devices to communicate, exchange information and ask for routing changes.
CEC is used for (+ a lot more) :
The Amlogic CEC driver has been merged for 4.14 using the CEC Framework maintained by Hans Verkuil.
GXBB and GXL embeds a Mali-450 MP3 IP that renders OpenGL ES 1 & ES 2.
ARM provides a GPL kernel driver that discusses with the user-space OpenGL shared library.
Support for GXBB and GXL has been added to the ARM Mali kernel driver :
Still need some work on GXM to support the Mali-T820.
User-Space library must be generate by the SoC vendor and must match the hardware config and kernel driver version.
A first initiative to create a full open-source alternative to the ARM binaries was launched in 2012 : LIMA driver
But it stalled in late 2016 since the driver design did not fit in the classic scheme : DRM driver + Gallium Driver
An (ex ?) AMD employee started a new driver at : https://github.com/yuq/mesa-lima
It can render kmscube on Mali-400 and has basic support for Mali-450 embedded in Amlogic SoCs.
To provide better display experience the support of the following are necessary :
Current Situation :
Missing support :
The SoC provide S/PDIF, I2S, PCM input and output.
Basic I2S output has been written and works throught HDMI or external DAC.
Missing support of :
One of the best features of those Amlogic SoCs is the Hardware Video Decoding and Encoding.
This will be handled as V4L2 driver to support full control from user-space application.
With support of Overlay planes in the DRM Display Driver, such decoded video frames could be played from graphical applications like VLC.
The GXL and GXm SoCs has a DesignWare USB3 controller forced to USB2 only (sic), with up to 3 PHYs to be configured.
This is why, Martin Blumenstingl, is pushing for a "Generic Roothub" interface to route PHY commands (Init, Enable, Disable, ...) to all PHYs at the same time.
PHY Driver is already upstream since 4.13
A lot of people loves to hack the Odroid-C2 board, and great applications like LibreELEC with KODI runs on these platforms.
A big part of Raspberry Pi projects are modified to run on the S905 platform, thanks to it's more powefull Mali-450 GPU and 4K Video Output and Video Decoding capability.
A few independent hacker pushes regurlary patchs to fix and support more features on the Amlogic SoCs.
For example, USB support for S905 and ADC support was pushed by an independant german hacker on his spare time (thanks Martin Blumenstingl !)
Such work keeps us focus on bigger features and we provide the community tests and integration to kernelci for automated boot testing.
Starting with the Odroid-C2 in 2016, there is now 5 Single Board Computers easing the Mainline support of these Amlogic SoCs.
Particularly, the new Libre Computer project "LibreTech-CC" board, succesfully backed on Kickstarter, wants to have Mainline support and is funding BayLibre for this task.
Espace | Suite |
---|---|
→, ←, molette | Diapo suivante, précédente |
↑, double-clic | Vue d'ensemble |
P | Console de présentation |
H | Cette aide |