Linux mainlining effort

The purpose of this page is to try and define sub-goals and milestones for the mainlining effort, containing goals and sub-goals with milestones for adding Allwinner support in the upstream mainline Linux Kernel.

It is very important to note that this is intended as a rough set of minimal goals - it is not meant to collide with the huge effort of rewriting major drivers!

=Overview= The idea is to submit the code needed to run the Linux kernel on Allwinner SoCs upstream, ie. to the official Linux kernel.

This can be achieved by following the concept outlined in the Your new ARM SoC Linux support check-list! article published by Thomas Petazzoni from Free Electrons.

Where relevant, I have attempted to include who is currently working on an item, mostly separate from any particular mainlining goal.

=Status=

The Mainline Kernel howto contains the currently used repositories for the mainlining process. The U-Boot repository and toolchain is described in the Mainline U-Boot howto.

The Mainline Kernel category  gives an overview of currently supported devices.

Status Matrix
The goal of this matrix is to give an easy view of work on each SoC worked on by linux-sunxi.

Core Stuff

 * A13 PSCI Suspend / Resume / CPUIdle (WiP: Antoine Tenart) patch-v1


 * Allwinner A80 support
 * SMP support (WiP: Chen-Yu Tsai (wens)) patch-rfc


 * Allwinner A83T support
 * Clock-ng support (WiP: Chen-Yu Tsai (wens)) patch
 * Modern Clock (clock-ng) support (WiP: Jean-Francois Moine) patch-v2
 * Clocks, r_pio, MMC and RSB support (WiP: Vishnu Patekar) patch-v4
 * USB support (WiP: Chen-Yu Tsai (wens))


 * Allwinner R40 support - (WiP: Icenowy Zheng) patch-v1/rfc


 * Clock-ng support for A10/A20 (WIP: Priit Laes (plaes)) sunxi-ccu patch-v2

