Zephyr 1.11.0 released, BayLibre contributions

A full changelog of this release are available on the project releases page.

For these last 3 Zephyr releases, BayLibre engineer Neil Armstrong worked to add a better support for the STM32F0 SoC family by adding SPI, I2C, and internal Flash support, following his work on the previous Zephyr release on the overall STM32 Microcontrollers.
A hard time was spent adding SPI Slave and I2C Slave support on Zephyr for the whole STM32 Microcontroller family, to align with other RTOS and Linux for the I2C Slave part.

Since Zephyr 1.8, supported in Zephyr :

Along the following STM32 Microcontrollers features :

And ongoing features still in discussions :

The last Pull Request is done in cooperation with Daniel Wagenknecht, and triggered a lot of technical discussions ! Thanks Daniel !


Linux Kernel v4.15 released, our contributions

Linux Kernel v4.15 released

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel v4.15, released on January, 28th 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Finally GPIO IRQ Support for Amlogic SoCs
  • Pinctrl cleanup for AXG future support
  • Meson GXL/GXM Internal PHY fixup for reliability
  • Support for new boards :
    • Vega S96
    • Khadas VIM2
  • Driver support for the Video Processing Unit Power Domain for mainline U-Boot support
  • Level Reset support for GX Family


  • Support for the Winbond w25q16dw present on the Khadas VIM2
  • usb: musb: da8xx: Remove duplicated defines



How We Improved AmLogic Support in Mainline Linux

It was a match made in heaven: two years ago AmLogic and BayLibre joined forces to bring top-notch support for AmLogic SoCs into the mainline Linux kernel.

Since that time AmLogic has continued to become one of the most relevant and widely used silicon vendors in the world. Similarly, BayLibre has expanded the variety of SoCs, drivers and frameworks supported upstream all while supporting a growing number of OEMs basing their products off of recent kernel releases.

Along the way Baylibre has collaborated with a great community of product makers, kernel hackers and hobbyists to improve the AmLogic Meson SoC support in mainline Linux. We’ve added support for 64-bit SoCs, new drivers, and we’ve become maintainers for the AmLogic platform in Linux.

Our goal is straightforward: AmLogic system-on-chip processors should be so well-supported in the mainline Linux kernel that OEMs will go to market using the latest stable kernel release.

Last year at Embedded Linux Conference 2017 and this year at Linux Conf Australia, Neil Armstrong gave a well-received talk on our work. This post expands on Neil’s presentation and provides an update on some of the changes we’ve been involved with recently.

The Linux Meson project

The Linux Meson project is an effort to get support for the ARM-based SoCs produced by AmLogic into the upstream Linux kernel and GNU/Linux distributions. AmLogic chips are found in many Android-based multimedia devices such as set-top boxes, smart TVs, projectors, and tablets but are also starting to appear in products in the smart speaker market. Popular consumer products and community boards using the AmLogic Meson SoC include:

  • Amazon Fire TV (gen3)
  • Wetek Play/Hub
  • Nexbox A1/A95
  • Hardkernel ODROID-C2
  • Tronsmart Vega S96
  • R-Box Pro
  • HwaCom AmazeTV
  • Libre Tech CC (a.k.a “Le Potato”)
  • Khadas VIM and VIM2
  • NanoPi K2

AmLogic provides a kernel release and SDK that supports their hardware but it’s a heavily-modified 3.10-based or 3.14-based kernel for Android. Thankfully, most of the changes are confined to the `drivers/amlogic` directory and it has been possible to use them as a starting point to write the upstream support.

Carlo Caione added the initial support for the 32-bit Meson6 SoC in Linux 3.18, with Beniamino Galvani adding support for Ethernet and Andreas Färber contributing code for the GXBB platform. Since then, support has been added for Meson8, Meson8b, and the 64-bit ARM Meson GXBB, Meson GXL and GXM SoCs and a whole host of hardware. Codenames for the 64-bit SoCs are used in the kernel source and the following table shows how they map to their respective product names:


Codename Product name
GXL S905X, S905D
GXM S912
AXG A111, A112, A113


Here’s How We Helped

Our efforts have mainly been focused on adding support for the 64-bit Meson SoCs. Kevin Hilman generalized the boot and serial console code for the 64-bit AmLogic family of SoCs so that more boards could be supported, starting with the Hardkernel ODROID-C2).

Michael Turquette reworked the Meson SoC clock driver to move to the `platform_driver` API and replaced the dynamic configuration code with statically initialized data. That was in preparation for adding clock driver support for the S905 SoC. We’ve also added S905 AO (Always-On) clock and reset controller drivers and support for PWM, RNG, Watchdog, IR, I2C, SPIFC devices.

Because some of AmLogic SoCs use a legacy version of the System Control and Power Interface (SCPI) protocol (pre-v1.0), we pushed changes to the upstream SCPI driver to support it. The SCPI driver is used for Dynamic Voltage and Frequency Scaling (DVFS) with the CPUFreq subsystem to dynamically alter the processor’s speed.

