KernelDriverProjects: Difference between revisions

From RevSpace
Jump to navigation Jump to search
No edit summary
No edit summary
Line 25: Line 25:
* Add regulator nodes to the dts files of all boards with an axp221 pmic, to enable CPU voltage scaling and disable unused regulators
* Add regulator nodes to the dts files of all boards with an axp221 pmic, to enable CPU voltage scaling and disable unused regulators
* Boards: Columbus A31 DKT , Mele A1000G Quad
* Boards: Columbus A31 DKT , Mele A1000G Quad
* Difficulty: Easy
== Add an i2c controller and axp152 child node to boards using an axp152 pmic ==
* Add an i2c controller and axp152 child node to boards using an axp152 pmic, to enable power button and "poweroff" support, see
sun5i-a10s-auxtek-t003.dts for an example
* Boards: Auxtek T004, r7-tv-dongle, a10s-mk802
* Difficulty: Easy
* Difficulty: Easy


Line 41: Line 49:
* Boards: Ippo q8h tablets, ga10h tablets
* Boards: Ippo q8h tablets, ga10h tablets
* Difficulty: Easy/Medium
* Difficulty: Easy/Medium


== Focaltech ft5x touchscreen driver ==
== Focaltech ft5x touchscreen driver ==
Line 88: Line 97:
* Difficulty: Medium
* Difficulty: Medium


== AXP PMIC hwmon driver ==
* The AXP152 / AXP209 / AXP221 / AXP223 PMIC-s all can monitor various voltages and currents (and in some cases temperatures), write and upstream a hwmon driver for this, so that userspace utilities using the hwmon interface can show the readings of these sensors.
* Difficulty: Easy / Medium


== AXP152 PMIC regulator driver ==
== AXP152 PMIC regulator driver ==


* The AXP152 PMIC has several voltage regulators on board. Tdrivers/regulator/axp20x-regulator.c  regulator driver needs to be extended to support the AXP152 so that e.g. CPU voltage scaling can be used to save power on boards with this pmic.
* The AXP152 PMIC has several voltage regulators on board. drivers/regulator/axp20x-regulator.c  regulator driver needs to be extended to support the AXP152 so that e.g. CPU voltage scaling can be used to save power on boards with this pmic.
* Boards: A10s OLinuxIno Micro, mk802-a10s, others
* Boards: A10s OLinuxIno Micro, mk802-a10s, others
* Difficulty: Medium
* Difficulty: Medium
== Add support for peripheral only mode to sunxi musb and usb-phy code ==
* Currently the sunxi musb and usb-phy code support otg and host-only mode, some boards however use the musb controller in peripheral-only mode, add support for this.
* Boards: Auxtek T003
* Difficulty: Easy/Medium




Line 186: Line 207:
* This all needs to be integrated, tested and cleaned-up
* This all needs to be integrated, tested and cleaned-up
* Difficulty: Medium
* Difficulty: Medium
== Convert sunxi u-boot i2c code to the device-model ==
* Convert sunxi u-boot i2c code to the new u-boot device-model. Note this requires taking special care of the UTOO_P66 and Colombus boards which both use a gpio-i2c controller to initialize the LCD screen
* Difficulty: Medium
== Add support for vga out via the chrontel ch7026 parallel lcd to vga bridge chip ==
* Add support for vga out via the chrontel ch7026 parallel lcd to vga bridge chip to the u-boot video code
* Difficulty: Medium / Hard





Revision as of 09:29, 9 August 2015

This page contains Hans' TODO list of kernel driver / u-boot projects.

These projects may also be undertaken by participants of the KernelDriverProgrammingCourse2015.


Open projects

Enable analog audio output on relevant A10/A13/A20 boards

  • Hans' sunxi-wip branch has support for the audio-codec found on the Allwinner A10 / A13 / A20, but this needs to be enabled in devicetree on boards which have an analog audio output. See the cubietruck dts file for an example how to do this.
  • Difficulty: Easy


Add regulator nodes to the dts files of all boards with an axp209 pmic

  • Add regulator nodes to the dts files of all boards with an axp209 pmic, to enable CPU voltage scaling and disable unused regulators
  • Difficulty: Easy


