Bootlin at Kernel Recipes 2014

Kernel RecipesThe Kernel Recipes conference is holding its third edition next week in Paris, on September 25th and 26th. With speakers like Greg Kroah-Hartmann, Hans Peter Anvin, Martin Peres, Hans Verkuil or Jean Delvare and many others, it is going to be a very interesting kernel-oriented conference.

Bootlin will participate to this conference, as our engineer Maxime Ripard will give a talk about Supporting a new ARM platform: the Allwinner example, and Maxime will be attending the event on both days.

Also, Bootlin’sCEO Michael Opdenacker will be attending the conference as well.

A good opportunity to meet Bootlin folks, and discuss business or career opportunities! We are always interested in getting to know more engineers with embedded Linux or Linux kernel knowledge to join our engineering team, so do not hesitate to meet us during the conference, or contact us ahead of time to plan a discussion. If you don’t have a seat yet, unfortunately the conference is fully booked, but meeting in the area is possible too.

Bootlin at the Embedded Linux Conference Europe

DüsseldorfThe Embedded Linux Conference Europe will take place on October 13-15 in Düsseldorf, Germany. As usual, a large part of the Bootlin engineering team will participate to the conference, with no less than 7 engineers: Alexandre Belloni, Boris Brezillon, Grégory Clement, Michael Opdenacker, Thomas Petazzoni, Maxime Ripard and Antoine Ténart.

Several of our talk proposals have been accepted, so we’ll be presenting about the following topics:

In addition to this participation to the Embedded Linux Conference Europe:

  • Many of us will also participate to the Linux Plumbers conference, on October 15-17. It’s another great opportunity to talk about topics around real-time, power management, storage, multimedia, and more.
  • Thomas Petazzoni will participate to the next Buildroot Developers Meeting.

As usual, we’re looking forward to this event! Do not hesitate to get in touch with us if you’re interested in meeting us during these events for specific discussions.

Linux 3.16 released, Bootlin 7th contributing company

Linus Torvalds has released the 3.16 kernel a few weeks ago. Unfortunately, the KernelNewbies LinuxChanges page has not been updated, but LWN.net summaries of the merge window (part 1, part 2 and final part) give a good summary of the important changes available in Linux 3.16.

On Bootlin’sside, 3.16 has been our most active kernel cycle ever: we have merged 388 patches in this cycle, making Bootlin the 7th company contributing to the Linux kernel by number of patches according to the statistics. Bootlin is ranked right after Texas Instruments, and before Novell, Renesas or Google. (Note that the statistics rank Bootlin as 9th, but this includes the “Unknown” and “Hobbyists” categories which are not companies). This strong participation clearly shows Bootlin’sability to get code merged in the mainline Linux kernel, as we’ve progressively done since kernel 3.6 over the last two years.

We are therefore available to help companies willing to add support for their hardware (processor, system-on-chip, module, or board) to the mainline Linux kernel. Do not hesitate to contact to get the discussion started.