Major drivers

 * A13 Cedrus Video Decoder driver (WiP: Florent (kido) Revest) patch-v1 dedicated wiki page


 * Audio codec support:
 * A20 Audio Codec improvements (WiP: Danny Milosavljevic) patch-v9


 * Display Engine driver
 * sun4i (A10) LVDS support (WiP: Priit Laes (plaes)) patch-v1
 * sun8i (A64, A83T, H3) Display Engine (v2) support, HDMI support (WiP: Jean-Francois Moine) patch-v7, current work for V3s (Icenowy Zheng) patch-v1
 * HDMI Controller (A10/A10s/A20/A31), (WiP: Maxime Ripard (mripard)) patch-v1


 * CSI (camera sensor interface) (WiP: Yassin Jaffer (ddc)) (WiP: Maxime Ripard (mripard))
 * CSI clock driver (WiP: Yassin Jaffer (ddc)) patch-RFC (use clock-ng instead)


 * dwmac-sun8i (H3/H5/A64/A83T) support (WiP: LABBE Corentin) (previoulsy named sun8i-emac) v2


 * Security System/Crypto Engine
 * sun8i-ss/sun9i-ss/sun5i-ss (WIP: LABBE Corentin more info at http://sunxi.montjoie.ovh/)
 * hwrng driver (WiP: Corentin (Montjoie) Labbe) patch-v1


 * A80 related (WiP: Chen-Yu Tsai (wens))
 * GMAC

Minor drivers

 * sun6i (A31/A31s) PWM support (WiP: Siarhei Volkau) patch-v1
 * AXP20x/AXP22x Power Supply driver (WiP: Quentin Schulz) patch-v4
 * H3 and A64 SID controller (WiP: Icenowy Zheng) patch-v3
 * H3/sun8i
 * THS (WiP: Icenowy Zheng) RFC patch
 * DVFS support (WiP: Ondřej Jirman - megi) patch-v1 - this is also available in these orange-pi-4.x branches
 * Simplefb dtb entry (wip: Icenowy Zheng) sample-patch requires uboot-h3-hdmi
 * Keypad (WiP: Yassin Jaffer (ddc)) patch
 * hardware spinlock (H3/A83) (WIP: LABBE Corentin)

Easy Tasks
Following drivers should be doable by someone with no or a small kernel development experience:
 * One Wire / 1-Wire (dedicated HW only present on A31/A80)
 * Smart Card Reader
 * A23/A33 Thermal Sensor Controller

Medium and Difficult Tasks
These drivers require some good knowledge of the kernel internals, plus a good experience with such piece of hardware.
 * Audio Related drivers
 * Audio Decoding Engine (Only exists in A10)
 * V4L driver for G2D/Mixer is based on samsung g2d and fimc driver. Only initial work started.

Troublesome

 * Memory Stick (missing hardware?)
 * TV Decoder (Analog in, no existing driver, no datasheet)
 * Transport Stream (DVB)
 * PATA (old tech, while still interesting for Compact Flash, possibly removed from A20, though A20 memory map still mentions it)
 * GPS backend IP (only present on A10, not much interesting, as all modern GPS receivers have MCU with UART output, no documentation)
 * Ac200: No datasheet, at least the ephy part seems to work in "generic PHY" mode

Unlikely
These are too far off the track third party drivers making it unlikely they will ever get accepted mainline.


 * Mali driver

Related but separate

 * Device-specific drivers

Planned for 4.12

 * H3
 * USB OTG support


 * H5
 * New SoC variant, similar to H3, but ARM64 with Cortex-A53 cores.
 * pinctrl driver
 * CCU (sunxi-ng) driver
 * USB OTG support

Added board support: FriendlyARM NanoPi NEO Air, Xunlong Orange Pi PC 2

Merged for 4.11

 * A23
 * Audio codec device tree changes


 * A31
 * SPDIF output support


 * A33
 * cpufreq support
 * Audio codec support


 * A64
 * MMC Support
 * USB support


 * A80
 * sunxi-ng style clock support


 * H2+
 * New SoC variant, similar to H3


 * H3
 * Audio codec device tree changes
 * SPDIF output support


 * V3s
 * New SoC support
 * USB PHY driver
 * pinctrl driver
 * CCU driver

Added board support: LicheePi One, Xunlong Orange Pi Zero, LicheePi Zero, Sinovoip Banana Pi M64

Merged in 4.10

 * A23
 * Audio Codec driver


 * A31/A31s
 * Display Driver (first pipeline)
 * Audio Codec support


 * A64
 * Clock driver


 * A80
 * External SDIO WiFi


 * H3
 * Audio Codec driver
 * SPI

Added board support: NextThingCo CHIP Pro, Pine64, FriendlyARM NanoPi M1

Merged into 4.9

 * GR8
 * SoC Support


 * AXP209
 * GPIO support


 * A31
 * SPDIF support


 * A23/A33
 * sunxi-ng CCU driver


 * A31/A31s
 * sunxi-ng CCU driver


 * A33
 * Display Driver


 * A64
 * USB PHY support


 * H3
 * PWM support
 * I2C support


 * AXP806 PMIC
 * regulator support


 * AC100 RTC / codec IC
 * mfd driver
 * RTC driver

Added board support: Orange Pi PC Plus, Olimex A33-OLinuXino, Xunlong Orange Pi Lite, Inet q972, Empire Electronix M712, Xunlong Orange Pi Plus 2, Xunlong Orange Pi Plus 2E, FriendlyARM NanoPi NEO,

Merged into 4.8

 * A10/A20
 * Display engine clocks (TCON, FE, DE)
 * I2S audio interface driver


 * H3
 * Clocks (through sunxi-ng)
 * USB multi-reset lines support
 * AXP2xx driver:
 * External drivebus support
 * AXP223 USB power supply support
 * AXP809 PMIC support


 * BCM53125 support
 * This switch is used in Lamobo / Banana Pi R1

Merged into 4.7

 * A13/R8
 * Display Engine support


 * A10/A20
 * SPDIF Support


 * A31/A23/H3 DMAengine improvements for H3 audio support (WiP: Jean-Francois Moine) patch-v6


 * H3
 * USB support (multi-reset line support delayed til 4.8)

Added board support: Dserve DSRV9703C, Polaroid MID2809PXE4, colorfly e708 q1, Difrence DIT4350

Merged into 4.6



 * Allwinner A83T support
 * Initial bringup
 * timer, watchdog and reboot


 * H3
 * R_PIO support


 * A64
 * pinctrl driver
 * generic arm64 Allwinner platform (ARCH_SUNXI) support


 * NAND
 * ECC layout definition rework (partially) and randomizer support


 * A10/A20 SPDIF driver


 * AXP223 PMIC support


 * eMMC HS-DDR support for all currently supported SoCs except A80

Added board support: Allwinner A83TDevBoard, Cubietech Cubietruck Plus

Merged into 4.5

 * Allwinner A80 support
 * IR receiver driver
 * NMI controller
 * PRCM driver
 * R_PIO support
 * RSB driver


 * Allwinner H3 SoC support
 * H3 USB PHY clocks


 * A10/A20 Video Engine clocks


 * MIC1 capture for sun4i codec


 * Audio codec enabled on various boards

Added board support: Xunlong Orange Pi Plus

A quick fix is to revert commit 88f8b1b which introduced the regression. See http://lists.infradead.org/pipermail/linux-arm-kernel/2016-March/415939.html, https://www.mail-archive.com/netdev@vger.kernel.org/msg104119.html, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823493. Version v4.5-rc7 is known to be still okay, v4.6-rc2 fixes stmmac again.

Merged into 4.4

 * R8 SoC support


 * A10 / A20
 * CAN driver (commit)


 * A10 / A10s / A13 / A20
 * Audio Codec driver
 * Audio clocks (PLL2)
 * Audio codec related DTS bits
 * Enabled on Cubieboard, Cubieboard2, Cubietruck, C.H.I.P., Mele A1000


 * A23 / A33
 * RSB (Reduced Serial Bus) driver
 * PWM enabled


 * A83T
 * PIO driver


 * AXP202/AXP209
 * USB power supply driver
 * Support for OTG vbus detection via AXP pmic
 * DTS nodes for OTG vbus support

Added board support: Olimex A20 EVB (commit), Unified Q8 format tablet, Wits Pro A20 DKT (commit), Yones Toptech bs1078v2 (commit), Wobo i5 (commit), C.H.I.P (commit), Sinlinx SinA31s, MSI Primo81 (commit)

Merged into 4.3

 * A10 / A13 / A20 / A23 / A31
 * Enable OTG controller (commit)


 * A10 / A10s / A13 / A20
 * Support for DMA engine


 * A23 / A33
 * Support for USB-controllers


 * most of Allwinner SoC
 * Support for Security System (commit)


 * AXP152
 * AXP152 mfd support

Added board support: Iteaduino Plus A10, Ippo-q8h-a33 v1.2

Merged into 4.2

 * A10 / A10s / A13 / A20 / A31 / A23
 * SRAM Controller


 * A23
 * SMP support (commit)
 * Architected timer support


 * A31/A31s
 * CPUFreq support


 * A33
 * Machine support (commit)
 * Bring-up sharing most drivers with A23
 * pinctl driver (commit)
 * PIO controller (commit)


 * A80
 * Architected timer support
 * USB support


 * AXP221 PMIC driver


 * H3
 * Introduce H3 support (commit)
 * DMA Controller (commit)

Added board support: LinkSprite pcDuino3 Nano, Cubietech Cubieboard4, Gemei G9, Auxtek T004, Utoo P66, Wexler TAB 7200, MK808C, Jesurun Q5, Xunlong Orange Pi, Xunlong Orange Pi Mini, Sinlinx SinA33

Merged into 4.1

 * A80
 * USB PHY driver


 * AXP202/AXP209
 * DT bindings

Merged into 4.0

 * A10 / A20
 * PS/2 Controller


 * A13 / A31
 * IR receiver


 * A31s
 * bring-up sharing majority of drivers with A31
 * pinctrl driver


 * A80
 * MMC


 * All SoCs
 * LRADC Input driver
 * CPUFreq
 * PWM Driver


 * AXP209 power button input driver

Added board support: CSQ CS908, LeMaker Banana Pro, Chuwi V7 CW0825, Rikomagic mk802, Rikomagic mk802ii, Rikomagic mk802_a10s, MarsBoard A10, Hyundai A7HD

Merged into 3.19

 * A10 / A10s / A13 / A20 / A31 / A23
 * Simple Framebuffer
 * In order to use that, you'll need a recent mainline u-boot (2015.01+)
 * USB phy driver support for usb0


 * A10 / A20
 * NAND
 * Only works for SLC NAND for now
 * Some additional work is needed for MLC NANDs


 * A23
 * DMAengine driver (shared with A31)


 * A80
 * initial machine support
 * basic clocks and reset
 * pinctrl driver
 * extra UART, I2C, LEDS

Related merges: sunxi-simplefb-for-3.19

Added board support: Mele M3, LeMaker Banana Pi, Merrii A80 Optimus Board, Olimex A20-OLinuXino-Lime2

Merged into 3.18

 * A31/A23
 * RTC
 * Watchdog


 * A23
 * MMC
 * pinctrl
 * DMA
 * I2C

Added board support: Olimex A20-OLinuXino-Lime, Merrii Hummingbird A20, HSG H702

Merged into 3.17

 * A10/A20
 * IR driver


 * A31
 * PIO/R_PIO external interrupts
 * DMAengine
 * GMAC


 * A23
 * Timers, UARTs, initial bringup
 * Basic clocks
 * PIO/R_PIO drivers

Related merges: clk-for-linus-3.17, mfd-for-linus-3.17, pinctrl-v3.17-1, soc-for-3.17, dt-for-3.17, slave-dma for-linus, v4l_for_linus,

Added Board Support: Merrii Hummingbird A31, BA10, LinkSprite pcDuino V3, Ippo q8h

Merged into 3.16

 * AXP20x regulator support


 * All
 * MMC support


 * A31
 * USB support
 * PRCM
 * SMBus Regmap
 * Special Pins Muxer
 * P2WI Controller


 * A10
 * Touchscreen controller
 * Touchscreen controller temperature sensor

Related Merges:

defconfig-for-3.16, drivers-for-3.16, dt-for-3.16, soc-for-3.16, usb-3.16-rc1, pinctrl-v3.16-1, clk-for-linus-3.16, clk-for-linus-3.16-part2, mmc-updates-for-3.16-rc1, mfd-for-linus-3.16, regulator-v3.16, input-for-linus

Added board support: Mele M9, R7

Merged into 3.15

 * All SoCs
 * SPI
 * A10/A10s/A13/A20
 * OHCI
 * EHCI
 * A10/A20
 * AHCI
 * A20/A31
 * NMI controller
 * A20
 * GMAC
 * A31
 * I2C

Related merges:, , , , , ,

Added board support: LinkSprite_pcDuino, Inet 97f, A10-OLinuXino-LIME

Merged into 3.14

 * A31
 * Reset Controller Support
 * SMP
 * A20
 * SMP (via PSCI)
 * External clock outputs
 * High Speed Timers
 * RTC driver (A10/A20) (commit)
 * RTP (DT only)
 * GMAC support in stmmac driver
 * AP6210 WiFi (BCM43362) support in brcmfmac driver

Related merges:, , , ,

Added board support: Olimex A13-OLinuXino-Micro (commit)

Merged into 3.13

 * SID Driver
 * I2C for A20
 * sunxi_defconfig
 * Bug fixes

Added board support: Cubietruck

Merged into 3.12

 * A31 support
 * Basic SoC + GPIO
 * Clock support
 * A20 support
 * Basic SoC + GPIO
 * Clock support
 * A10s clocks
 * Clock Source and Clock Event rework
 * Watchdog driver

Related merges:, , , , ,

Added board support: A31 EVB, A20-OLinuXino-Micro, Cubieboard2, Mele A1000

Merged into 3.11

 * IRQ support for the PIO
 * I2C Driver
 * EMAC Driver
 * A10s support

Related merges:, , , , ,

Added board support: Olimex A10s-OLinuXino-Micro

Merged into 3.10

 * LED support
 * Clock driver
 * Complete UART support

Related merges:, ,

Added Board Support: Pineriver_H24

Merged into 3.9

 * PINCTRL driver
 * GPIO-lib based driver

Related merges:

Added Board Support: Miniand_Hackberry

Merged into 3.8

 * Initial support for Allwinner SoCs (commit)
 * Timer (commit)
 * UART
 * Device Tree
 * Interrupt controller (commit)

Related merges: ,

Added board support: Cubieboard, A13-OLinuXino

=References=

= See also =
 * Mainline Kernel Howto
 * Possible setups for hacking on mainline
 * Linux Kernel
 * Toolchain

=External Links=
 * kernel.org - Official website for the Linux Kernel
 * http://github.com/torvalds/linux - Linus Torvalds' GitHub account with the upstream Linux kernel
 * Linux Kernel documentation index
 * Linux Kernel man pages
 * Kernel Newbies Site - Excellent source of information for people new to kernel
 * Linus' kernel tree for 2.6
 * Kernel bugzilla - Regressions for each of recent versions
 * Linux-libre project - Maintains and distributes fully free kernel
 * LinGrok, Linux kernel source code cross-reference
 * Free Electrons LXR (Linux Cross Reference)
 * linux-arm-kernel - Mailing list archive

How to upstream

 * Your new ARM SoC Linux support check-list! by Thomas Petazzoni of Free Electrons
 * Linux Kernel Upstreaming How-To (CNXSoft - Embedded Software Development)
 * Matt Porter's YouTube video talk on “Upstreaming 101" (LCA14-111)
 * Matt Porter's presentation slides for “Upstreaming 101" (LCA14-111)
 * Matt Porter's YouTube video talk on “Upstreaming 201" (LCA14-112)
 * Matt Porter's presentation slides for “Upstreaming 201" (LCA14-112)
 * How to Write and Submit a Linux Kernel Patch (CNXSoft - Embedded Software Development)
 * YouTube Video- Write and Submit your first Linux kernel Patch
 * Greg Kroah-­Hartman Kernel Tutorial Write and Submit your first Linux Kernel Patch
 * Linaro resources page from LCA (Linaro Connect Asia) 2014

=Notes=