Re: [PATCH] rockchip: rk3328: Add missing bootph-some-ram props

2024-05-06 Thread Kever Yang



On 2024/5/2 03:21, Jonas Karlman wrote:

Add bootph-some-ram props to pinctrl nodes related to eMMC, SD-card and
SPI flash to match e.g. RK3308 and RK3399.

Also adjust bootph props for sdio_vcc_pin, pinctrl and uart2m1_xfer.

Fixes: 1e21f5693045 ("rockchip: rk3328: Fix loading FIT from SD-card when booting 
from eMMC")
Signed-off-by: Jonas Karlman 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
This has been runtime tested on a Rock64 and NanoPi R2S Plus.

The uart2m1_xfer change help speed up boot by around 100 ms.
---
  arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi|  2 +-
  .../rk3328-orangepi-r1-plus-lts-u-boot.dtsi   |  7 ---
  .../dts/rk3328-orangepi-r1-plus-u-boot.dtsi   |  7 ---
  arch/arm/dts/rk3328-rock64-u-boot.dtsi|  7 ---
  arch/arm/dts/rk3328-u-boot.dtsi   | 20 +++
  5 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 
b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
index 4fa170eeaf8d..d8c79600b659 100644
--- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
@@ -12,7 +12,7 @@
  };
  
  _vcc_pin {

-   bootph-all;
+   bootph-pre-ram;
  };
  
  _otg {

diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi 
b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
index 0a9423cd9c7e..b50c1332b836 100644
--- a/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
@@ -8,9 +8,6 @@
  #include "rk3328-sdram-lpddr3-666.dtsi"
  
   {

-   bootph-pre-ram;
-   bootph-some-ram;
-
flash@0 {
bootph-pre-ram;
bootph-some-ram;
@@ -19,18 +16,22 @@
  
  _clk {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _cs0 {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _rx {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _tx {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _otg {

diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi 
b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
index 1096821fc5d3..8ae003bbefd1 100644
--- a/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
@@ -8,9 +8,6 @@
  #include "rk3328-sdram-ddr4-666.dtsi"
  
   {

-   bootph-pre-ram;
-   bootph-some-ram;
-
flash@0 {
bootph-pre-ram;
bootph-some-ram;
@@ -19,18 +16,22 @@
  
  _clk {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _cs0 {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _rx {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _tx {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _otg {

diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi 
b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index 551cff6f24f6..22f128090f84 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -30,9 +30,6 @@
  };
  
   {

-   bootph-pre-ram;
-   bootph-some-ram;
-
flash@0 {
bootph-pre-ram;
bootph-some-ram;
@@ -41,18 +38,22 @@
  
  _clk {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _cs0 {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _rx {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _tx {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _otg {

diff --git a/arch/arm/dts/rk3328-u-boot.dtsi b/arch/arm/dts/rk3328-u-boot.dtsi
index d3608bd0e2b2..0135bc08d491 100644
--- a/arch/arm/dts/rk3328-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-u-boot.dtsi
@@ -17,7 +17,6 @@
};
  
  	dmc: dmc {

-   bootph-all;
compatible = "rockchip,rk3328-dmc";
reg = <0x0 0xff40 0x0 0x1000
   0x0 0xff78 0x0 0x3000
@@ -25,6 +24,7 @@
   0x0 0xff44 0x0 0x1000
   0x0 0xff72 0x0 0x1000
   0x0 0xff798000 0x0 0x1000>;
+   bootph-all;
};
  };
  
@@ -42,14 +42,17 @@
  
  _bus8 {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _clk {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _cmd {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
   {

@@ -66,10 +69,12 @@
  
  _pull_none_8ma {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _pull_none_12ma {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _pull_up {

@@ -78,19 +83,21 @@
  
  _pull_up_4ma {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _pull_up_8ma {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _pull_up_12ma {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
   {

-   bootph-pre-ram;
-   bootph-some-ram;
+   bootph-all;
  };
  
   {

@@ -103,18 +110,22 @@
  
  _bus4 {

bootph-pre-ram;
+   bootph-some-ram;
  };
  
  _clk {

bootph-pre-ram;
+  

[PATCH] rockchip: rk3328: Add missing bootph-some-ram props

2024-05-01 Thread Jonas Karlman
Add bootph-some-ram props to pinctrl nodes related to eMMC, SD-card and
SPI flash to match e.g. RK3308 and RK3399.

Also adjust bootph props for sdio_vcc_pin, pinctrl and uart2m1_xfer.

Fixes: 1e21f5693045 ("rockchip: rk3328: Fix loading FIT from SD-card when 
booting from eMMC")
Signed-off-by: Jonas Karlman 
---
This has been runtime tested on a Rock64 and NanoPi R2S Plus.

The uart2m1_xfer change help speed up boot by around 100 ms.
---
 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi|  2 +-
 .../rk3328-orangepi-r1-plus-lts-u-boot.dtsi   |  7 ---
 .../dts/rk3328-orangepi-r1-plus-u-boot.dtsi   |  7 ---
 arch/arm/dts/rk3328-rock64-u-boot.dtsi|  7 ---
 arch/arm/dts/rk3328-u-boot.dtsi   | 20 +++
 5 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi 
b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
index 4fa170eeaf8d..d8c79600b659 100644
--- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
@@ -12,7 +12,7 @@
 };
 
 _vcc_pin {
-   bootph-all;
+   bootph-pre-ram;
 };
 
 _otg {
diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi 
b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
index 0a9423cd9c7e..b50c1332b836 100644
--- a/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
@@ -8,9 +8,6 @@
 #include "rk3328-sdram-lpddr3-666.dtsi"
 
  {
-   bootph-pre-ram;
-   bootph-some-ram;
-
flash@0 {
bootph-pre-ram;
bootph-some-ram;
@@ -19,18 +16,22 @@
 
 _clk {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _cs0 {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _rx {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _tx {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _otg {
diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi 
b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
index 1096821fc5d3..8ae003bbefd1 100644
--- a/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
@@ -8,9 +8,6 @@
 #include "rk3328-sdram-ddr4-666.dtsi"
 
  {
-   bootph-pre-ram;
-   bootph-some-ram;
-
flash@0 {
bootph-pre-ram;
bootph-some-ram;
@@ -19,18 +16,22 @@
 
 _clk {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _cs0 {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _rx {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _tx {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _otg {
diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi 
b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index 551cff6f24f6..22f128090f84 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -30,9 +30,6 @@
 };
 
  {
-   bootph-pre-ram;
-   bootph-some-ram;
-
flash@0 {
bootph-pre-ram;
bootph-some-ram;
@@ -41,18 +38,22 @@
 
 _clk {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _cs0 {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _rx {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _tx {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _otg {
diff --git a/arch/arm/dts/rk3328-u-boot.dtsi b/arch/arm/dts/rk3328-u-boot.dtsi
index d3608bd0e2b2..0135bc08d491 100644
--- a/arch/arm/dts/rk3328-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-u-boot.dtsi
@@ -17,7 +17,6 @@
};
 
dmc: dmc {
-   bootph-all;
compatible = "rockchip,rk3328-dmc";
reg = <0x0 0xff40 0x0 0x1000
   0x0 0xff78 0x0 0x3000
@@ -25,6 +24,7 @@
   0x0 0xff44 0x0 0x1000
   0x0 0xff72 0x0 0x1000
   0x0 0xff798000 0x0 0x1000>;
+   bootph-all;
};
 };
 
@@ -42,14 +42,17 @@
 
 _bus8 {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _clk {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _cmd {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
  {
@@ -66,10 +69,12 @@
 
 _pull_none_8ma {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _pull_none_12ma {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _pull_up {
@@ -78,19 +83,21 @@
 
 _pull_up_4ma {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _pull_up_8ma {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _pull_up_12ma {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
  {
-   bootph-pre-ram;
-   bootph-some-ram;
+   bootph-all;
 };
 
  {
@@ -103,18 +110,22 @@
 
 _bus4 {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _clk {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _cmd {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _dectn {
bootph-pre-ram;
+   bootph-some-ram;
 };
 
 _pin {
@@ -127,7 +138,8 @@
 };
 
 _xfer {
-   bootph-all;
+