configs: rockchip: Modernise Geekbox config
PATCH 1/1 configs: rockchip: Modernise Geekbox config
Modernise and move the Geekbox config to use SPL/TPL with upstream TF-A, enable MMC/USB/Eth to make the device more useful and work like other Rockchip devices. Update the readme to reflect the changes to the build process.
---
I've not moved this to upstream DT as yet because there's some further issues I need to debug but this moves this platform forward.
arch/arm/dts/rk3368-geekbox-u-boot.dtsi | 10 ++++ board/geekbuying/geekbox/README | 40 +++++++++++++- configs/geekbox_defconfig | 71 ++++++++++++++++++++++++- 3 files changed, 118 insertions(+), 3 deletions(-)
arch/arm/dts/rk3368-geekbox-u-boot.dtsi +10 -0
@@ -26,6 +26,16 @@ bootph-all; }; +&dmc { + bootph-all; + + rockchip,memory-schedule = <DMC_MSCH_CBDR>; + rockchip,ddr-frequency = <800000000>; + rockchip,ddr-speed-bin = <DDR3_1600K>; + + status = "okay"; +}; + &grf { bootph-all; };
board/geekbuying/geekbox/README +39 -1
@@ -1 +1,39 @@ -see board/rockchip/sheep_rk3368/README +Here is the step-by-step to boot to U-Boot on the Geekbox + +Get the Source and build ATF +============================ + + > git clone https://github.com/TrustedFirmware-A/trusted-firmware-a.git + > cd arm-trusted-firmware + > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3368 bl31 + +Configure U-Boot +================ + + > cd ../u-boot + > export BL31=../arm-trusted-firmware/build/rk3368/release/bl31.bin + > make geekbox_defconfig + +Build the full U-Boot/ATF firmware stack +======================================== + + > make CROSS_COMPILE=aarch64-unknown-elf- + +Flash the image +=============== + +Copy the SPL to offset 32k and the FIT image containing the payloads +(U-Boot proper, ATF, devicetree) to offset 256k card. + +eMMC +---- + +rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with +help of the Rockchip loader binary. + + > git clone https://github.com/rockchip-linux/rkdeveloptool + > cd rkdeveloptool + > autoreconf -i && && ./configure && make + > git clone https://github.com/rockchip-linux/rkbin.git + > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin + > ./rkdeveloptool wl 64 ../u-boot-rockchip.bin
configs/geekbox_defconfig +69 -2
98 lines not on this page · raw message
Signature · 1 line
2.47.0
Hi Peter,
Quoted 61 lines · Peter Robinson
Modernise and move the Geekbox config to use SPL/TPL with upstream TF-A, enable MMC/USB/Eth to make the device more useful and work like other Rockchip devices. Update the readme to reflect the changes to the build process.
Signed-off-by Peter Robinson <[email protected]>---
I've not moved this to upstream DT as yet because there's some further issues I need to debug but this moves this platform forward.
arch/arm/dts/rk3368-geekbox-u-boot.dtsi | 10 ++++ board/geekbuying/geekbox/README | 40 +++++++++++++- configs/geekbox_defconfig | 71 ++++++++++++++++++++++++- 3 files changed, 118 insertions(+), 3 deletions(-)arch/arm/dts/rk3368-geekbox-u-boot.dtsi +10
-0@@ -26,6 +26,16 @@ bootph-all; }; +&dmc { + bootph-all; + + rockchip,memory-schedule = <DMC_MSCH_CBDR>; + rockchip,ddr-frequency = <800000000>; + rockchip,ddr-speed-bin = <DDR3_1600K>; + + status = "okay"; +}; + &grf { bootph-all; };board/geekbuying/geekbox/README +17
-1@@ -1 +1,39 @@ -see board/rockchip/sheep_rk3368/README +Here is the step-by-step to boot to U-Boot on the Geekbox + +Get the Source and build ATF +============================ + + > git clone https://github.com/TrustedFirmware-A/trusted-firmware-a.git + > cd arm-trusted-firmware + > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3368 bl31 + +Configure U-Boot +================ + + > cd ../u-boot + > export BL31=../arm-trusted-firmware/build/rk3368/release/bl31.bin + > make geekbox_defconfig + +Build the full U-Boot/ATF firmware stack
board/geekbuying/geekbox/README line 27
Quoted 10 lines
board/geekbuying/geekbox/README +10
-0+======================================== + + > make CROSS_COMPILE=aarch64-unknown-elf- + +Flash the image +=============== + +Copy the SPL to offset 32k and the FIT image containing the payloads +(U-Boot proper, ATF, devicetree) to offset 256k card. +
Missing a word here at the end of the sentence I believe?
Quoted 56 lines
board/geekbuying/geekbox/README +12
-0+eMMC +---- + +rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with +help of the Rockchip loader binary. + + > git clone https://github.com/rockchip-linux/rkdeveloptool + > cd rkdeveloptool + > autoreconf -i && && ./configure && make + > git clone https://github.com/rockchip-linux/rkbin.git + > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin + > ./rkdeveloptool wl 64 ../u-boot-rockchip.binconfigs/geekbox_defconfig +22
-1@@ -3,29 +3,96 @@ CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x00200000 -CONFIG_SYS_MALLOC_F_LEN=0x1000 CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 CONFIG_DEFAULT_DEVICE_TREE="rk3368-geekbox" +CONFIG_SPL_TEXT_BASE=0x00000000 CONFIG_ROCKCHIP_RK3368=y +CONFIG_TPL_LIBCOMMON_SUPPORT=y +CONFIG_TPL_LIBGENERIC_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC=y +CONFIG_SPL_STACK=0x188000 +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_START_ADDR=0x400000 +CONFIG_SPL_BSS_MAX_SIZE=0x20000 +CONFIG_SPL_STACK_R=y +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 +CONFIG_SPL=y CONFIG_TARGET_GEEKBOX=y CONFIG_DEBUG_UART_BASE=0xFF690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-geekbox.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_MAX_SIZE=0x40000 +CONFIG_SPL_PAD_TO=0x7f8000 +CONFIG_SPL_BOOTROM_SUPPORT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200 +CONFIG_SPL_ATF=y +CONFIG_TPL=y
configs/geekbox_defconfig CONFIG_SKIP_LOWLEVEL_INIT=y · line 50
Quoted 10 lines
configs/geekbox_defconfig +10
-0+CONFIG_TPL_SYS_MALLOC_SIMPLE=y +CONFIG_TPL_DRIVERS_MISC=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_REGULATOR=y +CONFIG_CMD_USB=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_TPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent"
Mmmm... really removing pinctrl in SPL? Not sure this is wise? We usually remove clocks and interrupts specific nodes?
Quoted 23 lines
configs/geekbox_defconfig +17
-1+CONFIG_TPL_OF_PLATDATA=y +CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_TPL_DM=y CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_TPL_REGMAP=y CONFIG_SYSCON=y -CONFIG_BOUNCE_BUFFER=y +CONFIG_SPL_SYSCON=y +CONFIG_TPL_SYSCON=y CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_TPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y CONFIG_PINCTRL=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH_PHY=y +CONFIG_ETH_DESIGNWARE=y
configs/geekbox_defconfig CONFIG_SKIP_LOWLEVEL_INIT=y · line 82
Quoted 10 lines
configs/geekbox_defconfig +9
-0+CONFIG_RGMII=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=y CONFIG_RAM=y +CONFIG_SPL_RAM=y
Not sure we need SPL_RAM if we have TPL_RAM?
BTW, if you're using upstream TF-A, you can also disable CONFIG_SPL_ATF_NO_PLATFORM_PARAM and let U-Boot pass the serial console to TF-A instead of relying on build time setting in TF-A :) (I've done this for RK3399 Puma already).
Cheers,
Quentin