Skip to contentSkip to conversation

arm: dts: imx8mp: Delete default clocks for clock controller node

PATCH In review Ye Li 5 participants 6 messages Aug 17, 2021 – Oct 21, 2021

Subsystems (2)
lore
Share & tools
lore

Ye Li

author
#0 lore raw

PATCH 1/1 arm: dts: imx8mp: Delete default clocks for clock controller node

Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node.

---
 arch/arm/dts/imx8mp-u-boot.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/dts/imx8mp-u-boot.dtsi +3 -0
index d61346d..a6ede2e 100644
@@ -18,6 +18,9 @@
 &clk {
 	u-boot,dm-spl;
 	u-boot,dm-pre-reloc;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+	/delete-property/ assigned-clock-rates;
 };
 
 &osc_32k {
Signature · 1 line
2.7.4
Tested-by on v1 1/1
#1 lore raw

Am Dienstag, den 17.08.2021, 14:32 +0800 schrieb Ye Li:

Quoted 4 lines

Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node.

Quoted 19 lines
---
 arch/arm/dts/imx8mp-u-boot.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/dts/imx8mp-u- renamed from arch/arm/dts/imx8mp-u-boot.dtsi +0 -0

boot.dtsi
index d61346d..a6ede2e 100644

arch/arm/dts/imx8mp-u-boot.dtsi +3 -0
@@ -18,6 +18,9 @@
 &clk {
 	u-boot,dm-spl;
 	u-boot,dm-pre-reloc;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+	/delete-property/ assigned-clock-rates;
 };
 
 &osc_32k {
#2 lore raw

Hello Stefano,

Quoted 9 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Teresa Remmet
Sent: Thursday, August 26, 2021 9:20 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH] arm: dts: imx8mp: Delete default clocks for clock controller node

Quoted 3 lines

Am Dienstag, den 17.08.2021, 14:32 +0800 schrieb Ye Li:

Quoted 2 lines

Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node.

Just a ping on this patch, it seems that without this path uSDHC controllers are not being correctly probed, hence the boot sequence is blocked. Applying this patch does solve the probing.

Can you please consider taking this patch?

Quoted 4 lines
Quoted 2 lines
Quoted 19 lines
Quoted 19 lines
---
 arch/arm/dts/imx8mp-u-boot.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/dts/imx8mp-u- renamed from arch/arm/dts/imx8mp-u-boot.dtsi +0 -0

boot.dtsi index d61346d..a6ede2e 100644

arch/arm/dts/imx8mp-u-boot.dtsi +3 -0
@@ -18,6 +18,9 @@
 &clk {
      u-boot,dm-spl;
      u-boot,dm-pre-reloc;
+     /delete-property/ assigned-clocks;
+     /delete-property/ assigned-clock-parents;
+     /delete-property/ assigned-clock-rates;
 };
 
 &osc_32k {
Acked-by Peng Fan on v1 1/1
#3 lore raw
In reply to Ye Li
Quoted 14 lines · Ye Li

Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node.

---
  arch/arm/dts/imx8mp-u-boot.dtsi | 3 +++
  1 file changed, 3 insertions(+)
arch/arm/dts/imx8mp-u-boot.dtsi +0 -0
index d61346d..a6ede2e 100644

arch/arm/dts/imx8mp-u-boot.dtsi line 26

Quoted 9 lines
arch/arm/dts/imx8mp-u-boot.dtsi +3 -0
@@ -18,6 +18,9 @@
  &clk {
  	u-boot,dm-spl;
  	u-boot,dm-pre-reloc;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+	/delete-property/ assigned-clock-rates;
  };
 
  &osc_32k {

For a release fix, this is ok.

But for distro boot, we need think Linux Kernel will use the device tree exported by U-Boot. Removing this property may cause issue.

I think other vendors may has similar issue that U-Boot modify dtb and corrupt distribution kernel booting.

Thanks,
Peng.

#4 lore raw

Hi Peng,

Quoted 27 lines · Peng Fan (OSS)
Quoted 13 lines · Ye Li

Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node.

---
  arch/arm/dts/imx8mp-u-boot.dtsi | 3 +++

  1 file changed, 3 insertions(+)
arch/arm/dts/imx8mp-u-boot.dtsi +0 -0
index d61346d..a6ede2e 100644

arch/arm/dts/imx8mp-u-boot.dtsi line 26

Quoted 9 lines
arch/arm/dts/imx8mp-u-boot.dtsi +3 -0
@@ -18,6 +18,9 @@
   &clk {
       u-boot,dm-spl;
       u-boot,dm-pre-reloc;
+    /delete-property/ assigned-clocks;
+    /delete-property/ assigned-clock-parents;
+    /delete-property/ assigned-clock-rates;
   };
   &osc_32k {
 

For a release fix, this is ok.

Quoted 6 lines

But for distro boot, we need think Linux Kernel will use the device tree exported by U-Boot. Removing this property may cause issue.

But let's think this is not the only use case. The other use case is kernel has its own DT and not the one from U-Boot. In products in field, if kernel has a strong dependency from U-Boot, a kernel update can be done only if it is together a bootloader update.

Quoted 3 lines

I think other vendors may has similar issue that U-Boot modify dtb and corrupt distribution kernel booting.

We should also think about if thsi is a good thing. There could not be a kernel update without a u-boot update. And just a few devices have support for a powercut safe bootloader update.

I do not want to be very OT, I apply the patch, sorry for delay.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#5 lore raw

PATCH 1/1 arm: dts: imx8mp: Delete default clocks for clock controller node

In reply to Ye Li
Quoted 6 lines

Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================