Skip to content

Add rk3066 ADC and USB support

Johan Jonker u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17rockchip: spl: fix reloc gd and FDT blob pointerarch/arm/mach-rockchip/sdram.c arch/arm/mach-rockchip/spl.c+17 -00 replies
2/17rockchip: spl: allow more boot devicesarch/arm/mach-rockchip/spl.c+4 -10 replies
3/17rockchip: spl-boot-order: add usb boot optionarch/arm/mach-rockchip/spl-boot-order.c+3 -00 replies
4/17rockchip: board: allow spl compile for usb init functionsarch/arm/mach-rockchip/Makefile+2 -10 replies
5/17rockchip: usb: gadget: rockusb: enable spl compiledrivers/usb/gadget/Kconfig drivers/usb/gadget/Makefile+11 -10 replies
6/17rockchip: configs: mk808: add spl usb configsinclude/configs/mk808.h+3 -00 replies
7/17arm: dts: rockchip: mk808: add adc usb required properties for splarch/arm/dts/rk3066a-mk808-u-boot.dtsi+29 -00 replies
8/17rockchip: adc: enable spl compile class driverdrivers/adc/adc-uclass.c+27 -60 replies
9/17rockchip: adc: reduce error notifications from class driverdrivers/adc/adc-uclass.c+2 -20 replies
10/17rockchip: adc: enable spl compile rockchip-saradc driverdrivers/adc/rockchip-saradc.c+49 -150 replies
11/17rockchip: adc: fix adc timerdrivers/adc/adc-uclass.c drivers/adc/rockchip-saradc.c+7 -50 replies
12/17rockchip: adc: fix the hangupsdrivers/adc/rockchip-saradc.c+5 -00 replies
13/17rockchip: adc: make adc branch compile in SPLdrivers/Makefile drivers/adc/Kconfig drivers/adc/Makefile+33 -30 replies
14/17rockchip: adc: move config items in a sub menudrivers/adc/Kconfig+4 -00 replies
15/17rockchip: rk3066: config nand data pins in splarch/arm/mach-rockchip/rk3066/rk3066.c+5 -20 replies
16/17rockchip: rk3066: add recovery mode in splarch/arm/include/asm/arch-rockchip/f_rockusb.h arch/arm/mach-rockchip/rk3066/rk3066.c+87 -00 replies
17/17rockchip: configs: mk808: enable usb supportconfigs/mk808_defconfig+20 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 00/17] Add rk3066 ADC and USB support

Add rk3066 ADC and USB support.

The Rockchip SoC rk3066 has no support for MMC and USB in the BootROM. The TPL/SPL parts are mostly stored on NAND. With U-boot stored on an external media the moment a user wants to start a recovery action it has to be done in SPL. Some boards only have one ADC switch for the user and no serial console. The U-boot USB drivers only works in combination with OF_REAL enabled.

For current ARM SoCs the FDT stored in BBS is erased after SPL relocation in the crt0.S main function. So for drivers to work in SPL, FDT is move to the end of DRAM. The global_data must update there pointers. The common Rockchip functions must also become available in SPL.

Most work has to be done on the ADC driver that has recently had a "upgrade" for a vref regulator. For Rockchip this regulator are mostly fixed. As we are in SPL that would introduce 2 extra U-boot classes UCLASS_REGULATOR and UCLASS_GPIO. In SPL there's no pin control yet, so reduce code and read these ADC properties from the DT in SPL.
While testing some improvement had to be made for reliability. Fixup SPL compile and the way the ADC section is shown in U-boot's main menu.

Add a __weak recovery button function as condition to enter the recovery mode in spl. It then looks for a boot_device to select a storage function method. And finally run the rockusb gadget while connected to a USB host.

Enable all new futures by adding them to the mk808_defconfig.

Johan Jonker (16):
rockchip: spl: fix reloc gd and FDT blob pointer
rockchip: spl: allow more boot devices
rockchip: spl-boot-order: add usb boot option
rockchip: board: allow spl compile for usb init functions
rockchip: usb: gadget: rockusb: enable spl compile
rockchip: configs: mk808: add spl usb configs
arm: dts: rockchip: mk808: add adc usb required properties for spl
rockchip: adc: enable spl compile class driver
rockchip: adc: reduce error notifications from class driver
rockchip: adc: enable spl compile rockchip-saradc driver
rockchip: adc: fix adc timer
rockchip: adc: fix the hangups
rockchip: adc: make adc branch compile in SPL
rockchip: adc: move config items in a sub menu
rockchip: rk3066: add recovery mode in spl
rockchip: configs: mk808: enable usb support

Paweł Jarosz (1):
rockchip: rk3066: config nand data pins in spl

 arch/arm/dts/rk3066a-mk808-u-boot.dtsi        | 29 ++++++
 .../arm/include/asm/arch-rockchip/f_rockusb.h |  1 +
 arch/arm/mach-rockchip/Makefile               |  3 +-
 arch/arm/mach-rockchip/rk3066/rk3066.c        | 93 ++++++++++++++++++-
 arch/arm/mach-rockchip/sdram.c                |  1 +
 arch/arm/mach-rockchip/spl-boot-order.c       |  3 +
 arch/arm/mach-rockchip/spl.c                  | 21 ++++-
 configs/mk808_defconfig                       | 21 ++++-
 drivers/Makefile                              |  3 +-
 drivers/adc/Kconfig                           | 33 +++++++
 drivers/adc/Makefile                          |  4 +-
 drivers/adc/adc-uclass.c                      | 47 +++++++---
 drivers/adc/rockchip-saradc.c                 | 71 ++++++++++----
 drivers/usb/gadget/Kconfig                    | 10 ++
 drivers/usb/gadget/Makefile                   |  2 +-
 include/configs/mk808.h                       |  3 +
 16 files changed, 308 insertions(+), 37 deletions(-)
Signature · 1 line
2.20.1