User Tools

Site Tools


Linux for Amlogic Meson

Welcome to the wiki for the growing Linux development community around Amlogic Meson SoCs.

This community is focused around getting Meson SoCs well-supported by mainline Linux and mainline Linux distributions.

This wiki is not endorsed by or affiliated with Amlogic, Inc.

Not for end users - yet!

As we have a lot of work to do before we reach our goals, this wiki is not really suitable for end users yet - there are plenty of forum communities that offer disjunct Linux/Android spins with XBMC that you may be looking for.

Instead, we use this wiki as an information archive for those developers who are working collaboratively to bring Amlogic support to the existing Linux/open-source codebases and communities.

Target hardware

Current upstreaming efforts are focused around the S905/S905D/S905X/S912 SoCs (GXBB/GXL/GXM from the Meson GX family). Secondarily there are also some efforts around the S805 SoC (Meson8b), and the AML7826MX (Meson6) since they are widespread in many consumer products.

Supported/WiP SoC Families

  • Meson6 : Dual 32bit Cortex-A9
    • AML8726MX
  • Meson8 : Quad 32bit Cortex-A9
    • S802
  • Meson8b : Similar as Meson8 but with Quad 32bit Cortex-A5
    • S805
  • Meson8m2 : Similar to Meson8 (same 10/100/1000 MAC as Meson8b, H.265 UHD hardware decoder)
    • S812
  • GXBB : Quad 64bit Cortex-A53
    • S905
  • GXL : Quad 64bit Cortex-A53
    • S905D : Similar as S905, but with internal 10/100 Ethernet PHY (Gigabit Ethernet still requires an external PHY)
    • S905X : Identical to S905D but without Gigabit Ethernet
  • GXM : Identical to GXL but with Octo 64bit Cortex-A53
    • S912 : Pin compatible with S905D

For further indications :

Some development and final products are (partially) supported : Supported Hardware

Mainline Support Matrix

AML8726MX S802 S805 S812 S905 S905D S905X S912
UART Console Only Yes Yes Yes Yes Yes Yes Yes
Pinctrl/GPIO No Yes Yes Yes Yes Yes Yes Yes
GPIO Interrupt No WiP WiP WiP WiP WiP WiP WiP
Clock Control No Yes Yes Yes Yes Yes Yes Yes
PWM No Yes Yes Yes Yes Yes Yes Yes
Reset Control No Yes Yes Yes Yes Yes Yes Yes
Infrared Decoder Yes Yes Yes Yes Yes Yes Yes Yes
Ethernet No Yes Yes Yes Yes Yes Yes Yes
Multi-core No WiP WiP WiP Yes Yes Yes Yes
Fuse access WiP WiP WiP WiP Yes Yes Yes Yes
SPI (FC) Yes Yes Yes Yes Yes Yes Yes Yes
SPI (CC) N/A No No No Yes Yes Yes Yes
I2C Yes Yes Yes Yes Yes Yes Yes Yes
USB No Yes Yes Yes Yes Partial Partial Partial
MHU/Mailbox N/A N/A N/A N/A Yes Yes Yes Yes
DVFS No No No No Yes Yes Yes Yes
eMMC No Partial Partial Partial Yes Yes Yes Yes
SDCard No Yes Yes Yes Yes Yes Yes Yes
SDIO No Partial Partial Partial Yes Yes Yes Yes
NAND No No No No No No No No
ADC No Yes Yes Yes Yes Yes Yes Yes
Audio Subsystem No No No No WiP WiP WiP WiP
CVBS Output No No No No Yes Yes Yes Yes
HDMI Output No No No No Yes Yes Yes Yes
HDMI Audio No No No No WiP WiP WiP WiP
CEC No No No No Yes Yes Yes Yes
Thermal Sensor No No No No Yes Yes Yes Yes
Video Encoders No No No No No No No No
Video Decoders No No No No No No No No
DVB TS Input No No No No No No No No
LCD/LVDS Output N/A No No No No No No No
DVP MIPI Input N/A No No No No No No No
3D Acceleration No No No No Yes Yes Yes No
Real Time Clock (RTC) No No No No N/A N/A N/A N/A

Kernel mainlining progress

