summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorJonas Karlman <jonas@kwiboo.se>2024-04-30 15:30:24 +0000
committerKever Yang <kever.yang@rock-chips.com>2024-05-07 15:56:08 +0800
commit100f489f58a685222d0e9049bd8b4990101450d4 (patch)
tree239e9a6ccecdf178bdc7157bc1b11a1755be5c86 /arch/arm
parentfa903919d23fb2467730e864321180f7442d6d71 (diff)
rockchip: rk3399: Fix loading FIT from SD-card when booting from eMMC
When RK3399 boards run SPL from eMMC and fail to load FIT from eMMC due to it being missing or checksum validation fails there can be a fallback to read FIT from SD-card. However, without proper pinctrl configuration reading FIT from SD-card may fail: U-Boot SPL 2024.04-rc4 (Mar 17 2024 - 22:54:45 +0000) Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC1 Card did not respond to voltage select! : -110 mmc_init: -95, time 12 spl: mmc init failed with error: -95 SPL: failed to boot from all boot devices (err=-6) ### ERROR ### Please RESET the board ### Fix this by tagging related sdhci, sdmmc and spi flash pinctrl nodes with bootph props. Also move bootph for common nodes shared by all boards to the SoC u-boot.dtsi. eMMC, SD-Card and SPI flash nodes are also changed to only be tagged with bootph props for SPL and U-Boot pre-reloc phases. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/dts/rk3399-ficus-u-boot.dtsi10
-rw-r--r--arch/arm/dts/rk3399-gru-u-boot.dtsi24
-rw-r--r--arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi3
-rw-r--r--arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi23
-rw-r--r--arch/arm/dts/rk3399-roc-pc-u-boot.dtsi5
-rw-r--r--arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi10
-rw-r--r--arch/arm/dts/rk3399-rock960-u-boot.dtsi10
-rw-r--r--arch/arm/dts/rk3399-rockpro64-u-boot.dtsi7
-rw-r--r--arch/arm/dts/rk3399-u-boot.dtsi57
9 files changed, 116 insertions, 33 deletions
diff --git a/arch/arm/dts/rk3399-ficus-u-boot.dtsi b/arch/arm/dts/rk3399-ficus-u-boot.dtsi
index 67b63a83523..ac924d6dc59 100644
--- a/arch/arm/dts/rk3399-ficus-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-ficus-u-boot.dtsi
@@ -5,3 +5,13 @@
#include "rk3399-u-boot.dtsi"
#include "rk3399-sdram-ddr3-1600.dtsi"
+
+&pcfg_pull_none_18ma {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
index b1604a6872c..0cc40eb6d6f 100644
--- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
@@ -54,6 +54,30 @@
enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
};
+&sdhci {
+ /delete-property/ bootph-pre-ram;
+};
+
+&sdmmc {
+ /delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_bus4 {
+ /delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_cd {
+ /delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_clk {
+ /delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_cmd {
+ /delete-property/ bootph-pre-ram;
+};
+
&spi5 {
spi-activate-delay = <100>;
spi-max-frequency = <3000000>;
diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
index 56fdaf440ae..17af95a114f 100644
--- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
@@ -19,7 +19,8 @@
};
&spiflash {
- bootph-all;
+ bootph-pre-ram;
+ bootph-some-ram;
};
&vdd_log {
diff --git a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
index d1912a2ef6a..1930e5e1035 100644
--- a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
@@ -88,27 +88,8 @@
};
&norflash {
- bootph-all;
-};
-
-&pcfg_pull_none {
- bootph-all;
-};
-
-&pcfg_pull_up {
- bootph-all;
-};
-
-&sdmmc_bus4 {
- bootph-all;
-};
-
-&sdmmc_clk {
- bootph-all;
-};
-
-&sdmmc_cmd {
- bootph-all;
+ bootph-pre-ram;
+ bootph-some-ram;
};
&uart0 {
diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
index 58a3c0afcdd..d40daacc782 100644
--- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
@@ -33,8 +33,9 @@
};
&spi1 {
- spi_flash: flash@0 {
- bootph-all;
+ flash@0 {
+ bootph-pre-ram;
+ bootph-some-ram;
};
};
diff --git a/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi b/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi
index 5c1c451b8f8..44dab14dc21 100644
--- a/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi
@@ -3,3 +3,13 @@
* Copyright (c) 2023 Radxa Limited
*/
#include "rk3399-rock-pi-4-u-boot.dtsi"
+
+&pcfg_pull_none_18ma {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
diff --git a/arch/arm/dts/rk3399-rock960-u-boot.dtsi b/arch/arm/dts/rk3399-rock960-u-boot.dtsi
index 55716ba4df7..ef08d8987ce 100644
--- a/arch/arm/dts/rk3399-rock960-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-rock960-u-boot.dtsi
@@ -19,3 +19,13 @@
vin-supply = <&vcc5v0_sys>;
};
};
+
+&pcfg_pull_none_18ma {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
index b15e5392c3c..e280739057d 100644
--- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
@@ -26,8 +26,6 @@
};
};
};
-
-
};
&sdhci {
@@ -36,8 +34,9 @@
};
&spi1 {
- spi_flash: flash@0 {
- bootph-all;
+ flash@0 {
+ bootph-pre-ram;
+ bootph-some-ram;
};
};
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index b39fe39fa2b..4298552dd99 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -92,13 +92,22 @@
};
&emmc_phy {
- bootph-all;
+ bootph-pre-ram;
+ bootph-some-ram;
};
&grf {
bootph-all;
};
+&pcfg_pull_none {
+ bootph-all;
+};
+
+&pcfg_pull_up {
+ bootph-all;
+};
+
&pinctrl {
bootph-all;
};
@@ -116,7 +125,8 @@
};
&sdhci {
- bootph-all;
+ bootph-pre-ram;
+ bootph-some-ram;
max-frequency = <200000000>;
/* mmc to sram can't do dma, prevent aborts transferring TF-A parts */
@@ -124,14 +134,51 @@
};
&sdmmc {
- bootph-all;
+ bootph-pre-ram;
+ bootph-some-ram;
/* mmc to sram can't do dma, prevent aborts transferring TF-A parts */
u-boot,spl-fifo-mode;
};
-&spi1 {
- bootph-all;
+&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;
+};
+
+&spi1_clk {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&spi1_cs0 {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&spi1_rx {
+ bootph-pre-ram;
+ bootph-some-ram;
+};
+
+&spi1_tx {
+ bootph-pre-ram;
+ bootph-some-ram;
};
&uart2 {