We’ve added a driver for the AmLogic SPI Communication Controller (SPICC) that’s capable of full-duplex transfers up to 30MHz. And in v4.10 Kevin added a brand new SD/eMMC driver that supports the host controller found on the AmLogic S905/GX* family of SoCs.

Neil wrote the AmLogic Meson DRM driver and has added HDMI support since his last update during his talk at Embedded Linux Conference 2017.

As the following graph shows, the number of Meson patches merged into the kernel has risen steadily over the last few kernel releases, and Baylibre is responsible for hundreds of them.

AmLogic kernel commits and BayLibre contributions
And because of our knowledge of the Meson code, we’ve had the honour of becoming (co-)maintainers for the majority of it.

  • Meson SoC code (Kevin Hilman)
  • DRM display driver (Neil Armstrong)
  • AO-CEC driver (Neil Armstrong)
  • Meson SoC clock framework (Neil Armstrong and Jerome Brunet)

As the number of supported boards has grown, it’s become increasingly important to maintain quality across all devices. For that, we’ve leaned heavily on kernelci.org. Baylibre is a founding member of kCI and you can expect more details in an upcoming blog post.

kernelci.org has been extremely useful for our AmLogic work. Part of our lab is made up of 8 AmLogic Meson boards which we use to check for regressions across 6 kernel trees. The kernelci.org infrastructure recently caught a kernel regression in the SCPI code which resulted in CPUFreq failures on boot. Thanks to kernelci.org and our collection of Meson boards, we were able to get the offending patch reverted before the final v4.15 release.


Links to Community Resources

AmLogic Meson support has come a long way in the last two years. That progress has been possible thanks to the supportive Linux Meson community and the kernel hackers (shout out to Martin Blumenstringl for his contributions as well as Carlo Caione and Andreas Färber for their early work and ongoing reviews) helping to improve the upstream AmLogic code. There’s lots more to come and we are currently working on support for the new AXG SoC (including audio) which is targeted at the smart speaker market.

If you want to know more about Linux Meson development you can subscribe to the linux-amlogic mailing list or join the #linux-amlogic IRC channel on irc.freenode.net. Also, the Linux Meson wiki is updated as support for new devices and SoCs lands in mainline Linux.


Post header image by Hardkernel – http://odroid.com/dokuwiki/doku.php?id=en:odroid-c2, CC BY-SA 3.0, Link

U-Boot v2018.01 released, our contributions

BayLibre has continued contribution to the open-source community as seen with this new version of U-Boot v2018.01, released on 9 Jan 2018.

Here is a summary of our contributions:

Amlogic SoC family:

Add support for the Meson GXL Family by :

  • Adding pinctrl support, based on excellent work of Beniamino Galvani
  • Adding Internal PHY Support + fixups for reliability
  • Add support for dynamic reserved memory
  • Adding support for S905X Based boards :
    • P212 reference board
    • Khadas VIM
    • LibreTech-CC
  • Neil Armstrong becomes maintainer of these freshly added boards

This version of U-Boot for Amlogic GXL SoCs will need to wait for Linux 4.16 to be released, or is compatible with the LibreTech-cc 4.14 stable linux tree for the LibreTech-CC board.

Khadas has released an image with this version of U-Boot and Linux Mainline for the Khadas VIM board here.

Misc :

  • fat: Use cache aligned buffers for fat_opendir

Linux Kernel v4.14 released, our contributions

Linux Kernel v4.14 released

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel v4.14, released on Nov 12 2017.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Add support for eMMC HS200 and SD SRD104 modes to GX MMC Controller
  • Fix GX MMC Controller clocking scheme
  • Add GPIO Lines names to the following Single Board Computers :
    • LibreTech-CC
    • Nanopi K2
    • Khadas VIM
  • Add support for the HDMI CEC Controller on Meson GX SoCs

TI DaVinci SoC family:

  • musb: musb_cppi41: Configure the number of channels for DA8xx



Kernel Recipes: Mainline Linux on AML-S905X-CC: Le Potato

At Kernel Recipes this year, BayLibre was proud to partner with the Libre Computer Project to give away around 30 “Le Potato” boards to attendees.  Kernel Recipes is already known for its throw microphone, but this year each speaker threw a “Le Potato” board at the audience.

For those who received the board, pre-built images (to be written to a microSD card, at least 4Gb) are available here :

What works:

  • Quad-Core Cortex-A53 @ 1.5GHz with Dynamic Voltage and Frequency Scaling (DVFS)
  • Penta-Core Mali-450 MP3 GPU limited to X11 (experimental) and Framebuffer acceleration
  • RS-232 TTL serial console on UART header and 40-pin header using DT Overlay
  • microSDCard SD/SDHC/SDXC up to SDR104 (UHS-I) speed
  • Optional eMMC 5.1 up to HS200 speed
  • SDIO up to SDR104 on 40-pin header
  • I2C, SPI, PWM, ADC on 40-pin header
  • Infrared Receiver
  • Hardware Watchdog
  • Up to 100Mb Full Duplex Ethernet
  • 4x USB2.0 Type A ports
  • 480i/576i CVBS Analog Output on AV Jack
  • Up to 1080p60 Full HD Output with CEC and Stereo Digital Audio

