Skip to contentSkip to conversation

arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon

PATCH Superseded Dhruva Gole 2 participants 3 messages Oct 30, 2024 – Nov 4, 2024

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon

Add another entry in the wkup_conf for the syscon node, and then use that for the syscon in opp-table.

Marking entire wkup_conf as "syscon", "simple-mfd" is wrong and needs to be addressed similar to how other child-nodes in wkup_conf are implemented in the same file.

---

Since the driver fixes for ti-cpufreq.c have made it in -next [1], The DT fixes for SK-AM62x can be supported with support for legacy style DT as well. This has been tested on SK-AM62x [2]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/cpufreq/ti-cpufreq.c?id=1724ae88efcbcd0daeb203ffeb4a2c0e59f2ddf7
[2] https://gist.github.com/DhruvaG2000/40b80cc04a9ac90c86445d6e67ece4cb

Changelog:

Changes in v2:
- Deleted PATCH to Make the AM625 efuse_offset 0, because with [1] we no longer break backward compatibility and hence need to preserve the old offset.
- Link to v1:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

---
 arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 7 ++++++-
 arch/arm64/boot/dts/ti/k3-am625.dtsi       | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +6 -1
index e0afafd532a5..b2b65e31c7cf 100644
@@ -10,7 +10,7 @@
 &cbass_wakeup {
 	wkup_conf: syscon@43000000 {
 		bootph-all;
-		compatible = "syscon", "simple-mfd";
+		compatible = "simple-bus";
 		reg = <0x00 0x43000000 0x00 0x20000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -22,6 +22,11 @@ chipid: chipid@14 {
 			reg = <0x14 0x4>;
 		};
 
+		opp_efuse_table: syscon@18 {
+			compatible = "ti,am62-opp-efuse-table", "syscon";
+			reg = <0x18 0x4>;
+		};
+
 		cpsw_mac_syscon: ethernet-mac-syscon@200 {
 			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
 			reg = <0x200 0x8>;
arch/arm64/boot/dts/ti/k3-am625.dtsi +1 -1
index c3d1db47dc9f..c249883a8a8d 100644
@@ -108,7 +108,7 @@ cpu3: cpu@3 {
 	a53_opp_table: opp-table {
 		compatible = "operating-points-v2-ti-cpu";
 		opp-shared;
-		syscon = <&wkup_conf>;
+		syscon = <&opp_efuse_table>;
 
 		opp-200000000 {
 			opp-hz = /bits/ 64 <200000000>;

base-commit: dec9255a128e19c5fcc3bdb18175d78094cc624d

Signature · 1 line
2.34.1
#1 lore raw

Hi

Quoted 36 lines · Dhruva Gole

Add another entry in the wkup_conf for the syscon node, and then use that for the syscon in opp-table.

Marking entire wkup_conf as "syscon", "simple-mfd" is wrong and needs to be addressed similar to how other child-nodes in wkup_conf are implemented in the same file.

---

Since the driver fixes for ti-cpufreq.c have made it in -next [1], The DT fixes for SK-AM62x can be supported with support for legacy style DT as well. This has been tested on SK-AM62x [2]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/cpufreq/ti-cpufreq.c?id=1724ae88efcbcd0daeb203ffeb4a2c0e59f2ddf7
[2] https://gist.github.com/DhruvaG2000/40b80cc04a9ac90c86445d6e67ece4cb

Changelog:

Changes in v2:
- Deleted PATCH to Make the AM625 efuse_offset 0, because with [1] we no longer break backward compatibility and hence need to preserve the old offset.
- Link to v1:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

---
 arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 7 ++++++-
 arch/arm64/boot/dts/ti/k3-am625.dtsi       | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +0 -0
index e0afafd532a5..b2b65e31c7cf 100644

arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi line 11

Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +0 -0
@@ -10,7 +10,7 @@
 &cbass_wakeup {
 	wkup_conf: syscon@43000000 {

Now that the compatible is updated, this needs to be bus@addr dtbs_check should catch such errors.

arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi line 13

Quoted 3 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +1 -1
 		bootph-all;
-		compatible = "syscon", "simple-mfd";
+		compatible = "simple-bus";

Did you also check U-Boot and make sure no regression/update needed?

Quoted 30 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +5 -0
 		reg = <0x00 0x43000000 0x00 0x20000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -22,6 +22,11 @@ chipid: chipid@14 {
 			reg = <0x14 0x4>;
 		};
 
+		opp_efuse_table: syscon@18 {
+			compatible = "ti,am62-opp-efuse-table", "syscon";
+			reg = <0x18 0x4>;
+		};
+
 		cpsw_mac_syscon: ethernet-mac-syscon@200 {
 			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
 			reg = <0x200 0x8>;
arch/arm64/boot/dts/ti/k3-am625.dtsi +1 -1
index c3d1db47dc9f..c249883a8a8d 100644
@@ -108,7 +108,7 @@ cpu3: cpu@3 {
 	a53_opp_table: opp-table {
 		compatible = "operating-points-v2-ti-cpu";
 		opp-shared;
-		syscon = <&wkup_conf>;
+		syscon = <&opp_efuse_table>;
 
 		opp-200000000 {
 			opp-hz = /bits/ 64 <200000000>;

base-commit: dec9255a128e19c5fcc3bdb18175d78094cc624d

Signature · 2 lines
Regards
Vignesh
#2 lore raw
Quoted 34 lines · Vignesh Raghavendra

Hi

Quoted 31 lines · Dhruva Gole

Add another entry in the wkup_conf for the syscon node, and then use that for the syscon in opp-table.

Marking entire wkup_conf as "syscon", "simple-mfd" is wrong and needs to be addressed similar to how other child-nodes in wkup_conf are implemented in the same file.

---

Since the driver fixes for ti-cpufreq.c have made it in -next [1], The DT fixes for SK-AM62x can be supported with support for legacy style DT as well. This has been tested on SK-AM62x [2]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/cpufreq/ti-cpufreq.c?id=1724ae88efcbcd0daeb203ffeb4a2c0e59f2ddf7
[2] https://gist.github.com/DhruvaG2000/40b80cc04a9ac90c86445d6e67ece4cb

Changelog:

Changes in v2:
- Deleted PATCH to Make the AM625 efuse_offset 0, because with [1] we no longer break backward compatibility and hence need to preserve the old offset.
- Link to v1:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

---
 arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 7 ++++++-
 arch/arm64/boot/dts/ti/k3-am625.dtsi       | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
Quoted 10 lines

arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi line 11

Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +0 -0
index e0afafd532a5..b2b65e31c7cf 100644
@@ -10,7 +10,7 @@
 &cbass_wakeup {
 	wkup_conf: syscon@43000000 {

Now that the compatible is updated, this needs to be bus@addr dtbs_check should catch such errors.

Oh yes, I'll update this. Good catch.

Quoted 7 lines

arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi line 13

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +1 -1
 		bootph-all;
-		compatible = "syscon", "simple-mfd";
+		compatible = "simple-bus";

Did you also check U-Boot and make sure no regression/update needed?

No, I can do a quick sanity boot till kernel with this DTB in U-boot to check for regressions.

Thanks for the review.

Signature · 3 lines
Best regards,
Dhruva Gole
Texas Instruments Incorporated