rockchip: enable TPL for tinker-rk3288
Subsystems (3)
cover rockchip: enable TPL for tinker-rk3288
Tinker board has overflow the SRAM size limit, enable TPL for it so that there will be no size limit for SPL.
Also some other fix to bring up Tinker board:
- enabel sdmmc pinctrl with dts in SPL
- extend raw u-boot.bin size limit
Kever Yang (6):
rockchip: rk3288: enable TPL configs to chip level
rockchip: rk3288: add separate TPL STACK address
rockchip: dts: rk3288-tinker: enable sdmmc pinctrl node in spl
rockchip: config: update config for TPL support on tinker-rk3288
rockchip: config: tiner-rk3288: extend CONFIG_SYS_MONITOR_LEN to 600KB
rockchip: rk3288: enable TPL for tinker-board
arch/arm/dts/rk3288-tinker.dts | 26 +++++++++++++++++++++++++- arch/arm/mach-rockchip/Kconfig | 18 ++++++++++++++++++ arch/arm/mach-rockchip/rk3288/Kconfig | 15 +-------------- configs/tinker-rk3288_defconfig | 13 +++++-------- include/configs/tinker_rk3288.h | 2 +- 5 files changed, 50 insertions(+), 24 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/6 rockchip: rk3288: enable TPL configs to chip level
More boards other than vyasa needs TPL, so enable the TPL configs at chip level instead of board level.
---
arch/arm/mach-rockchip/Kconfig | 14 ++++++++++++++ arch/arm/mach-rockchip/rk3288/Kconfig | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-)
arch/arm/mach-rockchip/Kconfig +14 -0
@@ -87,6 +87,20 @@ config ROCKCHIP_RK3288 select SPL_BOARD_INIT if SPL select SUPPORT_SPL select SPL + select SUPPORT_TPL + select TPL_BOOTROM_SUPPORT + select TPL_CLK + select TPL_DM + select TPL_DRIVERS_MISC_SUPPORT + select TPL_LIBCOMMON_SUPPORT + select TPL_LIBGENERIC_SUPPORT + select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL + select TPL_OF_CONTROL + select TPL_OF_PLATDATA + select TPL_RAM + select TPL_REGMAP + select TPL_SERIAL_SUPPORT + select TPL_SYSCON imply USB_FUNCTION_ROCKUSB imply CMD_ROCKUSB help
arch/arm/mach-rockchip/rk3288/Kconfig +0 -14
@@ -99,21 +99,7 @@ config TARGET_VYASA_RK3288 bool "Vyasa-RK3288" select BOARD_LATE_INIT select ROCKCHIP_BROM_HELPER - select SUPPORT_TPL select TPL - select TPL_BOOTROM_SUPPORT - select TPL_CLK - select TPL_DM - select TPL_DRIVERS_MISC_SUPPORT - select TPL_LIBCOMMON_SUPPORT - select TPL_LIBGENERIC_SUPPORT - select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL - select TPL_OF_CONTROL - select TPL_OF_PLATDATA - select TPL_RAM - select TPL_REGMAP - select TPL_SERIAL_SUPPORT - select TPL_SYSCON help Vyasa is a RK3288-based development board with 2 USB ports, HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It
Signature · 1 line
2.20.1
PATCH 1/6 rockchip: rk3288: enable TPL configs to chip level
Quoted 52 lines · Kever Yang
More boards other than vyasa needs TPL, so enable the TPL configs at chip level instead of board level.
Signed-off-by Kever Yang <[email protected]>---
arch/arm/mach-rockchip/Kconfig | 14 ++++++++++++++ arch/arm/mach-rockchip/rk3288/Kconfig | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-)arch/arm/mach-rockchip/Kconfig +14
-0@@ -87,6 +87,20 @@ config ROCKCHIP_RK3288 select SPL_BOARD_INIT if SPL select SUPPORT_SPL select SPL + select SUPPORT_TPL + select TPL_BOOTROM_SUPPORT + select TPL_CLK + select TPL_DM + select TPL_DRIVERS_MISC_SUPPORT + select TPL_LIBCOMMON_SUPPORT + select TPL_LIBGENERIC_SUPPORT + select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL + select TPL_OF_CONTROL + select TPL_OF_PLATDATA + select TPL_RAM + select TPL_REGMAP + select TPL_SERIAL_SUPPORT + select TPL_SYSCON imply USB_FUNCTION_ROCKUSB imply CMD_ROCKUSB helparch/arm/mach-rockchip/rk3288/Kconfig +0
-7@@ -99,21 +99,7 @@ config TARGET_VYASA_RK3288 bool "Vyasa-RK3288" select BOARD_LATE_INIT select ROCKCHIP_BROM_HELPER - select SUPPORT_TPL select TPL - select TPL_BOOTROM_SUPPORT - select TPL_CLK - select TPL_DM - select TPL_DRIVERS_MISC_SUPPORT - select TPL_LIBCOMMON_SUPPORT - select TPL_LIBGENERIC_SUPPORT
arch/arm/mach-rockchip/rk3288/Kconfig config TARGET_VYASA_RK3288 · line 105
Quoted 10 lines
arch/arm/mach-rockchip/rk3288/Kconfig +0
-7- select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL - select TPL_OF_CONTROL - select TPL_OF_PLATDATA - select TPL_RAM - select TPL_REGMAP - select TPL_SERIAL_SUPPORT - select TPL_SYSCON help Vyasa is a RK3288-based development board with 2 USB ports, HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It
I remember, I have added r-b tag to same patch before from Heiko. what ever is planning to pick add my
PATCH 2/6 rockchip: rk3288: add separate TPL STACK address
In reply to Kever YangTPL is at SRAM while other stage is at SDRAM, so it needs separate STACK.
---
arch/arm/mach-rockchip/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/Kconfig +4 -0
@@ -95,6 +95,7 @@ config ROCKCHIP_RK3288 select TPL_LIBCOMMON_SUPPORT select TPL_LIBGENERIC_SUPPORT select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL + select TPL_NEEDS_SEPARATE_STACK if TPL select TPL_OF_CONTROL select TPL_OF_PLATDATA select TPL_RAM
@@ -118,6 +119,9 @@ config TPL_TEXT_BASE config TPL_MAX_SIZE default 32768 +config TPL_STACK + default 0xff718000 + endif config ROCKCHIP_RK3328
Signature · 1 line
2.20.1
PATCH 2/6 rockchip: rk3288: add separate TPL STACK address
Quoted 6 lines · Kever Yang
TPL is at SRAM while other stage is at SDRAM, so it needs separate STACK.
Signed-off-by Kever Yang <[email protected]>---
Jagan Teki <[email protected]>
PATCH 2/6 rockchip: rk3288: add separate TPL STACK address
Quoted 10 lines · Jagan Teki
Quoted 6 lines · Kever Yang
TPL is at SRAM while other stage is at SDRAM, so it needs separate STACK.
Signed-off-by Kever Yang <[email protected]>---
Jagan Teki <[email protected]>
PATCH 3/6 rockchip: dts: rk3288-tinker: enable sdmmc pinctrl node in spl
In reply to Kever Yangrockchip pinctrl driver has update to use dts, so we need to add the pinctrl config in SPL for sdmmc.
---
arch/arm/dts/rk3288-tinker.dts | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
arch/arm/dts/rk3288-tinker.dts +25 -1
@@ -28,7 +28,7 @@ &pinctrl { - u-boot,dm-pre-reloc; + u-boot,dm-spl usb { host_vbus_drv: host-vbus-drv {
@@ -37,6 +37,30 @@ }; }; +&pcfg_pull_none_drv_8ma { + u-boot,dm-spl +}; + +&pcfg_pull_up_drv_8ma { + u-boot,dm-spl +}; + +&sdmmc_bus4 { + u-boot,dm-spl +}; + +&sdmmc_clk { + u-boot,dm-spl +}; + +&sdmmc_cmd { + u-boot,dm-spl +}; + +&sdmmc_pwr { + u-boot,dm-spl +}; + &pwm1 { status = "okay"; };
Signature · 1 line
2.20.1
PATCH 3/6 rockchip: dts: rk3288-tinker: enable sdmmc pinctrl node in spl
Quoted 40 lines · Kever Yang
rockchip pinctrl driver has update to use dts, so we need to add the pinctrl config in SPL for sdmmc.
Signed-off-by Kever Yang <[email protected]>---
arch/arm/dts/rk3288-tinker.dts | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)arch/arm/dts/rk3288-tinker.dts +14
-1@@ -28,7 +28,7 @@ &pinctrl { - u-boot,dm-pre-reloc; + u-boot,dm-spl usb { host_vbus_drv: host-vbus-drv {@@ -37,6 +37,30 @@ }; }; +&pcfg_pull_none_drv_8ma { + u-boot,dm-spl +}; + +&pcfg_pull_up_drv_8ma { + u-boot,dm-spl +}; + +&sdmmc_bus4 { + u-boot,dm-spl +}; + +&sdmmc_clk {
arch/arm/dts/rk3288-tinker.dts line 62
Quoted 10 lines
arch/arm/dts/rk3288-tinker.dts +10
-0+ u-boot,dm-spl +}; + +&sdmmc_cmd { + u-boot,dm-spl +}; + +&sdmmc_pwr { + u-boot,dm-spl +};
Moving these to -u-boot.dtsi make easy for DTS sync later.
PATCH 4/6 rockchip: config: update config for TPL support on tinker-rk3288
In reply to Kever YangWe need to update TEXT BASE for TPL/SPL/U-Boot; SPL no need relocate STACK after enable TPL, so remove it; Don't enable pinctrl names so that SPL can get pinctrl dts;
---
configs/tinker-rk3288_defconfig | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
configs/tinker-rk3288_defconfig +5 -8
@@ -1,13 +1,12 @@ CONFIG_ARM=y CONFIG_ARCH_ROCKCHIP=y -CONFIG_SYS_TEXT_BASE=0x00000000 +CONFIG_SYS_TEXT_BASE=0x01000000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ROCKCHIP_RK3288=y -CONFIG_SPL_SIZE_LIMIT=30720 -CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y +CONFIG_TPL_LDSCRIPT="arch/arm/mach-rockchip/u-boot-tpl.lds" CONFIG_TARGET_TINKER_RK3288=y CONFIG_NR_DRAM_BANKS=1 -CONFIG_SPL_STACK_R_ADDR=0x80000 +CONFIG_SPL_SIZE_LIMIT=400000 CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y
@@ -17,9 +16,7 @@ CONFIG_CONSOLE_MUX=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_TEXT_BASE=0xff704000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 +CONFIG_SPL_TEXT_BASE=0 CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y
@@ -37,7 +34,7 @@ CONFIG_CMD_REGULATOR=y CONFIG_SPL_PARTITION_UUIDS=y CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker" -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y
Signature · 1 line
2.20.1
PATCH 5/6 rockchip: config: tiner-rk3288: extend CONFIG_SYS_MONITOR_LEN to 600KB
In reply to Kever YangThe raw u-boot.bin for tinker board has been about 450KB without debug option, and 550KB with all debug on, and the default value is 200KB, which is not enough for run raw u-boot.bin.
---
include/configs/tinker_rk3288.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/tinker_rk3288.h +1 -1
@@ -18,5 +18,5 @@ func(DHCP, dchp, na)#define CONFIG_SYS_MMC_ENV_DEV 1 - +#define CONFIG_SYS_MONITOR_LEN (600 * 1024)#endif
Signature · 1 line
2.20.1
PATCH 6/6 rockchip: rk3288: enable TPL for tinker-board
In reply to Kever YangAll the config for TPL has been update, we can enable the TPL.
---
arch/arm/mach-rockchip/rk3288/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-rockchip/rk3288/Kconfig +1 -0
@@ -118,6 +118,7 @@ config TARGET_ROCK2 config TARGET_TINKER_RK3288 bool "Tinker-RK3288" select BOARD_LATE_INIT + select TPL help Tinker is a RK3288-based development board with 2 USB ports, HDMI, micro-SD card, audio, Gigabit Ethernet. It also includes on-board
Signature · 1 line
2.20.1