What doesn’t work (yet) :

  • 4k2k HDMI 2.0a modes, 7.1 and compressed Digital Audio
  • Mali-450 MP3 GPU Acceleration for Wayland
  • Analog and 7.1 I2S Digital audio output
  • Hardware Accelerated Video decoding/encoding for H.264/H.265/VP9

How to build and boot your own kernel from mainline:

For Overlays support, please follow the steps on https://github.com/libre-computer-project/libretech-overlays/blob/for-4.13.y/README.md

For Questions, please find us on the IRC channel #linux-amlogic (on Freenode) or ask questions on linux-amlogic@lists.infradead.org

Embedded and Kernel Recipes speakers

BayLibre’s team experts talk in the Open source community

It’s the end of holidays and we’re ready to tackle September in fine fettle.
Two major conferences are taking place in the Embedded and Open source community.
BayLibre is sponsors at those events.
We are longing for them for good reasons!

Two Jedi of our team, will demonstrate their power as embedded systems experts.

  • Neil Armstrong (yes the real one !) : Embedded system expert and software engineer, one of the Embedded Recipes speakers
  • Kevin Hilman : Linux Kernel expert, one of the Kernel Recipes speakers

Embedded Recipes

The first edition of the Embedded Recipes conference, #er2017, will take place in Paris, the 26th of September 2017.

Just as it’s big sister, Kernel Recipes, the objective is to bring together a developer community.

That day will be dedicated to Embedded Open Source actors.

Share your experience with us. 

Neil Armstrong : From Embedded Recipe speakers

Software and Linux Embedded System Engineer

9 years of passion for embedded systems, Linux Expert.

Neil was keen on computing at the youngest age. He obtains his degree of engineering in computer science from Polytech Nice-Sophia.

He got into Neotion as a Linux embedded system engineer.

From this experience he has got increasingly interested in the Open source community.

Then, in 2015 he decides, to join the team BayLibre.

Kernel Recipes

We wish a happy 6th edition to Kernel Recipes!

From the 27th to the 29th September 2017 in Paris.

A great, human and professional experience as always.

A unique track of conferences on subjects as varied as:

  • Open source hardware,
  • Core,
  • Security,
  • Experience feedback,
  • Industrialization processes
  • and so many more…

Kevin Hilman: From Kernel recipes speakers

Linux Kernel Consulting and Engineering

20 years of engagement with Embedded Linux. Expert in power management. Upstream maintenance of Kernel subsystems.

Early in computer science, he earns a Master of Science in Electrical Engineering from the University of Seattle.

Then in 2003 he decides to settle down in France and joins Texas Instrument. He works there as a Linux Kernel developer and meet his future collaborators.

Later he returns Seattle and Texas Instrument for a few years. He finally decides to join the team BayLibre.


How to Subscribe ?

The subscription is limited so unfortunately there are no more places left.

Think about it next year and be sure to subscribe!

Embedded Recipes

Kernel Recipes

Linux Kernel v4.13 released, our contributions

Linux Kernel v4.13 released

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel v4.13, released on Sept 3rd.

For this version we supplied:

  • multiple team members
  • many work hours
  • several cups of coffee
  • and a few pastries

An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Add S905x based libretech-cc “Le Potato” board support (Succesfully backed on kickstarter)
  • Fix PWM for AO Domain
  • Add HDMI Nodes for more boards (p212, p230, Khadas VIM, Wetek Play2)
  • Support for the SPICC controller added
  • And missing GXL pinctrl pins

TI DaVinci SoC family:

  • da850: Enable CPPI 4.1 DMA to USB OTG controller
  • da850: vpif: adaptions for DT support


  • Fix for Mediatek MMC driver



Linux v4.12 released, BayLibre contributions

We are happy to announce the Linux v4.12 release on July the 2nd.

Baylibre is pleased to have contributed with the Linux Kernel community to this new version.

An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Clocks fixups and exports
  • GXL pinctrl fixups and more pins declarations
  • GXBB more pins declarations
  • Add MALI Node for GXBB and GXL
  • Add MALI Clocks support
  • Odroid-c2: Fix USB Hub and and GPIO pin labels
  • Add ADC Laddred buttons on P230 and Q200
  • Add support for HDMI Output on GXBB, GXL and GXM


TI DaVinci SoC family:

  • musb for da8xx
    • Add clock for CPPI 4.1 DMA engine
    • CPPI 4.1 DMA fixes
    • Detect aborted transfers
    • Add support of CPPI 4.1 DMA controller to DA8xx
  • Enable ohci for omapl138 lcdk
  • Add support for SATA on dm8168-evm
    • model the SATA refclk
    • add con_id for the SATA clock
    • add and enable the SATA node
    • davinci_all_defconfig: enable SATA modules
  • Fix da850 vpif display pinx
  • Fix davinci SPI DMA handling


  • ASoC: add es7134 DAC driver and bindings
  • Enhancements to the DW-HDMI bridge driver