User Tools

Site Tools


start

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
  • GXBB : Quad 64bit Cortex-A53
    • S905
  • GXL : Quad 64bit Cortex-A53 (WiP)
    • 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 (WiP)
    • S912 : Pin compatible with S905D

For further indications : https://en.wikipedia.org/wiki/Amlogic#Comparison_Table

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

Kernel mainlining progress

v4.10

  • Meson GX MMC support
  • Meson GX 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
  • Meson GX DRM basics along with CVBS output

v4.9

  • Meson GX Secure Monitor
  • Enhanced Meson GXBB Ethernet support
  • Meson GX SPIFC support
  • Meson GX I2C support
  • Meson8b and GX PWM support

v4.8

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

v4.7

  • 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)

v4.6

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

v4.5

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

v4.4

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

v4.2

  • Clock controller driver added

v4.1

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

v4.0

  • Meson6/Meson8 GPIO & pin control driver added

v3.19

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

v3.18

  • 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

HowTo

32-bit SoCs (Meson8b / S805 or older)

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)

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

WiP

  • SCPI support for GXL/GXM (Martin Blumenstingl / xdarklight - merged for v4.11)
  • SAR ADC (Martin Blumenstingl / xdarklight - merged for v4.11)
  • initial support for HS200, HS400, DDR, … modes on MMC for GX family (Heiner Kallweit - merged for v4.11)
  • performance improvements (and code cleanup) for the GX family MMC driver (Heiner Kallweit)
  • USB host for GXL/GXM (Martin Blumenstingl / xdarklight)
  • DRM for Video Pipeline/HDMI (Neil Armstrong / narmstrong)
  • SMP pre-GXBB (Carlo Caione / ccaione)
  • MMC pre-GXBB (Carlo Caione / ccaione)
  • GPIO IRQ (Carlo Caione / ccaione, Jerome Brunet / jbrunet)
  • ASoC Audio (Jerome Brunet / jbrunet)
  • Support for the Khadas VIM [Pro] boards (Martin Blumenstingl / xdarklight)
  • Mali clocks and devicetree support for GXBB (Neil Armstrong / narmstrong)

TODO

  • Support more boards
  • System Suspend / Power Management
  • 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: https://patchwork.kernel.org/patch/9376039/)
  • 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
  • Implement MMC scatter-gather on GX family
  • Implement MMC calibration for HS modes on GX family

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.

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 :

Community

  • Our IRC channel is #linux-amlogic on Freenode
start.txt · Last modified: 2017/02/20 00:23 by xdarklight