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. Check out Linux-tree-diff for a rough idea of the differences.

This can be achieved by following the concept outlined in the Your new ARM SoC Linux support check-list! 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=

Merged into 3.8

 * Timer
 * UART
 * Device Tree
 * Interrupt controller

Related merges: ,

Added board support: Cubieboard, A13-OLinuXino

Merged into 3.9

 * PINCTRL driver
 * GPIO-lib based driver

Related merges:

Added Board Support: Hackberry

Merged into 3.10

 * LED support
 * Clock driver
 * Complete UART support

Related merges:, ,

Added Board Support: Mini X-Plus

Merged into 3.11

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

Related merges:, , , , ,

Added board support: A10S-OLinuXino

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
 * Mele A1000 device tree
 * Watchdog driver

Related merges:, , , , ,

Added board support: A31_EVB, A20-OLinuXino, Cubieboard2, Mele A1000

Merged into 3.13

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

Added board support: Cubietruck

Planned for 3.14

 * A31
 * Reset Controler Support


 * High Speed Timers
 * RTC driver

Core Stuff

 * A31 SMP support (WiP: Maxime Ripard (mripard))

Major drivers

 * DMAengine driver
 * DMAengine driver handles slave dma clients including SPI, EMAC, USB, I2S, HDMI audio, and NAND
 * Implementing slave SG transfers is the priority (for SPI to start), with cyclic transfers (for audio clients) following that
 * Currently in a23 SDK there AW driver for DMAEngine, it should be adapted to device tree, cleaned for mainline


 * SPI driver (WiP: Maxime Ripard (mripard))
 * PIO mode only to start then DMA support via the dmaengine API


 * SDIO Driver (WiP: Maxime Ripard (mripard), Hans De Goede, David Lanzendörfer)
 * SATA Driver (WiP: Oliver Schinagl (oliv3r))
 * AXP209 driver (WiP: Carlo Caione (n01) / arokux)

Minor drivers

 * PWM Driver (WiP: Oliver Schinagl (oliv3r))
 * IR driver (WiP: Alexsey Shestacov (wingrime))
 * Touchpanel driver (WiP: Hans de Goede (hansg))
 * IIO LRADC driver (WiP: Carlo Caione (n01)) Input LRADC driver (WiP: Hans de Goede (hansg))
 * USB EHCI Host Driver (WiP: arokux, see status.)
 * USB OHCI Host Driver (WiP: Hans de Goede (hansg))
 * USB OTG Driver (WiP CHen-Yu Tsai (wens))
 * Ethernet - GMAC driver (WiP: torbenh3, wens) port of the sunxi gmac driver to mainline exists. Upstream driver for the gmac IP is stmmac.
 * Working sunxi extension for stmmac (wens): https://github.com/wens/linux/tree/wip/stmmac-v2


 * Transport Stream (WiP: woprr)
 * Security System (WiP: Montjoie)
 * CAN (WiP: Peter Chen )

Achievable

 * Audio
 * Audio Codec
 * IIS/I2S (Audio transport)
 * SPDIF (Audio transport)
 * AC97 Interface


 * CSI (Camera Input)
 * PS/2 (Keyboard/Mouse)
 * Smart Card Reader
 * Keypad
 * One wire
 * A23(A31?) or higher SoCs


 * Crypto Engine
 * HW PRNG
 * MD5
 * AES

Hard

 * Display
 * TCON (LCD)
 * HDMI
 * TV Encoder (Analog output, VGA, Composite, SVHS)
 * Display engine FE/BE
 * Mixer


 * VPU (See Reverse_Engineering)
 * Video Engine (See Reverse_Engineering)
 * Audio Engine (See Reverse_Engineering)
 * Audio Video Sync

Troublesome

 * Memory Stick (has anybody actually got this hardware connected and a memory stick?)
 * TV Decoder (Analog in, no driver, no datasheet)
 * PATA (Old tech, while still interesting for Compact Flash, possibly removed from A20, though A20 memory map still mentions it)
 * GPS backend IP (Only a10, not much interesting, as all modern GPS recivers have MCU with UART output, no documentation)

DMA dependent drivers

 * NAND MTD driver
 * We can take as a good base the MTD Driver from Quiang Yu. Contact User:Rz2k about how well it works and mainlining.


 * Sound driver

Needing major rework
These drivers need major rework AND lack documentation other than existing source pile.
 * USB Gadget driver
 * It seems to actually be a Mentor Graphics Inventra USB Controller (musb), that already support for it in mainline kernel, so it only needs a thin layer to adapt it to sunxi. Moreover, it's already supporting the PIO mode, so we could avoid relying on DMA to merge it. (Thanks to Arnd Bergmann for noticing)
 * irc user jukivili works on getting this driver to work with sunxi-3.4
 * Status 2013-10-02:
 * OTG requires more work. Mode detection is working, but have not yet figured out how to reset MUSB core and hardware from host-mode to peripheral and other way around.
 * Mode detection/USB-PHY stuff probably needs to be moved to new USB-PHY driver as is done with other MUSB hardware drivers.


 * Display driver (libv, techn also might be interested)

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


 * Mali driver (will not happen unless libv gets a proper lima driver out)

Related but separate

 * Device-specific drivers

=References=

= See also = Linux-tree-diff - list of kernel files modified or added ('+' sign) for allwinner SOCs.

Mainline Kernel Howto

=External Links=
 * Your new ARM SoC Linux support check-list! by Thomas Petazzoni of Free Electrons
 * 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