Our major contributions have again been focused on the support of various ARM processor families:

  • On the Atmel SoC family
    • Conversion of the SAM9RL processor to the Device Tree. Done by Alexandre Belloni.
    • Huge cleanup of ADC/touchscreen handling: improvements in the IIO at91_adc driver to support more SoC families, and conversions of several Atmel platforms to use this driver, and then finally removal of the old atmel_tsadcc driver. Done by Alexandre Belloni.
    • Numerous fixes to the clock handling on various SoCs, following their conversion to the Common Clock Framework. Done by Alexandre Belloni.
    • Conversion of the SAM9RL, SAM9x5 and SAM9n12 SoCs to the Common Clock Framework. Done by Boris Brezillon.
    • Boris Brezillon is now one of the official maintainers for AT91 clock support.
  • On the Allwinner SoC family
    • Addition of PWM support to sun4i and sun7i. Done by Alexandre Belloni.
    • Addition of SMBus support to the regmap subsystem. This was needed to support the P2WI bus of Allwinner A31. Done by Boris Brezillon.
    • New I2C driver for the P2WI bus of Allwinner A31, used to communicate with the PMIC. Done by Boris Brezillon.
    • Improvements to the Allwinner pinctrl driver needed to support the P2WI bus. Done by Boris Brezillon.
    • Addition of a driver for the PRCM (Power, Reset and Clock Management) unit of the Allwinner A31. Done by Boris Brezillon.
    • Numerous cleanups of the pinctrl driver for Allwinner. Done by Maxime Ripard.
    • Addition of the ARM PMU description in the Device Tree of Allwinner platforms. Done by Maxime Ripard.
    • Add USB support for Allwinner A31. Done by Maxime Ripard, with some help from Boris Brezillon.
    • Various improvements to Allwinner clock drivers. Done by Maxime Ripard.
  • On the Marvell Berlin SoC family
    • Addition of basic Device Tree descriptions for several Marvell Berlin processors and boards. Done by Antoine Ténart.
    • Addition of clock drivers and DT clock descriptions of the Marvell Berlin processors. Done by Alexandre Belloni.
    • Addition of the pinctrl drivers for the Marvell Berlin processors. Done by Antoine Ténart.
    • Enabling of SDHCI and GPIO support on Marvell Berlin. Done by Antoine Ténart.
  • On the Marvell EBU SoC family
    • Addition of watchdog support for Armada 375 and Armada 38x, which required some changes to the existing watchdog driver. Done by Ezequiel Garcia.
    • Addition of thermal support for Armada 375 and Armada 38x, which required some changes in the existing armada_thermal driver. Done by Ezequiel Garcia.
    • Improvements of the pxa3xx_nand driver used for NAND support on Armada 370/375/38x/XP to use the newly introduced ECC strength and step size Device Tree bindings, which allows from the Device Tree to override the ECC constraints described by ONFI, when needed to match the bootloader constraints. Done by Ezequiel Garcia.
    • Addition of a generic software TSO (TCP Segmentation Offload) layer, and the corresponding changes to enable this feature in the mv643xx_eth and mvneta network drivers. This gives a huge performance boost in transmit operations! Done by Ezequiel Garcia.
    • SMP support for Armada 375 and Armada 38x has been added. Done by Grégory Clement.
    • cpuidle support for Armada XP has been added. Done by Grégory Clement.
    • USB support (USB2 and USB3) for Armada 375 and Armada 38x has been added. Done by Grégory Clement.
    • Hardware I/O coherency support for Armada 375 and Armada 38x. Done by Thomas Petazzoni.
    • Enabling of the SDHCI and AHCI interfaces on Armada 38x. Done by Thomas Petazzoni.
    • Major clean-up of Marvell Orion5x support. This is an older ARMv5 family of processors from Marvell, having a lot of similarities with Kirkwood and more recent Armada. This cleanup include many Device Tree conversions, up to the point where a few Marvell Orion5x platforms can now be fully described using a Device Tree, with no board file. Done by Thomas Petazzoni.
    • Addition of a new Device Tree binding for fixed network links, i.e links that do not use a MDIO-controlled PHY. This involved both some generic PHY layer improvements, and corresponding changes in the Marvell-specific mvneta network driver. Done by Thomas Petazzoni.
    • Addition of a work-around for a relatively complex PCIe/L2 errata affecting Armada 375/38x, which fixes heavy PCIe traffic when the system is running with hardware I/O coherency enabled. Done by Thomas Petazzoni.

Here is the complete list of patches from Bootlin merged into the 3.16 kernel:

Marvell publishes the datasheet of the Armada XP processor

thumb-armada-xpA bit more than a month after publishing the datasheet of the Armada 370 processor, Marvell has now released a similar datasheet for the more powerful Armada XP processor. The datasheet is available as a PDF document, with no registration, at http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf, with a link to it clearly visible on the Armada XP product page.

As most of our readers probably know, Bootlin has been working and continues to work significantly on the Linux kernel support for Marvell processors. Thanks to this work done for more than two years now, the mainline Linux kernel has pretty good support for the Armada XP processor. This processor is a nice monster: up to 4 cores (PJ4B cores, which are roughly equivalent to Cortex-A9 but with LPAE support), up to 10 PCIe interfaces, multiple SATA interfaces, up to four Gigabit network interfaces, and many, many other things (XOR engine, cryptographic engine, etc.). Many of the processor features are already supported in mainline, and lately we’ve been focusing on power management features: cpuidle support for Armada XP will be part of 3.16, cpufreq support will either be part of 3.17 or 3.18, and suspend/resume should hopefully be part of 3.18.

The Armada XP processor is used in publicly available products:

At Bootlin, we are again really happy to see Marvell opening this datasheet, as it will allow all community developers to further improve support for this processor in the Linux kernel, but also in other open-source projects.

Linux 3.15 released, an overview of Bootlin contributions

The 3.15 of the Linux kernel was released just a few days ago by Linus Torvalds. As explained by LWN.net, the headline features in 3.15 include some significant memory management improvements, the renameat2() system call, file-private POSIX locks, a new device mapper target called dm-era, faster resume from suspend, and more. One can also read the coverage by LWN.net of the first part and the second part of the merge window to get more details about the major new features in this release.

As usual, Bootlin contributed to the Linux kernel during this 3.15 cycle, and with a total of 218 patches contributed, it’s a new record for Bootlin. According to the KPS statistics, Bootlin ranked #12 in the list of companies contributing to the Linux kernel for the 3.15 kernel (if you exclude the “Unknown” and “Hobbyists” categories, which aren’t really companies).

