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-v1


 * Allwinner H6 support
 * Pinctrl (WIP: Icenowy Zheng) patch-v1

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
 * AC100 Audio codec support (WiP: Ondrej Jirma (megi)) WIP branch


 * Display Engine driver
 * LVDS support (WiP: Priit Laes (plaes)) patch-v1 (WiP: Maxime Ripard (mripard)) patch-v1
 * HDMI Controller (H3), (WiP: Jernej Skrabec (jernejsk)) WIP branch
 * MIPI DSI support (A33/R16), (WiP: Maxime Ripard (mripard)) patch-v1


 * CSI (camera sensor interface) (WiP: Yassin Jaffer (ddc)) (WiP: Maxime Ripard (mripard))
 * V3s CSI driver (WiP: Yong Deng) patch-rfc
 * A83T CSI driver (WiP: Ondrej Jirman) (based on V3s driver and unified fwnode endpoint parser)


 * Ethernet support
 * A80 (WiP: Chen-Yu Tsai (wens))
 * A83T (WiP: Chen-Yu Tsai (wens)) wip-branch (WiP: Corentin Labbe (montjoie)) patch-v2


 * Security System/Crypto Engine
 * sun8i-ss/sun9i-ss/sun5i-ss (WIP: LABBE Corentin more info at http://sunxi.montjoie.ovh/)


 * ARM Mali400
 * Lima DRM driver (WiP: Qiang Yu (yuq)), mesa-lima (open source) (WiP: Qiang Yu (yuq))
 * Mali kernel driver (WiP: Maxime Ripard (mripard)), Mali userspace driver (closed source)

Minor drivers

 * sun6i (A31/A31s) PWM support (WiP: Siarhei Volkau) patch-v1
 * H3 and A64 SID controller (WiP: Icenowy Zheng) patch-v3
 * H3/sun8i
 * THS (WiP: Icenowy Zheng) patch-v4
 * 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) (A64)
 * Keypad (WiP: Yassin Jaffer (ddc)) patch
 * hardware spinlock (H3/A83T) (WIP: LABBE Corentin)
 * A83T IR driver (WIP: Philipp Rossak (embed-3d) patch-v3)
 * A83T Thermal driver (WIP: Philipp Rossak (embed-3d))
 * CPUfreq for H3,H5, A83T (WIP: Philipp Rossak (embed-3d))

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

Medium and Difficult Tasks
These drivers require some good knowledge of the kernel internals, plus a good experience with such piece of hardware.
 * 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

Planned for 4.16
Drivers:
 * DE2 (multi-plane support, HW scaling)
 * H3/H5
 * SimpleFB support

New boards supported:
 * Xunlong Orange Pi R1

Planned for 4.15
Drivers:
 * A10/A20/A31
 * display
 * HDMI controller
 * sunxi-ng clocks
 * audio PLL sigma-delta modulation support for accurate audio playback
 * A33
 * Audio codec fixes
 * A64
 * DMA controller

Device tree changes:
 * SoC specific
 * A10/A20
 * CCU sunxi-ng style clock conversion
 * Display pipeline
 * HDMI controller
 * A31
 * HDMI controller
 * I2S controllers
 * A64
 * DMA controller
 * EMAC
 * SPI
 * H3/H5
 * EMAC
 * R40
 * Basic dtsi


 * Board specific
 * IR receiver for FriendlyARM NanoPi M1
 * WiFi, BT and IR receiver for FriendlyARM Nanopi M1 Plus
 * HDMI enabled on Merrii Hummingbird A31, Sinlinx SinA31s, MSI Primo81, Cubietech Cubieboard, Cubietech Cubieboard2, Cubietech Cubietruck, Banana Pi M1+, Olimex A10-OLinuXino-Lime, Olimex A20-OLinuXino-Lime, Olimex A20-OLinuXino-Lime2, Olimex A20-OLinuXino-Micro
 * ACIN and Battery power supplies enabled on Lamobo R1 and A13 reference design tablets
 * AXP803 PMIC regulators and WiFi enabled for Allwinner A83TDevBoard, Banana Pi M3, Cubietech Cubietruck Plus
 * AXP803 PMIC regulators and USB OTG enabled for TBS A711
 * EMAC re-enabled for various A64/H3/H5 boards


 * Cleanups
 * Removal of GPIO pinmux settings for A10 and A80

New boards supported:
 * TBS A711
 * FriendlyARM NanoPi NEO Plus2
 * Olimex A20-OLinuXino-Micro eMMC variant
 * Banana Pi M2 Ultra
 * Banana Pi M2 Berry

Merged into 4.14
Drivers:


 * A10s
 * HDMI DDC I2C Adapter
 * HDMI CEC support
 * most of Allwinner SoC
 * sun4i-ss SecuritySystem PRNG driver
 * A10/A20
 * CCU Clock-ng support
 * A10/A20/A31/A33/H3
 * MUSB fixes (commit) (commit)
 * A64
 * SRAM controller driver
 * A83T
 * SD/MMC support
 * AXP813 PMIC
 * USB support
 * H3
 * I2S support
 * R40
 * CCU sunxi-ng style clock driver support
 * pinctrl support


 * AXP PMICs
 * PEK time fix for AXP22x

Device tree changes:
 * SoC specific
 * A83T / A64
 * R_INTC interrupt controller
 * A83T
 * RSB support
 * SD/MMC support
 * AXP813 PMIC and codec
 * USB host support


 * Board specific
 * AXP803 basic support and regulators for Pine64 and SoPine
 * USB and WiFi enabled for Sinovoip Banana Pi M64
 * Ethernet for Beelink X2
 * USB OTG for Beelink X2
 * SD/MMC for Cubietech Cubietruck Plus and Allwinner A83TDevBoard
 * AXP813 PMIC for Cubietech Cubietruck Plus and Allwinner A83TDevBoard
 * AC100 chip for Cubietech Cubietruck Plus and Allwinner A83TDevBoard
 * USB hosts for Cubietech Cubietruck Plus and Allwinner A83TDevBoard

New boards supported:


 * Sinovoip Banana Pi M2 Magic
 * Olimex A64-OLinuXino
 * FriendlyARM NanoPi A64
 * Sinovoip Banana Pi M3

Merged into 4.13
Drivers:


 * A10s
 * HDMI support


 * V3s
 * Clock driver for Display Engine 2.0
 * DRM/KMS display driver support for Display Engine 2.0
 * codec support


 * A64 / A83T / H2+ / H3 / H5
 * dwmac-sun8i ethernet driver Unfinished due to unstable DT binding


 * A83T
 * Clock driver

Device tree changes:


 * SoC Specific
 * LRADC, MMC1, SPI, Display Engine 2.0 for V3s


 * Board Specific
 * Enable AXP PMIC battery support on NextThingCo CHIP, Sinlinx SinA33
 * Enable USB OTG on Banana Pi M2+, Orange Pi PC, Orange Pi PC Plus, Orange Pi Plus 2E
 * Enable dedicated USB hosts for USB OTG on Pine64
 * Enable dwmac-sun8i for Ethernet on various boards Removed due to unstable DT binding

Added board support: FriendlyARM NanoPi NEO2, Xunlong Orange Pi Prime, LicheePi Zero dock board

Merged into 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


 * A31/H3 SPI
 * Support transfers larger than 64 bytes


 * AXP PMICs
 * AXP803 basic support
 * ACIN Power Supply driver
 * ADC IIO driver
 * Battery Power Supply driver

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

Merged into 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 into 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.

Changes merged up to 4.4
Changes up to 4.4 can be found on Linux mainlining history page.

=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=