[RFC] [GIT] Update support for RK3188 (Radxa Rock board).

Панов Андрей rockford at yandex.ru
Sun Mar 1 05:20:58 PST 2015


Hello!

Here is a big changeset for RK3188 arch and Radxa Rock board.
It brings support for updated DTS and booting from SD card as first-stage loader.
DRAM setting blob from RK is required to boot (but this is unrelated to barebox).

It lacks some unknown (for me) and requred initializations, so:
3.0 kernel from radxa repo boots fine. Mainline kernel gets a race in about 50%, and in another 50% works.
It is disgusting, since I'd just wanted to try a newer kernel with this board.

For not to spamming a ML with a long patches, it can be pulled from git tree:
https://github.com/apxii/barebox/tree/rk/2up
(based on next branch)

Little howto:
1. Prepare SD card with bootfs and rootfs as usually.
2. Compile barebox
   make ARCH=arm radxa_rock_defconfig
   make ARCH=arm
3. Checkout and compile https://github.com/apxii/rkboottools
4. Get some RK3188 bootloader from https://github.com/neo-technologies/rockchip-bootloader
5. Run "rk-splitboot RK3188Loader(L)_V2.13.bin" command. (for example)
   You will get "FlashData" file with others.
   Otherwise it can be borrowed from RK U-boot sources from https://github.com/linux-rockchip/u-boot-rockchip/blob/u-boot-rk3188/tools/rk_tools/3188_LPDDR2_300MHz_DDR3_300MHz_20130830.bin
6. Run "rk-makebootable FlashData barebox-radxa-rock.bin rrboot.bin"
7. Insert SD card and run "dd if=rrboot.bin of=</dev/sdcard> bs=$((0x200)) seek=$((0x40))"
8. Boot from SD card

Diffstat: 
 arch/arm/Kconfig                                   |   4 +
 arch/arm/boards/radxa-rock/board.c                 |  34 +----
 arch/arm/boards/radxa-rock/env/boot/mshc1          |   9 ++
 arch/arm/boards/radxa-rock/env/boot/mshc1-old      |   8 ++
 arch/arm/boards/radxa-rock/env/init/bootsource     |   7 +
 arch/arm/boards/radxa-rock/env/nv/hostname         |   1 +
 arch/arm/configs/radxa_rock_defconfig              | 112 ++++++++++++++++
 arch/arm/dts/rk3188-clocks.dtsi                    | 289 ----------------------------------------
 arch/arm/dts/rk3188-radxarock.dts                  |  32 +++--
 arch/arm/dts/rk3188.dtsi                           | 306 ------------------------------------------
 arch/arm/dts/rk3xxx.dtsi                           | 139 --------------------
 arch/arm/mach-rockchip/Makefile                    |   1 -
 arch/arm/mach-rockchip/include/mach/rockchip-pll.h |  26 ----
 arch/arm/mach-rockchip/pll.c                       | 102 --------------
 drivers/clk/Kconfig                                |   6 +
 drivers/clk/Makefile                               |   2 +
 drivers/clk/clk-composite.c                        | 146 +++++++++++++++++++++
 drivers/clk/clk-divider.c                          |  40 +++++-
 drivers/clk/clk-fractional-divider.c               | 156 ++++++++++++++++++++++
 drivers/clk/clk-mux.c                              |   3 +
 drivers/clk/clk.c                                  |   9 ++
 drivers/clk/rockchip/Makefile                      |   2 +-
 drivers/clk/rockchip/clk-cpu.c                     | 160 ++++++++++++++++++++++
 drivers/clk/rockchip/clk-pll.c                     | 368 +++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/rockchip/clk-rk3188.c                  | 875 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/rockchip/clk-rockchip.c                |  86 ------------
 drivers/clk/rockchip/clk.c                         | 259 ++++++++++++++++++++++++++++++++++++
 drivers/clk/rockchip/clk.h                         | 431 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/mci/Kconfig                                |   6 +
 drivers/mci/dw_mmc.c                               | 170 +++++++++++++++++++++++-
 drivers/net/arc_emac.c                             |  24 +++-
 include/init.h                                     |   1 +
 include/linux/barebox-wrapper.h                    |   6 +
 include/linux/clk.h                                |  23 ++++
 include/linux/gcd.h                                |  12 ++
 lib/Kconfig                                        |   3 +
 lib/Makefile                                       |   1 +
 lib/gcd.c                                          |  19 +++
 38 files changed, 2869 insertions(+), 1009 deletions(-)

Detailed patches:

Radxa Rock specific ones:
4b77cddfbd18f8a3b6ee33af38f2b7e848705398 ARM: Rockchip: Add Radxa Rock defconfig
a6cc35140027fe595b36e523a708d71b2f1df150 ARM: Rockchip: Update Radxa Rock board.
55e1c4a08b05314d88d544d15ea018f20d4801f8 ARM: Rockchip: Use newer DTS for Radxa Rock board.
f8b53fca5af554ce79a827d7cb6b79d3968d4211 ARM: Rockchip: Update clk driver from Linux kernel for use with newer DTS.
f70ec3cfd5465b61ad9d0c959287bd0254f5d67f ARM: Rockchip: Update Kconfig
320d3e5edba95d7f77121e7939c5ac9ab2f97d2a ARM: Rockchip: Remove unused files from mach-rockchip.

Updates for DW MMC and network drivers:
b6e2b367dd9499743b9d12aace69d0a39b9001d3 MMC: dw_mmc: Add support for PIO mode and Rockchip variant of this hardware.
840e360305c789c80764f97fd078a547d5714b47 NET: arc_emac: Update for newer DTS, support for Rockchip .compatible.

Updates for generic clock subsystem:
03b11a4c712b6d3449bee68f69f46dd0c7409108 CLK: Add helper defines to barebox-wrapper.h for easier porting of drivers from Linux kernel.
fb6ab7a4b2a6f45a62c5176f0d1c9d48738eeb5b CLK: Check and do not allow to register clock twice.
47cc281060ccfa95d8552aa2808844d1b5624945 CLK: clk-divider: Respect CLK_DIVIDER_POWER_OF_TWO flag.
e9c7f7f9a7b8371f8696e9cb042f0eb8ef281a94 CLK: clk-divider: Introduce clk_divider_alloc() and *_free() routines.
8964564e2b564729ba228868c7e079640a4fe595 CLK: clk-divider: Respect CLK_DIVIDER_HIWORD_MASK flag.
719dc710b91a2d991834980bce5e493bfc4118fe CLK: clk-mux: Respect CLK_MUX_HIWORD_MASK flag.
e1c886218e37f3755e37e5181f09e02270eb2f96 CLK: Add fractional divider clock support from Linux kernel.
ead132e11b67ce8fb7c1b15bf5be263399786ed7 CLK: Add support for composite clock from Linux kernel.

Updates for library:
bc0b4de43892dcb5e38de5e61463c00b195e17c5 lib: Add gcd() function.



--
 Андрей



More information about the barebox mailing list