[PATCH 00/13] rockchip: rk3288-tinker: Migrate to OF_UPSTREAM

This series migrate Tinker Board to use OF_UPSTREAM, cleanup devices and pinctrl included in xPL control FDT and finally change to use FIT with checksum validation.
TPL continue to OF_PLATDATA after this series, however boot testing was done with and without use of OF_PLATDATA.
Features tested on a Tinker Board S: - SD-card boot - eMMC boot - Ethernet - USB gadget - USB host
Jonas Karlman (13): board: rockchip: rk3288-tinker: Add myself as reviewer to MAINTAINERS rockchip: rk3288-tinker: Sort u-boot.dtsi nodes alphabetically rockchip: rk3288-tinker: Only include required DT nodes in TPL rockchip: rk3288-tinker: Drop unused vcc_sd regulator from SPL rockchip: rk3288-tinker: Include mmc nodes in pre-reloc for env load rockchip: rk3288-tinker: Set cpuid and serial env var rockchip: rk3288-tinker: Sync defconfig options from rk3288-tinker-s rockchip: rk3288-tinker: Use common bss and stack addresses rockchip: rk3288-tinker: Drop use of silent console and late boardinfo rockchip: rk3288-tinker: Drop USE_PREBOOT Kconfig option rockchip: rk3288-tinker: Migrate to OF_UPSTREAM rockchip: rk3288-tinker: Fix slow Ethernet initializion rockchip: rk3288-tinker: Change to use FIT
arch/arm/dts/Makefile | 2 - arch/arm/dts/rk3288-tinker-s-u-boot.dtsi | 13 +- arch/arm/dts/rk3288-tinker-s.dts | 29 - arch/arm/dts/rk3288-tinker-u-boot.dtsi | 53 +- arch/arm/dts/rk3288-tinker.dts | 33 -- arch/arm/dts/rk3288-tinker.dtsi | 533 ------------------- arch/arm/mach-rockchip/rk3288/Kconfig | 6 +- board/rockchip/tinker_rk3288/MAINTAINERS | 7 +- board/rockchip/tinker_rk3288/tinker-rk3288.c | 2 +- configs/tinker-rk3288_defconfig | 41 +- configs/tinker-s-rk3288_defconfig | 38 +- 11 files changed, 81 insertions(+), 676 deletions(-) delete mode 100644 arch/arm/dts/rk3288-tinker-s.dts delete mode 100644 arch/arm/dts/rk3288-tinker.dts delete mode 100644 arch/arm/dts/rk3288-tinker.dtsi

Add myself as a reviewer for Tinker Board and S variant so that I can help with review and testing of defconfig and device tree changes.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- board/rockchip/tinker_rk3288/MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/rockchip/tinker_rk3288/MAINTAINERS b/board/rockchip/tinker_rk3288/MAINTAINERS index 3869d5dc8534..a5cae55d4286 100644 --- a/board/rockchip/tinker_rk3288/MAINTAINERS +++ b/board/rockchip/tinker_rk3288/MAINTAINERS @@ -1,5 +1,6 @@ TINKER-RK3288 M: Lin Huang hl@rock-chips.com +R: Jonas Karlman jonas@kwiboo.se S: Maintained F: arch/arm/dts/rk3288-tinker.dts F: arch/arm/dts/rk3288-tinker.dtsi @@ -12,6 +13,7 @@ F: configs/tinker-rk3288_defconfig
TINKER-S-RK3288 M: Michael Trimarchi michael@amarulasolutions.com +R: Jonas Karlman jonas@kwiboo.se S: Maintained F: board/rockchip/tinker_rk3288 F: include/configs/tinker_rk3288.h

On 2024/11/6 00:00, Jonas Karlman wrote:
Add myself as a reviewer for Tinker Board and S variant so that I can help with review and testing of defconfig and device tree changes.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
board/rockchip/tinker_rk3288/MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/rockchip/tinker_rk3288/MAINTAINERS b/board/rockchip/tinker_rk3288/MAINTAINERS index 3869d5dc8534..a5cae55d4286 100644 --- a/board/rockchip/tinker_rk3288/MAINTAINERS +++ b/board/rockchip/tinker_rk3288/MAINTAINERS @@ -1,5 +1,6 @@ TINKER-RK3288 M: Lin Huang hl@rock-chips.com +R: Jonas Karlman jonas@kwiboo.se S: Maintained F: arch/arm/dts/rk3288-tinker.dts F: arch/arm/dts/rk3288-tinker.dtsi @@ -12,6 +13,7 @@ F: configs/tinker-rk3288_defconfig
TINKER-S-RK3288 M: Michael Trimarchi michael@amarulasolutions.com +R: Jonas Karlman jonas@kwiboo.se S: Maintained F: board/rockchip/tinker_rk3288 F: include/configs/tinker_rk3288.h