Add regulator nodes to the dts files of all boards with an axp221 pmic

  • Add regulator nodes to the dts files of all boards with an axp221 pmic, to enable CPU voltage scaling and disable unused regulators
  • Boards: Columbus A31 DKT , Mele A1000G Quad
  • Difficulty: Easy


Add an i2c controller and axp152 child node to boards using an axp152 pmic

  • Add an i2c controller and axp152 child node to boards using an axp152 pmic, to enable power button and "poweroff" support, see

sun5i-a10s-auxtek-t003.dts for an example

  • Boards: Auxtek T004, r7-tv-dongle, a10s-mk802
  • Difficulty: Easy


Create dts files for sunxi boards which do not have a dts file yet

  • Create a dts file for the wobo-i5 (including pinmux setting for the emac veing routed to an alternative port), auxtek-t003, uhost-u1a
  • Difficulty: Easy


Silead GSL1680 touchcreen driver

  • Various (cheap) tablets use a gsl1680 touchscreen controller. An userspace driver for this touchscreen is available here. Write a proper kernel driver for this and upstream it.
  • A driver was recently posted for this here, a good approach here would be to first get the userspace driver to work to make sure you've the right firmware, etc. and then try to get the posted driver to work, fixing it up as necessary.
  • Yet another driver is here, the above one is likely a better starting point, but this one may be useful in someway too
  • Boards: Ippo q8h tablets, ga10h tablets
  • Difficulty: Easy/Medium


Focaltech ft5x touchscreen driver

  • Various tablets use a Focaltech ft5x touchscreen controller. A driver is available in various Android kernel sources, see the linux-sunxi wiki touchscreen page. Write a proper kernel driver for this and upstream it.
  • Boards: Wits PRO A20 DKT, Columbus A31 DKT, Chuwi_V7_CW0825 tablet
  • Difficulty: Easy/Medium


Freescale MMA7660 accelerometer driver

  • Various tablets use a Freescale MMA7660 accelerometer. Write a proper kernel driver for this and upstream it.
  • datasheet here
  • Something resembling a kernel driver, which exports both an input and a hwmon interface (which is wrong and should be removed) is available here and also here
  • Boards: Chuwi_V7_CW0825 tablet
  • Difficulty: Easy/Medium


Freescale MMA8452 accelerometer driver

  • Various tablets use a Freescale MMA8452 accelerometer. The kernel already has an iio driver for this, looks like all we need to do is hook it up in devicetree
  • datasheet here
  • Boards: Columbus A31 DKT
  • Difficulty: Easy/Medium


Memsic MXC622X accelerometer driver

  • Various (cheap) tablets use a Memsic MXC622X accelerometer. Write a proper kernel driver for this and upstream it.
  • Android driver here
  • Boards: Ippo q8h tablets
  • Difficulty: Easy/Medium


Bosch BMA250 accelerometer driver

  • Various tablets use a Bosch BMA250 accelerometer
  • This accelerometer is supported by the drivers/iio/accel/bmc150-accel.c driver
  • This driver currently lacks devicetree support, adding devicetree support to the existing driver should be enough to get the accelerometer on the UTOO-P66 tablet to work
  • Boards: UTOO P66 tablets
  • Difficulty: Easy/Medium


AXP PMIC gpio driver

  • The AXP152 / AXP209 / AXP221 / AXP223 PMIC-s all have various gpio pins. These need to have a pinctrl driver written for them, so that they can be either used as gpio-s, or e multiplexed to e.g. the pwm the PMIC-s have on board.
  • Difficulty: Medium


AXP PMIC hwmon driver

  • The AXP152 / AXP209 / AXP221 / AXP223 PMIC-s all can monitor various voltages and currents (and in some cases temperatures), write and upstream a hwmon driver for this, so that userspace utilities using the hwmon interface can show the readings of these sensors.
  • Difficulty: Easy / Medium

AXP152 PMIC regulator driver

  • The AXP152 PMIC has several voltage regulators on board. drivers/regulator/axp20x-regulator.c regulator driver needs to be extended to support the AXP152 so that e.g. CPU voltage scaling can be used to save power on boards with this pmic.
  • Boards: A10s OLinuxIno Micro, mk802-a10s, others
  • Difficulty: Medium


Add support for peripheral only mode to sunxi musb and usb-phy code

  • Currently the sunxi musb and usb-phy code support otg and host-only mode, some boards however use the musb controller in peripheral-only mode, add support for this.
  • Boards: Auxtek T003
  • Difficulty: Easy/Medium


