diff mbox series

arm: dts: k3-am625-beagleplay: Fix boot

Message ID c430c549-6c6d-4d32-a51b-e2bfa597bd4a@siemens.com
State Deferred
Delegated to: Tom Rini
Headers show
Series arm: dts: k3-am625-beagleplay: Fix boot | expand

Commit Message

Jan Kiszka Oct. 3, 2023, 8:26 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

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 as 'bootph-all'.

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

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This may overshoot, but at least the board boots again. Could it be that 
[1] broke even more boards?

 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 70 ++++++++++----------
 arch/arm/dts/k3-am625-r5-beagleplay.dts      | 12 ++--
 2 files changed, 41 insertions(+), 41 deletions(-)

  &secure_proxy_sa3 {
-	bootph-pre-ram;
+	bootph-all;
 	/* We require this for boot handshake */
 	status = "okay";
 };
@@ -69,12 +69,12 @@
 		compatible = "ti,am654-system-controller";
 		mboxes= <&secure_proxy_main 1>, <&secure_proxy_main 0>, <&secure_proxy_sa3 0>;
 		mbox-names = "tx", "rx", "boot_notify";
-		bootph-pre-ram;
+		bootph-all;
 	};
 };
  &main_esm {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_pktdma {

Comments

Roger Quadros Oct. 4, 2023, 10:01 a.m. UTC | #1
Hi Jan,

On 03/10/2023 23:26, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> 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 as 'bootph-all'.
> 
> [1] 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Nishanth already send a fix earlier
https://lore.kernel.org/all/20231002150053.2930710-1-nm@ti.com/

> ---
> 
> This may overshoot, but at least the board boots again. Could it be that 
> [1] broke even more boards?
> 
>  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 70 ++++++++++----------
>  arch/arm/dts/k3-am625-r5-beagleplay.dts      | 12 ++--
>  2 files changed, 41 insertions(+), 41 deletions(-)
>
Nishanth Menon Oct. 4, 2023, 12:15 p.m. UTC | #2
On 22:26-20231003, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> 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 as 'bootph-all'.
> 
> [1] 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> This may overshoot, but at least the board boots again. Could it be that 
> [1] broke even more boards?

Jan: https://lore.kernel.org/all/b1c62a7d-a90e-4212-8972-9b622e147975@kernel.org/

I got boot without r5-beagleplay.dts modified. and it is in line with
the changes in linux-next commit 944adefc7f88 ("arm64: dts: ti:
k3-am625-beagleplay: Add boot phase tags marking")

> 
>  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 70 ++++++++++----------
>  arch/arm/dts/k3-am625-r5-beagleplay.dts      | 12 ++--
>  2 files changed, 41 insertions(+), 41 deletions(-)
> 
> diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> index f8c04e8a300..d6c6baa5518 100644
> --- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> +++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> @@ -14,143 +14,143 @@
>  	};
>   	memory@80000000 {
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>   	/* Keep the LEDs on by default to indicate life */
>  	leds {
> -		bootph-pre-ram;
> +		bootph-all;
>  		led-0 {
>  			default-state = "on";
> -			bootph-pre-ram;
> +			bootph-all;
>  		};
>   		led-1 {
>  			default-state = "on";
> -			bootph-pre-ram;
> +			bootph-all;
>  		};
>   		led-2 {
>  			default-state = "on";
> -			bootph-pre-ram;
> +			bootph-all;
>  		};
>   		led-3 {
>  			default-state = "on";
> -			bootph-pre-ram;
> +			bootph-all;
>  		};
>   		led-4 {
>  			default-state = "on";
> -			bootph-pre-ram;
> +			bootph-all;
>  		};
>  	};
>  };
>   &cbass_main {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_timer0 {
>  	clock-frequency = <25000000>;
> -	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_pds {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &k3_clks {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &k3_reset {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &dmsc {
> -	bootph-pre-ram;
> +	bootph-all;
>  	k3_sysreset: sysreset-controller {
>  		compatible = "ti,sci-sysreset";
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>  };
>   &wkup_conf {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &chipid {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_pmx0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_uart0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &console_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &cbass_mcu {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &cbass_wakeup {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &mcu_pmx0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_i2c0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &local_i2c_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &gpio0_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_gpio0 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_gpio1 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &sdhci0 {
>  	/* EMMC */
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &emmc_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &sd_pins_default {
> -	bootph-pre-ram;
> +	bootph-all;
>  	/* Force to use SDCD card detect pin */
>  	pinctrl-single,pins = <
>  		AM62X_IOPAD(0x023c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
> @@ -164,11 +164,11 @@
>  };
>   &tps65219 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &sdhci1 {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   #ifdef CONFIG_TARGET_AM625_A53_EVM
> diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts b/arch/arm/dts/k3-am625-r5-beagleplay.dts
> index 9c9d0570592..ac5461a32c0 100644
> --- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
> +++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
> @@ -31,7 +31,7 @@
>  		ti,sci = <&dmsc>;
>  		ti,sci-proc-id = <32>;
>  		ti,sci-host-id = <10>;
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>   	dm_tifs: dm-tifs {
> @@ -41,7 +41,7 @@
>  		mbox-names = "rx", "tx";
>  		mboxes= <&secure_proxy_main 22>,
>  			<&secure_proxy_main 23>;
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>  };
>  @@ -55,11 +55,11 @@
>  };
>   &mcu_esm {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &secure_proxy_sa3 {
> -	bootph-pre-ram;
> +	bootph-all;
>  	/* We require this for boot handshake */
>  	status = "okay";
>  };
> @@ -69,12 +69,12 @@
>  		compatible = "ti,am654-system-controller";
>  		mboxes= <&secure_proxy_main 1>, <&secure_proxy_main 0>, <&secure_proxy_sa3 0>;
>  		mbox-names = "tx", "rx", "boot_notify";
> -		bootph-pre-ram;
> +		bootph-all;
>  	};
>  };
>   &main_esm {
> -	bootph-pre-ram;
> +	bootph-all;
>  };
>   &main_pktdma {
> -- 
> 2.35.3
Jan Kiszka Oct. 5, 2023, 4:18 a.m. UTC | #3
On 04.10.23 14:15, Nishanth Menon wrote:
> On 22:26-20231003, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> 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 as 'bootph-all'.
>>
>> [1] 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> This may overshoot, but at least the board boots again. Could it be that 
>> [1] broke even more boards?
> 
> Jan: https://lore.kernel.org/all/b1c62a7d-a90e-4212-8972-9b622e147975@kernel.org/
> 
> I got boot without r5-beagleplay.dts modified. and it is in line with
> the changes in linux-next commit 944adefc7f88 ("arm64: dts: ti:
> k3-am625-beagleplay: Add boot phase tags marking")
> 

Yeah, no problem, missed that.

Meanwhile, I can fix our IOT2050 because I was unfortunatenly right:
more havoc in sight. Did anyone tried to look at the fallouts
systematically already? Is it only affecting the TI family?

Jan
Nishanth Menon Oct. 5, 2023, 11:27 a.m. UTC | #4
On 06:18-20231005, Jan Kiszka wrote:
> On 04.10.23 14:15, Nishanth Menon wrote:
> > On 22:26-20231003, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> 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 as 'bootph-all'.
> >>
> >> [1] 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>
> >> This may overshoot, but at least the board boots again. Could it be that 
> >> [1] broke even more boards?
> > 
> > Jan: https://lore.kernel.org/all/b1c62a7d-a90e-4212-8972-9b622e147975@kernel.org/
> > 
> > I got boot without r5-beagleplay.dts modified. and it is in line with
> > the changes in linux-next commit 944adefc7f88 ("arm64: dts: ti:
> > k3-am625-beagleplay: Add boot phase tags marking")
> > 
> 
> Yeah, no problem, missed that.
> 
> Meanwhile, I can fix our IOT2050 because I was unfortunatenly right:
> more havoc in sight. Did anyone tried to look at the fallouts
> systematically already? Is it only affecting the TI family?
> 

I know all of TI K3 platforms are broken, but I don't think (based on
discussions on the list so far), anyone actually went around non-TI
platforms to identify the ones that are broken.
Tom Rini Oct. 5, 2023, 2:49 p.m. UTC | #5
On Thu, Oct 05, 2023 at 06:18:08AM +0200, Jan Kiszka wrote:
> On 04.10.23 14:15, Nishanth Menon wrote:
> > On 22:26-20231003, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> 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 as 'bootph-all'.
> >>
> >> [1] 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>
> >> This may overshoot, but at least the board boots again. Could it be that 
> >> [1] broke even more boards?
> > 
> > Jan: https://lore.kernel.org/all/b1c62a7d-a90e-4212-8972-9b622e147975@kernel.org/
> > 
> > I got boot without r5-beagleplay.dts modified. and it is in line with
> > the changes in linux-next commit 944adefc7f88 ("arm64: dts: ti:
> > k3-am625-beagleplay: Add boot phase tags marking")
> > 
> 
> Yeah, no problem, missed that.
> 
> Meanwhile, I can fix our IOT2050 because I was unfortunatenly right:
> more havoc in sight. Did anyone tried to look at the fallouts
> systematically already? Is it only affecting the TI family?

Well, I'm pretty confused right now.  The visible breakage has been
traced back to a commit that was in -next and is fine on my J721E EVM
and is fine on my AM65x EVM.  I can't figure out where my Beagleplay
ended up, so I can't check that one as easily.  But given how the
breakage is described, mine too should be failing.  But they aren't.  In
both cases, I have the GP versions of the chips, and am booting the
unsigned files.
Tom Rini Oct. 5, 2023, 2:52 p.m. UTC | #6
On Thu, Oct 05, 2023 at 10:49:19AM -0400, Tom Rini wrote:
> On Thu, Oct 05, 2023 at 06:18:08AM +0200, Jan Kiszka wrote:
> > On 04.10.23 14:15, Nishanth Menon wrote:
> > > On 22:26-20231003, Jan Kiszka wrote:
> > >> From: Jan Kiszka <jan.kiszka@siemens.com>
> > >>
> > >> 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 as 'bootph-all'.
> > >>
> > >> [1] 9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
> > >>
> > >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > >> ---
> > >>
> > >> This may overshoot, but at least the board boots again. Could it be that 
> > >> [1] broke even more boards?
> > > 
> > > Jan: https://lore.kernel.org/all/b1c62a7d-a90e-4212-8972-9b622e147975@kernel.org/
> > > 
> > > I got boot without r5-beagleplay.dts modified. and it is in line with
> > > the changes in linux-next commit 944adefc7f88 ("arm64: dts: ti:
> > > k3-am625-beagleplay: Add boot phase tags marking")
> > > 
> > 
> > Yeah, no problem, missed that.
> > 
> > Meanwhile, I can fix our IOT2050 because I was unfortunatenly right:
> > more havoc in sight. Did anyone tried to look at the fallouts
> > systematically already? Is it only affecting the TI family?
> 
> Well, I'm pretty confused right now.  The visible breakage has been
> traced back to a commit that was in -next and is fine on my J721E EVM
> and is fine on my AM65x EVM.  I can't figure out where my Beagleplay
> ended up, so I can't check that one as easily.  But given how the
> breakage is described, mine too should be failing.  But they aren't.  In
> both cases, I have the GP versions of the chips, and am booting the
> unsigned files.

OK, I think I might have solved my own unexpected success here in that
it seems like I had the wrong files being copied to the device and so
that somehow ended up working.  I have replicated failure finally.

> 
> -- 
> Tom
diff mbox series

Patch

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index f8c04e8a300..d6c6baa5518 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -14,143 +14,143 @@ 
 	};
  	memory@80000000 {
-		bootph-pre-ram;
+		bootph-all;
 	};
  	/* Keep the LEDs on by default to indicate life */
 	leds {
-		bootph-pre-ram;
+		bootph-all;
 		led-0 {
 			default-state = "on";
-			bootph-pre-ram;
+			bootph-all;
 		};
  		led-1 {
 			default-state = "on";
-			bootph-pre-ram;
+			bootph-all;
 		};
  		led-2 {
 			default-state = "on";
-			bootph-pre-ram;
+			bootph-all;
 		};
  		led-3 {
 			default-state = "on";
-			bootph-pre-ram;
+			bootph-all;
 		};
  		led-4 {
 			default-state = "on";
-			bootph-pre-ram;
+			bootph-all;
 		};
 	};
 };
  &cbass_main {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_timer0 {
 	clock-frequency = <25000000>;
-	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_pds {
-	bootph-pre-ram;
+	bootph-all;
 };
  &k3_clks {
-	bootph-pre-ram;
+	bootph-all;
 };
  &k3_reset {
-	bootph-pre-ram;
+	bootph-all;
 };
  &dmsc {
-	bootph-pre-ram;
+	bootph-all;
 	k3_sysreset: sysreset-controller {
 		compatible = "ti,sci-sysreset";
-		bootph-pre-ram;
+		bootph-all;
 	};
 };
  &wkup_conf {
-	bootph-pre-ram;
+	bootph-all;
 };
  &chipid {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_pmx0 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_uart0 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &console_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
  &cbass_mcu {
-	bootph-pre-ram;
+	bootph-all;
 };
  &cbass_wakeup {
-	bootph-pre-ram;
+	bootph-all;
 };
  &mcu_pmx0 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_i2c0 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &local_i2c_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
  &gpio0_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_gpio0 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &main_gpio1 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &sdhci0 {
 	/* EMMC */
-	bootph-pre-ram;
+	bootph-all;
 };
  &emmc_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 };
  &sd_pins_default {
-	bootph-pre-ram;
+	bootph-all;
 	/* Force to use SDCD card detect pin */
 	pinctrl-single,pins = <
 		AM62X_IOPAD(0x023c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
@@ -164,11 +164,11 @@ 
 };
  &tps65219 {
-	bootph-pre-ram;
+	bootph-all;
 };
  &sdhci1 {
-	bootph-pre-ram;
+	bootph-all;
 };
  #ifdef CONFIG_TARGET_AM625_A53_EVM
diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts b/arch/arm/dts/k3-am625-r5-beagleplay.dts
index 9c9d0570592..ac5461a32c0 100644
--- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
+++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
@@ -31,7 +31,7 @@ 
 		ti,sci = <&dmsc>;
 		ti,sci-proc-id = <32>;
 		ti,sci-host-id = <10>;
-		bootph-pre-ram;
+		bootph-all;
 	};
  	dm_tifs: dm-tifs {
@@ -41,7 +41,7 @@ 
 		mbox-names = "rx", "tx";
 		mboxes= <&secure_proxy_main 22>,
 			<&secure_proxy_main 23>;
-		bootph-pre-ram;
+		bootph-all;
 	};
 };
 @@ -55,11 +55,11 @@
 };
  &mcu_esm {
-	bootph-pre-ram;
+	bootph-all;
 };