From 04fcd9a56bbb4e1fa8a9609804e4ca942a62b9c0 Mon Sep 17 00:00:00 2001 From: Mayuresh Chitale Date: Thu, 29 May 2025 03:30:49 +0000 Subject: Revert "booti/bootm: riscv: Verify image arch type" This reverts commit 37b0b22d8b7bbed6aa95b6daed06dcbf4a66f211 as discussed in [1]. [1] https://lists.denx.de/pipermail/u-boot/2025-May/590841.html Signed-off-by: Mayuresh Chitale Reviewed-by: Leo Yu-Chi Liang --- arch/riscv/lib/bootm.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch') diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index c98c5e76633..9544907ab1e 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -90,10 +90,6 @@ static void boot_jump_linux(struct bootm_headers *images, int flag) announce_and_cleanup(fake); if (!fake) { - if (images->os.arch != IH_ARCH_DEFAULT) { - printf("Image arch not compatible with host arch.\n"); - hang(); - } if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) { #ifdef CONFIG_SMP ret = smp_call_function(images->ep, -- cgit v1.3.1 From 29a2025d77192e510580403b793ae027af19c81c Mon Sep 17 00:00:00 2001 From: Mayuresh Chitale Date: Thu, 29 May 2025 03:30:50 +0000 Subject: Revert "riscv: Select appropriate image type" This reverts commit 027a316828528da95a77d20632370b1bc2823f0b as discussed in [1]. [1] https://lists.denx.de/pipermail/u-boot/2025-May/590841.html Signed-off-by: Mayuresh Chitale Reviewed-by: Leo Yu-Chi Liang --- arch/riscv/dts/binman.dtsi | 14 ++++---------- arch/riscv/include/asm/u-boot.h | 4 ---- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'arch') diff --git a/arch/riscv/dts/binman.dtsi b/arch/riscv/dts/binman.dtsi index c5b0464d6a7..b518560bb94 100644 --- a/arch/riscv/dts/binman.dtsi +++ b/arch/riscv/dts/binman.dtsi @@ -5,12 +5,6 @@ #include -#ifdef CONFIG_64BIT -#define ARCH "riscv64" -#else -#define ARCH "riscv" - -#endif / { binman: binman { multiple-images; @@ -37,7 +31,7 @@ description = "U-Boot"; type = "standalone"; os = "U-Boot"; - arch = ARCH; + arch = "riscv"; compression = "none"; load = /bits/ 64 ; @@ -49,7 +43,7 @@ description = "Linux"; type = "standalone"; os = "Linux"; - arch = ARCH; + arch = "riscv"; compression = "none"; load = /bits/ 64 ; @@ -62,7 +56,7 @@ tee { description = "OP-TEE"; type = "tee"; - arch = ARCH; + arch = "riscv"; compression = "none"; os = "tee"; load = /bits/ 64 ; @@ -76,7 +70,7 @@ description = "OpenSBI fw_dynamic Firmware"; type = "firmware"; os = "opensbi"; - arch = ARCH; + arch = "riscv"; compression = "none"; load = /bits/ 64 ; entry = /bits/ 64 ; diff --git a/arch/riscv/include/asm/u-boot.h b/arch/riscv/include/asm/u-boot.h index a90cc4c21cf..d5e1d5f3231 100644 --- a/arch/riscv/include/asm/u-boot.h +++ b/arch/riscv/include/asm/u-boot.h @@ -23,10 +23,6 @@ #include /* For image.h:image_check_target_arch() */ -#ifdef CONFIG_64BIT -#define IH_ARCH_DEFAULT IH_ARCH_RISCV64 -#else #define IH_ARCH_DEFAULT IH_ARCH_RISCV -#endif #endif /* _U_BOOT_H_ */ -- cgit v1.3.1 From 14315b73a8e7aef9125c7c1aa28ebe3f0725a202 Mon Sep 17 00:00:00 2001 From: Sumit Garg Date: Mon, 5 May 2025 18:13:33 +0530 Subject: mach-snapdragon: Update fdtfile logic to work for RB1 and RB2 RB1 and RB2 have three root compatibles where the last one can't be used to decode fdtfile name (qcm* vs qrb*). So rather just rely on the first compatible to retrieve the SoC name. Signed-off-by: Sumit Garg Link: https://lore.kernel.org/r/20250505124333.12344-1-sumit.garg@kernel.org Signed-off-by: Casey Connolly --- arch/arm/mach-snapdragon/board.c | 63 +++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 27 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c index 3ab75f0fce0..5547d6d054f 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -409,52 +409,39 @@ static void configure_env(void) return; } - /* The last compatible is always the SoC compatible */ - ret = ofnode_read_string_index(root, "compatible", compat_count - 1, &last_compat); - if (ret < 0) { - log_warning("Can't read second compatible\n"); - return; - } - - /* Copy the second compat (e.g. "qcom,sdm845") into buf */ - strlcpy(buf, last_compat, sizeof(buf) - 1); - tmp = buf; - - /* strsep() is destructive, it replaces the comma with a \0 */ - if (!strsep(&tmp, ",")) { - log_warning("second compatible '%s' has no ','\n", buf); - return; - } - - /* tmp now points to just the "sdm845" part of the string */ - env_set("soc", tmp); - - /* Now figure out the "board" part from the first compatible */ - memset(buf, 0, sizeof(buf)); strlcpy(buf, first_compat, sizeof(buf) - 1); tmp = buf; /* The Qualcomm reference boards (RBx, HDK, etc) */ if (!strncmp("qcom", buf, strlen("qcom"))) { + char *soc; + /* * They all have the first compatible as "qcom,-" * (e.g. "qcom,qrb5165-rb5"). We extract just the part after * the dash. */ - if (!strsep(&tmp, "-")) { + if (!strsep(&tmp, ",")) { + log_warning("compatible '%s' has no ','\n", buf); + return; + } + soc = strsep(&tmp, "-"); + if (!soc) { log_warning("compatible '%s' has no '-'\n", buf); return; } - /* tmp is now "rb5" */ + + env_set("soc", soc); env_set("board", tmp); } else { if (!strsep(&tmp, ",")) { log_warning("compatible '%s' has no ','\n", buf); return; } - /* for thundercomm we just want the bit after the comma (e.g. "db845c"), - * for all other boards we replace the comma with a '-' and take both - * (e.g. "oneplus-enchilada") + /* + * For thundercomm we just want the bit after the comma + * (e.g. "db845c"), for all other boards we replace the comma + * with a '-' and take both (e.g. "oneplus-enchilada") */ if (!strncmp("thundercomm", buf, strlen("thundercomm"))) { env_set("board", tmp); @@ -462,6 +449,28 @@ static void configure_env(void) *(tmp - 1) = '-'; env_set("board", buf); } + + /* The last compatible is always the SoC compatible */ + ret = ofnode_read_string_index(root, "compatible", + compat_count - 1, &last_compat); + if (ret < 0) { + log_warning("Can't read second compatible\n"); + return; + } + + /* Copy the last compat (e.g. "qcom,sdm845") into buf */ + memset(buf, 0, sizeof(buf)); + strlcpy(buf, last_compat, sizeof(buf) - 1); + tmp = buf; + + /* strsep() is destructive, it replaces the comma with a \0 */ + if (!strsep(&tmp, ",")) { + log_warning("second compatible '%s' has no ','\n", buf); + return; + } + + /* tmp now points to just the "sdm845" part of the string */ + env_set("soc", tmp); } /* Now build the full path name */ -- cgit v1.3.1 From d1555de5fa21c06118540dcd4a627a1af29bbb40 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 27 May 2025 11:33:31 +0200 Subject: arm/dts/qemu-sbsa: Fix interrupt Change the vcpumntirq in the GICv3 node from SPI to PPI. Prevents Linux from complaining: '[Firmware Bug]: CPU interface incapable of MMIO access' Fixes: 6d722894fd48 "board: emulation: Add QEMU sbsa support" Signed-off-by: Patrick Rudolph --- arch/arm/dts/qemu-sbsa.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/dts/qemu-sbsa.dts b/arch/arm/dts/qemu-sbsa.dts index 099b51b927f..a7718d6c29e 100644 --- a/arch/arm/dts/qemu-sbsa.dts +++ b/arch/arm/dts/qemu-sbsa.dts @@ -91,7 +91,10 @@ #interrupt-cells = <3>; status = "okay"; interrupt-controller; - interrupts = ; + + /* vcpumntirq: virtual CPU interface maintenance interrupt */ + interrupts = ; + reg = /bits/ 64 , /bits/ 64 , /bits/ 64 <0 0>, -- cgit v1.3.1 From 27cd65ca1bf16c21818c233c6d658f3e747f5e85 Mon Sep 17 00:00:00 2001 From: Anshul Dalal Date: Thu, 22 May 2025 18:03:04 +0530 Subject: mach-k3: am62ax: enable caches for the SPL stage board_init_f for the am62a is missing the call to spl_enable_cache which exists for all other am62 platforms (check am625_init.c & am62p5_init.c). This allows the usage of caches while loading and parsing the u-boot.img FIT resulting in ~2x speedup in the A53 SPL stage. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/am62ax/am62a7_init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-k3/am62ax/am62a7_init.c b/arch/arm/mach-k3/am62ax/am62a7_init.c index 28aee34f30b..edd43a1d78d 100644 --- a/arch/arm/mach-k3/am62ax/am62a7_init.c +++ b/arch/arm/mach-k3/am62ax/am62a7_init.c @@ -191,6 +191,7 @@ void board_init_f(ulong dummy) if (ret) panic("DRAM init failed: %d\n", ret); #endif + spl_enable_cache(); setup_qos(); -- cgit v1.3.1 From 79d9ac8b13e34f6e70af4f6a513afb8ebde29c98 Mon Sep 17 00:00:00 2001 From: Lukasz Czechowski Date: Tue, 20 May 2025 13:36:39 +0200 Subject: arm: uniphier: Change _debug_uart_putc function to inline Update the definition of _debug_uart_putc to static inline. This matches the instructions in include/debug_uart.h and provides consistency with implementations for other platforms. Signed-off-by: Lukasz Czechowski Reviewed-by: Tom Rini Reviewed-by: Kever Yang --- arch/arm/mach-uniphier/debug-uart/debug-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c index 6836eb63bfa..1a3e290aa97 100644 --- a/arch/arm/mach-uniphier/debug-uart/debug-uart.c +++ b/arch/arm/mach-uniphier/debug-uart/debug-uart.c @@ -16,7 +16,7 @@ #define UNIPHIER_UART_LSR 0x14 #define UNIPHIER_UART_LDR 0x24 -static void _debug_uart_putc(int c) +static inline void _debug_uart_putc(int c) { void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); -- cgit v1.3.1 From 80bac2343025f058cbba5b7b26257755368bd9f7 Mon Sep 17 00:00:00 2001 From: Lukasz Czechowski Date: Tue, 20 May 2025 13:36:43 +0200 Subject: rockchip: px30: Weaken dependency TPL/SPL serial Allow to disable serial console in TPL and SPL. Weak dependency to SPL_SERIAL and TPL_SERIAL is also used in other Rockchip boards. Signed-off-by: Lukasz Czechowski Reviewed-by: Quentin Schulz Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 9210877a4a4..dac160d33ae 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -11,8 +11,8 @@ config ROCKCHIP_PX30 select TPL_TINY_FRAMEWORK if TPL select TPL_HAVE_INIT_STACK if TPL imply SPL_SEPARATE_BSS - select SPL_SERIAL - select TPL_SERIAL + imply SPL_SERIAL + imply TPL_SERIAL select DEBUG_UART_BOARD_INIT imply ROCKCHIP_COMMON_BOARD imply ROCKCHIP_COMMON_STACK_ADDR -- cgit v1.3.1 From ac86ee45eea978a4191361cbe2dfaeb11dd1a43c Mon Sep 17 00:00:00 2001 From: Lukasz Czechowski Date: Tue, 20 May 2025 13:36:44 +0200 Subject: rockchip: px30: Fix hard dependency to DEBUG_UART_BOARD_INIT Because DEBUG_UART_BOARD_INIT depends on DEBUG_UART, hard dependency to DEBUG_UART_BOARD_INIT in ROCKCHIP_PX30 can cause warnings if DEBUG_UART is disabled. The DEBUG_UART_BOARD_INIT is already implied by ARCH_ROCKCHIP entry. Remove hard dependency from ROCKCHIP_PX30, so that it will be consistent with other rockchip boards. Signed-off-by: Lukasz Czechowski Reviewed-by: Quentin Schulz Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/Kconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index dac160d33ae..d3ed870b169 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -13,7 +13,6 @@ config ROCKCHIP_PX30 imply SPL_SEPARATE_BSS imply SPL_SERIAL imply TPL_SERIAL - select DEBUG_UART_BOARD_INIT imply ROCKCHIP_COMMON_BOARD imply ROCKCHIP_COMMON_STACK_ADDR imply SPL_ROCKCHIP_COMMON_BOARD -- cgit v1.3.1 From 2abd7fff9ebf08d51614c58e824d184ebe550404 Mon Sep 17 00:00:00 2001 From: Justin Klaassen Date: Fri, 23 May 2025 16:53:40 +0000 Subject: rockchip: rk3399-nanopi-4: Allow MMC driver to control SD regulators This change removes the "regulator-always-on" property from the "vcc3v0_sd" (vmmc-supply) and "vcc_sdio" (vqmmc-supply) regulators, which otherwise prevents the MMC driver from being able to power cycle the SD card as part of the initialization procedure. It also removes the "regulator-boot-on" from the "vcc_sdio" regulator, which could theoretically damage a SD card that is already initialized in a low voltage mode. Signed-off-by: Justin Klaassen Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi index 75736124996..ba2b73223d4 100644 --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi @@ -19,8 +19,11 @@ &vcc3v0_sd { bootph-pre-ram; + /delete-property/ regulator-always-on; }; &vcc_sdio { + /delete-property/ regulator-always-on; + /delete-property/ regulator-boot-on; regulator-init-microvolt = <3000000>; }; -- cgit v1.3.1 From 210ab4f60df8d48abb475fd4dac7a9a74ffa6090 Mon Sep 17 00:00:00 2001 From: Justin Klaassen Date: Fri, 23 May 2025 16:53:41 +0000 Subject: rockchip: rk3399-nanopi-4: Enable IO-domain driver in SPL The NanoPi RK3399 boards support UHS-I (up to SDR104) SD cards, however using any of these 1.8v modes results in a boot failure in SPL upon soft reboot. The issue is that the "vcc_sdio" regulator is left at 1.8v on reboot and the corresponding GPIO defaults to 3.3v. This prevents the SD card from being reinitialized and read successfully. This change enables the RK8XX regulators and Rockchip IO-domain drivers in SPL, which initializes "vcc_sdio" regulator to 3.0v and configures the GPIO for the correct level on boot. Signed-off-by: Justin Klaassen Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 9 +++++++++ configs/nanopc-t4-rk3399_defconfig | 7 +++++++ configs/nanopi-m4-2gb-rk3399_defconfig | 7 +++++++ configs/nanopi-m4-rk3399_defconfig | 7 +++++++ configs/nanopi-m4b-rk3399_defconfig | 7 +++++++ configs/nanopi-neo4-rk3399_defconfig | 7 +++++++ configs/nanopi-r4s-rk3399_defconfig | 7 +++++++ 7 files changed, 51 insertions(+) (limited to 'arch') diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi index ba2b73223d4..62fd21f2ca5 100644 --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi @@ -9,6 +9,14 @@ bootph-pre-ram; }; +&i2c0_xfer { + bootph-pre-ram; +}; + +&io_domains { + bootph-pre-ram; +}; + &sdmmc { pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; }; @@ -23,6 +31,7 @@ }; &vcc_sdio { + bootph-pre-ram; /delete-property/ regulator-always-on; /delete-property/ regulator-boot-on; regulator-init-microvolt = <3000000>; diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig index cf634bdce4c..40e99878016 100644 --- a/configs/nanopc-t4-rk3399_defconfig +++ b/configs/nanopc-t4-rk3399_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopc-t4" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y +CONFIG_SPL_DRIVERS_MISC=y CONFIG_TARGET_EVB_RK3399=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -18,6 +19,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopc-t4.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_POWER=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL=y CONFIG_CMD_BOOTZ=y @@ -33,6 +36,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_SPL_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y @@ -46,8 +50,11 @@ CONFIG_NVME_PCI=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y +CONFIG_SPL_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y +CONFIG_SPL_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/nanopi-m4-2gb-rk3399_defconfig b/configs/nanopi-m4-2gb-rk3399_defconfig index e4d6beeb493..5c53293757d 100644 --- a/configs/nanopi-m4-2gb-rk3399_defconfig +++ b/configs/nanopi-m4-2gb-rk3399_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4-2gb" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y +CONFIG_SPL_DRIVERS_MISC=y CONFIG_TARGET_EVB_RK3399=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -19,6 +20,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-m4-2gb.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_POWER=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL=y CONFIG_CMD_BOOTZ=y @@ -37,6 +40,7 @@ CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_SPL_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y @@ -50,8 +54,11 @@ CONFIG_NVME_PCI=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y +CONFIG_SPL_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y +CONFIG_SPL_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_SCSI=y CONFIG_BAUDRATE=1500000 diff --git a/configs/nanopi-m4-rk3399_defconfig b/configs/nanopi-m4-rk3399_defconfig index 25761e3f9f8..76d2994ae57 100644 --- a/configs/nanopi-m4-rk3399_defconfig +++ b/configs/nanopi-m4-rk3399_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-m4" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y +CONFIG_SPL_DRIVERS_MISC=y CONFIG_TARGET_EVB_RK3399=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -19,6 +20,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-m4.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_POWER=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL=y CONFIG_CMD_BOOTZ=y @@ -36,6 +39,7 @@ CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_SPL_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y @@ -49,8 +53,11 @@ CONFIG_NVME_PCI=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y +CONFIG_SPL_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y +CONFIG_SPL_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_SCSI=y CONFIG_BAUDRATE=1500000 diff --git a/configs/nanopi-m4b-rk3399_defconfig b/configs/nanopi-m4b-rk3399_defconfig index f32d3e5ffd1..17241b38946 100644 --- a/configs/nanopi-m4b-rk3399_defconfig +++ b/configs/nanopi-m4b-rk3399_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-m4b" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y +CONFIG_SPL_DRIVERS_MISC=y CONFIG_TARGET_EVB_RK3399=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -19,6 +20,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-m4b.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_POWER=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL=y CONFIG_CMD_BOOTZ=y @@ -36,6 +39,7 @@ CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_SPL_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y @@ -49,8 +53,11 @@ CONFIG_NVME_PCI=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y +CONFIG_SPL_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y +CONFIG_SPL_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_SCSI=y CONFIG_BAUDRATE=1500000 diff --git a/configs/nanopi-neo4-rk3399_defconfig b/configs/nanopi-neo4-rk3399_defconfig index 00822f7f655..c0aedd5288b 100644 --- a/configs/nanopi-neo4-rk3399_defconfig +++ b/configs/nanopi-neo4-rk3399_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-neo4" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y +CONFIG_SPL_DRIVERS_MISC=y CONFIG_TARGET_EVB_RK3399=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -17,6 +18,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-neo4.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_POWER=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL=y CONFIG_CMD_BOOTZ=y @@ -31,6 +34,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_SPL_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y @@ -43,8 +47,11 @@ CONFIG_GMAC_ROCKCHIP=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y +CONFIG_SPL_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y +CONFIG_SPL_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig index 100b68bb49e..3ce9bad76fe 100644 --- a/configs/nanopi-r4s-rk3399_defconfig +++ b/configs/nanopi-r4s-rk3399_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-r4s" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y +CONFIG_SPL_DRIVERS_MISC=y CONFIG_TARGET_EVB_RK3399=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART_BASE=0xFF1A0000 @@ -17,6 +18,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4s.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_POWER=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL=y CONFIG_CMD_BOOTZ=y @@ -31,6 +34,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_SPL_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y @@ -43,8 +47,11 @@ CONFIG_GMAC_ROCKCHIP=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y +CONFIG_SPL_PMIC_RK8XX=y +CONFIG_SPL_DM_REGULATOR=y CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_REGULATOR_RK8XX=y +CONFIG_SPL_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_BAUDRATE=1500000 -- cgit v1.3.1 From 03005fbe5006c4c79143fdddb453d3ec74e004f5 Mon Sep 17 00:00:00 2001 From: Yang Xiwen Date: Sat, 31 May 2025 21:10:02 +0800 Subject: arm: armv7: restore section to .text after saved_args when CONFIG_BLOBLIST is enabled, the section is switched to .data but is not switched back to .text. It makes all the code below placed in .data section, also breaks CONFIG_POSITION_INDEPENDENT. Fix it by adding `.section .text` to switch the section back to .text. Fixes: 5103e69344d6 ("arm: armv7: save boot arguments") Signed-off-by: Yang Xiwen --- arch/arm/cpu/armv7/start.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 959251957de..833486817f8 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -182,6 +182,8 @@ saved_args: .word 0 .endr END(saved_args) + + .section .text #endif #ifdef CONFIG_ARMV7_LPAE -- cgit v1.3.1 From 0a7610c97ae6af8d2681e361eb24fce1cd63194d Mon Sep 17 00:00:00 2001 From: Yang Xiwen Date: Sat, 31 May 2025 21:10:03 +0800 Subject: arm: qemu: Add imply CONFIG_POSITION_INDEPENDENT Add 'imply CONFIG_POSITION_INDEPENTDENT' for QEMU arm arch. This allows qemu arm boards to load u-boot.bin at any address. It is skipped by default when u-boot is loaded by either --bios or --kernel. To load u-boot.bin at a different address, one can use u-boot chain-loading or qemu loader device[1]. [1] https://www.qemu.org/docs/master/system/generic-loader.html Signed-off-by: Yang Xiwen --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 79f60eb3f34..6ff3f2750ea 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1091,6 +1091,7 @@ config ARCH_QEMU imply USB_XHCI_PCI imply USB_KEYBOARD imply CMD_USB + imply POSITION_INDEPENDENT config ARCH_RENESAS bool "Renesas ARM SoCs" -- cgit v1.3.1