diff mbox series

[1/6] arm: dts: k3-am64-evm: Fix boot

Message ID 20230929134646.214781-2-rogerq@kernel.org
State Accepted
Commit c043ba97d810953e9835b83b1a17bd106b810e5f
Delegated to: Tom Rini
Headers show
Series arm: dts: k3-am64 / k3-am62: Fix boot | expand

Commit Message

Roger Quadros Sept. 29, 2023, 1:46 p.m. UTC
Since commit [1] A53 u-boot proper is broken.
This is because nodes marked as 'bootph-pre-ram' are
not available at u-boot proper before relocation.

To fix this we mark all nodes in sk-u-boot.dtsi as
'bootph-all'.

Move vtt_supply and cbass_mcu node to -r5-evm.dts as
it is only required for R5 SPL.

[1]
9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 56 ++++++++++++---------------
 arch/arm/dts/k3-am642-r5-evm.dts      |  8 ++++
 2 files changed, 32 insertions(+), 32 deletions(-)

Comments

Nishanth Menon Oct. 2, 2023, 3:19 p.m. UTC | #1
On 16:46-20230929, Roger Quadros wrote:
> Since commit [1] A53 u-boot proper is broken.
> This is because nodes marked as 'bootph-pre-ram' are
> not available at u-boot proper before relocation.
> 
> To fix this we mark all nodes in sk-u-boot.dtsi as
> 'bootph-all'.
> 
> Move vtt_supply and cbass_mcu node to -r5-evm.dts as
> it is only required for R5 SPL.
> 
> [1]
> 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> 
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> ---
>  arch/arm/dts/k3-am642-evm-u-boot.dtsi | 56 ++++++++++++---------------
>  arch/arm/dts/k3-am642-r5-evm.dts      |  8 ++++
>  2 files changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
> index c85f57d40f..d06955dfbc 100644
> --- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi
> +++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
> @@ -11,109 +11,101 @@
>  	};
>  
>  	memory@80000000 {
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>  };
>  
> -&vtt_supply {
> -	bootph-pre-ram;
> -};
> -
>  &cbass_main {
> -	bootph-pre-ram;
> -};
> -
> -&cbass_mcu {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_timer0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  	clock-frequency = <200000000>;
>  };
>  
>  &main_conf {
> -	bootph-pre-ram;
> +	bootph-all;
>  	chipid@14 {
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>  };
>  
>  &main_pmx0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_i2c0_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_i2c0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_uart0_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_uart0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &usb0 {
>  	dr_mode="peripheral";
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &usbss0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_mmc1_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &main_usb0_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &dmss {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &secure_proxy_main {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &dmsc {
> -	bootph-pre-ram;
> +	bootph-all;
>  	k3_sysreset: sysreset-controller {
>  		compatible = "ti,sci-sysreset";
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>  };
>  
>  &k3_pds {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &k3_clks {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &k3_reset {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &sdhci0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &sdhci1 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &cpsw3g {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>  
>  &cpsw_port2 {
> diff --git a/arch/arm/dts/k3-am642-r5-evm.dts b/arch/arm/dts/k3-am642-r5-evm.dts
> index 73461f8f6c..696735d8e2 100644
> --- a/arch/arm/dts/k3-am642-r5-evm.dts
> +++ b/arch/arm/dts/k3-am642-r5-evm.dts
> @@ -40,6 +40,10 @@
>  	};
>  };
>  
> +&vtt_supply {
> +	bootph-pre-ram;
> +};
> +
>  &cbass_main {
>  	sysctrler: sysctrler {
>  		compatible = "ti,am654-system-controller";
> @@ -53,6 +57,10 @@
>  	bootph-pre-ram;
>  };
>  
> +&cbass_mcu {
> +	bootph-pre-ram;
> +};

A bit superfluous, but ok - we just need this atm for esm.
> +
>  &mcu_esm {
>  	bootph-pre-ram;
>  };
> -- 
> 2.34.1
> 

Reviewed-by: Nishanth Menon <nm@ti.com>
Roger Quadros Oct. 2, 2023, 4:14 p.m. UTC | #2
Nishanth,

On 02/10/2023 18:19, Nishanth Menon wrote:
> On 16:46-20230929, Roger Quadros wrote:
>> Since commit [1] A53 u-boot proper is broken.
>> This is because nodes marked as 'bootph-pre-ram' are
>> not available at u-boot proper before relocation.
>>
>> To fix this we mark all nodes in sk-u-boot.dtsi as
>> 'bootph-all'.
>>
>> Move vtt_supply and cbass_mcu node to -r5-evm.dts as
>> it is only required for R5 SPL.
>>
>> [1]
>> 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
>>
>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
>> ---
>>  arch/arm/dts/k3-am642-evm-u-boot.dtsi | 56 ++++++++++++---------------
>>  arch/arm/dts/k3-am642-r5-evm.dts      |  8 ++++
>>  2 files changed, 32 insertions(+), 32 deletions(-)
>>
>> diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
>> index c85f57d40f..d06955dfbc 100644
>> --- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi
>> +++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
>> @@ -11,109 +11,101 @@
>>  	};
>>  
>>  	memory@80000000 {
>> -		bootph-pre-ram;
>> +		bootph-all;
>>  	};
>>  };
>>  
>> -&vtt_supply {
>> -	bootph-pre-ram;
>> -};
>> -
>>  &cbass_main {
>> -	bootph-pre-ram;
>> -};
>> -
>> -&cbass_mcu {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_timer0 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  	clock-frequency = <200000000>;
>>  };
>>  
>>  &main_conf {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  	chipid@14 {
>> -		bootph-pre-ram;
>> +		bootph-all;
>>  	};
>>  };
>>  
>>  &main_pmx0 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_i2c0_pins_default {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_i2c0 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_uart0_pins_default {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_uart0 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &usb0 {
>>  	dr_mode="peripheral";
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &usbss0 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_mmc1_pins_default {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &main_usb0_pins_default {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &dmss {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &secure_proxy_main {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &dmsc {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  	k3_sysreset: sysreset-controller {
>>  		compatible = "ti,sci-sysreset";
>> -		bootph-pre-ram;
>> +		bootph-all;
>>  	};
>>  };
>>  
>>  &k3_pds {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &k3_clks {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &k3_reset {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &sdhci0 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &sdhci1 {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &cpsw3g {
>> -	bootph-pre-ram;
>> +	bootph-all;
>>  };
>>  
>>  &cpsw_port2 {
>> diff --git a/arch/arm/dts/k3-am642-r5-evm.dts b/arch/arm/dts/k3-am642-r5-evm.dts
>> index 73461f8f6c..696735d8e2 100644
>> --- a/arch/arm/dts/k3-am642-r5-evm.dts
>> +++ b/arch/arm/dts/k3-am642-r5-evm.dts
>> @@ -40,6 +40,10 @@
>>  	};
>>  };
>>  
>> +&vtt_supply {
>> +	bootph-pre-ram;
>> +};
>> +
>>  &cbass_main {
>>  	sysctrler: sysctrler {
>>  		compatible = "ti,am654-system-controller";
>> @@ -53,6 +57,10 @@
>>  	bootph-pre-ram;
>>  };
>>  
>> +&cbass_mcu {
>> +	bootph-pre-ram;
>> +};
> 
> A bit superfluous, but ok - we just need this atm for esm.

Just moved it from -uboot.dtsi to -r5-evm.dts.

>> +
>>  &mcu_esm {
>>  	bootph-pre-ram;
>>  };
>> -- 
>> 2.34.1
>>
> 
> Reviewed-by: Nishanth Menon <nm@ti.com>
> 

Please see suggestion by Massimo here
https://lore.kernel.org/all/CAC928HY2rZoz6L8za+L20GAsbJCBYOe+k75L_N3aE-78smnLfg@mail.gmail.com/

Do you agree we should change this series to use bootph-some-ram instead?
Nishanth Menon Oct. 2, 2023, 4:19 p.m. UTC | #3
On 19:14-20231002, Roger Quadros wrote:
[...]

> 
> Please see suggestion by Massimo here
> https://lore.kernel.org/all/CAC928HY2rZoz6L8za+L20GAsbJCBYOe+k75L_N3aE-78smnLfg@mail.gmail.com/
> 
> Do you agree we should change this series to use bootph-some-ram instead?

Actually I dont like usage of bootph-some-ram as a hack. We dont
have any DDR in the initial stages of R5 SPL. I'd rather stick with
bootph-all and pre-ram which is accurate for the staged boot sequence
we are following.

Further, boot-ph-all and pre-ram is already the direction we are moving in
kernel dts to make syncs easier in the future. unless there is a strong
reasoning on an alternate rationale, i'd rather not mess with the flow
in play already.

Personally though, I am miffed at a breaking change of this form :(
Tom Rini Oct. 5, 2023, 2:49 p.m. UTC | #4
On Fri, Sep 29, 2023 at 04:46:41PM +0300, Roger Quadros wrote:

> Since commit [1] A53 u-boot proper is broken.
> This is because nodes marked as 'bootph-pre-ram' are
> not available at u-boot proper before relocation.
> 
> To fix this we mark all nodes in sk-u-boot.dtsi as
> 'bootph-all'.
> 
> Move vtt_supply and cbass_mcu node to -r5-evm.dts as
> it is only required for R5 SPL.
> 
> [1]
> 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> 
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> Reviewed-by: Nishanth Menon <nm@ti.com>

For the series, applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
index c85f57d40f..d06955dfbc 100644
--- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
@@ -11,109 +11,101 @@ 
 	};
 
 	memory@80000000 {
-		bootph-pre-ram;
+		bootph-all;
 	};
 };
 
-&vtt_supply {
-	bootph-pre-ram;
-};
-
 &cbass_main {
-	bootph-pre-ram;
-};
-
-&cbass_mcu {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_timer0 {
-	bootph-pre-ram;
+	bootph-all;
 	clock-frequency = <200000000>;
 };
 
 &main_conf {
-	bootph-pre-ram;
+	bootph-all;
 	chipid@14 {
-		bootph-pre-ram;
+		bootph-all;
 	};
 };
 
 &main_pmx0 {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_i2c0_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_i2c0 {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_uart0_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_uart0 {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &usb0 {
 	dr_mode="peripheral";
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &usbss0 {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_mmc1_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &main_usb0_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &dmss {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &secure_proxy_main {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &dmsc {
-	bootph-pre-ram;
+	bootph-all;
 	k3_sysreset: sysreset-controller {
 		compatible = "ti,sci-sysreset";
-		bootph-pre-ram;
+		bootph-all;
 	};
 };
 
 &k3_pds {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &k3_clks {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &k3_reset {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &sdhci0 {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &sdhci1 {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &cpsw3g {
-	bootph-pre-ram;
+	bootph-all;
 };
 
 &cpsw_port2 {
diff --git a/arch/arm/dts/k3-am642-r5-evm.dts b/arch/arm/dts/k3-am642-r5-evm.dts
index 73461f8f6c..696735d8e2 100644
--- a/arch/arm/dts/k3-am642-r5-evm.dts
+++ b/arch/arm/dts/k3-am642-r5-evm.dts
@@ -40,6 +40,10 @@ 
 	};
 };
 
+&vtt_supply {
+	bootph-pre-ram;
+};
+
 &cbass_main {
 	sysctrler: sysctrler {
 		compatible = "ti,am654-system-controller";
@@ -53,6 +57,10 @@ 
 	bootph-pre-ram;
 };
 
+&cbass_mcu {
+	bootph-pre-ram;
+};
+
 &mcu_esm {
 	bootph-pre-ram;
 };