v4.15 (work in progress)

  • USB controller interrupt fix for Meson6/Meson8/Meson8b
  • SoC information driver for Meson6/Meson8/Meson8b/Meson8m2
  • SD/MMC/SDIO driver for Meson6/Meson8/Meson8b/Meson8m2
  • pinctrl: cleanups and minor fixes
  • DT updates
    • Meson8b: add reserved-memory zones to fix system freezes
    • Meson8b: add USB support on Odroid-C1
    • Meson8/Meson8b: add the SDIO MMC controller
    • GX: enable the SAR ADC on Libre Tech CC
    • GX: enable the internal Ethernet PHY LEDs on Libre Tech CC
    • GX: enable the USB on Nexbox A95X (GXBB)
    • GX: pinctrl offset cleanup
  • New board support
    • Khadas VIM2 (GXM)
    • Tronsmart Vega S96 (GXM)


  • clock controller driver updates
    • GX: add SD/eMMC clocks
    • GX: fix divider flags
    • GX: add the AO CEC clock
    • Meson8/Meson8b: register reset controller built into the clock-controller
  • DT updates
    • GX: GPIO line names for Khadas VIM and NanoPi K2
    • GX: CEC support (for all boards where HDMI is enabled)
    • GX: use the correct MMC clocks
    • GX: add MMC regulator settle times for NanoPi K2, Libre Tech CC, P200 and P201
    • GX: enable SD card UHS modes on NanoPi K2, Libre Tech CC, P200 and P201
    • GX: enable SD card SDR104 mode on NanoPi K2
    • GX: update to use stable UART bindings (fixes HCI UART where the bootloader doesn't enable the UART clocks)
    • Meson8/Meson8b: add the SRAM
    • Meson8: PWM support
    • Meson8b: cleanup duplicate code in watchdog node
  • GX: SoC information driver (SoC version, etc.)
  • AO CEC Driver
  • Watchdog support for Meson8m2
  • UART SysRq


  • DT cleanups
    • GX: reorganize alphabetically to better avoid conflicts
    • Meson6/8/8b: use interrupt pre-processor macros instead of magic numbers
  • add HDMI and CVBS nodes for multiple GX boards
  • pinctrl updates:
    • GX: add SPI (SPICC) and HDMI CEC pins
    • Meson8: (AO) HDMI CEC, AO remote output, I2S, SPDIF and PWM pins
  • SCPI: fix thermal sensor reporting
  • Meson8 support for the SAR ADC driver
  • USB PHY driver for Meson GXL/GXM
  • SPICC (SPI Communication Controller) driver
  • Meson8 clock controller support
  • USB support for Meson8 and Meson8b
  • Hardware random number generator support for Meson6, Meson8 and Meson8b
  • reserved memory zones (to prevent random crashes) on Meson8
  • New board support
    • NanoPi K2 (GXBB)
    • R-Box Pro (GXM)


  • DRM/KMS: added support for HDMI output
  • clocks: added clocks for audio, GFX (Mali)
  • pinctrl: added pins for audio, missing pins for GXL/GXM
  • phy: added GPIO resets for ethernet PHYs
  • Add clocks and DT node for Mali-450 support for GXBB/GXL (using off-tree driver)
  • usb: dwc2 support for Meson8
  • i2c: driver code improvements and code cleanup
  • Meson GX MMC
    • performance improvements
    • eMMC calibration support
    • CMD23 support
    • misc. cleanup and refactoring
    • descriptor chaining (DMA) support
  • Enhanced board support
    • Amlogic P212 (S905X)
  • new boards
    • Khadas Vim (S905X)
    • HwaCom AmazeTV (S905X)


  • SAR ADC support
  • ADC laddered keys (P200 board)
  • New board support
    • Wetek Play (S905)
    • Wetek Hub (S905)


  • Meson GX MMC support, including SDIO WLAN
  • Meson GXBB USB (host) support
  • Meson GXL internal (100Mbit/s) PHY support
  • initial support for the GXL (S905D/S905X) and GXM (S912) SoCs
  • SCPI support for GXBB
  • CPU DVFS (using SCPI)
  • Meson GX DRM basics along with CVBS output
  • new board support
    • Amlogic P230 (S905D)
    • Amlogic P212 (S905X)
    • Nexbox A95 (S905)
    • Nexbox A1 (S912)


  • Meson GX Secure Monitor
  • Enhanced Meson GXBB Ethernet support
  • Meson GX SPIFC support
  • Meson GX I2C support
  • Meson8b and GX PWM support
  • USB host support
  • clocks: added AO clocks and reset
  • MHU / mailbox support


  • Meson GXBB Ethernet support
  • Meson GXBB Hardware Random Number Generator
  • Meson GXBB Watchdog driver
  • Meson 8b and GXBB support for the IR remote driver


  • MesonGXBB pin control support
  • earlycon support in serial driver
  • Initial device trees for Amlogic reference boards P200 and P201 (S905)
  • Initial device tree for Hardkernel ODROID-C2 (S905)


  • Initial GXBB family support (clocks, serial)
  • Initial device trees for Tronsmart Vega S95 (S905)


  • Meson8b watchdog support / Reboot
  • ODROID-C1 status LED support
  • Serial driver bugfixes


  • Initial Meson8b device trees for Hardkernel ODROID-C1 (S805) and Tronfy MXQ (S805)


  • Clock controller driver added


  • MINIX NEO X8 board support (M8-S802)
  • Meson8b GPIO & pin control driver added


  • Meson6/Meson8 GPIO & pin control driver added


  • Core Meson8 support added
  • I2C driver added
  • SPI flash driver added
  • IR remote control driver added
  • L2 cache enabled


  • Core Meson6 support added
  • Geniatech ATV1200 board support (AML8726-MX)
  • UART driver added
  • Watchdog driver added
  • Timer/clocksource driver added
  • Ethernet controller enabled with glue added to stmmac driver

Kernel Development Stats


32-bit SoCs (Meson8b / S805 or older)

Download recent cross-toolchain Linaro Latest arm-linux-gnueabihf binaries

To compile the 32-bit mainline kernel:

# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- multi_v7_defconfig
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x00208000 uImage dtbs

To boot the 32-bit kernel using the shipped U-Boot:

# mmcinfo
# fatload mmc 0:1 0x21000000 uImage
# fatload mmc 0:1 0x22000000 rootfs.cpio.uboot
# fatload mmc 0:1 0x21800000 meson8b-mxq.dtb
# setenv bootargs "console=ttyAML0,115200"
# bootm 0x21000000 0x22000000 0x21800000

64-bit SoCs (GXBB / S905 or newer)

Download recent cross-toolchain Linaro Latest aarch64-linux-gnu binaries

To compile the 64-bit mainline kernel:

# make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
# make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs
# mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux-next -d arch/arm64/boot/Image ../uImage

To boot the 64-bit kernel using the shipped U-Boot:

# fatload mmc 0:1 0x01080000 uImage
# fatload mmc 0:1 $dtb_mem_addr meson-gxbb-vega-s95-telos.dtb
# bootm 0x1080000 - $dtb_mem_addr

Upstreaming status


  • USB host support for GXL/GXM (Martin Blumenstingl / xdarklight)
  • basic USB3 PHY initalization for GXL/GXM (Martin Blumenstingl / xdarklight)
  • GPIO IRQ (Carlo Caione / ccaione, Jerome Brunet / jbrunet, Heiner Kallweit)
  • ASoC Audio (Jerome Brunet / jbrunet)
  • NAND controller driver (Martin Blumenstingl / xdarklight)
  • temperature sensors support for the SAR ADC driver (Martin Blumenstingl / xdarklight)
  • initial CPU frequency scaling work for Meson8 and Meson8b (Martin Blumenstingl / xdarklight)
  • Meson8m2 (S812) SoC support (Martin Blumenstingl / xdarklight)
  • SMP and CPU hotplug pre-GXBB (Carlo Caione / ccaione, Martin Blumenstingl / xdarklight)
  • Endless Mini EC-100 device support (Martin Blumenstingl / xdarklight)
    • CPU voltage scaling seems to be implemented with PWM_D: using XTAL as input, a PWM period of 1166ns and inverted duty cycle logic (100% PWM = 0.86V, 0% PWM = 1.14V)
  • efuse driver for Meson6/Meson8/Meson8b/Meson8m2 (Martin Blumenstingl / xdarklight)

Stalled WiP

  • Meson GX System Suspend / Power Management (Neil Armstrong / narmstrong) (last patches)
  • Meson8 RTC (Ben Dooks / bjdooks) (last patches)
  • convert existing devices to use the PWM LED driver to allow dimming the LEDs (Martin Blumenstingl / xdarklight) (last patches)


  • Support more boards (Amlogic based retail products should have PCB holes to enable Serial console with a simple USB to Serial TTL adapter, i.e. Sparkfun USB to Serial TTL cable)
  • the USB hub on Odroid-C2 is in reset mode by default (setting GPIOAO_4 to LOW takes it out of reset - we probably need upstream support for this which is WiP:
  • USB OTG for GXL/GXM (dwc3 is used for host-mode, dwc2 for device-mode and the first USB2 PHY switches the mode depending on what the USB3 PHY OTG detection logic tells it to)
  • Find a way to cap the SCPI cpufreq max frequency to re-enable DVFS on Odroid-C2
  • Meson DRM Features
    • Cursor Plane
    • Overlay Planes Support (with Ordering and scaling)
    • More formats support for Primary Plane
    • ColorKey as DRM Attribute
    • Primary Plane scaling
    • CRTC Color correction attributes
    • CVBS Color optimizations as attributes
    • LVDS and LCD output support on supported boards
    • Add Display support for pre-GX SoCs
    • Add HDMI support for pre-GX SoCs, Unknown HDMI Controller IP
  • Video Encoder/Decoder subsystem support as V4L2 driver (Endless Mobiles has written a V4L2 frontend to Amlogic implementation here)

Development resources

Our main source of information is the open source kernel code and Linux SDK published by Amlogic.

A partial S805 SoC manual and a partial S905 SoC manual has been published by Hardkernel.
A partial S905X SoC manual and a partial S912 SoC manual manual have been published by Khadas (on their docs page)

Based on the Amlogic kernel code, these git trees also contain some interesting developments:

All new developments will ultimately go into the official Linux tree. In the meantime, you can find in-development or ready-to-merge changes in these trees :

Experimental Test distributions using mainline (maybe outdated) :


  • Our IRC channel is #linux-amlogic on Freenode
start.txt · Last modified: 2017/10/16 06:09 by dlan