brcmfmac sdio support improvements

  • The brcmfmac driver needs a board specific nvram file to be loaded from /lib/firmware/brcm, which means that currently brcm sdio wifi devices do not work ootb. To fix this 2 things are needed:
  1. The ability to set a board specific name for the nvram file in the dts, so that these files can be distributed as part of the linux-firmware package
  2. The ability to replace the MAC address in the nvram file with a dynamically generated one, so that not all boards end up getting the same MAC from the linux-firmware provided nvram file. This will require some special notation in the nvram file which will cause the kernel to replace the product (and not the vendor) bits of the MAC with a dynamically generated one.
  • Difficulty: Easy

RTL8189ES wifi driver

  • Find a recent copy of the RTL8189ES driver, make it build against the latest kernel and get it to work on at least one device. Then clean it up and submit it upstream for drivers/staging, then clean it up further to eventually move it into mainline proper.
  • Boards: mk802-a10s, other a10s based hdmi-sticks / topset-boxes
  • Difficulty: Medium


RTL8703AS wifi / bluetooth driver

  • Find a recent copy of the RTL8703AS driver, make it build against the latest kernel and get it to work on at least one device. Then clean it up and submit it upstream for drivers/staging, then clean it up further to eventually move it into mainline proper. This may be a good starting point.
  • Boards: ga10h
  • Difficulty: Medium


Mediatek mt6620 wifi / bluetooth driver

  • Find a recent copy of the Mediatek mt6620 wifi / bluetooth driver, make it build against the latest kernel and get it to work on at least one device. Then clean it up and submit it upstream for drivers/staging, then clean it up further to eventually move it into mainline proper. The; latest version I could find is here, there may be a more recent version in one of the later allwinner SDKs
  • Boards: Columbus A31 DKT
  • Difficulty: Medium


H3 kernel support

  • Add support to the Linux kernel for the H3 SoC, a patchset adding basic support (timers, interrupt controller, serial console) is available.
  • Difficulty: Hard


A83 kernel support

  • Add support to the Linux kernel for the A83 SoC, no work has been done on this yet.
  • Difficulty: Hard


CSI camera interface driver + sensor drivers

  • All the Allwinner SoCs have a CSI camera interface, add a driver for this + where necessary drivers for the sensor used on a board so that the camera can be used through the kernel's v4l2 api.
  • Boards: All tablets, bananapi with camera module
  • Difficulty: Hard


Rework Raspberry Pi 2 kernel code for multi platform support

  • Most Linux distros ship a single ARM kernel binary build with multi-platform support which runtime adjusts itself to the SoC being used. The Raspberry Pi 2 kernel code does not support this, requiring a kernel compiled specifically for it, which will not run on any other board. This means that the ARM images of distributions like Fedora do not work out of the box on the Raspberry Pi 2. The Raspberry Pi 2 kernel code needs to be modified to support multi platform kernels and use devicetree for runtime configuration everywhere.
  • Work on this is in progress
  • Difficulty: Medium/Hard


Kernel modesetting driver for am7xxx based usb pico projectors

  • There is a userspace driver for these devices available documenting the protocol, video format, etc.
  • A kernel driver can be modelled after my Grain Media GM12U320 driver
  • I've a Philips PPX 2055 beamer available for testing
  • Difficulty: Medium/Hard


Various sunxi kernel support tasks

  • Mapping for mele a1000
  • Fix stmmac ethernet driver being too chatty making it hard to use a text console, note it spews even more after suspend/resume
  • i2c speed calculation is wrong in kernel, see datasheet / u-boot for correct formula, this is a sunxi only thing, needs to check the compat.
  • Add missing iounmap(info->screen_base) to simplefb_remove
  • For even more Allwinner SoCs related todo items see this todo list.


Create u-boot boardconfigs sunxi boards which do not have a defconfig file yet

  • Create defconfig files for the wobo-i5, auxtek-t003, uhost-u1a
  • Difficulty: Easy


Add a poweroff cmd to u-boot

  • When testing u-boot often the next step after testing is turning off the board, currently this requires booting into Linux or holding down the power button for 10+ seconds for battery powered devices. It would be nice to have a poweroff command which shutsdown the board. Since we already have pmic support in u-boot for all sunxi boards adding this should be easy.
  • Difficulty: Easy


