From 8f649a02b8582f24eff0f87cc436af7ce142df84 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Fri, 22 Nov 2024 10:08:55 +0800 Subject: [PATCH] feat: u-boot: add rk2410 Signed-off-by: ZHANG Yuntian --- u-boot/rk2410/0001-common | 1 + u-boot/rk2410/0002-rockchip | 1 + .../0001-menu-fix-timeout-duration.patch | 79 +++ ...hip-move-crypto-functions-to-rk3588s.patch | 68 +++ ...ip-create-rk3588s-u-boot-dtsi.patch.ignore | 546 ++++++++++++++++++ .../0001-Fix-make-clean-distclean.patch | 25 + u-boot/rk2410/fork.conf | 136 +++++ u-boot/rk2410/kconfig.conf | 1 + u-boot/rknext/fork.conf | 22 +- 9 files changed, 874 insertions(+), 5 deletions(-) create mode 120000 u-boot/rk2410/0001-common create mode 120000 u-boot/rk2410/0002-rockchip create mode 100644 u-boot/rk2410/0010-backport/0001-menu-fix-timeout-duration.patch create mode 100644 u-boot/rk2410/0020-rock-5a/0001-rockchip-move-crypto-functions-to-rk3588s.patch create mode 100644 u-boot/rk2410/0020-rock-5a/0002-rockchip-create-rk3588s-u-boot-dtsi.patch.ignore create mode 100644 u-boot/rk2410/0100-vendor/0001-Fix-make-clean-distclean.patch create mode 100644 u-boot/rk2410/fork.conf create mode 100644 u-boot/rk2410/kconfig.conf diff --git a/u-boot/rk2410/0001-common b/u-boot/rk2410/0001-common new file mode 120000 index 00000000..d2afe44c --- /dev/null +++ b/u-boot/rk2410/0001-common @@ -0,0 +1 @@ +../.common \ No newline at end of file diff --git a/u-boot/rk2410/0002-rockchip b/u-boot/rk2410/0002-rockchip new file mode 120000 index 00000000..996195bf --- /dev/null +++ b/u-boot/rk2410/0002-rockchip @@ -0,0 +1 @@ +../.rockchip \ No newline at end of file diff --git a/u-boot/rk2410/0010-backport/0001-menu-fix-timeout-duration.patch b/u-boot/rk2410/0010-backport/0001-menu-fix-timeout-duration.patch new file mode 100644 index 00000000..80546d54 --- /dev/null +++ b/u-boot/rk2410/0010-backport/0001-menu-fix-timeout-duration.patch @@ -0,0 +1,79 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Masahiro Yamada +Date: Thu, 24 May 2018 17:04:57 +0900 +Subject: [PATCH] menu: fix timeout duration + +For distro-boot, the TIMEOUT directive in the boot script specifies +how long to pause in units of 1/10 sec. [1] + +Commit 8594753ba0a7 ("menu: only timeout when menu is displayed") +corrected this by simply dividing the timeout value by 10 in +menu_interactive_choice(). + +I see two problems: + + - For example, "TIMEOUT 5" should wait for 0.5 sec, but the current + implementation cannot handle the granularity of 1/10 sec. + In fact, it never breaks because "m->timeout / 10" is zero, + which means no timeout. + + - The menu API is used not only by cmd/pxe.c but also by + common/autoboot.c . For the latter case, the unit of the + timeout value is _second_ because its default is associated + with CONFIG_BOOTDELAY. + +To fix the first issue, use DIV_ROUND_UP() so that the timeout value +is rounded up to the closest integer. + +For the second issue, move the division to the boundary between +cmd/pxe.c and common/menu.c . This is a more desirable place because +the comment of struct pxe_menu says: + + * timeout - time in tenths of a second to wait for a user key-press before + * booting the default label. + +Then, the comment of menu_create() says: + + * timeout - A delay in seconds to wait for user input. If 0, timeout is + * disabled, and the default choice will be returned unless prompt is 1. + +[1] https://www.syslinux.org/wiki/index.php?title=SYSLINUX#TIMEOUT_timeout + +Signed-off-by: Masahiro Yamada +--- + cmd/pxe.c | 4 ++-- + common/menu.c | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/cmd/pxe.c b/cmd/pxe.c +index cce48e01e..32fc299f6 100644 +--- a/cmd/pxe.c ++++ b/cmd/pxe.c +@@ -1558,8 +1558,8 @@ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg) + /* + * Create a menu and add items for all the labels. + */ +- m = menu_create(cfg->title, cfg->timeout, cfg->prompt, label_print, +- NULL, NULL); ++ m = menu_create(cfg->title, DIV_ROUND_UP(cfg->timeout, 10), ++ cfg->prompt, label_print, NULL, NULL); + + if (!m) + return NULL; +diff --git a/common/menu.c b/common/menu.c +index c53030f36..69f98ff33 100644 +--- a/common/menu.c ++++ b/common/menu.c +@@ -195,8 +195,7 @@ static inline int menu_interactive_choice(struct menu *m, void **choice) + + if (!m->item_choice) { + readret = cli_readline_into_buffer("Enter choice: ", +- cbuf, +- m->timeout / 10); ++ cbuf, m->timeout); + + if (readret >= 0) { + choice_item = menu_item_by_key(m, cbuf); +-- +2.37.2 + diff --git a/u-boot/rk2410/0020-rock-5a/0001-rockchip-move-crypto-functions-to-rk3588s.patch b/u-boot/rk2410/0020-rock-5a/0001-rockchip-move-crypto-functions-to-rk3588s.patch new file mode 100644 index 00000000..961bb49a --- /dev/null +++ b/u-boot/rk2410/0020-rock-5a/0001-rockchip-move-crypto-functions-to-rk3588s.patch @@ -0,0 +1,68 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Yuntian Zhang +Date: Tue, 26 Apr 2022 14:16:32 +0800 +Subject: [PATCH] rockchip: move crypto functions to rk3588s + +rkbin uses crypto device to verify hash before passing control to bootloader. If this device is missing boot will fail. + +Signed-off-by: Yuntian Zhang +--- + arch/arm/dts/rk3588.dtsi | 15 --------------- + arch/arm/dts/rk3588s.dtsi | 15 +++++++++++++++ + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/arch/arm/dts/rk3588.dtsi b/arch/arm/dts/rk3588.dtsi +index 8a13e8edd8..f7eb5936a8 100644 +--- a/arch/arm/dts/rk3588.dtsi ++++ b/arch/arm/dts/rk3588.dtsi +@@ -429,21 +429,6 @@ + status = "disabled"; + }; + +- crypto: crypto@fe370000 { +- compatible = "rockchip,rk3588-crypto"; +- reg = <0x0 0xfe370000 0x0 0x4000>; +- clocks = <&scmi_clk SCMI_CRYPTO_CORE>, <&scmi_clk SCMI_CRYPTO_PKA>; +- clock-names = "sclk_crypto", "apkclk_crypto"; +- clock-frequency = <350000000>, <350000000>; +- status = "disabled"; +- }; +- +- rng: rng@fe378000 { +- compatible = "rockchip,trngv1"; +- reg = <0x0 0xfe378000 0x0 0x200>; +- status = "disabled"; +- }; +- + hdptxphy1: phy@fed70000 { + compatible = "rockchip,rk3588-hdptx-phy"; + reg = <0x0 0xfed70000 0x0 0x2000>; +diff --git a/arch/arm/dts/rk3588s.dtsi b/arch/arm/dts/rk3588s.dtsi +index 53ccfbaeed..ca18d3bd0c 100644 +--- a/arch/arm/dts/rk3588s.dtsi ++++ b/arch/arm/dts/rk3588s.dtsi +@@ -2220,6 +2220,21 @@ + arm,pl330-periph-burst; + }; + ++ crypto: crypto@fe370000 { ++ compatible = "rockchip,rk3588-crypto"; ++ reg = <0x0 0xfe370000 0x0 0x4000>; ++ clocks = <&scmi_clk SCMI_CRYPTO_CORE>, <&scmi_clk SCMI_CRYPTO_PKA>; ++ clock-names = "sclk_crypto", "apkclk_crypto"; ++ clock-frequency = <350000000>, <350000000>; ++ status = "disabled"; ++ }; ++ ++ rng: rng@fe378000 { ++ compatible = "rockchip,trngv1"; ++ reg = <0x0 0xfe378000 0x0 0x200>; ++ status = "disabled"; ++ }; ++ + hdptxphy0: phy@fed60000 { + compatible = "rockchip,rk3588-hdptx-phy"; + reg = <0x0 0xfed60000 0x0 0x2000>; +-- +2.36.1 + diff --git a/u-boot/rk2410/0020-rock-5a/0002-rockchip-create-rk3588s-u-boot-dtsi.patch.ignore b/u-boot/rk2410/0020-rock-5a/0002-rockchip-create-rk3588s-u-boot-dtsi.patch.ignore new file mode 100644 index 00000000..b0a03b18 --- /dev/null +++ b/u-boot/rk2410/0020-rock-5a/0002-rockchip-create-rk3588s-u-boot-dtsi.patch.ignore @@ -0,0 +1,546 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Yuntian Zhang +Date: Tue, 26 Apr 2022 14:23:52 +0800 +Subject: [PATCH] rockchip: create rk3588s-u-boot-dtsi + +This file will contain common features between rk3588 & rk3588s. + +rk3588 specific features are kept in rk3588-u-boot-dtsi. + +Signed-off-by: Yuntian Zhang +--- + arch/arm/dts/rk3588-u-boot.dtsi | 250 +----------------------------- + arch/arm/dts/rk3588s-u-boot.dtsi | 253 +++++++++++++++++++++++++++++++ + 2 files changed, 255 insertions(+), 248 deletions(-) + create mode 100644 arch/arm/dts/rk3588s-u-boot.dtsi + +diff --git a/arch/arm/dts/rk3588-u-boot.dtsi b/arch/arm/dts/rk3588-u-boot.dtsi +index 3fe8054aac..3d411437b5 100644 +--- a/arch/arm/dts/rk3588-u-boot.dtsi ++++ b/arch/arm/dts/rk3588-u-boot.dtsi +@@ -4,260 +4,14 @@ + * SPDX-License-Identifier: GPL-2.0+ + */ + +-#include +- +-/ { +- aliases { +- mmc0 = &sdhci; +- mmc1 = &sdmmc; +- }; +- +- chosen { +- stdout-path = &uart2; +- u-boot,spl-boot-order = &sdmmc, &sdhci, &spi_nand, &spi_nor; +- }; +- +- secure-otp@fe3a0000 { +- u-boot,dm-spl; +- compatible = "rockchip,rk3588-secure-otp"; +- reg = <0x0 0xfe3a0000 0x0 0x4000>; +- }; +-}; +- +-&firmware { +- u-boot,dm-spl; +-}; +- +-&gpio0 { +- u-boot,dm-spl; +- status = "okay"; +-}; +-&gpio1 { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&gpio2 { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +-&gpio3 { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&gpio4 { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&scmi { +- u-boot,dm-spl; +-}; +- +-&scmi_clk { +- u-boot,dm-spl; +-}; +- +-&sram { +- u-boot,dm-spl; +-}; +- +-&scmi_shmem { +- u-boot,dm-spl; +-}; +- +-&xin24m { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&cru { +- u-boot,dm-spl; +- status = "okay"; +-}; +- +-&psci { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&crypto { +- u-boot,dm-spl; +- status = "okay"; +-}; +- +-&sys_grf { +- u-boot,dm-spl; +- status = "okay"; +-}; ++#include "rk3588s-u-boot.dtsi" + + &pcie30_phy_grf { + u-boot,dm-pre-reloc; + status = "okay"; + }; + +-&php_grf { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&pipe_phy0_grf { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- + &pipe_phy1_grf { + u-boot,dm-pre-reloc; + status = "okay"; +-}; +- +-&pipe_phy2_grf { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&uart2 { +- u-boot,dm-spl; +- status = "okay"; +-}; +- +-&hw_decompress { +- u-boot,dm-spl; +- status = "okay"; +-}; +- +-&rng { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&sfc { +- u-boot,dm-spl; +- status = "okay"; +- +- #address-cells = <1>; +- #size-cells = <0>; +- spi_nand: flash@0 { +- u-boot,dm-spl; +- compatible = "spi-nand"; +- reg = <0>; +- spi-tx-bus-width = <1>; +- spi-rx-bus-width = <4>; +- spi-max-frequency = <80000000>; +- }; +- +- spi_nor: flash@1 { +- u-boot,dm-spl; +- compatible = "jedec,spi-nor"; +- label = "sfc_nor"; +- reg = <0>; +- spi-tx-bus-width = <1>; +- spi-rx-bus-width = <4>; +- spi-max-frequency = <80000000>; +- }; +-}; +- +-&saradc { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&sdmmc { +- bus-width = <4>; +- u-boot,dm-spl; +- cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; +- status = "okay"; +-}; +- +-&sdhci { +- bus-width = <8>; +- u-boot,dm-spl; +- mmc-hs200-1_8v; +- non-removable; +- status = "okay"; +-}; +- +-&usb2phy0_grf { +- u-boot,dm-pre-reloc; +-}; +- +-&u2phy0 { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-&u2phy0_otg { +- u-boot,dm-pre-reloc; +- status = "okay"; +-}; +- +-/* Support SPL-PINCTRL: +- * 1. ioc +- * 2. pinctrl(sdmmc) +- * 3. gpio if need +- */ +-&ioc { +- u-boot,dm-spl; +-}; +- +-&pinctrl { +- u-boot,dm-spl; +- /delete-node/ sdmmc; +- sdmmc { +- u-boot,dm-spl; +- sdmmc_bus4: sdmmc-bus4 { +- u-boot,dm-spl; +- rockchip,pins = +- /* sdmmc_d0 */ +- <4 RK_PD0 1 &pcfg_pull_up_drv_level_2>, +- /* sdmmc_d1 */ +- <4 RK_PD1 1 &pcfg_pull_up_drv_level_2>, +- /* sdmmc_d2 */ +- <4 RK_PD2 1 &pcfg_pull_up_drv_level_2>, +- /* sdmmc_d3 */ +- <4 RK_PD3 1 &pcfg_pull_up_drv_level_2>; +- }; +- +- sdmmc_clk: sdmmc-clk { +- u-boot,dm-spl; +- rockchip,pins = +- /* sdmmc_clk */ +- <4 RK_PD5 1 &pcfg_pull_up_drv_level_2>; +- }; +- +- sdmmc_cmd: sdmmc-cmd { +- u-boot,dm-spl; +- rockchip,pins = +- /* sdmmc_cmd */ +- <4 RK_PD4 1 &pcfg_pull_up_drv_level_2>; +- }; +- +- sdmmc_det: sdmmc-det { +- u-boot,dm-spl; +- rockchip,pins = +- /* sdmmc_det */ +- <0 RK_PA4 1 &pcfg_pull_up>; +- }; +- +- sdmmc_pwren: sdmmc-pwren { +- u-boot,dm-spl; +- rockchip,pins = +- /* sdmmc_pwren */ +- <0 RK_PA5 2 &pcfg_pull_none>; +- }; +- }; +-}; +- +-&pcfg_pull_up_drv_level_2 { +- u-boot,dm-spl; +-}; +- +-&pcfg_pull_up { +- u-boot,dm-spl; +-}; +- +-&pcfg_pull_none +-{ +- u-boot,dm-spl; +-}; ++}; +\ No newline at end of file +diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi +new file mode 100644 +index 0000000000..f606faa95e +--- /dev/null ++++ b/arch/arm/dts/rk3588s-u-boot.dtsi +@@ -0,0 +1,253 @@ ++/* ++ * (C) Copyright 2021 Rockchip Electronics Co., Ltd ++ * ++ * SPDX-License-Identifier: GPL-2.0+ ++ */ ++ ++#include ++ ++/ { ++ aliases { ++ mmc0 = &sdhci; ++ mmc1 = &sdmmc; ++ }; ++ ++ chosen { ++ stdout-path = &uart2; ++ u-boot,spl-boot-order = &sdmmc, &sdhci, &spi_nand, &spi_nor; ++ }; ++ ++ secure-otp@fe3a0000 { ++ u-boot,dm-spl; ++ compatible = "rockchip,rk3588-secure-otp"; ++ reg = <0x0 0xfe3a0000 0x0 0x4000>; ++ }; ++}; ++ ++&firmware { ++ u-boot,dm-spl; ++}; ++ ++&gpio0 { ++ u-boot,dm-spl; ++ status = "okay"; ++}; ++&gpio1 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&gpio2 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++&gpio3 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&gpio4 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&scmi { ++ u-boot,dm-spl; ++}; ++ ++&scmi_clk { ++ u-boot,dm-spl; ++}; ++ ++&sram { ++ u-boot,dm-spl; ++}; ++ ++&scmi_shmem { ++ u-boot,dm-spl; ++}; ++ ++&xin24m { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&cru { ++ u-boot,dm-spl; ++ status = "okay"; ++}; ++ ++&psci { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&crypto { ++ u-boot,dm-spl; ++ status = "okay"; ++}; ++ ++&sys_grf { ++ u-boot,dm-spl; ++ status = "okay"; ++}; ++ ++&php_grf { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&pipe_phy0_grf { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&pipe_phy2_grf { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&uart2 { ++ u-boot,dm-spl; ++ status = "okay"; ++}; ++ ++&hw_decompress { ++ u-boot,dm-spl; ++ status = "okay"; ++}; ++ ++&rng { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&sfc { ++ u-boot,dm-spl; ++ status = "okay"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi_nand: flash@0 { ++ u-boot,dm-spl; ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-tx-bus-width = <1>; ++ spi-rx-bus-width = <4>; ++ spi-max-frequency = <80000000>; ++ }; ++ ++ spi_nor: flash@1 { ++ u-boot,dm-spl; ++ compatible = "jedec,spi-nor"; ++ label = "sfc_nor"; ++ reg = <0>; ++ spi-tx-bus-width = <1>; ++ spi-rx-bus-width = <4>; ++ spi-max-frequency = <80000000>; ++ }; ++}; ++ ++&saradc { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&sdmmc { ++ bus-width = <4>; ++ u-boot,dm-spl; ++ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; ++ status = "okay"; ++}; ++ ++&sdhci { ++ bus-width = <8>; ++ u-boot,dm-spl; ++ mmc-hs200-1_8v; ++ non-removable; ++ status = "okay"; ++}; ++ ++&usb2phy0_grf { ++ u-boot,dm-pre-reloc; ++}; ++ ++&u2phy0 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&u2phy0_otg { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++/* Support SPL-PINCTRL: ++ * 1. ioc ++ * 2. pinctrl(sdmmc) ++ * 3. gpio if need ++ */ ++&ioc { ++ u-boot,dm-spl; ++}; ++ ++&pinctrl { ++ u-boot,dm-spl; ++ /delete-node/ sdmmc; ++ sdmmc { ++ u-boot,dm-spl; ++ sdmmc_bus4: sdmmc-bus4 { ++ u-boot,dm-spl; ++ rockchip,pins = ++ /* sdmmc_d0 */ ++ <4 RK_PD0 1 &pcfg_pull_up_drv_level_2>, ++ /* sdmmc_d1 */ ++ <4 RK_PD1 1 &pcfg_pull_up_drv_level_2>, ++ /* sdmmc_d2 */ ++ <4 RK_PD2 1 &pcfg_pull_up_drv_level_2>, ++ /* sdmmc_d3 */ ++ <4 RK_PD3 1 &pcfg_pull_up_drv_level_2>; ++ }; ++ ++ sdmmc_clk: sdmmc-clk { ++ u-boot,dm-spl; ++ rockchip,pins = ++ /* sdmmc_clk */ ++ <4 RK_PD5 1 &pcfg_pull_up_drv_level_2>; ++ }; ++ ++ sdmmc_cmd: sdmmc-cmd { ++ u-boot,dm-spl; ++ rockchip,pins = ++ /* sdmmc_cmd */ ++ <4 RK_PD4 1 &pcfg_pull_up_drv_level_2>; ++ }; ++ ++ sdmmc_det: sdmmc-det { ++ u-boot,dm-spl; ++ rockchip,pins = ++ /* sdmmc_det */ ++ <0 RK_PA4 1 &pcfg_pull_up>; ++ }; ++ ++ sdmmc_pwren: sdmmc-pwren { ++ u-boot,dm-spl; ++ rockchip,pins = ++ /* sdmmc_pwren */ ++ <0 RK_PA5 2 &pcfg_pull_none>; ++ }; ++ }; ++}; ++ ++&pcfg_pull_up_drv_level_2 { ++ u-boot,dm-spl; ++}; ++ ++&pcfg_pull_up { ++ u-boot,dm-spl; ++}; ++ ++&pcfg_pull_none ++{ ++ u-boot,dm-spl; ++}; +-- +2.36.1 + diff --git a/u-boot/rk2410/0100-vendor/0001-Fix-make-clean-distclean.patch b/u-boot/rk2410/0100-vendor/0001-Fix-make-clean-distclean.patch new file mode 100644 index 00000000..0be0e5e8 --- /dev/null +++ b/u-boot/rk2410/0100-vendor/0001-Fix-make-clean-distclean.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: bsp +Date: Tue, 9 May 2023 21:17:38 +0800 +Subject: [PATCH] Fix make clean/distclean + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 590fd4c1f2c..ed61fdea561 100644 +--- a/Makefile ++++ b/Makefile +@@ -1517,7 +1517,7 @@ CLEAN_DIRS += $(MODVERDIR) \ + $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) + + CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ +- boot* u-boot* MLO* SPL System.map fit-dtb.blob *.bin *.img *.gz .cc ++ u-boot* MLO* SPL System.map fit-dtb.blob *.bin *.img *.gz .cc + + # Directories & files removed with 'make mrproper' + MRPROPER_DIRS += include/config include/generated spl tpl \ +-- +2.40.1 + diff --git a/u-boot/rk2410/fork.conf b/u-boot/rk2410/fork.conf new file mode 100644 index 00000000..a1161b4b --- /dev/null +++ b/u-boot/rk2410/fork.conf @@ -0,0 +1,136 @@ +BSP_GIT="https://github.com/radxa/u-boot.git" +BSP_BRANCH="next-dev-v2024.10" +BSP_MAKE_TARGETS=("u-boot.dtb" "u-boot.itb" "all") +BSP_REPLACES=("rk3588") +SUPPORTED_BOARDS=( + #"rock-pi-e" + #"rock-2" + #"rock-5-itx" + #"rock-5a" + #"rock-5b" + "rock-5b-plus" + #"rock-5c" + #"rock-5d" + #"rock-5t" + #"rock-5a-spi" + #"rock-5c-spi" + #"rock-5d-spi" + #"radxa-e52c" + "radxa-e54c" + #"radxa-nx5-io" + "radxa-cm4-rpi-cm4-io" + #"radxa-cm5-io" + #"radxa-cm5-rpi-cm4-io" + #"radxa-e25" + #"radxa-cm3i-io" + #"radxa-cm3j-rpi-cm4-io" +) + +bsp_rock-pi-e() { + BSP_SOC="rk3328" + RKBIN_DDR="${BSP_SOC}_ddr_333MHz_v" + BSP_BL31_OVERRIDE="rk322xh" + RKMINILOADER="rk322xh_miniloader_" + UBOOT_BASE_ADDR="0x200000" +} + +bsp_rk3528() { + BSP_SOC="rk3528" + RKBIN_DDR="${BSP_SOC}_ddr_1056MHz" +} + +bsp_rock-2() { + bsp_rk3528 +} + +bsp_rk3568() { + BSP_SOC="rk3568" + RKBIN_DDR="${BSP_SOC}_ddr_1560MHz_v" +} + +bsp_rk3588() { + BSP_SOC="rk3588" + RKBIN_DDR="${BSP_SOC}_ddr_lp4_2112MHz_lp5_2400MHz" +} + +bsp_rk3588s() { + bsp_rk3588 + BSP_SOC="rk3588s" + BSP_BL31_OVERRIDE="rk3588" + BSP_TRUST_OVERRIDE="rk3588" +} + +bsp_rock-5-itx() { + bsp_rk3588 +} + +bsp_rock-5a() { + bsp_rk3588s +} + +bsp_rock-5a-spi() { + bsp_rk3588s +} + +bsp_rock-5b-plus() { + bsp_rk3588 +} + +bsp_rock-5b() { + bsp_rk3588 +} + +bsp_rock-5c() { + bsp_rk3588s +} + +bsp_rock-5c-spi() { + bsp_rk3588s +} + +bsp_rock-5d() { + bsp_rk3588s +} + +bsp_rock-5d-spi() { + bsp_rk3588s +} + +bsp_rock-5t() { + bsp_rk3588 +} + +bsp_radxa-e52c() { + bsp_rk3588s + RKBIN_DDR="${BSP_BL31_OVERRIDE}_ddr_lp4_1866MHz_lp4x_2112MHz_lp5_2400MHz" +} + +bsp_radxa-e54c() { + bsp_rk3588s + RKBIN_DDR="${BSP_BL31_OVERRIDE}_ddr_lp4_1866MHz_lp4x_2112MHz_lp5_2400MHz" +} + +bsp_radxa-nx5-io() { + bsp_rk3588s +} + +bsp_radxa-cm5-io() { + bsp_rk3588s +} + +bsp_radxa-cm5-rpi-cm4-io() { + bsp_rk3588s +} + +bsp_radxa-cm3i-io() { + bsp_rk3568 +} + +bsp_radxa-cm3j-rpi-cm4-io() { + bsp_rk3568 +} + +bsp_radxa-e25() { + bsp_rk3568 + RKBIN_DDR="${BSP_SOC}_ddr_1560MHz_uart2_m0_115200_v" +} diff --git a/u-boot/rk2410/kconfig.conf b/u-boot/rk2410/kconfig.conf new file mode 100644 index 00000000..b2eba7aa --- /dev/null +++ b/u-boot/rk2410/kconfig.conf @@ -0,0 +1 @@ +# CONFIG_SPL_SPI_LOAD is not set diff --git a/u-boot/rknext/fork.conf b/u-boot/rknext/fork.conf index 08861e5f..dae19742 100644 --- a/u-boot/rknext/fork.conf +++ b/u-boot/rknext/fork.conf @@ -5,12 +5,24 @@ BSP_REPLACES=("rk3588") SUPPORTED_BOARDS=( #"rock-pi-e" "rock-2" - "rock-5-itx" "rock-5a" "rock-5b" "rock-5b-plus" "rock-5c" "rock-5d" "rock-5t" - "rock-5a-spi" "rock-5c-spi" "rock-5d-spi" - "radxa-e52c" "radxa-e54c" + "rock-5-itx" + "rock-5a" + "rock-5b" + #"rock-5b-plus" + "rock-5c" + "rock-5d" + "rock-5t" + "rock-5a-spi" + "rock-5c-spi" + "rock-5d-spi" + "radxa-e52c" + #"radxa-e54c" "radxa-nx5-io" - "radxa-cm5-io" "radxa-cm5-rpi-cm4-io" - "radxa-e25" "radxa-cm3i-io" "radxa-cm3j-rpi-cm4-io" + "radxa-cm5-io" + "radxa-cm5-rpi-cm4-io" + "radxa-e25" + "radxa-cm3i-io" + "radxa-cm3j-rpi-cm4-io" ) bsp_rock-pi-e() {