Re: [PATCH 09/31] rockchip: rk3399: Add a default spl-boot-order prop

2024-05-01 Thread Jonas Karlman
Hi Quentin,

On 2024-04-02 16:02, Quentin Schulz wrote:
> Hi Jonas,
> 
> On 3/31/24 22:28, Jonas Karlman wrote:
>> A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl",
>>  and 
>>
>> Move this to rk3399-u-boot.dtsi and make this default for boards
>> currently missing a u-boot,spl-boot-order prop.
>>
>> The _flash reference has been dropped from spl-boot-order now that
>> boot source id is cached and "same-as-spl" can be resolved into the SPI
>> flash node.
>>
> 
> This is not really the same thing.
> 
> This prevents from having U-Boot proper in SPI and TPL+SPL on eMMC/SD 
> card. Is this a real usecase? I don't know, we do support it on Puma 
> (though I know you haven't changed it in this commit). I guess we could 
> still have the devices with SPI flashes have their own 
> u-boot,spl-boot-order if they want.

Agree, I tweaked the commit message a little bit in v2.

I think before the SPI flash node had to be included in spl-boot-order
to be able to load FIT from SPI flash, so the inclusion has probably
mostly been an effect of that.

> 
> So, in short, I would at the very least document this new limitation in 
> the commit log but have nothing against the change (my board not being 
> impacted by it :) ).

Agree, I have been very restrictive and try not to change any behavior
on gru based and puma targets :-

Regards,
Jonas

> 
> Cheers,
> Quentin



Re: [PATCH 09/31] rockchip: rk3399: Add a default spl-boot-order prop

2024-04-23 Thread Kever Yang



On 2024/4/1 04:28, Jonas Karlman wrote:

A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl",
 and 

Move this to rk3399-u-boot.dtsi and make this default for boards
currently missing a u-boot,spl-boot-order prop.

The _flash reference has been dropped from spl-boot-order now that
boot source id is cached and "same-as-spl" can be resolved into the SPI
flash node.

Signed-off-by: Jonas Karlman 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
  arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi  | 1 -
  arch/arm/dts/rk3399-evb-u-boot.dtsi| 1 -
  arch/arm/dts/rk3399-ficus-u-boot.dtsi  | 6 --
  arch/arm/dts/rk3399-firefly-u-boot.dtsi| 6 --
  arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi| 6 --
  arch/arm/dts/rk3399-leez-p710-u-boot.dtsi  | 6 --
  arch/arm/dts/rk3399-nanopi4-u-boot.dtsi| 6 --
  arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi   | 6 --
  arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi  | 6 --
  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 4 
  arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi  | 6 --
  arch/arm/dts/rk3399-rock960-u-boot.dtsi| 5 -
  arch/arm/dts/rk3399-rockpro64-u-boot.dtsi  | 5 +
  arch/arm/dts/rk3399-u-boot.dtsi| 4 
  arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi | 6 --
  15 files changed, 5 insertions(+), 69 deletions(-)

diff --git a/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi 
b/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi
index a3f27566e438..6c07de98fa01 100644
--- a/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi
@@ -9,7 +9,6 @@
  / {
chosen {
stdout-path = "serial2:150n8";
-   u-boot,spl-boot-order = "same-as-spl", , 
};
  };
  
diff --git a/arch/arm/dts/rk3399-evb-u-boot.dtsi b/arch/arm/dts/rk3399-evb-u-boot.dtsi

index dfce63e4d428..796ac9642399 100644
--- a/arch/arm/dts/rk3399-evb-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-evb-u-boot.dtsi
@@ -9,7 +9,6 @@
  / {
chosen {
stdout-path = "serial2:150n8";
-   u-boot,spl-boot-order = "same-as-spl", , 
};
  };
  
diff --git a/arch/arm/dts/rk3399-ficus-u-boot.dtsi b/arch/arm/dts/rk3399-ficus-u-boot.dtsi

index 38e0897db91d..67b63a835238 100644
--- a/arch/arm/dts/rk3399-ficus-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-ficus-u-boot.dtsi
@@ -5,9 +5,3 @@
  
  #include "rk3399-u-boot.dtsi"

  #include "rk3399-sdram-ddr3-1600.dtsi"