Add support to u-boot for booting from NAND

  • sunxi NAND support is in the works for the kernel, and currently is available in my sunxi-wip kernel tree
  • Preliminary support for loading u-boot.bin from NAND from the SPL is available in my sunxi-wip u-boot tree
  • Patches for adding support for reading the kernel, fdt, etc. from NAND from u-boot.bin are available here
  • This all needs to be integrated, tested and cleaned-up
  • Difficulty: Medium


Convert sunxi u-boot i2c code to the device-model

  • Convert sunxi u-boot i2c code to the new u-boot device-model. Note this requires taking special care of the UTOO_P66 and Colombus boards which both use a gpio-i2c controller to initialize the LCD screen
  • Difficulty: Medium


Add support for vga out via the chrontel ch7026 parallel lcd to vga bridge chip

  • Add support for vga out via the chrontel ch7026 parallel lcd to vga bridge chip to the u-boot video code
  • Difficulty: Medium / Hard


A80 u-boot support

  • Add full support to u-boot for the A80 SoC, main u-boot.bin already has A80 support, but we need to add SPL support (pmic voltage setup, dram init)
  • Difficulty: Hard


H3 u-boot support

  • Add support to u-boot for the H3 SoC, no work has been done on this yet.
  • Difficulty: Hard


A83 u-boot support

  • Add support to u-boot for the A83 SoC, no work has been done on this yet.
  • Difficulty: Hard


u-boot usb scanning speedup

  • Probing the usb bus on u-boot is currently very slow, one problem is that all ports are scanning one by one, with a 1s powerup delay per port. This can be sped up by making doing the scanning in parallel using cooperative multi-tasking, e.g. :
    • rework reset to use kernel timings (try every 10 ms)
    • lower power good wait to 100 ms, then when done enumerating re-scan hubs every 100 ms, and if no new hubs show up for 5 sonsecutive scans, we are done
  • Difficulty: Medium/Hard


u-boot sunxi support cleanups

  • The u-boot code for supporting Allwinner sunxi SoCs can use a number of cleanups:
    • Define CONFIG_MMC0_CD_PIN for all boards with a sdcard slot
    • Define CONFIG_USB0_ID_DET for all boards which use CONFIG_USB_MUSB_SUNXI and have an otg connector
    • Move i2c_init_board() call in arch/arm/cpu/armv7/sunxi/board.c from s_init() to board_init_f under #ifdef CONFIG_SPL_I2C_SUPPORT
    • Convert all options set through CONFIG_SYS_EXTRA_OPTIONS to proper Kconfig options
    • Drop CONFIG_SUNXI use CONFIG_ARCH_SUNXI everywhere
    • Fix u-boot twsi enable / disable in clock_sun6i.c to do trt wrt reset
    • Fix "weird" CCM_DRAM_CTRL_DCLK_OUT define, change it into a CCM_DRAM_GATE_OFFSET_foo define, and put it together with the others
    • Use CONFIG_VIDEO_LCD_RESET instead of power on Ippo q8h boards
    • Print board name from u-boot
    • Make CONFIG_SYS_USB_[E|O]HCI_MAX_ROOT_PORTS a runtime parameter passed in via ehci_register / ohci_register for device-model (CONFIG_DM_USB) enabled builds and drop them from include/configs/sunxi-common.h
    • Make board/sunxi/Kconfig select CONFIG_SPL by default on MACH-s where we support the SPL, remove CONFIG_SPL=y from all defconfigs
    • Fix u-boot "gpio status" command output for axp gpio-s
  • Difficulty: Easy


WIP Projects

Enable the OTG USB port on all Allwinner boards

  • Hans' sunxi-wip branch has support for the otg controller found on all supported Allwinner SoCs, currently this only gets enabled in devicetree on a few boards. This needs to be enabled in devicetree on all boards. See the cubietruck dts file for an example how to do this.
  • Difficulty: Easy
  • Who: All


Finished Projects

AXP152 PMIC mfd driver

  • The AXP152 PMIC is a multifunction device, so a mfd driver needs to be written to instantiate per function cells to which various kernel driver can then be bound.
  • Boards: A10s OLinuxIno Micro, mk802-a10s, others
  • Difficulty: Medium
  • Who: Hans