* [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies
@ 2024-09-19 8:28 Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 1/6] arm64: dts: ti: k3-am62a: " Dhruva Gole
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski
Hello everyone
This series adds in the OPPs for the Cortex-A53s on the AM62Ax and
AM62Px SoC families along with the defining the
WKUP_MMR0_WKUP0_CTRL_MMR0_JTAG_USER_ID which we can use to properly
limit the OPPs available for that variant.
Moreover, it also adds a driver cleanup where we can finally get rid of
the rev_offsets and zero the efuse_offsets as they are now taken from socinfo and
DT efuse node register respectively. This series has been tested on all
devices that it affects and has been confirmed to cause no known regressions.
Test logs:
https://gist.github.com/DhruvaG2000/63f5e28636d52787488f776e5bf39498
**NOTE:** Special attention needed on the driver patch 6/6. I have left
a note for the maintainers there on how they would prefer to send it.
Changelog:
---
Changes in v4:
- Add 2 more patches to this series:
- Driver cleanup as described above.
- AM625 DT fixups
- Link to v3: https://lore.kernel.org/all/20240826-opp-v3-0-0934f8309e13@ti.com/
Changes in v3:
- Miscellaneous spelling fixes in commit body
- Link to v2: https://lore.kernel.org/r/20240823-opp-v2-0-e2f67b37c299@ti.com
Changes in v2:
- Expanded on commit descriptions
- Split board file and SoC fdt changes into different patches
- Link to v1: https://lore.kernel.org/r/20240809-opp-v1-0-fea8efeaf963@ti.com
---
Bryan Brattlof (4):
arm64: dts: ti: k3-am62a: add opp frequencies
arm64: dts: ti: k3-am62a7-sk: add 1.4ghz opp entry
arm64: dts: ti: k3-am62p: add opp frequencies
arm64: dts: ti: k3-am62p5-sk: add 1.4ghz opp entry
Dhruva Gole (2):
arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon
cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 7 ++-
arch/arm64/boot/dts/ti/k3-am625.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 5 ++
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 9 ++++
arch/arm64/boot/dts/ti/k3-am62a7.dtsi | 51 +++++++++++++++++++
.../dts/ti/k3-am62p-j722s-common-wakeup.dtsi | 5 ++
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 9 ++++
arch/arm64/boot/dts/ti/k3-am62p5.dtsi | 47 +++++++++++++++++
drivers/cpufreq/ti-cpufreq.c | 5 +-
9 files changed, 134 insertions(+), 6 deletions(-)
base-commit: 55bcd2e0d04c1171d382badef1def1fd04ef66c5
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V4 1/6] arm64: dts: ti: k3-am62a: add opp frequencies
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
@ 2024-09-19 8:28 ` Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 2/6] arm64: dts: ti: k3-am62a7-sk: add 1.4ghz opp entry Dhruva Gole
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski, Bryan Brattlof
From: Bryan Brattlof <bb@ti.com>
One power management technique available to the Cortex-A53s is their
ability to dynamically scale their frequency across the device's
Operating Performance Points (OPP)
The OPPs available for the Cortex-A53s on the AM62Ax can vary based on
the silicon variant used. The SoC variant is encoded into the
WKUP_MMR0_WKUP0_CTRL_MMR0_JTAG_USER_ID register which is used to limit
to only OPP entries the variant supports. A table of all these variants
can be found in it's data sheet[0] for the AM62Ax family.
Add the OPP table into the SoC's fdti file along with the syscon node to
describe the WKUP_MMR0_WKUP0_CTRL_MMR0_JTAG_USER_ID register to detect
the SoC variant.
[0] https://www.ti.com/lit/ds/symlink/am62a3.pdf
Signed-off-by: Bryan Brattlof <bb@ti.com>
---
Link to comment on previous rev:
https://lore.kernel.org/all/20240828131601.6sxvnwpcsb36tz4m@eloquent/
Nishanth, this series has been tested to work on all platforms [1].
I hope that with the revision picking from socinfo and the efuse_offsets
being picked from DT (as they should) there are no longer any major
outstanding concerns on this series?
[1] https://gist.github.com/DhruvaG2000/63f5e28636d52787488f776e5bf39498
---
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 5 ++
arch/arm64/boot/dts/ti/k3-am62a7.dtsi | 51 +++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi
index f5ac101a04df..0b1dd5390cd3 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi
@@ -17,6 +17,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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7.dtsi b/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
index f86a23404e6d..6c99221beb6b 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
@@ -48,6 +48,8 @@ cpu0: cpu@0 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&L2_0>;
+ operating-points-v2 = <&a53_opp_table>;
+ clocks = <&k3_clks 135 0>;
};
cpu1: cpu@1 {
@@ -62,6 +64,8 @@ cpu1: cpu@1 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&L2_0>;
+ operating-points-v2 = <&a53_opp_table>;
+ clocks = <&k3_clks 136 0>;
};
cpu2: cpu@2 {
@@ -76,6 +80,8 @@ cpu2: cpu@2 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&L2_0>;
+ operating-points-v2 = <&a53_opp_table>;
+ clocks = <&k3_clks 137 0>;
};
cpu3: cpu@3 {
@@ -90,6 +96,51 @@ cpu3: cpu@3 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&L2_0>;
+ operating-points-v2 = <&a53_opp_table>;
+ clocks = <&k3_clks 138 0>;
+ };
+ };
+
+ a53_opp_table: opp-table {
+ compatible = "operating-points-v2-ti-cpu";
+ opp-shared;
+ syscon = <&opp_efuse_table>;
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-800000000 {
+ opp-hz = /bits/ 64 <800000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-1000000000 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-supported-hw = <0x01 0x0006>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-1250000000 {
+ opp-hz = /bits/ 64 <1250000000>;
+ opp-supported-hw = <0x01 0x0004>;
+ clock-latency-ns = <6000000>;
+ opp-suspend;
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 2/6] arm64: dts: ti: k3-am62a7-sk: add 1.4ghz opp entry
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 1/6] arm64: dts: ti: k3-am62a: " Dhruva Gole
@ 2024-09-19 8:28 ` Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 3/6] arm64: dts: ti: k3-am62p: add opp frequencies Dhruva Gole
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski, Bryan Brattlof
From: Bryan Brattlof <bb@ti.com>
The AM62Ax reference board is capable of supplying 0v85 to the VDD_CORE
which allows the Cortex-A53s to operate at 1.4GHz according to chapter
7.5 of the SoC's data sheet[0]. Append the 1.4Ghz entry to the OPP table
to enable this OPP
[0] https://www.ti.com/lit/ds/symlink/am62a3.pdf
Signed-off-by: Bryan Brattlof <bb@ti.com>
---
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index 67faf46d7a35..a6f0d87a50d8 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -68,6 +68,15 @@ wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
};
};
+ opp-table {
+ /* Requires VDD_CORE at 0v85 */
+ opp-1400000000 {
+ opp-hz = /bits/ 64 <1400000000>;
+ opp-supported-hw = <0x01 0x0004>;
+ clock-latency-ns = <6000000>;
+ };
+ };
+
vmain_pd: regulator-0 {
/* TPS25750 PD CONTROLLER OUTPUT */
compatible = "regulator-fixed";
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 3/6] arm64: dts: ti: k3-am62p: add opp frequencies
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 1/6] arm64: dts: ti: k3-am62a: " Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 2/6] arm64: dts: ti: k3-am62a7-sk: add 1.4ghz opp entry Dhruva Gole
@ 2024-09-19 8:28 ` Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 4/6] arm64: dts: ti: k3-am62p5-sk: add 1.4ghz opp entry Dhruva Gole
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski, Bryan Brattlof
From: Bryan Brattlof <bb@ti.com>
One power management technique available to the Cortex-A53s is their
ability to dynamically scale their frequency across the device's
Operating Performance Points (OPP)
The OPPs available for the Cortex-A53s on the AM62Px can vary based on
the silicon variant used. The SoC variant is encoded into the
WKUP_MMR0_WKUP0_CTRL_MMR0_JTAG_USER_ID register which is used to limit
the OPP entries the SoC supports. A table of all these variants can be
found in its data sheet[0] for the AM62Px processor family.
Add the OPP table into the SoC's fdti file along with the syscon node to
describe the WKUP_MMR0_WKUP0_CTRL_MMR0_JTAG_USER_ID register to detect
the SoC variant.
[0] https://www.ti.com/lit/ds/symlink/am62p-q1.pdf
Signed-off-by: Bryan Brattlof <bb@ti.com>
---
.../dts/ti/k3-am62p-j722s-common-wakeup.dtsi | 5 ++
arch/arm64/boot/dts/ti/k3-am62p5.dtsi | 47 +++++++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi
index 315d0092e736..6f32135f00a5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi
@@ -20,6 +20,11 @@ chipid: chipid@14 {
bootph-all;
};
+ 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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62p5.dtsi b/arch/arm64/boot/dts/ti/k3-am62p5.dtsi
index 41f479dca455..140587d02e88 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p5.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p5.dtsi
@@ -47,6 +47,7 @@ cpu0: cpu@0 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
+ operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 135 0>;
};
@@ -62,6 +63,7 @@ cpu1: cpu@1 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
+ operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 136 0>;
};
@@ -77,6 +79,7 @@ cpu2: cpu@2 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
+ operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 137 0>;
};
@@ -92,10 +95,54 @@ cpu3: cpu@3 {
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
+ operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 138 0>;
};
};
+ a53_opp_table: opp-table {
+ compatible = "operating-points-v2-ti-cpu";
+ opp-shared;
+ syscon = <&opp_efuse_table>;
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-800000000 {
+ opp-hz = /bits/ 64 <800000000>;
+ opp-supported-hw = <0x01 0x0007>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-1000000000 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-supported-hw = <0x01 0x0006>;
+ clock-latency-ns = <6000000>;
+ };
+
+ opp-1250000000 {
+ opp-hz = /bits/ 64 <1250000000>;
+ opp-supported-hw = <0x01 0x0004>;
+ clock-latency-ns = <6000000>;
+ opp-suspend;
+ };
+ };
+
l2_0: l2-cache0 {
compatible = "cache";
cache-unified;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 4/6] arm64: dts: ti: k3-am62p5-sk: add 1.4ghz opp entry
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
` (2 preceding siblings ...)
2024-09-19 8:28 ` [PATCH V4 3/6] arm64: dts: ti: k3-am62p: add opp frequencies Dhruva Gole
@ 2024-09-19 8:28 ` Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family Dhruva Gole
5 siblings, 0 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski, Bryan Brattlof
From: Bryan Brattlof <bb@ti.com>
The AM62Px reference board is capable of supplying 0v85 to the VDD_CORE
which allows the Cortex-A53s to operate at 1.4GHz according to chapter
6.6 of the SoC's data sheet[0] . Append the 1.4Ghz entry to the OPP
table to enable this frequency
[0] https://www.ti.com/lit/ds/symlink/am62p-q1.pdf
Signed-off-by: Bryan Brattlof <bb@ti.com>
---
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
index 3efa12bb7254..7f3dc39e12bc 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
@@ -128,6 +128,15 @@ led-0 {
};
};
+ opp-table {
+ /* Requires VDD_CORE at 0v85 */
+ opp-1400000000 {
+ opp-hz = /bits/ 64 <1400000000>;
+ opp-supported-hw = <0x01 0x0004>;
+ clock-latency-ns = <6000000>;
+ };
+ };
+
tlv320_mclk: clk-0 {
#clock-cells = <0>;
compatible = "fixed-clock";
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
` (3 preceding siblings ...)
2024-09-19 8:28 ` [PATCH V4 4/6] arm64: dts: ti: k3-am62p5-sk: add 1.4ghz opp entry Dhruva Gole
@ 2024-09-19 8:28 ` Dhruva Gole
2024-09-19 16:40 ` Andrew Davis
2024-09-19 8:28 ` [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family Dhruva Gole
5 siblings, 1 reply; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski
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.
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
**DEPENDS ON:** PATCH 6/6: cpufreq: ti-cpufreq: Update the efuse/rev offsets
Link to v1: https://lore.kernel.org/all/20240902093222.2828345-2-d-gole@ti.com/
No changes, just combined it as part of Bryan's AM62A and AM62P series
and sending it all together.
---
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(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
index e0afafd532a5..b2b65e31c7cf 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
@@ -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>;
diff --git a/arch/arm64/boot/dts/ti/k3-am625.dtsi b/arch/arm64/boot/dts/ti/k3-am625.dtsi
index c3d1db47dc9f..c249883a8a8d 100644
--- a/arch/arm64/boot/dts/ti/k3-am625.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am625.dtsi
@@ -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>;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
` (4 preceding siblings ...)
2024-09-19 8:28 ` [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon Dhruva Gole
@ 2024-09-19 8:28 ` Dhruva Gole
2024-10-01 6:29 ` Viresh Kumar
5 siblings, 1 reply; 11+ messages in thread
From: Dhruva Gole @ 2024-09-19 8:28 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Dhruva Gole,
Rob Herring, Krzysztof Kozlowski
With the Silicon revision being taken directly from socinfo, there's no
longer any need for reading any SOC register for revision from this driver.
Hence, we do not require any rev_offset for AM62 family of devices.
The efuse offset should be 0x0 for AM625 as well, as the syscon
register being used from DT refers to the efuse_offset directly.
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
Viresh, Nishanth, Vignesh,
This driver fix is better to go with PATCH 5/6.
Subject: [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for
opp-table syscon
That patch fixes the efuse offset in the AM625 DT.
Without it, the driver will read from an incorrect efuse offset, and end
up breaking things in -next till all the DT changes make it in.
Hence, it would be preferrable if this entire series goes via a single
maintainer's tree.
Viresh, perhaps if you can ack this single patch, then Vignesh/Nishanth
could take it up if there are no objections?
I am sorry that this break compatibility with older AM625 devicetree.
However, the old devicetree was marking the entire wkup_conf as "syscon",
"simple-mfd" which was wrong and needed to be fixed.
This series finally tries to bring order to DT and the driver.
However, if there is still any way to maintain the backward
compatibility, then I am open to suggestions. Please try
and understand here that the ask for backward compatibility here
is to ask the driver to support a case where the register offset itself
was to be picked from a different node. I am not sure there's any
clean way to do this.
---
drivers/cpufreq/ti-cpufreq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
index ba621ce1cdda..870ab0b376c1 100644
--- a/drivers/cpufreq/ti-cpufreq.c
+++ b/drivers/cpufreq/ti-cpufreq.c
@@ -313,10 +313,9 @@ static const struct soc_device_attribute k3_cpufreq_soc[] = {
static struct ti_cpufreq_soc_data am625_soc_data = {
.efuse_xlate = am625_efuse_xlate,
- .efuse_offset = 0x0018,
+ .efuse_offset = 0x0,
.efuse_mask = 0x07c0,
.efuse_shift = 0x6,
- .rev_offset = 0x0014,
.multi_regulator = false,
};
@@ -325,7 +324,6 @@ static struct ti_cpufreq_soc_data am62a7_soc_data = {
.efuse_offset = 0x0,
.efuse_mask = 0x07c0,
.efuse_shift = 0x6,
- .rev_offset = 0x0014,
.multi_regulator = false,
};
@@ -334,7 +332,6 @@ static struct ti_cpufreq_soc_data am62p5_soc_data = {
.efuse_offset = 0x0,
.efuse_mask = 0x07c0,
.efuse_shift = 0x6,
- .rev_offset = 0x0014,
.multi_regulator = false,
};
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon
2024-09-19 8:28 ` [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon Dhruva Gole
@ 2024-09-19 16:40 ` Andrew Davis
2024-09-20 10:37 ` Dhruva Gole
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Davis @ 2024-09-19 16:40 UTC (permalink / raw)
To: Dhruva Gole, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Viresh Kumar, Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel, Rob Herring,
Krzysztof Kozlowski
On 9/19/24 3:28 AM, Dhruva Gole wrote:
> 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.
>
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
> ---
>
> **DEPENDS ON:** PATCH 6/6: cpufreq: ti-cpufreq: Update the efuse/rev offsets
>
> Link to v1: https://lore.kernel.org/all/20240902093222.2828345-2-d-gole@ti.com/
> No changes, just combined it as part of Bryan's AM62A and AM62P series
> and sending it all together.
>
> ---
> 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(-)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> index e0afafd532a5..b2b65e31c7cf 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> @@ -10,7 +10,7 @@
> &cbass_wakeup {
> wkup_conf: syscon@43000000 {
> bootph-all;
> - compatible = "syscon", "simple-mfd";
> + compatible = "simple-bus";
This can be done in a separate patch after this one. You'll also
want to change the syscon@43000000 to bus@43000000, and drop the
"reg = <>;" line at the same time.
Andrew
> 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>;
> diff --git a/arch/arm64/boot/dts/ti/k3-am625.dtsi b/arch/arm64/boot/dts/ti/k3-am625.dtsi
> index c3d1db47dc9f..c249883a8a8d 100644
> --- a/arch/arm64/boot/dts/ti/k3-am625.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am625.dtsi
> @@ -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>;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon
2024-09-19 16:40 ` Andrew Davis
@ 2024-09-20 10:37 ` Dhruva Gole
0 siblings, 0 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-09-20 10:37 UTC (permalink / raw)
To: Andrew Davis
Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Viresh Kumar,
Rafael J . Wysocki, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, Rob Herring, Krzysztof Kozlowski
On Sep 19, 2024 at 11:40:31 -0500, Andrew Davis wrote:
> On 9/19/24 3:28 AM, Dhruva Gole wrote:
> > 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.
> >
> > Signed-off-by: Dhruva Gole <d-gole@ti.com>
> > ---
> >
> > **DEPENDS ON:** PATCH 6/6: cpufreq: ti-cpufreq: Update the efuse/rev offsets
> >
> > Link to v1: https://lore.kernel.org/all/20240902093222.2828345-2-d-gole@ti.com/
> > No changes, just combined it as part of Bryan's AM62A and AM62P series
> > and sending it all together.
> >
> > ---
> > 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(-)
> >
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> > index e0afafd532a5..b2b65e31c7cf 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> > @@ -10,7 +10,7 @@
> > &cbass_wakeup {
> > wkup_conf: syscon@43000000 {
> > bootph-all;
> > - compatible = "syscon", "simple-mfd";
> > + compatible = "simple-bus";
>
> This can be done in a separate patch after this one. You'll also
> want to change the syscon@43000000 to bus@43000000, and drop the
> "reg = <>;" line at the same time.
>
> Andrew
>
Sure Andrew, thanks for pointing this out. I will do this in a separate
patch.
--
Best regards,
Dhruva Gole
Texas Instruments Incorporated
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family
2024-09-19 8:28 ` [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family Dhruva Gole
@ 2024-10-01 6:29 ` Viresh Kumar
2024-10-01 7:52 ` Dhruva Gole
0 siblings, 1 reply; 11+ messages in thread
From: Viresh Kumar @ 2024-10-01 6:29 UTC (permalink / raw)
To: Dhruva Gole
Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rafael J . Wysocki, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, Rob Herring, Krzysztof Kozlowski
On 19-09-24, 13:58, Dhruva Gole wrote:
> With the Silicon revision being taken directly from socinfo, there's no
> longer any need for reading any SOC register for revision from this driver.
> Hence, we do not require any rev_offset for AM62 family of devices.
> The efuse offset should be 0x0 for AM625 as well, as the syscon
> register being used from DT refers to the efuse_offset directly.
>
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
> ---
>
> Viresh, Nishanth, Vignesh,
>
> This driver fix is better to go with PATCH 5/6.
>
> Subject: [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for
> opp-table syscon
>
> That patch fixes the efuse offset in the AM625 DT.
> Without it, the driver will read from an incorrect efuse offset, and end
> up breaking things in -next till all the DT changes make it in.
> Hence, it would be preferrable if this entire series goes via a single
> maintainer's tree.
> Viresh, perhaps if you can ack this single patch, then Vignesh/Nishanth
> could take it up if there are no objections?
>
> I am sorry that this break compatibility with older AM625 devicetree.
> However, the old devicetree was marking the entire wkup_conf as "syscon",
> "simple-mfd" which was wrong and needed to be fixed.
>
> This series finally tries to bring order to DT and the driver.
>
> However, if there is still any way to maintain the backward
> compatibility, then I am open to suggestions. Please try
> and understand here that the ask for backward compatibility here
> is to ask the driver to support a case where the register offset itself
> was to be picked from a different node. I am not sure there's any
> clean way to do this.
>
> ---
> drivers/cpufreq/ti-cpufreq.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> index ba621ce1cdda..870ab0b376c1 100644
> --- a/drivers/cpufreq/ti-cpufreq.c
> +++ b/drivers/cpufreq/ti-cpufreq.c
> @@ -313,10 +313,9 @@ static const struct soc_device_attribute k3_cpufreq_soc[] = {
>
> static struct ti_cpufreq_soc_data am625_soc_data = {
> .efuse_xlate = am625_efuse_xlate,
> - .efuse_offset = 0x0018,
> + .efuse_offset = 0x0,
> .efuse_mask = 0x07c0,
> .efuse_shift = 0x6,
> - .rev_offset = 0x0014,
> .multi_regulator = false,
> };
>
> @@ -325,7 +324,6 @@ static struct ti_cpufreq_soc_data am62a7_soc_data = {
> .efuse_offset = 0x0,
> .efuse_mask = 0x07c0,
> .efuse_shift = 0x6,
> - .rev_offset = 0x0014,
> .multi_regulator = false,
> };
>
> @@ -334,7 +332,6 @@ static struct ti_cpufreq_soc_data am62p5_soc_data = {
> .efuse_offset = 0x0,
> .efuse_mask = 0x07c0,
> .efuse_shift = 0x6,
> - .rev_offset = 0x0014,
> .multi_regulator = false,
> };
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family
2024-10-01 6:29 ` Viresh Kumar
@ 2024-10-01 7:52 ` Dhruva Gole
0 siblings, 0 replies; 11+ messages in thread
From: Dhruva Gole @ 2024-10-01 7:52 UTC (permalink / raw)
To: Viresh Kumar
Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rafael J . Wysocki, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, Rob Herring, Krzysztof Kozlowski
On Oct 01, 2024 at 11:59:19 +0530, Viresh Kumar wrote:
> On 19-09-24, 13:58, Dhruva Gole wrote:
> > With the Silicon revision being taken directly from socinfo, there's no
> > longer any need for reading any SOC register for revision from this driver.
> > Hence, we do not require any rev_offset for AM62 family of devices.
> > The efuse offset should be 0x0 for AM625 as well, as the syscon
> > register being used from DT refers to the efuse_offset directly.
> >
> > Signed-off-by: Dhruva Gole <d-gole@ti.com>
> > ---
> >
> > Viresh, Nishanth, Vignesh,
> >
> > This driver fix is better to go with PATCH 5/6.
> >
> > Subject: [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for
> > opp-table syscon
> >
> > That patch fixes the efuse offset in the AM625 DT.
> > Without it, the driver will read from an incorrect efuse offset, and end
> > up breaking things in -next till all the DT changes make it in.
> > Hence, it would be preferrable if this entire series goes via a single
> > maintainer's tree.
> > Viresh, perhaps if you can ack this single patch, then Vignesh/Nishanth
> > could take it up if there are no objections?
> >
> > I am sorry that this break compatibility with older AM625 devicetree.
> > However, the old devicetree was marking the entire wkup_conf as "syscon",
> > "simple-mfd" which was wrong and needed to be fixed.
> >
> > This series finally tries to bring order to DT and the driver.
> >
> > However, if there is still any way to maintain the backward
> > compatibility, then I am open to suggestions. Please try
> > and understand here that the ask for backward compatibility here
> > is to ask the driver to support a case where the register offset itself
> > was to be picked from a different node. I am not sure there's any
> > clean way to do this.
> >
> > ---
> > drivers/cpufreq/ti-cpufreq.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> > index ba621ce1cdda..870ab0b376c1 100644
> > --- a/drivers/cpufreq/ti-cpufreq.c
> > +++ b/drivers/cpufreq/ti-cpufreq.c
> > @@ -313,10 +313,9 @@ static const struct soc_device_attribute k3_cpufreq_soc[] = {
> >
> > static struct ti_cpufreq_soc_data am625_soc_data = {
> > .efuse_xlate = am625_efuse_xlate,
> > - .efuse_offset = 0x0018,
> > + .efuse_offset = 0x0,
> > .efuse_mask = 0x07c0,
> > .efuse_shift = 0x6,
> > - .rev_offset = 0x0014,
> > .multi_regulator = false,
> > };
> >
> > @@ -325,7 +324,6 @@ static struct ti_cpufreq_soc_data am62a7_soc_data = {
> > .efuse_offset = 0x0,
> > .efuse_mask = 0x07c0,
> > .efuse_shift = 0x6,
> > - .rev_offset = 0x0014,
> > .multi_regulator = false,
> > };
> >
> > @@ -334,7 +332,6 @@ static struct ti_cpufreq_soc_data am62p5_soc_data = {
> > .efuse_offset = 0x0,
> > .efuse_mask = 0x07c0,
> > .efuse_shift = 0x6,
> > - .rev_offset = 0x0014,
> > .multi_regulator = false,
> > };
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Really sorry for any confusion here, but this series has been overall
split up and posted afresh here:
https://lore.kernel.org/all/20240930-b4-ti-cpufreq-am62-quirk-v1-0-b5e04f0f899b@ti.com/
This was done to avoid breaking any backward compatibility issues with
older DTs in a clean way.
--
Best regards,
Dhruva Gole
Texas Instruments Incorporated
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-10-01 7:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-19 8:28 [PATCH V4 0/6] ti: k3-am62{a,p}x-sk: add opp frequencies Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 1/6] arm64: dts: ti: k3-am62a: " Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 2/6] arm64: dts: ti: k3-am62a7-sk: add 1.4ghz opp entry Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 3/6] arm64: dts: ti: k3-am62p: add opp frequencies Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 4/6] arm64: dts: ti: k3-am62p5-sk: add 1.4ghz opp entry Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 5/6] arm64: dts: ti: k3-am62: use opp_efuse_table for opp-table syscon Dhruva Gole
2024-09-19 16:40 ` Andrew Davis
2024-09-20 10:37 ` Dhruva Gole
2024-09-19 8:28 ` [PATCH V4 6/6] cpufreq: ti-cpufreq: Update efuse/rev offsets in AM62 family Dhruva Gole
2024-10-01 6:29 ` Viresh Kumar
2024-10-01 7:52 ` Dhruva Gole
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).