-
-/ {
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
diff --git a/arch/arm/dts/rk3399-firefly-u-boot.dtsi 
b/arch/arm/dts/rk3399-firefly-u-boot.dtsi
index c58ad95d120a..1f5fda1d0f1d 100644
--- a/arch/arm/dts/rk3399-firefly-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-firefly-u-boot.dtsi
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-ddr3-1600.dtsi"
  
-/ {

-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
  _log {
regulator-init-microvolt = <95>;
  };
diff --git a/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi 
b/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi
index a7039d74a016..4a3b23e48313 100644
--- a/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
  
-/ {

-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
  _log {
regulator-init-microvolt = <95>;
  };
diff --git a/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi 
b/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi
index c638ce259731..03b596850635 100644
--- a/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
  
-/ {

-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
  _log {
regulator-init-microvolt = <95>;
  };
diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi 
b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
index a9d10592d573..a126bbaf086f 100644
--- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
@@ -5,12 +5,6 @@
  
  #include "rk3399-u-boot.dtsi"
  
-/{

-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
   {
pinctrl-0 = <_bus4 _clk _cmd _cd>;
  };
diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi 
b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
index 88a77cad8d43..83b0c44e9ec5 100644
--- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
  
-/ {

-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , , 

-   };
-};
-
   {
rockchip,panel = <_panel>;
  };
diff --git 

Re: [PATCH 09/31] rockchip: rk3399: Add a default spl-boot-order prop

2024-04-02 Thread Quentin Schulz

Hi Jonas,

On 3/31/24 22:28, Jonas Karlman wrote:

A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl",
 and 

Move this to rk3399-u-boot.dtsi and make this default for boards
currently missing a u-boot,spl-boot-order prop.

The _flash reference has been dropped from spl-boot-order now that
boot source id is cached and "same-as-spl" can be resolved into the SPI
flash node.



This is not really the same thing.

This prevents from having U-Boot proper in SPI and TPL+SPL on eMMC/SD 
card. Is this a real usecase? I don't know, we do support it on Puma 
(though I know you haven't changed it in this commit). I guess we could 
still have the devices with SPI flashes have their own 
u-boot,spl-boot-order if they want.


So, in short, I would at the very least document this new limitation in 
the commit log but have nothing against the change (my board not being 
impacted by it :) ).


Cheers,
Quentin


[PATCH 09/31] rockchip: rk3399: Add a default spl-boot-order prop

2024-03-31 Thread Jonas Karlman
A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl",
 and 

Move this to rk3399-u-boot.dtsi and make this default for boards
currently missing a u-boot,spl-boot-order prop.

The _flash reference has been dropped from spl-boot-order now that
boot source id is cached and "same-as-spl" can be resolved into the SPI
flash node.

Signed-off-by: Jonas Karlman 
---
 arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi  | 1 -
 arch/arm/dts/rk3399-evb-u-boot.dtsi| 1 -
 arch/arm/dts/rk3399-ficus-u-boot.dtsi  | 6 --
 arch/arm/dts/rk3399-firefly-u-boot.dtsi| 6 --
 arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi| 6 --
 arch/arm/dts/rk3399-leez-p710-u-boot.dtsi  | 6 --
 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi| 6 --
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi   | 6 --
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi  | 6 --
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 4 
 arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi  | 6 --
 arch/arm/dts/rk3399-rock960-u-boot.dtsi| 5 -
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi  | 5 +
 arch/arm/dts/rk3399-u-boot.dtsi| 4 
 arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi | 6 --
 15 files changed, 5 insertions(+), 69 deletions(-)

diff --git a/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi 
b/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi
index a3f27566e438..6c07de98fa01 100644
--- a/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi
@@ -9,7 +9,6 @@
 / {
chosen {
stdout-path = "serial2:150n8";
-   u-boot,spl-boot-order = "same-as-spl", , 
};
 };
 
diff --git a/arch/arm/dts/rk3399-evb-u-boot.dtsi 
b/arch/arm/dts/rk3399-evb-u-boot.dtsi
index dfce63e4d428..796ac9642399 100644
--- a/arch/arm/dts/rk3399-evb-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-evb-u-boot.dtsi
@@ -9,7 +9,6 @@
 / {
chosen {
stdout-path = "serial2:150n8";
-   u-boot,spl-boot-order = "same-as-spl", , 
};
 };
 
diff --git a/arch/arm/dts/rk3399-ficus-u-boot.dtsi 
b/arch/arm/dts/rk3399-ficus-u-boot.dtsi
index 38e0897db91d..67b63a835238 100644
--- a/arch/arm/dts/rk3399-ficus-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-ficus-u-boot.dtsi
@@ -5,9 +5,3 @@
 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
-
-/ {
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
diff --git a/arch/arm/dts/rk3399-firefly-u-boot.dtsi 
b/arch/arm/dts/rk3399-firefly-u-boot.dtsi
index c58ad95d120a..1f5fda1d0f1d 100644
--- a/arch/arm/dts/rk3399-firefly-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-firefly-u-boot.dtsi
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
 
-/ {
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
 _log {
regulator-init-microvolt = <95>;
 };
diff --git a/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi 
b/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi
index a7039d74a016..4a3b23e48313 100644
--- a/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
 _log {
regulator-init-microvolt = <95>;
 };
diff --git a/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi 
b/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi
index c638ce259731..03b596850635 100644
--- a/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-leez-p710-u-boot.dtsi
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
 _log {
regulator-init-microvolt = <95>;
 };
diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi 
b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
index a9d10592d573..a126bbaf086f 100644
--- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
@@ -5,12 +5,6 @@
 
 #include "rk3399-u-boot.dtsi"
 
-/{
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , 
-   };
-};
-
  {
pinctrl-0 = <_bus4 _clk _cmd _cd>;
 };
diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi 
b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
index 88a77cad8d43..83b0c44e9ec5 100644
--- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-   chosen {
-   u-boot,spl-boot-order = "same-as-spl", , , 

-   };
-};
-
  {
rockchip,panel = <_panel>;
 };
diff --git a/arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi 
b/arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
index cabf0a9dae89..e29757590611 100644
---