Sort the nodes in rk3288-tinker u-boot.dtsi files in alphabetical order.
This has no intended change to board DTs and only rearrange nodes in preparation for future changes.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- arch/arm/dts/rk3288-tinker-s-u-boot.dtsi | 8 ++--- arch/arm/dts/rk3288-tinker-u-boot.dtsi | 44 ++++++++++++------------ 2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi index b4c5483146ab..a782f2f9804a 100644 --- a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi @@ -17,18 +17,18 @@ bootph-pre-ram; };
-&emmc_clk { +&emmc_bus8 { bootph-pre-ram; };
-&emmc_cmd { +&emmc_clk { bootph-pre-ram; };
-&emmc_pwr { +&emmc_cmd { bootph-pre-ram; };
-&emmc_bus8 { +&emmc_pwr { bootph-pre-ram; }; diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 0cf1b696d168..032dac221c24 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -17,6 +17,10 @@ rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>; };
+&gpio7 { + bootph-pre-ram; +}; + &i2c2 { m24c08@50 { compatible = "at,24c08", "i2c-eeprom"; @@ -24,31 +28,15 @@ }; };
-&pinctrl { - bootph-all; -}; - -&uart2 { - bootph-all; -}; - -&uart2_xfer { - bootph-all; -}; - -&sdmmc { - bootph-pre-ram; -}; - -&gpio7 { +&pcfg_pull_none { bootph-pre-ram; };
-&vcc_sd { +&pcfg_pull_none_drv_8ma { bootph-pre-ram; };
-&pcfg_pull_none_drv_8ma { +&pcfg_pull_up { bootph-pre-ram; };
@@ -56,11 +44,11 @@ bootph-pre-ram; };
-&pcfg_pull_none { - bootph-pre-ram; +&pinctrl { + bootph-all; };
-&pcfg_pull_up { +&sdmmc { bootph-pre-ram; };
@@ -83,3 +71,15 @@ &sdmmc_pwr { bootph-pre-ram; }; + +&uart2 { + bootph-all; +}; + +&uart2_xfer { + bootph-all; +}; + +&vcc_sd { + bootph-pre-ram; +};

On 2024/11/6 00:00, Jonas Karlman wrote:
Sort the nodes in rk3288-tinker u-boot.dtsi files in alphabetical order.
This has no intended change to board DTs and only rearrange nodes in preparation for future changes.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/dts/rk3288-tinker-s-u-boot.dtsi | 8 ++--- arch/arm/dts/rk3288-tinker-u-boot.dtsi | 44 ++++++++++++------------ 2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi index b4c5483146ab..a782f2f9804a 100644 --- a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi @@ -17,18 +17,18 @@ bootph-pre-ram; };
-&emmc_clk { +&emmc_bus8 { bootph-pre-ram; };
-&emmc_cmd { +&emmc_clk { bootph-pre-ram; };
-&emmc_pwr { +&emmc_cmd { bootph-pre-ram; };
-&emmc_bus8 { +&emmc_pwr { bootph-pre-ram; }; diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 0cf1b696d168..032dac221c24 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -17,6 +17,10 @@ rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>; };
+&gpio7 {
- bootph-pre-ram;
+};
- &i2c2 { m24c08@50 { compatible = "at,24c08", "i2c-eeprom";
@@ -24,31 +28,15 @@ }; };
-&pinctrl {
- bootph-all;
-};
-&uart2 {
- bootph-all;
-};
-&uart2_xfer {
- bootph-all;
-};
-&sdmmc {
- bootph-pre-ram;
-};
-&gpio7 { +&pcfg_pull_none { bootph-pre-ram; };
-&vcc_sd { +&pcfg_pull_none_drv_8ma { bootph-pre-ram; };
-&pcfg_pull_none_drv_8ma { +&pcfg_pull_up { bootph-pre-ram; };
@@ -56,11 +44,11 @@ bootph-pre-ram; };
-&pcfg_pull_none {
- bootph-pre-ram;
+&pinctrl {
- bootph-all; };
-&pcfg_pull_up { +&sdmmc { bootph-pre-ram; };
@@ -83,3 +71,15 @@ &sdmmc_pwr { bootph-pre-ram; };
+&uart2 {
- bootph-all;
+};
+&uart2_xfer {
- bootph-all;
+};
+&vcc_sd {
- bootph-pre-ram;
+};

Drop the unneeded bootph-all prop from dmc node, it is already defined in soc u-boot.dtsi.
Remove booth-all prop from gpio7 node, this node is not needed in TPL.
Adjust bootph props to include pinctrl related nodes for UART2.
Remove the explicit bootph-all prop from the pinctrl node, any bootph- prop will automatically be propagated to the pinctrl node.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- arch/arm/dts/rk3288-tinker-u-boot.dtsi | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 032dac221c24..1665e4f5d10f 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -6,7 +6,6 @@ #include "rk3288-u-boot.dtsi"
&dmc { - bootph-all; rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d 0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6 0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0 @@ -18,6 +17,7 @@ };
&gpio7 { + /delete-property/ bootph-all; bootph-pre-ram; };
@@ -29,7 +29,7 @@ };
&pcfg_pull_none { - bootph-pre-ram; + bootph-all; };
&pcfg_pull_none_drv_8ma { @@ -37,17 +37,13 @@ };
&pcfg_pull_up { - bootph-pre-ram; + bootph-all; };
&pcfg_pull_up_drv_8ma { bootph-pre-ram; };
-&pinctrl { - bootph-all; -}; - &sdmmc { bootph-pre-ram; }; @@ -77,7 +73,8 @@ };
&uart2_xfer { - bootph-all; + bootph-pre-sram; + bootph-pre-ram; };
&vcc_sd {

On 2024/11/6 00:00, Jonas Karlman wrote:
Drop the unneeded bootph-all prop from dmc node, it is already defined in soc u-boot.dtsi.
Remove booth-all prop from gpio7 node, this node is not needed in TPL.
Adjust bootph props to include pinctrl related nodes for UART2.
Remove the explicit bootph-all prop from the pinctrl node, any bootph- prop will automatically be propagated to the pinctrl node.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/dts/rk3288-tinker-u-boot.dtsi | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 032dac221c24..1665e4f5d10f 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -6,7 +6,6 @@ #include "rk3288-u-boot.dtsi"
&dmc {
- bootph-all; rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d 0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6 0x4 0x8 0x4 0x76 0x4 0x0 0x30 0x0
@@ -18,6 +17,7 @@ };
&gpio7 {
- /delete-property/ bootph-all; bootph-pre-ram; };
@@ -29,7 +29,7 @@ };
&pcfg_pull_none {
- bootph-pre-ram;
bootph-all; };
&pcfg_pull_none_drv_8ma {
@@ -37,17 +37,13 @@ };
&pcfg_pull_up {
- bootph-pre-ram;
bootph-all; };
&pcfg_pull_up_drv_8ma { bootph-pre-ram; };
-&pinctrl {
- bootph-all;
-};
- &sdmmc { bootph-pre-ram; };
@@ -77,7 +73,8 @@ };
&uart2_xfer {
- bootph-all;
bootph-pre-sram;
bootph-pre-ram; };
&vcc_sd {

The sdmmc power come from vcc33_sd pmic regulator and not from the vcc_sd fixed regulator, as currently defined in the in-tree DT.
Drop vcc_sd and the related gpio7 and sdmmc_pwr nodes from being included in SPL along with any related Kconfig option. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is handled correctly in SPL.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- arch/arm/dts/rk3288-tinker-u-boot.dtsi | 9 --------- configs/tinker-rk3288_defconfig | 7 +------ configs/tinker-s-rk3288_defconfig | 7 +------ 3 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 1665e4f5d10f..4f230739f1c3 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -18,7 +18,6 @@
&gpio7 { /delete-property/ bootph-all; - bootph-pre-ram; };
&i2c2 { @@ -64,10 +63,6 @@ bootph-pre-ram; };
-&sdmmc_pwr { - bootph-pre-ram; -}; - &uart2 { bootph-all; }; @@ -76,7 +71,3 @@ bootph-pre-sram; bootph-pre-ram; }; - -&vcc_sd { - bootph-pre-ram; -}; diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 42dbef9c2c30..aff820ebfdda 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -4,7 +4,6 @@ CONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=y CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 -CONFIG_SPL_GPIO=y CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 @@ -33,8 +32,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -CONFIG_SPL_I2C=y -CONFIG_SPL_POWER=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -54,6 +51,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y @@ -74,10 +72,7 @@ CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_DM_PMIC=y CONFIG_PMIC_RK8XX=y -CONFIG_SPL_PMIC_RK8XX=y -CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y -CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index e62a03e066cc..6aef775a5717 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -5,7 +5,6 @@ CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_SYS_MALLOC_F_LEN=0x4000 -CONFIG_SPL_GPIO=y CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 @@ -33,8 +32,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -CONFIG_SPL_I2C=y -CONFIG_SPL_POWER=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -55,6 +52,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y @@ -75,10 +73,7 @@ CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_DM_PMIC=y CONFIG_PMIC_RK8XX=y -CONFIG_SPL_PMIC_RK8XX=y -CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y -CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y

On 2024/11/6 00:00, Jonas Karlman wrote:
The sdmmc power come from vcc33_sd pmic regulator and not from the vcc_sd fixed regulator, as currently defined in the in-tree DT.
Drop vcc_sd and the related gpio7 and sdmmc_pwr nodes from being included in SPL along with any related Kconfig option. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is handled correctly in SPL.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/dts/rk3288-tinker-u-boot.dtsi | 9 --------- configs/tinker-rk3288_defconfig | 7 +------ configs/tinker-s-rk3288_defconfig | 7 +------ 3 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 1665e4f5d10f..4f230739f1c3 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -18,7 +18,6 @@
&gpio7 { /delete-property/ bootph-all;
bootph-pre-ram; };
&i2c2 {
@@ -64,10 +63,6 @@ bootph-pre-ram; };
-&sdmmc_pwr {
- bootph-pre-ram;
-};
- &uart2 { bootph-all; };
@@ -76,7 +71,3 @@ bootph-pre-sram; bootph-pre-ram; };
-&vcc_sd {
- bootph-pre-ram;
-}; diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 42dbef9c2c30..aff820ebfdda 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -4,7 +4,6 @@ CONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=y CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 -CONFIG_SPL_GPIO=y CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 @@ -33,8 +32,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -CONFIG_SPL_I2C=y -CONFIG_SPL_POWER=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -54,6 +51,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y @@ -74,10 +72,7 @@ CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_DM_PMIC=y CONFIG_PMIC_RK8XX=y -CONFIG_SPL_PMIC_RK8XX=y -CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y -CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index e62a03e066cc..6aef775a5717 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -5,7 +5,6 @@ CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_SYS_MALLOC_F_LEN=0x4000 -CONFIG_SPL_GPIO=y CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 @@ -33,8 +32,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -CONFIG_SPL_I2C=y -CONFIG_SPL_POWER=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -55,6 +52,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigne CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y @@ -75,10 +73,7 @@ CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_DM_PMIC=y CONFIG_PMIC_RK8XX=y -CONFIG_SPL_PMIC_RK8XX=y -CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y -CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y

Include mmc related nodes in U-Boot proper pre-reloc phase to ensure environment can be loaded from mmc devices.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- arch/arm/dts/rk3288-tinker-s-u-boot.dtsi | 5 +++++ arch/arm/dts/rk3288-tinker-u-boot.dtsi | 7 +++++++ 2 files changed, 12 insertions(+)
diff --git a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi index a782f2f9804a..614d47ce1801 100644 --- a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi @@ -15,20 +15,25 @@
&emmc { bootph-pre-ram; + bootph-some-ram; };
&emmc_bus8 { bootph-pre-ram; + bootph-some-ram; };
&emmc_clk { bootph-pre-ram; + bootph-some-ram; };
&emmc_cmd { bootph-pre-ram; + bootph-some-ram; };
&emmc_pwr { bootph-pre-ram; + bootph-some-ram; }; diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 4f230739f1c3..7568b1495341 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -33,6 +33,7 @@
&pcfg_pull_none_drv_8ma { bootph-pre-ram; + bootph-some-ram; };
&pcfg_pull_up { @@ -41,26 +42,32 @@
&pcfg_pull_up_drv_8ma { bootph-pre-ram; + bootph-some-ram; };
&sdmmc { bootph-pre-ram; + bootph-some-ram; };
&sdmmc_bus4 { bootph-pre-ram; + bootph-some-ram; };
&sdmmc_cd { bootph-pre-ram; + bootph-some-ram; };
&sdmmc_clk { bootph-pre-ram; + bootph-some-ram; };
&sdmmc_cmd { bootph-pre-ram; + bootph-some-ram; };
&uart2 {

On 2024/11/6 00:00, Jonas Karlman wrote:
Include mmc related nodes in U-Boot proper pre-reloc phase to ensure environment can be loaded from mmc devices.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/dts/rk3288-tinker-s-u-boot.dtsi | 5 +++++ arch/arm/dts/rk3288-tinker-u-boot.dtsi | 7 +++++++ 2 files changed, 12 insertions(+)
diff --git a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi index a782f2f9804a..614d47ce1801 100644 --- a/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-s-u-boot.dtsi @@ -15,20 +15,25 @@
&emmc { bootph-pre-ram;
bootph-some-ram; };
&emmc_bus8 { bootph-pre-ram;
bootph-some-ram; };
&emmc_clk { bootph-pre-ram;
bootph-some-ram; };
&emmc_cmd { bootph-pre-ram;
bootph-some-ram; };
&emmc_pwr { bootph-pre-ram;
bootph-some-ram; };
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 4f230739f1c3..7568b1495341 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -33,6 +33,7 @@
&pcfg_pull_none_drv_8ma { bootph-pre-ram;
bootph-some-ram; };
&pcfg_pull_up {
@@ -41,26 +42,32 @@
&pcfg_pull_up_drv_8ma { bootph-pre-ram;
bootph-some-ram; };
&sdmmc { bootph-pre-ram;
bootph-some-ram; };
&sdmmc_bus4 { bootph-pre-ram;
bootph-some-ram; };
&sdmmc_cd { bootph-pre-ram;
bootph-some-ram; };
&sdmmc_clk { bootph-pre-ram;
bootph-some-ram; };
&sdmmc_cmd { bootph-pre-ram;
bootph-some-ram; };
&uart2 {

Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set the cpuid# and serial# env vars.
Change to read mac address from eeprom in rockchip_early_misc_init_r() to ensure the ethaddr env var is set before rockchip_setup_macaddr() try to set ethaddr based on cpuid.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- board/rockchip/tinker_rk3288/tinker-rk3288.c | 2 +- configs/tinker-rk3288_defconfig | 2 ++ configs/tinker-s-rk3288_defconfig | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index e966e9f201ab..dfd553d1aa5f 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -22,7 +22,7 @@ static int get_ethaddr_from_eeprom(u8 *addr) return i2c_eeprom_read(dev, 0, addr, 6); }
-int rk3288_board_late_init(void) +int rockchip_early_misc_init_r(void) { u8 ethaddr[6];
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index aff820ebfdda..851c312d4db5 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -29,6 +29,7 @@ CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set @@ -63,6 +64,7 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y +CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 6aef775a5717..2269d04ee644 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -29,6 +29,7 @@ CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set @@ -64,6 +65,7 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y +CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y

On 2024/11/6 00:00, Jonas Karlman wrote:
Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set the cpuid# and serial# env vars.
Change to read mac address from eeprom in rockchip_early_misc_init_r() to ensure the ethaddr env var is set before rockchip_setup_macaddr() try to set ethaddr based on cpuid.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
board/rockchip/tinker_rk3288/tinker-rk3288.c | 2 +- configs/tinker-rk3288_defconfig | 2 ++ configs/tinker-s-rk3288_defconfig | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index e966e9f201ab..dfd553d1aa5f 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -22,7 +22,7 @@ static int get_ethaddr_from_eeprom(u8 *addr) return i2c_eeprom_read(dev, 0, addr, 6); }
-int rk3288_board_late_init(void) +int rockchip_early_misc_init_r(void) { u8 ethaddr[6];
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index aff820ebfdda..851c312d4db5 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -29,6 +29,7 @@ CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set @@ -63,6 +64,7 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y +CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 6aef775a5717..2269d04ee644 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -29,6 +29,7 @@ CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set @@ -64,6 +65,7 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y +CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y

Add missing Kconfig options used by the rk3288-tinker-s variant.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- configs/tinker-rk3288_defconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 851c312d4db5..0c2fd573b67b 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -41,6 +41,7 @@ CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_PMIC=y @@ -92,8 +93,10 @@ CONFIG_USB_ETHER_SMSC95XX=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set CONFIG_DISPLAY=y CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y +CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_DHRYSTONE=y CONFIG_ERRNO_STR=y

On 2024/11/6 00:00, Jonas Karlman wrote:
Add missing Kconfig options used by the rk3288-tinker-s variant.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
configs/tinker-rk3288_defconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 851c312d4db5..0c2fd573b67b 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -41,6 +41,7 @@ CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_PMIC=y @@ -92,8 +93,10 @@ CONFIG_USB_ETHER_SMSC95XX=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set CONFIG_DISPLAY=y CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y +CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_DHRYSTONE=y CONFIG_ERRNO_STR=y

Migrate to use common bss, stack and malloc heap size and addresses to unify memory use in TPL, SPL and pre-reloc.
Ensure SYS_MALLOC_F_LEN and TPL variant stay at 0x2000 and is unaffected on other boards not changed to use common malloc heap size.
ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- Typical malloc() usage on one of my Tinker Board:
TPL malloc() before relocation used 0x834 bytes (2 KB)
SPL malloc() before relocation used 0x10a4 bytes (4 KB) SPL malloc() used 0x140 bytes (0 KB)
Pre-reloc malloc() used 0xf20 bytes (3 KB) --- arch/arm/mach-rockchip/rk3288/Kconfig | 6 +++++- configs/tinker-rk3288_defconfig | 10 ---------- configs/tinker-s-rk3288_defconfig | 10 ---------- 3 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig index 69a5614b449a..672d634f7fb5 100644 --- a/arch/arm/mach-rockchip/rk3288/Kconfig +++ b/arch/arm/mach-rockchip/rk3288/Kconfig @@ -132,6 +132,7 @@ config TARGET_ROCK2 config TARGET_TINKER_RK3288 bool "Tinker-RK3288" select BOARD_LATE_INIT + select ROCKCHIP_COMMON_STACK_ADDR select TPL help Tinker is a RK3288-based development board with 2 USB ports, HDMI, @@ -160,7 +161,7 @@ config SYS_SOC default "rk3288"
config SYS_MALLOC_F_LEN - default 0x2000 + default 0x2000 if !SPL_SHARES_INIT_SP_ADDR
config SPL_DRIVERS_MISC default y @@ -177,6 +178,9 @@ config SPL_SERIAL config TPL_STACK default 0xff718000
+config TPL_SYS_MALLOC_F_LEN + default 0x2000 + config TPL_TEXT_BASE default 0xff704000
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 0c2fd573b67b..0f3d47e1a4fc 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -5,19 +5,11 @@ CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 CONFIG_SF_DEFAULT_SPEED=20000000 -CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker" CONFIG_DM_RESET=y -CONFIG_SYS_MONITOR_LEN=614400 CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y -CONFIG_SPL_STACK_R_ADDR=0x80000 -CONFIG_SPL_STACK=0xff718000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 CONFIG_SYS_BOOTM_LEN=0x4000000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SPL_SIZE_LIMIT=0x4b000 @@ -31,8 +23,6 @@ CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 -CONFIG_SPL_NO_BSS_LIMIT=y -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 2269d04ee644..a013571b2575 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -4,20 +4,12 @@ CONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=y CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 -CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 CONFIG_SF_DEFAULT_SPEED=20000000 CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker-s" CONFIG_DM_RESET=y -CONFIG_SYS_MONITOR_LEN=614400 CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y -CONFIG_SPL_STACK_R_ADDR=0x800000 -CONFIG_SPL_STACK=0xff718000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x300000 CONFIG_SYS_BOOTM_LEN=0x4000000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SPL_SIZE_LIMIT=0x4b000 @@ -31,8 +23,6 @@ CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 -CONFIG_SPL_NO_BSS_LIMIT=y -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y

On 2024/11/6 00:00, Jonas Karlman wrote:
Migrate to use common bss, stack and malloc heap size and addresses to unify memory use in TPL, SPL and pre-reloc.
Ensure SYS_MALLOC_F_LEN and TPL variant stay at 0x2000 and is unaffected on other boards not changed to use common malloc heap size.
ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
Typical malloc() usage on one of my Tinker Board:
TPL malloc() before relocation used 0x834 bytes (2 KB)
SPL malloc() before relocation used 0x10a4 bytes (4 KB) SPL malloc() used 0x140 bytes (0 KB)
Pre-reloc malloc() used 0xf20 bytes (3 KB)
arch/arm/mach-rockchip/rk3288/Kconfig | 6 +++++- configs/tinker-rk3288_defconfig | 10 ---------- configs/tinker-s-rk3288_defconfig | 10 ---------- 3 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig index 69a5614b449a..672d634f7fb5 100644 --- a/arch/arm/mach-rockchip/rk3288/Kconfig +++ b/arch/arm/mach-rockchip/rk3288/Kconfig @@ -132,6 +132,7 @@ config TARGET_ROCK2 config TARGET_TINKER_RK3288 bool "Tinker-RK3288" select BOARD_LATE_INIT
- select ROCKCHIP_COMMON_STACK_ADDR select TPL help Tinker is a RK3288-based development board with 2 USB ports, HDMI,
@@ -160,7 +161,7 @@ config SYS_SOC default "rk3288"
config SYS_MALLOC_F_LEN
- default 0x2000
default 0x2000 if !SPL_SHARES_INIT_SP_ADDR
config SPL_DRIVERS_MISC default y
@@ -177,6 +178,9 @@ config SPL_SERIAL config TPL_STACK default 0xff718000
+config TPL_SYS_MALLOC_F_LEN
- default 0x2000
- config TPL_TEXT_BASE default 0xff704000
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 0c2fd573b67b..0f3d47e1a4fc 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -5,19 +5,11 @@ CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 CONFIG_SF_DEFAULT_SPEED=20000000 -CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker" CONFIG_DM_RESET=y -CONFIG_SYS_MONITOR_LEN=614400 CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y -CONFIG_SPL_STACK_R_ADDR=0x80000 -CONFIG_SPL_STACK=0xff718000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 CONFIG_SYS_BOOTM_LEN=0x4000000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SPL_SIZE_LIMIT=0x4b000 @@ -31,8 +23,6 @@ CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 -CONFIG_SPL_NO_BSS_LIMIT=y -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 2269d04ee644..a013571b2575 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -4,20 +4,12 @@ CONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=y CONFIG_SYS_ARCH_TIMER=y CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 -CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000 CONFIG_SF_DEFAULT_SPEED=20000000 CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker-s" CONFIG_DM_RESET=y -CONFIG_SYS_MONITOR_LEN=614400 CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y -CONFIG_SPL_STACK_R_ADDR=0x800000 -CONFIG_SPL_STACK=0xff718000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x300000 CONFIG_SYS_BOOTM_LEN=0x4000000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SPL_SIZE_LIMIT=0x4b000 @@ -31,8 +23,6 @@ CONFIG_SILENT_CONSOLE=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 -CONFIG_SPL_NO_BSS_LIMIT=y -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y

Current use of SILENT_CONSOLE hide valuable information when something goes wrong during boot, drop this Kconfig option to allow user to see e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE, drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- configs/tinker-rk3288_defconfig | 2 -- configs/tinker-s-rk3288_defconfig | 2 -- 2 files changed, 4 deletions(-)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 0f3d47e1a4fc..fb42b8bcb00d 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -19,8 +19,6 @@ CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" -CONFIG_SILENT_CONSOLE=y -CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index a013571b2575..f3a392688f02 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -19,8 +19,6 @@ CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" -CONFIG_SILENT_CONSOLE=y -CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y

On 2024/11/6 00:00, Jonas Karlman wrote:
Current use of SILENT_CONSOLE hide valuable information when something goes wrong during boot, drop this Kconfig option to allow user to see e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE, drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
configs/tinker-rk3288_defconfig | 2 -- configs/tinker-s-rk3288_defconfig | 2 -- 2 files changed, 4 deletions(-)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 0f3d47e1a4fc..fb42b8bcb00d 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -19,8 +19,6 @@ CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" -CONFIG_SILENT_CONSOLE=y -CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index a013571b2575..f3a392688f02 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -19,8 +19,6 @@ CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" -CONFIG_SILENT_CONSOLE=y -CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y

After the migration to use standard boot, storage media should automatically be initialized in the order listed in boot_targets env.
Drop USE_PREBOOT to speed up boot with ~12 seconds when booting from e.g. SD-card or eMMC.
Before:
3,048,599 2,056 main_loop 3,050,717 2,118 usb_start 15,070,499 12,019,782 cli_loop
After:
3,058,244 2,054 main_loop 3,063,260 5,016 cli_loop
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- configs/tinker-rk3288_defconfig | 1 - configs/tinker-s-rk3288_defconfig | 1 - 2 files changed, 2 deletions(-)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index fb42b8bcb00d..1007d9ca9e15 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -17,7 +17,6 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index f3a392688f02..47d089ff4780 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -17,7 +17,6 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000

On 2024/11/6 00:00, Jonas Karlman wrote:
After the migration to use standard boot, storage media should automatically be initialized in the order listed in boot_targets env.
Drop USE_PREBOOT to speed up boot with ~12 seconds when booting from e.g. SD-card or eMMC.
Before:
3,048,599 2,056 main_loop 3,050,717 2,118 usb_start 15,070,499 12,019,782 cli_loop
After:
3,058,244 2,054 main_loop 3,063,260 5,016 cli_loop
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
configs/tinker-rk3288_defconfig | 1 - configs/tinker-s-rk3288_defconfig | 1 - 2 files changed, 2 deletions(-)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index fb42b8bcb00d..1007d9ca9e15 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -17,7 +17,6 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index f3a392688f02..47d089ff4780 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -17,7 +17,6 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000

The device tree for ASUS Tinker Board and S variant in dts/upstream can be used as-is by U-Boot, migrate board to OF_UPSTREAM.
The change to use DT from dts/upstream will include minor changes and fixes related to leds and regulators.
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- arch/arm/dts/Makefile | 2 - arch/arm/dts/rk3288-tinker-s.dts | 29 -- arch/arm/dts/rk3288-tinker.dts | 33 -- arch/arm/dts/rk3288-tinker.dtsi | 533 ----------------------- board/rockchip/tinker_rk3288/MAINTAINERS | 5 +- configs/tinker-rk3288_defconfig | 6 +- configs/tinker-s-rk3288_defconfig | 6 +- 7 files changed, 9 insertions(+), 605 deletions(-) delete mode 100644 arch/arm/dts/rk3288-tinker-s.dts delete mode 100644 arch/arm/dts/rk3288-tinker.dts delete mode 100644 arch/arm/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index aeccfa93fc53..40f2f768fc69 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -74,8 +74,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-popmetal.dtb \ rk3288-rock2-square.dtb \ rk3288-rock-pi-n8.dtb \ - rk3288-tinker.dtb \ - rk3288-tinker-s.dtb \ rk3288-veyron-jerry.dtb \ rk3288-veyron-mickey.dtb \ rk3288-veyron-minnie.dtb \ diff --git a/arch/arm/dts/rk3288-tinker-s.dts b/arch/arm/dts/rk3288-tinker-s.dts deleted file mode 100644 index cc7ac5f8811c..000000000000 --- a/arch/arm/dts/rk3288-tinker-s.dts +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. - */ - -/dts-v1/; - -#include "rk3288-tinker.dtsi" - -/ { - model = "Rockchip RK3288 Asus Tinker Board S"; - compatible = "asus,rk3288-tinker-s", "rockchip,rk3288"; - - chosen { - stdout-path = &uart2; - }; -}; - -&emmc { - bus-width = <8>; - cap-mmc-highspeed; - non-removable; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; - max-frequency = <150000000>; - mmc-hs200-1_8v; - mmc-ddr-1_8v; - status = "okay"; -}; diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts deleted file mode 100644 index 8b1848c310ee..000000000000 --- a/arch/arm/dts/rk3288-tinker.dts +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR X11 -/* - * (C) Copyright 2016 Rockchip Electronics Co., Ltd - */ - -/dts-v1/; -#include "rk3288-tinker.dtsi" - -/ { - model = "Tinker-RK3288"; - compatible = "rockchip,rk3288-tinker", "rockchip,rk3288"; - - chosen { - stdout-path = &uart2; - }; -}; - -&pinctrl { - usb { - host_vbus_drv: host-vbus-drv { - rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&pwm1 { - status = "okay"; -}; - -&usb_host1 { - vbus-supply = <&vcc5v0_host>; - status = "okay"; -}; diff --git a/arch/arm/dts/rk3288-tinker.dtsi b/arch/arm/dts/rk3288-tinker.dtsi deleted file mode 100644 index 62b4beb25100..000000000000 --- a/arch/arm/dts/rk3288-tinker.dtsi +++ /dev/null @@ -1,533 +0,0 @@ -/* - * This file is dual-licensed: you can use it either under the terms - * of the GPL or the X11 license, at your option. Note that this dual - * licensing only applies to this file, and not this project as a - * whole. - * - * a) This file is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * Or, alternatively, - * - * b) Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include <dt-bindings/input/input.h> -#include "rk3288.dtsi" - -/ { - memory { - device_type = "memory"; - reg = <0x0 0x0 0x0 0x80000000>; - }; - - ext_gmac: external-gmac-clock { - compatible = "fixed-clock"; - clock-frequency = <125000000>; - clock-output-names = "ext_gmac"; - #clock-cells = <0>; - }; - - gpio-keys { - compatible = "gpio-keys"; - autorepeat; - - pinctrl-names = "default"; - pinctrl-0 = <&pwrbtn>; - - button@0 { - gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; - label = "GPIO Key Power"; - linux,code = <KEY_POWER>; - linux,input-type = <1>; - gpio-key,wakeup = <1>; - debounce-interval = <100>; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - pwr-led { - gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; - }; - - act-led { - gpios=<&gpio2 3 GPIO_ACTIVE_LOW>; - linux,default-trigger="mmc0"; - }; - }; - - vcc_sys: vsys-regulator { - compatible = "regulator-fixed"; - regulator-name = "vcc_sys"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-always-on; - regulator-boot-on; - }; - - /* - * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from - * vcc_io directly. Those boards won't be able to power cycle SD cards - * but it shouldn't hurt to toggle this pin there anyway. - */ - vcc_sd: sdmmc-regulator { - compatible = "regulator-fixed"; - gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc_pwr>; - regulator-name = "vcc_sd"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - startup-delay-us = <100000>; - vin-supply = <&vcc_io>; - }; - - vcc5v0_host: usb-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&host_vbus_drv>; - regulator-name = "vcc5v0_host"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-always-on; - }; -}; - -&cpu0 { - cpu0-supply = <&vdd_cpu>; -}; - -&sdmmc { - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - card-detect-delay = <200>; - disable-wp; /* wp not hooked up */ - num-slots = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; - status = "okay"; - supports-sd; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; -}; - -&gpu { - mali-supply = <&vdd_gpu>; - status = "okay"; -}; - -&gmac { - phy-supply = <&vcc33_lan>; - phy-mode = "rgmii"; - clock_in_out = "input"; - snps,reset-gpio = <&gpio4 7 0>; - snps,reset-active-low; - snps,reset-delays-us = <0 10000 1000000>; - assigned-clocks = <&cru SCLK_MAC>; - assigned-clock-parents = <&ext_gmac>; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; - tx_delay = <0x30>; - rx_delay = <0x10>; - status = "okay"; -}; - -&hdmi { - ddc-i2c-bus = <&i2c5>; - status = "okay"; -}; - -&i2c0 { - status = "okay"; - clock-frequency = <400000>; - - rk808: pmic@1b { - compatible = "rockchip,rk808"; - reg = <0x1b>; - interrupt-parent = <&gpio0>; - interrupts = <4 IRQ_TYPE_LEVEL_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int &global_pwroff>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - clock-output-names = "xin32k", "rk808-clkout2"; - - vcc1-supply = <&vcc_sys>; - vcc2-supply = <&vcc_sys>; - vcc3-supply = <&vcc_sys>; - vcc4-supply = <&vcc_sys>; - vcc6-supply = <&vcc_sys>; - vcc7-supply = <&vcc_sys>; - vcc8-supply = <&vcc_18>; - vcc9-supply = <&vcc_io>; - vcc10-supply = <&vcc_io>; - vcc11-supply = <&vcc_sys>; - vcc12-supply = <&vcc_io>; - vddio-supply = <&vcc18_ldo1>; - - regulators { - vdd_cpu: DCDC_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-name = "vdd_arm"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_gpu: DCDC_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <850000>; - regulator-max-microvolt = <1250000>; - regulator-name = "vdd_gpu"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc_ddr"; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc_io: DCDC_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc_io"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc18_ldo1: LDO_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcc18_ldo1"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc33_mipi: LDO_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc33_mipi"; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_10: LDO_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-name = "vdd_10"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc18_codec: LDO_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcc18_codec"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vccio_sd"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vdd10_lcd: LDO_REG6 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-name = "vdd10_lcd"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc_18: LDO_REG7 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcc_18"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc18_lcd: LDO_REG8 { - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "vcc18_lcd"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc33_sd: SWITCH_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc33_sd"; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc33_lan: SWITCH_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc33_lan"; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - }; - }; -}; - -&i2c2 { - status = "okay"; - headset: nau8825@1a { - compatible = "nuvoton,nau8825"; - #sound-dai-cells = <0>; - reg = <0x1a>; - interrupt-parent = <&gpio6>; - interrupts = <5 IRQ_TYPE_LEVEL_LOW>; - nuvoton,jkdet-enable = <1>; - nuvoton,jkdet-pull-enable = <1>; - nuvoton,jkdet-pull-up = <0>; - nuvoton,jkdet-polarity = <1>; - nuvoton,vref-impedance = <2>; - nuvoton,micbias-voltage = <6>; - nuvoton,sar-threshold-num = <4>; - nuvoton,sar-threshold = <0xa 0x14 0x26 0x73>; - nuvoton,sar-hysteresis = <0>; - nuvoton,sar-voltage = <6>; - nuvoton,sar-compare-time = <0>; - nuvoton,sar-sampling-time = <0>; - nuvoton,short-key-debounce = <3>; - nuvoton,jack-insert-debounce = <7>; - nuvoton,jack-eject-debounce = <7>; - clock-names = "mclk"; - clocks = <&cru SCLK_I2S0_OUT>; - }; -}; - -&i2c5 { - status = "okay"; -}; - -&wdt { - status = "okay"; -}; - -&pwm0 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc18_ldo1>; - status ="okay"; -}; - -&uart0 { - status = "okay"; -}; - -&uart1 { - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; - -&uart3 { - status = "okay"; -}; - -&uart4 { - status = "okay"; -}; - -&tsadc { - rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ - rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ - status = "okay"; -}; - -&usbphy { - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host1 { - status = "okay"; -}; - -&usb_otg { - status= "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&vopl { - status = "okay"; -}; - -&vopl_mmu { - status = "okay"; -}; - -&pinctrl { - pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { - drive-strength = <8>; - }; - - pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { - bias-pull-up; - drive-strength = <8>; - }; - - backlight { - bl_en: bl-en { - rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - buttons { - pwrbtn: pwrbtn { - rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - eth_phy { - eth_phy_pwr: eth-phy-pwr { - rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int: pmic-int { - rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - sdmmc { - /* - * Default drive strength isn't enough to achieve even - * high-speed mode on EVB board so bump up to 8ma. - */ - sdmmc_bus4: sdmmc-bus4 { - rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, - <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, - <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, - <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; - }; - - sdmmc_clk: sdmmc-clk { - rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>; - }; - - sdmmc_cmd: sdmmc-cmd { - rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; - }; - - sdmmc_pwr: sdmmc-pwr { - rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - usb { - host_vbus_drv: host-vbus-drv { - rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pwr_3g: pwr-3g { - rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; diff --git a/board/rockchip/tinker_rk3288/MAINTAINERS b/board/rockchip/tinker_rk3288/MAINTAINERS index a5cae55d4286..ab1ce72a77b2 100644 --- a/board/rockchip/tinker_rk3288/MAINTAINERS +++ b/board/rockchip/tinker_rk3288/MAINTAINERS @@ -2,10 +2,6 @@ TINKER-RK3288 M: Lin Huang hl@rock-chips.com R: Jonas Karlman jonas@kwiboo.se S: Maintained -F: arch/arm/dts/rk3288-tinker.dts -F: arch/arm/dts/rk3288-tinker.dtsi -F: arch/arm/dts/rk3288-tinker-s.dts -F: arch/arm/dts/rk3288-tinker-s-u-boot.dtsi F: arch/arm/dts/rk3288-tinker-u-boot.dtsi F: board/rockchip/tinker_rk3288 F: include/configs/tinker_rk3288.h @@ -15,6 +11,7 @@ TINKER-S-RK3288 M: Michael Trimarchi michael@amarulasolutions.com R: Jonas Karlman jonas@kwiboo.se S: Maintained +F: arch/arm/dts/rk3288-tinker-s-u-boot.dtsi F: board/rockchip/tinker_rk3288 F: include/configs/tinker_rk3288.h F: configs/tinker-s-rk3288_defconfig diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 1007d9ca9e15..b7636fe581f4 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -6,7 +6,7 @@ CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_SF_DEFAULT_SPEED=20000000 -CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker" +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3288-tinker" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y @@ -17,7 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y @@ -36,6 +36,8 @@ CONFIG_CMD_REGULATOR=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_UPSTREAM=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 47d089ff4780..e50424746c81 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -6,7 +6,7 @@ CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_SF_DEFAULT_SPEED=20000000 -CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker-s" +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3288-tinker-s" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y @@ -17,7 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker-s.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y @@ -36,6 +36,8 @@ CONFIG_CMD_REGULATOR=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_UPSTREAM=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y

On 2024/11/6 00:00, Jonas Karlman wrote:
The device tree for ASUS Tinker Board and S variant in dts/upstream can be used as-is by U-Boot, migrate board to OF_UPSTREAM.
The change to use DT from dts/upstream will include minor changes and fixes related to leds and regulators.
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/dts/Makefile | 2 - arch/arm/dts/rk3288-tinker-s.dts | 29 -- arch/arm/dts/rk3288-tinker.dts | 33 -- arch/arm/dts/rk3288-tinker.dtsi | 533 ----------------------- board/rockchip/tinker_rk3288/MAINTAINERS | 5 +- configs/tinker-rk3288_defconfig | 6 +- configs/tinker-s-rk3288_defconfig | 6 +- 7 files changed, 9 insertions(+), 605 deletions(-) delete mode 100644 arch/arm/dts/rk3288-tinker-s.dts delete mode 100644 arch/arm/dts/rk3288-tinker.dts delete mode 100644 arch/arm/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index aeccfa93fc53..40f2f768fc69 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -74,8 +74,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \ rk3288-popmetal.dtb \ rk3288-rock2-square.dtb \ rk3288-rock-pi-n8.dtb \
- rk3288-tinker.dtb \
- rk3288-tinker-s.dtb \ rk3288-veyron-jerry.dtb \ rk3288-veyron-mickey.dtb \ rk3288-veyron-minnie.dtb \
diff --git a/arch/arm/dts/rk3288-tinker-s.dts b/arch/arm/dts/rk3288-tinker-s.dts deleted file mode 100644 index cc7ac5f8811c..000000000000 --- a/arch/arm/dts/rk3288-tinker-s.dts +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/*
- Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
- */
-/dts-v1/;
-#include "rk3288-tinker.dtsi"
-/ {
- model = "Rockchip RK3288 Asus Tinker Board S";
- compatible = "asus,rk3288-tinker-s", "rockchip,rk3288";
- chosen {
stdout-path = &uart2;
- };
-};
-&emmc {
- bus-width = <8>;
- cap-mmc-highspeed;
- non-removable;
- pinctrl-names = "default";
- pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
- max-frequency = <150000000>;
- mmc-hs200-1_8v;
- mmc-ddr-1_8v;
- status = "okay";
-}; diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts deleted file mode 100644 index 8b1848c310ee..000000000000 --- a/arch/arm/dts/rk3288-tinker.dts +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR X11 -/*
- (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
-/dts-v1/; -#include "rk3288-tinker.dtsi"
-/ {
- model = "Tinker-RK3288";
- compatible = "rockchip,rk3288-tinker", "rockchip,rk3288";
- chosen {
stdout-path = &uart2;
- };
-};
-&pinctrl {
- usb {
host_vbus_drv: host-vbus-drv {
rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
};
- };
-};
-&pwm1 {
- status = "okay";
-};
-&usb_host1 {
- vbus-supply = <&vcc5v0_host>;
- status = "okay";
-}; diff --git a/arch/arm/dts/rk3288-tinker.dtsi b/arch/arm/dts/rk3288-tinker.dtsi deleted file mode 100644 index 62b4beb25100..000000000000 --- a/arch/arm/dts/rk3288-tinker.dtsi +++ /dev/null @@ -1,533 +0,0 @@ -/*
- This file is dual-licensed: you can use it either under the terms
- of the GPL or the X11 license, at your option. Note that this dual
- licensing only applies to this file, and not this project as a
- whole.
- a) This file is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- Or, alternatively,
- b) Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
- */
-#include <dt-bindings/input/input.h> -#include "rk3288.dtsi"
-/ {
- memory {
device_type = "memory";
reg = <0x0 0x0 0x0 0x80000000>;
- };
- ext_gmac: external-gmac-clock {
compatible = "fixed-clock";
clock-frequency = <125000000>;
clock-output-names = "ext_gmac";
#clock-cells = <0>;
- };
- gpio-keys {
compatible = "gpio-keys";
autorepeat;
pinctrl-names = "default";
pinctrl-0 = <&pwrbtn>;
button@0 {
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
label = "GPIO Key Power";
linux,code = <KEY_POWER>;
linux,input-type = <1>;
gpio-key,wakeup = <1>;
debounce-interval = <100>;
};
- };
- gpio-leds {
compatible = "gpio-leds";
pwr-led {
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "default-on";
};
act-led {
gpios=<&gpio2 3 GPIO_ACTIVE_LOW>;
linux,default-trigger="mmc0";
};
- };
- vcc_sys: vsys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
- };
- /*
* NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
* vcc_io directly. Those boards won't be able to power cycle SD cards
* but it shouldn't hurt to toggle this pin there anyway.
*/
- vcc_sd: sdmmc-regulator {
compatible = "regulator-fixed";
gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_pwr>;
regulator-name = "vcc_sd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
startup-delay-us = <100000>;
vin-supply = <&vcc_io>;
- };
- vcc5v0_host: usb-host-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&host_vbus_drv>;
regulator-name = "vcc5v0_host";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
- };
-};
-&cpu0 {
- cpu0-supply = <&vdd_cpu>;
-};
-&sdmmc {
- bus-width = <4>;
- cap-mmc-highspeed;
- cap-sd-highspeed;
- card-detect-delay = <200>;
- disable-wp; /* wp not hooked up */
- num-slots = <1>;
- pinctrl-names = "default";
- pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
- status = "okay";
- supports-sd;
- vmmc-supply = <&vcc_sd>;
- vqmmc-supply = <&vccio_sd>;
-};
-&gpu {
- mali-supply = <&vdd_gpu>;
- status = "okay";
-};
-&gmac {
- phy-supply = <&vcc33_lan>;
- phy-mode = "rgmii";
- clock_in_out = "input";
- snps,reset-gpio = <&gpio4 7 0>;
- snps,reset-active-low;
- snps,reset-delays-us = <0 10000 1000000>;
- assigned-clocks = <&cru SCLK_MAC>;
- assigned-clock-parents = <&ext_gmac>;
- pinctrl-names = "default";
- pinctrl-0 = <&rgmii_pins>;
- tx_delay = <0x30>;
- rx_delay = <0x10>;
- status = "okay";
-};
-&hdmi {
- ddc-i2c-bus = <&i2c5>;
- status = "okay";
-};
-&i2c0 {
- status = "okay";
- clock-frequency = <400000>;
- rk808: pmic@1b {
compatible = "rockchip,rk808";
reg = <0x1b>;
interrupt-parent = <&gpio0>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int &global_pwroff>;
rockchip,system-power-controller;
wakeup-source;
#clock-cells = <1>;
clock-output-names = "xin32k", "rk808-clkout2";
vcc1-supply = <&vcc_sys>;
vcc2-supply = <&vcc_sys>;
vcc3-supply = <&vcc_sys>;
vcc4-supply = <&vcc_sys>;
vcc6-supply = <&vcc_sys>;
vcc7-supply = <&vcc_sys>;
vcc8-supply = <&vcc_18>;
vcc9-supply = <&vcc_io>;
vcc10-supply = <&vcc_io>;
vcc11-supply = <&vcc_sys>;
vcc12-supply = <&vcc_io>;
vddio-supply = <&vcc18_ldo1>;
regulators {
vdd_cpu: DCDC_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <1350000>;
regulator-name = "vdd_arm";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_gpu: DCDC_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <1250000>;
regulator-name = "vdd_gpu";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vcc_ddr: DCDC_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vcc_ddr";
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc_io: DCDC_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc_io";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vcc18_ldo1: LDO_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc18_ldo1";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc33_mipi: LDO_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc33_mipi";
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_10: LDO_REG3 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-name = "vdd_10";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vcc18_codec: LDO_REG4 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc18_codec";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vccio_sd: LDO_REG5 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vccio_sd";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vdd10_lcd: LDO_REG6 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-name = "vdd10_lcd";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1000000>;
};
};
vcc_18: LDO_REG7 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc_18";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc18_lcd: LDO_REG8 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc18_lcd";
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc33_sd: SWITCH_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vcc33_sd";
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc33_lan: SWITCH_REG2 {
regulator-always-on;
regulator-boot-on;
regulator-name = "vcc33_lan";
regulator-state-mem {
regulator-on-in-suspend;
};
};
};
- };
-};
-&i2c2 {
- status = "okay";
- headset: nau8825@1a {
compatible = "nuvoton,nau8825";
#sound-dai-cells = <0>;
reg = <0x1a>;
interrupt-parent = <&gpio6>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
nuvoton,jkdet-enable = <1>;
nuvoton,jkdet-pull-enable = <1>;
nuvoton,jkdet-pull-up = <0>;
nuvoton,jkdet-polarity = <1>;
nuvoton,vref-impedance = <2>;
nuvoton,micbias-voltage = <6>;
nuvoton,sar-threshold-num = <4>;
nuvoton,sar-threshold = <0xa 0x14 0x26 0x73>;
nuvoton,sar-hysteresis = <0>;
nuvoton,sar-voltage = <6>;
nuvoton,sar-compare-time = <0>;
nuvoton,sar-sampling-time = <0>;
nuvoton,short-key-debounce = <3>;
nuvoton,jack-insert-debounce = <7>;
nuvoton,jack-eject-debounce = <7>;
clock-names = "mclk";
clocks = <&cru SCLK_I2S0_OUT>;
- };
-};
-&i2c5 {
- status = "okay";
-};
-&wdt {
- status = "okay";
-};
-&pwm0 {
- status = "okay";
-};
-&saradc {
- vref-supply = <&vcc18_ldo1>;
- status ="okay";
-};
-&uart0 {
- status = "okay";
-};
-&uart1 {
- status = "okay";
-};
-&uart2 {
- status = "okay";
-};
-&uart3 {
- status = "okay";
-};
-&uart4 {
- status = "okay";
-};
-&tsadc {
- rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
- rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
- status = "okay";
-};
-&usbphy {
- status = "okay";
-};
-&usb_host0_ehci {
- status = "okay";
-};
-&usb_host1 {
- status = "okay";
-};
-&usb_otg {
- status= "okay";
-};
-&vopb {
- status = "okay";
-};
-&vopb_mmu {
- status = "okay";
-};
-&vopl {
- status = "okay";
-};
-&vopl_mmu {
- status = "okay";
-};
-&pinctrl {
- pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
drive-strength = <8>;
- };
- pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
bias-pull-up;
drive-strength = <8>;
- };
- backlight {
bl_en: bl-en {
rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
};
- };
- buttons {
pwrbtn: pwrbtn {
rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
};
- };
- eth_phy {
eth_phy_pwr: eth-phy-pwr {
rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
};
- };
- pmic {
pmic_int: pmic-int {
rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
};
- };
- sdmmc {
/*
* Default drive strength isn't enough to achieve even
* high-speed mode on EVB board so bump up to 8ma.
*/
sdmmc_bus4: sdmmc-bus4 {
rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
<6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
<6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
<6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
};
sdmmc_clk: sdmmc-clk {
rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
};
sdmmc_cmd: sdmmc-cmd {
rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
};
sdmmc_pwr: sdmmc-pwr {
rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
};
- };
- usb {
host_vbus_drv: host-vbus-drv {
rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
};
pwr_3g: pwr-3g {
rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
};
- };
-}; diff --git a/board/rockchip/tinker_rk3288/MAINTAINERS b/board/rockchip/tinker_rk3288/MAINTAINERS index a5cae55d4286..ab1ce72a77b2 100644 --- a/board/rockchip/tinker_rk3288/MAINTAINERS +++ b/board/rockchip/tinker_rk3288/MAINTAINERS @@ -2,10 +2,6 @@ TINKER-RK3288 M: Lin Huang hl@rock-chips.com R: Jonas Karlman jonas@kwiboo.se S: Maintained -F: arch/arm/dts/rk3288-tinker.dts -F: arch/arm/dts/rk3288-tinker.dtsi -F: arch/arm/dts/rk3288-tinker-s.dts -F: arch/arm/dts/rk3288-tinker-s-u-boot.dtsi F: arch/arm/dts/rk3288-tinker-u-boot.dtsi F: board/rockchip/tinker_rk3288 F: include/configs/tinker_rk3288.h @@ -15,6 +11,7 @@ TINKER-S-RK3288 M: Michael Trimarchi michael@amarulasolutions.com R: Jonas Karlman jonas@kwiboo.se S: Maintained +F: arch/arm/dts/rk3288-tinker-s-u-boot.dtsi F: board/rockchip/tinker_rk3288 F: include/configs/tinker_rk3288.h F: configs/tinker-s-rk3288_defconfig diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 1007d9ca9e15..b7636fe581f4 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -6,7 +6,7 @@ CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_SF_DEFAULT_SPEED=20000000 -CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker" +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3288-tinker" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y @@ -17,7 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y @@ -36,6 +36,8 @@ CONFIG_CMD_REGULATOR=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_UPSTREAM=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 47d089ff4780..e50424746c81 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -6,7 +6,7 @@ CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 CONFIG_SF_DEFAULT_SPEED=20000000 -CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker-s" +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3288-tinker-s" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y @@ -17,7 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker-s.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_CMD_GPIO=y @@ -36,6 +36,8 @@ CONFIG_CMD_REGULATOR=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_UPSTREAM=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y

For some reason the Ethernet PHY reset delay is set to 1 second, this cause an unneccecery long boot delay.
Tinker Board use RTL8211E or RTL8211F Ethernet PHY, datasheet list an initial 10ms delay and then a 30-76ms delay before accessing registers.
Change to use 80ms delay instead of a full second to speed up Ethernet initializion in U-Boot.
Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY support in U-Boot.
Before:
1,404,971 960,924 eth_common_init 2,438,830 1,033,859 eth_initialize 2,444,449 5,619 main_loop 2,445,153 704 cli_loop
After:
1,404,987 960,710 eth_common_init 1,519,110 114,123 eth_initialize 1,524,734 5,624 main_loop 1,525,452 718 cli_loop
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- There are more boards having similar full second delay and a fix will be sent to upstream Linux to correct this in due time. --- arch/arm/dts/rk3288-tinker-u-boot.dtsi | 4 ++++ configs/tinker-rk3288_defconfig | 3 +++ configs/tinker-s-rk3288_defconfig | 3 +++ 3 files changed, 10 insertions(+)
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 7568b1495341..a6f6f14df93d 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -16,6 +16,10 @@ rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>; };
+&gmac { + snps,reset-delays-us = <0 10000 80000>; +}; + &gpio7 { /delete-property/ bootph-all; }; diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index b7636fe581f4..05dca105d609 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -58,6 +58,9 @@ CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y CONFIG_PINCTRL=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index e50424746c81..1bee0d094c8d 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -58,6 +58,9 @@ CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y CONFIG_PINCTRL=y

On 2024/11/6 00:00, Jonas Karlman wrote:
For some reason the Ethernet PHY reset delay is set to 1 second, this cause an unneccecery long boot delay.
Tinker Board use RTL8211E or RTL8211F Ethernet PHY, datasheet list an initial 10ms delay and then a 30-76ms delay before accessing registers.
Change to use 80ms delay instead of a full second to speed up Ethernet initializion in U-Boot.
Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY support in U-Boot.
Before:
1,404,971 960,924 eth_common_init 2,438,830 1,033,859 eth_initialize 2,444,449 5,619 main_loop 2,445,153 704 cli_loop
After:
1,404,987 960,710 eth_common_init 1,519,110 114,123 eth_initialize 1,524,734 5,624 main_loop 1,525,452 718 cli_loop
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
There are more boards having similar full second delay and a fix will be sent to upstream Linux to correct this in due time.
arch/arm/dts/rk3288-tinker-u-boot.dtsi | 4 ++++ configs/tinker-rk3288_defconfig | 3 +++ configs/tinker-s-rk3288_defconfig | 3 +++ 3 files changed, 10 insertions(+)
diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi index 7568b1495341..a6f6f14df93d 100644 --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi @@ -16,6 +16,10 @@ rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>; };
+&gmac {
- snps,reset-delays-us = <0 10000 80000>;
+};
- &gpio7 { /delete-property/ bootph-all; };
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index b7636fe581f4..05dca105d609 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -58,6 +58,9 @@ CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y CONFIG_PINCTRL=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index e50424746c81..1bee0d094c8d 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -58,6 +58,9 @@ CONFIG_ROCKCHIP_EFUSE=y CONFIG_I2C_EEPROM=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y CONFIG_PINCTRL=y

Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to allow checksum validation and fallback loading of FIT from a different mmc device.
Checksum validation of FIT adds around 140 ms to boot time:
Before:
Mark Elapsed Stage 0 0 reset 13 13 TPL 6,957 6,944 end tpl 25,102 18,145 SPL 131,932 106,830 end phase 132,137 205 board_init_f 444,277 312,140 board_init_r 1,404,987 960,710 eth_common_init 1,519,110 114,123 eth_initialize 1,524,734 5,624 main_loop 1,525,452 718 cli_loop
After:
Mark Elapsed Stage 0 0 reset 13 13 TPL 6,957 6,944 end tpl 35,744 28,787 SPL 271,220 235,476 end phase 271,420 200 board_init_f 588,474 317,054 board_init_r 1,548,950 960,476 eth_common_init 1,663,105 114,155 eth_initialize 1,668,734 5,629 main_loop 1,669,417 683 cli_loop
Signed-off-by: Jonas Karlman jonas@kwiboo.se --- configs/tinker-rk3288_defconfig | 7 +++++++ configs/tinker-s-rk3288_defconfig | 7 +++++++ 2 files changed, 14 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 05dca105d609..bc5379d43430 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -17,9 +17,15 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -91,4 +97,5 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_DHRYSTONE=y +CONFIG_SPL_CRC32=y CONFIG_ERRNO_STR=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 1bee0d094c8d..f0c8cc5bbc1b 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -17,9 +17,15 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker-s.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -91,4 +97,5 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_DHRYSTONE=y +CONFIG_SPL_CRC32=y CONFIG_ERRNO_STR=y

On 2024/11/6 00:00, Jonas Karlman wrote:
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to allow checksum validation and fallback loading of FIT from a different mmc device.
Checksum validation of FIT adds around 140 ms to boot time:
Before:
Mark Elapsed Stage 0 0 reset 13 13 TPL 6,957 6,944 end tpl 25,102 18,145 SPL 131,932 106,830 end phase 132,137 205 board_init_f 444,277 312,140 board_init_r
1,404,987 960,710 eth_common_init 1,519,110 114,123 eth_initialize 1,524,734 5,624 main_loop 1,525,452 718 cli_loop
After:
Mark Elapsed Stage 0 0 reset 13 13 TPL 6,957 6,944 end tpl 35,744 28,787 SPL 271,220 235,476 end phase 271,420 200 board_init_f 588,474 317,054 board_init_r
1,548,950 960,476 eth_common_init 1,663,105 114,155 eth_initialize 1,668,734 5,629 main_loop 1,669,417 683 cli_loop
Signed-off-by: Jonas Karlman jonas@kwiboo.se
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
configs/tinker-rk3288_defconfig | 7 +++++++ configs/tinker-s-rk3288_defconfig | 7 +++++++ 2 files changed, 14 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig index 05dca105d609..bc5379d43430 100644 --- a/configs/tinker-rk3288_defconfig +++ b/configs/tinker-rk3288_defconfig @@ -17,9 +17,15 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -91,4 +97,5 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_DHRYSTONE=y +CONFIG_SPL_CRC32=y CONFIG_ERRNO_STR=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 1bee0d094c8d..f0c8cc5bbc1b 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -17,9 +17,15 @@ CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3288-tinker-s.dtb" CONFIG_MISC_INIT_R=y CONFIG_SPL_PAD_TO=0x7f8000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -91,4 +97,5 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_CMD_DHRYSTONE=y +CONFIG_SPL_CRC32=y CONFIG_ERRNO_STR=y
participants (2)
-
Jonas Karlman
-
Kever Yang