[U-Boot] [PATCH v3 00/25] dm: Introduce Rockchip RK3288 support
Simon Glass
sjg at chromium.org
Wed Jun 24 01:28:45 CEST 2015
The Rockchip RK3288 is based on a quad-core Cortex-A17 CPU and has a good
set of peripherals. Various full-featured U-Boot ports are available and
this is an attempt to bring those features into mainline. With this series
the Firefly RK3288 can boot to a prompt from an SD card.
Since much of the code is generic, this also supports the Radxa Rock Pro.
Since there is no device tree available for that yet, it uses the same
config and device tree as the Firefly. This works because not all
peripherals are supported, so the differences don't matter.
Support for booting from USB OTG is also provided, using the on-chip boot
ROM and the rkflashtool utility. This can boot as far as SPL, but there is
no support for reading U-Boot proper from USB as yet. This requires
implementing a suitable protocol (perhaps DFU or Rockchip's proprietary
one) in SPL.
Support is also provided for the Haier Chromebook, which is based on the
same SoC. In this case it boots from SPI rather than an SD card.
The basic approach here is to use driver model for everything, so this
series adds several new uclasses. Some of these have been discussed for a
while. The list is:
- Clocks - setting and getting PLL and peripheral clocks
- Pinctrl - adjusting pin multiplexing settings
- Reset - reseting the board or SoC
- RAM - setting up RAM controllers and detecting the available RAM
- MMC - MMC controllers (using the existing block device framework)
- LEDs - turning LEDs on and off, with only a GPIO driver so far
Trivial support is also added for regmap and syscon controllers, modelled
on how the kernel does this.
This series avoids hard-coding RK3288-specific code into the build. There
is a CONFIG_ROCKCHIP_RK3288 but it only *adds* support for RK3288. In
principle another CONFIG could add support for a different Rockchip SoC
with only the device tree selecting which one U-Boot works on.
Support is provided in mkimage to build these image types:
- rkimage - suitable for packaging up SPL to be sent to the boot ROM over
USB OTG
- rksd - suitable for writing to an SD card
Much of the source and ideas for this series came from downstream Rockchip
U-Boot trees. SDRAM init came from Coreboot. In most cases it has been
pretty heavily cleaned up / rewritten to meet U-Boot style and remove
hard-coding of things.
Drivers are provided for:
- Clocks
- Pinctrl
- SoC reset
- DDR3 SDRAM
- I2C
- SPI
- GPIOs
- LEDs using GPIOS
- MMC
- Firefly main PMIC (ACT8846) and included regulators
These are lightly tested and doubtless some problems exist with some,
particularly I2C.
One problem with device tree is that U-Boot has no way of dropping features
it does not need or use. For SPL this problem needs to be solved and this
series uses a new 'fdtgrep' tool for this. The 45KB Firefly device tree
reduces to a 6KB bytes when unused material is removed. SDRAM timings are
also in the device tree.
This series includes some changes aimed at reduce code size in SPL,
including:
- dropping alias sequence support (the aliases node) since many boards just
use a single UART in SPL
- adding a smaller panic() function that does not support printf()-format
strings
- removing device unbind code which will never be used in SPL
There is a large amount of additional work to bring other Rockchip drivers
and features into mainline U-Boot, so this is only a start.
Changes in v3:
- Update clock rate to always be 24MHz
- Add device tree bindings for CRU and DMC
- Make use of additional features since version 2
- Update README to mention available drivers
- Add various new patches to get RK3288 booting to a prompt
Changes in v2:
- Tidy up license headers and remove SPL #ifdefs
- Tidy up license headers and remove SPL #ifdefs
- Drop use of CONFIG_USE_PRIVATE_LIBGCC=y
- Tidy up license headers and remove SPL #ifdefs
Simon Glass (25):
rockchip: Add serial support
rockchip: Bring in RK3288 device tree file includes and bindings
rockchip: rk3288: dts: Make core devices available early
mkimage: Allow padding to any length
mkimage: Allow the original file size to be recorded
rockchip: Add the rkimage format to mkimage
rockchip: Add support for the SD image
rockchip: Add support for the SPI image
rockchip: gpio: Add rockchip GPIO driver
rockchip: Add basic peripheral and clock definitions
power: Add support for ACT8846 PMIC
power: regulator: Add a driver for ACT8846 regulators
rockchip: rk3288: Add clock driver
rockchip: rk3288: Add header files for PMU and GRF
rockchip: rk3288: Add SoC reset driver
rockchip: rk3288: Add a simple syscon driver
rockchip: rk3288: Add pinctrl driver
rockchip: rk3288: Add SDRAM init
rockchip: Add an MMC driver
rockchip: Add core SoC start-up code
rockchip: Add I2C driver
rockchip: Add SPI driver
rockchip: Add basic support for firefly-rk3288
rockchip: Add basic support for jerry
rockchip: Add a simple README
arch/arm/Kconfig | 10 +
arch/arm/Makefile | 1 +
arch/arm/dts/Makefile | 3 +
arch/arm/dts/cros-ec-sbs.dtsi | 16 +
arch/arm/dts/rk3288-firefly.dts | 75 +
arch/arm/dts/rk3288-firefly.dtsi | 457 ++++++
arch/arm/dts/rk3288-jerry.dts | 203 +++
arch/arm/dts/rk3288-thermal.dtsi | 88 ++
arch/arm/dts/rk3288-veyron-chromebook.dtsi | 200 +++
arch/arm/dts/rk3288-veyron.dtsi | 844 +++++++++++
arch/arm/dts/rk3288.dtsi | 1473 ++++++++++++++++++++
arch/arm/include/asm/arch-rockchip/clock.h | 45 +
arch/arm/include/asm/arch-rockchip/cru_rk3288.h | 185 +++
arch/arm/include/asm/arch-rockchip/ddr_rk3288.h | 484 +++++++
arch/arm/include/asm/arch-rockchip/gpio.h | 28 +
arch/arm/include/asm/arch-rockchip/grf_rk3288.h | 768 ++++++++++
arch/arm/include/asm/arch-rockchip/hardware.h | 20 +
arch/arm/include/asm/arch-rockchip/i2c.h | 70 +
arch/arm/include/asm/arch-rockchip/periph.h | 54 +
arch/arm/include/asm/arch-rockchip/pmu_rk3288.h | 89 ++
arch/arm/include/asm/arch-rockchip/sdram.h | 92 ++
arch/arm/mach-rockchip/Kconfig | 41 +
arch/arm/mach-rockchip/Makefile | 13 +
arch/arm/mach-rockchip/board-spl.c | 290 ++++
arch/arm/mach-rockchip/board.c | 46 +
arch/arm/mach-rockchip/common.c | 28 +
arch/arm/mach-rockchip/rk3288/Kconfig | 26 +
arch/arm/mach-rockchip/rk3288/Makefile | 9 +
arch/arm/mach-rockchip/rk3288/reset_rk3288.c | 47 +
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c | 878 ++++++++++++
arch/arm/mach-rockchip/rk3288/syscon_rk3288.c | 25 +
board/firefly/firefly-rk3288/Kconfig | 15 +
board/firefly/firefly-rk3288/MAINTAINERS | 6 +
board/firefly/firefly-rk3288/Makefile | 7 +
board/firefly/firefly-rk3288/firefly-rk3288.c | 7 +
board/google/chromebook_jerry/Kconfig | 15 +
board/google/chromebook_jerry/MAINTAINERS | 6 +
board/google/chromebook_jerry/Makefile | 7 +
board/google/chromebook_jerry/jerry.c | 7 +
board/google/common/Makefile | 2 +-
common/image.c | 3 +
configs/chromebook_jerry_defconfig | 37 +
configs/firefly-rk3288_defconfig | 36 +
doc/README.rockchip | 246 ++++
.../clock/rockchip,rk3188-cru.txt | 61 +
.../clock/rockchip,rk3288-cru.txt | 61 +
.../clock/rockchip,rk3288-dmc.txt | 155 ++
doc/device-tree-bindings/clock/rockchip.txt | 77 +
.../pinctrl/rockchip,pinctrl.txt | 157 +++
.../thermal/rockchip-thermal.txt | 68 +
drivers/clk/Makefile | 1 +
drivers/clk/clk_rk3288.c | 618 ++++++++
drivers/gpio/Kconfig | 9 +
drivers/gpio/Makefile | 1 +
drivers/gpio/rk_gpio.c | 123 ++
drivers/i2c/Kconfig | 9 +
drivers/i2c/Makefile | 1 +
drivers/i2c/rk_i2c.c | 391 ++++++
drivers/mmc/Kconfig | 9 +
drivers/mmc/Makefile | 1 +
drivers/mmc/rockchip_mmc.c | 98 ++
drivers/pinctrl/Kconfig | 9 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/rockchip/Makefile | 8 +
drivers/pinctrl/rockchip/pinctrl_rk3288.c | 429 ++++++
drivers/power/pmic/Kconfig | 9 +
drivers/power/pmic/Makefile | 1 +
drivers/power/pmic/act8846.c | 90 ++
drivers/power/regulator/Kconfig | 9 +
drivers/power/regulator/Makefile | 1 +
drivers/power/regulator/act8846.c | 155 ++
drivers/serial/Kconfig | 9 +
drivers/serial/Makefile | 1 +
drivers/serial/serial_rockchip.c | 43 +
drivers/spi/Kconfig | 10 +
drivers/spi/Makefile | 1 +
drivers/spi/rk_spi.c | 375 +++++
drivers/spi/rk_spi.h | 121 ++
include/configs/chromebook_jerry.h | 16 +
include/configs/firefly-rk3288.h | 15 +
include/configs/rk3288_common.h | 101 ++
include/dt-bindings/clock/rk3288-cru.h | 370 +++++
include/dt-bindings/clock/rockchip,rk808.h | 11 +
include/dt-bindings/pinctrl/rockchip.h | 26 +
include/dt-bindings/power-domain/rk3288.h | 11 +
include/image.h | 5 +-
include/power/act8846_pmic.h | 37 +
tools/Makefile | 3 +
tools/imagetool.h | 1 +
tools/mkimage.c | 23 +-
tools/rkcommon.c | 72 +
tools/rkcommon.h | 28 +
tools/rkimage.c | 65 +
tools/rksd.c | 102 ++
tools/rkspi.c | 119 ++
95 files changed, 11106 insertions(+), 13 deletions(-)
create mode 100644 arch/arm/dts/cros-ec-sbs.dtsi
create mode 100644 arch/arm/dts/rk3288-firefly.dts
create mode 100644 arch/arm/dts/rk3288-firefly.dtsi
create mode 100644 arch/arm/dts/rk3288-jerry.dts
create mode 100644 arch/arm/dts/rk3288-thermal.dtsi
create mode 100644 arch/arm/dts/rk3288-veyron-chromebook.dtsi
create mode 100644 arch/arm/dts/rk3288-veyron.dtsi
create mode 100644 arch/arm/dts/rk3288.dtsi
create mode 100644 arch/arm/include/asm/arch-rockchip/clock.h
create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3288.h
create mode 100644 arch/arm/include/asm/arch-rockchip/ddr_rk3288.h
create mode 100644 arch/arm/include/asm/arch-rockchip/gpio.h
create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk3288.h
create mode 100644 arch/arm/include/asm/arch-rockchip/hardware.h
create mode 100644 arch/arm/include/asm/arch-rockchip/i2c.h
create mode 100644 arch/arm/include/asm/arch-rockchip/periph.h
create mode 100644 arch/arm/include/asm/arch-rockchip/pmu_rk3288.h
create mode 100644 arch/arm/include/asm/arch-rockchip/sdram.h
create mode 100644 arch/arm/mach-rockchip/Kconfig
create mode 100644 arch/arm/mach-rockchip/Makefile
create mode 100644 arch/arm/mach-rockchip/board-spl.c
create mode 100644 arch/arm/mach-rockchip/board.c
create mode 100644 arch/arm/mach-rockchip/common.c
create mode 100644 arch/arm/mach-rockchip/rk3288/Kconfig
create mode 100644 arch/arm/mach-rockchip/rk3288/Makefile
create mode 100644 arch/arm/mach-rockchip/rk3288/reset_rk3288.c
create mode 100644 arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
create mode 100644 arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
create mode 100644 board/firefly/firefly-rk3288/Kconfig
create mode 100644 board/firefly/firefly-rk3288/MAINTAINERS
create mode 100644 board/firefly/firefly-rk3288/Makefile
create mode 100644 board/firefly/firefly-rk3288/firefly-rk3288.c
create mode 100644 board/google/chromebook_jerry/Kconfig
create mode 100644 board/google/chromebook_jerry/MAINTAINERS
create mode 100644 board/google/chromebook_jerry/Makefile
create mode 100644 board/google/chromebook_jerry/jerry.c
create mode 100644 configs/chromebook_jerry_defconfig
create mode 100644 configs/firefly-rk3288_defconfig
create mode 100644 doc/README.rockchip
create mode 100644 doc/device-tree-bindings/clock/rockchip,rk3188-cru.txt
create mode 100644 doc/device-tree-bindings/clock/rockchip,rk3288-cru.txt
create mode 100644 doc/device-tree-bindings/clock/rockchip,rk3288-dmc.txt
create mode 100644 doc/device-tree-bindings/clock/rockchip.txt
create mode 100644 doc/device-tree-bindings/pinctrl/rockchip,pinctrl.txt
create mode 100644 doc/device-tree-bindings/thermal/rockchip-thermal.txt
create mode 100644 drivers/clk/clk_rk3288.c
create mode 100644 drivers/gpio/rk_gpio.c
create mode 100644 drivers/i2c/rk_i2c.c
create mode 100644 drivers/mmc/rockchip_mmc.c
create mode 100644 drivers/pinctrl/rockchip/Makefile
create mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3288.c
create mode 100644 drivers/power/pmic/act8846.c
create mode 100644 drivers/power/regulator/act8846.c
create mode 100644 drivers/serial/serial_rockchip.c
create mode 100644 drivers/spi/rk_spi.c
create mode 100644 drivers/spi/rk_spi.h
create mode 100644 include/configs/chromebook_jerry.h
create mode 100644 include/configs/firefly-rk3288.h
create mode 100644 include/configs/rk3288_common.h
create mode 100644 include/dt-bindings/clock/rk3288-cru.h
create mode 100644 include/dt-bindings/clock/rockchip,rk808.h
create mode 100644 include/dt-bindings/pinctrl/rockchip.h
create mode 100644 include/dt-bindings/power-domain/rk3288.h
create mode 100644 include/power/act8846_pmic.h
create mode 100644 tools/rkcommon.c
create mode 100644 tools/rkcommon.h
create mode 100644 tools/rkimage.c
create mode 100644 tools/rksd.c
create mode 100644 tools/rkspi.c
--
2.4.3.573.g4eafbef
More information about the U-Boot
mailing list