The main features contributed by Bootlin again centered around the support for ARM processors:

  • By far, the largest contribution this cycle was the initial support for the new Armada 375 and Armada 38x processors from Marvell. Gregory Clement, Ezequiel Garcia and Thomas Petazzoni have been working on the code to support these processors since a few months ago, and started pushing the patches to the public in February this year. For the Marvell Armada 38x processor, it means that the code was pushed in mainline even before the processor was announced publicly! The features supported in 3.15 for these processors are: interrupts, GPIO, clocks, pin-muxing, serial, I2C, SPI, timer, L2 cache, SDIO (only for 375), SATA (only 375), XOR, PCIe, MBus, networking (only for 38x), NOR and NAND support. Many other features such as SMP, I/O coherency and various other peripherals will be supported in 3.16.
  • Convert support for the Atmel AT91SAM9RL processor to the Device Tree, done by Alexandre Belloni.
  • Addition of iio-hwmon to the Freescale i.MX23 and i.MX28 processors, which allows to use the internal temperature sensor of the processor. Done by Alexandre Belloni.
  • Multiple fixes and improvements to the AT91 ADC support. Done by Alexandre Belloni.
  • Support for the watchdog in Armada 370 and Armada XP was added, done by Ezequiel Garcia.
  • A driver for the SPI controller found in Allwinner A31 SoC was added, as well as all the Device Tree information to describe this controller and related clocks. Done by Maxime Ripard.
  • Support for the I2C controller found in the Allwinner A31 SoC was added into the existing mv64xxx-i2c driver, as well as the necessary Device Tree information to use I2C on this SoC. Done by Maxime Ripard.
  • Audio support was enabled on the Armada 370 SoC, re-using existing code for Kirkwood, and therefore making audio work on the Armada 370 DB platform. Done by Thomas Petazzoni.
  • A number of issues in the PCIe support for Marvell processors have been fixed, thanks to the reports from a number of users. Done by Thomas Petazzoni, with help from these users.

We also contributed other things than just support for ARM processors:

  • The main contribution in this area is the addition of UBI block, a driver that allows to use read-only block filesystems such as squashfs on top of a UBI volume. The code was originally written by David Wagner who was an intern at Bootlin, and later taken by Ezequiel Garcia who did a lot of additional cleanup work and community discussion to get the driver merged. Some details about this feature can be found in the Linux-MTD documentation.
  • A generic Device Tree binding to express NAND ECC related information in the Device Tree was contributed by Ezequiel Garcia.
  • The quest to remove IRQF_DISABLED continued, by Michael Opdenacker.

In details, all our contributions are:

Marvell publishes the datasheet of the Armada 370 processor

thumb-armada-xpOver the last two years, Bootlin has contributed support for the Marvell Armada 370 and Marvell Armada XP processors to the mainline Linux kernel. These ARM processors are used mainly in Network Attached Storage devices but also in other devices such as printers. Until now the datasheet for these processors was only available for Marvell customers and partners under NDA, but last week, Marvell finally released the datasheet of the Armada 370 publicly, with no restriction, no registration, no NDA. The Armada 370 processor can already be found in several consumer grade products:

From now on, on the Marvell page (broken link removed) related to the Armada 3xx family, the Armada 370 Functional Specification (broken link removed) as well as the Armada 370 Hardware Specifications (broken link removed) can be found. While the Armada XP datasheet is not available at this time, it is worth mentioning that the vast majority of the peripherals are exactly the same between Armada 370 and Armada XP, so even Armada XP users will find useful information in this datasheet.

Bootlin is happy to see that Marvell is making more and more progress towards mainlining their kernel support and opening their datasheets publicly. We strongly believe that the openness of these datasheets will allow hobbyists and developers to improve the support for Armada 370 in the open-source ecosystem, be it in the Linux kernel, in bootloaders like U-Boot or Barebox or even in other projects.

2014 Q2 newsletter

Bootlin is happy to share some news about the latest training and contribution activities of the company.

Linux 3.14 released, Bootlin contributions inside!

Linus Torvalds has just released the 3.14 version of the Linux kernel. As usual, it incorporates a large number of changes, for which a good summary is available on the KernelNewbies site.

This time around, Bootlin is the 19th company contributing to this kernel release, by number of patches, right between Cisco and Renesas. Six of our engineers have contributed to this release: Maxime Ripard, Alexandre Belloni, Ezequiel Garcia, Grégory Clement, Michael Opdenacker and Thomas Petazzoni. In total, they have contributed 121 patches to this kernel release.

  • By far, the largest number of patches are related to the addition of NAND support for the Armada 370 and Armada XP processors. This required a significant effort, done by Ezequiel Garcia, to re-use the existing pxa3xx_nand driver and extend it to cover the specificities of the Armada 370/XP NAND controller. And these specificities were quite complicated, involving a large number of changes to the driver, which all had to also be validated on existing PXA3xx hardware to not introduce any regression.
  • Support for high speed timers on various Allwinner SOCs has been added by Maxime Ripard.
  • Support for the Allwinner reset controller has been implemented by Maxime Ripard.
  • SMP support for the Allwinner A31 SOC was added by Maxime Ripard.
  • A number of small fixes and improvements were made to the AT91 pinctrl driver and the pinctrl subsystem by Alexandre Belloni.
  • Michael Opdenacker continued his quest to finally get rid of the IRQF_DISABLED flag.
  • A number of fixes and improvements were made by Grégory Clement and Thomas Petazzoni on various Armada 370/XP drivers: fix for the I2C controller on certain early Armada XP revisions, fixes to make the Armada 370/XP network driver usable as a module, etc.

In detail, our contributions were:

Bootlin contributions to Linux 3.13

Version 3.13 of the Linux kernel was released by Linus Torvalds on January, 19th 2014. The kernelnewbies.org site has an excellent page that covers the most important improvements and feature additions that this new kernel release brings.

As usual Bootlin contributed to this kernel: with 121 patches merged in 3.13 on a total of 12127 patches contributed, Bootlin is ranked 17th in the list of companies contributing to the Linux kernel. We also appeared on Jonathan Corbet kernel contribution statistics at LWN.net, as a company having contributed 1% of the kernel changes, right between Renesas Electronics and Huawei Technologies.

Amongst the contributions we made for 3.13:

  • Standby support added to the Marvell Kirkwood processors, done by Ezequiel Garcia.
  • Various fixes and improvements to the PXA3xx NAND driver, as well as to the Marvell Armada 370/XP clocks, in preparation to the introduction of NAND support for Armada 370/XP, which will arrive in 3.14. Work done by Ezequiel Garcia.
  • Added support for the Performance Monitoring Unit in the AM33xx Device Tree files, which allows to use perf and oprofile on platforms such as the BeagleBone. Work done by Alexandre Belloni.
  • Support added for the I2C controllers on certain Allwinner SOCs, as well as several other cleanups and minor improvements for these SoCs. Work done by Maxime Ripard.
  • Continued the work to get rid of IRQF_DISABLED, as well as other janitorial tasks such as removing unused Kconfig symbols. Work done by Michael Opdenacker.
  • Added support for MSI (Message Signaled Interrupts) for the Armada 370 and XP SoCs. Work done by Thomas Petazzoni.
  • Added support for the Marvell Matrix board (an Armada XP based platform) and the OpenBlocks A7 (a Kirkwood based platform manufactured by PlatHome). Work done by Thomas Petazzoni.

In detail, the patches contributed by Bootlin are:

Updated version of our kernel driver development course: Device Tree, BeagleBone Black, Wii Nunchuk, and more!

BeagleBone Black connected to the Wii Nunchuk over I2C
In the last few years, the practical labs of our Embedded Linux kernel and driver development training were based on the ARMv5 Calao USB-A9263 platform, and covering the ARM kernel support as it was a few years ago. While we do regularly update our training session materials, with all the changes that occurred in the ARM kernel world over the last two years, it was time to make more radical changes to this training course. This update is now available since last month, and we’ve already successfully given several sessions of this updated course.

The major improvements and updates are:

  • All the practical labs are now done on the highly popular ARMv7 based BeagleBone Black, which offers much more expansion capabilities than the Calao USB-A9263 platform we were using. This also means that participants to our public training sessions keep the BeagleBone Black with them after the session!
  • All the course materials and practical labs were updated to cover and use the Device Tree mechanism. We also for example cover how to configure pin muxing on the BeagleBone Black through the Device Tree.
  • The training course is now centered around the development of two device drivers:
    1. A driver for the Wii Nunchuk. This device is connected over I2C to the BeagleBone Black, and we detail, step by step, how to write a driver that communicates over I2C with the device and then exposes the device functionalities to userspace through the input kernel subsystem.
    2. A minimal driver for the OMAP UART, which we use to illustrate how to interface with memory-mapped devices: mapping I/O registers, accessing them, handling interrupts, putting processes to sleep and waking them up, etc. We expose some minimal functionality of the device to userspace through the misc kernel subsystem. This subsystem is useful to expose the functionalities of non-standard types of devices, such as custom devices implemented inside FPGAs.

And as usual, all the training materials are freely available, under a Creative Commons license, so you can study in detail the contents of the training session. It is also worth mentioning that this training session is taught by Bootlin engineers having practical and visible experience in kernel development, as can be seen in the contributions we made in the latest kernel releases: 3.9, 3.10, 3.11 and 3.12.

For details about cost and registration, see our Training cost and registration page.