mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC
@ 2026-01-20 11:47 Dhruva Gole
  2026-01-20 11:47 ` [PATCH v3 1/3] cpufreq: dt-platdev: Add ti,am62l3 to blocklist Dhruva Gole
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Dhruva Gole @ 2026-01-20 11:47 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree, Dhruva Gole

Hello,

This series adds CPU frequency scaling support for the TI AM62L3 SoC.

The AM62L3 is a low-power, low-cost SoC from Texas Instruments. This
series enables cpufreq support by:
1. Adding the SoC to the cpufreq-dt-platdev blocklist to prevent the generic driver from probing.
2. Extending the ti-cpufreq driver to support AM62L3 speed grading by reading the efuse.
3. Updating the device tree with the necessary operating points and clock configurations.

Tested on AM62L3 EVM [1]

[1] https://gist.github.com/DhruvaG2000/6dcceb80cf7bbd1e624ec210532538cb

Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
Changes in v3:
- Sorted the #defines and structs for am62l as well after am62a
- Pick the R-by tag from Kendall
- Link to v2: https://lore.kernel.org/r/20260116-am62l-cpufreq-v2-0-eac7e2e78d29@ti.com

Changes in v2:
- Sort alphabetically while adding AM62L as per Krzysztof's comments
- Link to v1: https://lore.kernel.org/r/20260116-am62l-cpufreq-v1-0-63d062317ae9@ti.com

---
Dhruva Gole (3):
      cpufreq: dt-platdev: Add ti,am62l3 to blocklist
      cpufreq: ti-cpufreq: add support for AM62L3 SoC
      arm64: dts: ti: k3-am62l: support cpufreq

 arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi |  5 +++
 arch/arm64/boot/dts/ti/k3-am62l3.dtsi       | 47 +++++++++++++++++++++++++++++
 drivers/cpufreq/cpufreq-dt-platdev.c        |  1 +
 drivers/cpufreq/ti-cpufreq.c                | 34 ++++++++++++++++++++-
 4 files changed, 86 insertions(+), 1 deletion(-)
---
base-commit: 9b7977f9e39b7768c70c2aa497f04e7569fd3e00
change-id: 20260116-am62l-cpufreq-1987a04a6f68

Best regards,
-- 
Dhruva Gole <d-gole@ti.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/3] cpufreq: dt-platdev: Add ti,am62l3 to blocklist
  2026-01-20 11:47 [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Dhruva Gole
@ 2026-01-20 11:47 ` Dhruva Gole
  2026-01-20 11:47 ` [PATCH v3 2/3] cpufreq: ti-cpufreq: add support for AM62L3 SoC Dhruva Gole
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Dhruva Gole @ 2026-01-20 11:47 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree, Dhruva Gole

Add AM62L3 SoC to the dt-platdev blocklist to ensure proper handling
of CPUFreq functionality. The AM62L3 will use its native TI CPUFreq
driver implementation instead of the generic dt-platdev driver.

This follows the same pattern as other TI SoCs like AM62A7, AM62D2,
and AM62P5 which have been previously added to this blocklist.

Reviewed-by: Kendall Willis <k-willis@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 1708179b2610bca6035d10f0f4766eee6f73912e..16310e190d9ff96af3d20cc5d98dc0e4af4d1bf1 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -193,6 +193,7 @@ static const struct of_device_id blocklist[] __initconst = {
 	{ .compatible = "ti,am625", },
 	{ .compatible = "ti,am62a7", },
 	{ .compatible = "ti,am62d2", },
+	{ .compatible = "ti,am62l3", },
 	{ .compatible = "ti,am62p5", },
 
 	{ .compatible = "qcom,ipq5332", },

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 2/3] cpufreq: ti-cpufreq: add support for AM62L3 SoC
  2026-01-20 11:47 [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Dhruva Gole
  2026-01-20 11:47 ` [PATCH v3 1/3] cpufreq: dt-platdev: Add ti,am62l3 to blocklist Dhruva Gole
@ 2026-01-20 11:47 ` Dhruva Gole
  2026-01-20 23:09   ` Kendall Willis
  2026-01-20 11:47 ` [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq Dhruva Gole
  2026-01-21  6:28 ` [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Viresh Kumar
  3 siblings, 1 reply; 10+ messages in thread
From: Dhruva Gole @ 2026-01-20 11:47 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree, Dhruva Gole

Add CPUFreq support for the AM62L3 SoC with the appropriate
AM62L3 speed grade constants according to the datasheet [1].

This follows the same architecture-specific implementation pattern
as other TI SoCs in the AM6x family.

While at it, also sort instances where the SOC family names
were not sorted alphabetically.

[1] https://www.ti.com/lit/pdf/SPRSPA1

Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
 drivers/cpufreq/ti-cpufreq.c | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
index 6ee76f5fe9c567b0b88797ddb51764a2a5606b16..3d1129aeed02b06f5877663a1b87521a230e3b32 100644
--- a/drivers/cpufreq/ti-cpufreq.c
+++ b/drivers/cpufreq/ti-cpufreq.c
@@ -70,6 +70,12 @@ enum {
 #define AM62A7_SUPPORT_R_MPU_OPP		BIT(1)
 #define AM62A7_SUPPORT_V_MPU_OPP		BIT(2)
 
+#define AM62L3_EFUSE_E_MPU_OPP			5
+#define AM62L3_EFUSE_O_MPU_OPP			15
+
+#define AM62L3_SUPPORT_E_MPU_OPP		BIT(0)
+#define AM62L3_SUPPORT_O_MPU_OPP		BIT(1)
+
 #define AM62P5_EFUSE_O_MPU_OPP			15
 #define AM62P5_EFUSE_S_MPU_OPP			19
 #define AM62P5_EFUSE_T_MPU_OPP			20
@@ -213,6 +219,22 @@ static unsigned long am625_efuse_xlate(struct ti_cpufreq_data *opp_data,
 	return calculated_efuse;
 }
 
+static unsigned long am62l3_efuse_xlate(struct ti_cpufreq_data *opp_data,
+				       unsigned long efuse)
+{
+	unsigned long calculated_efuse = AM62L3_SUPPORT_E_MPU_OPP;
+
+	switch (efuse) {
+	case AM62L3_EFUSE_O_MPU_OPP:
+		calculated_efuse |= AM62L3_SUPPORT_O_MPU_OPP;
+		fallthrough;
+	case AM62L3_EFUSE_E_MPU_OPP:
+		calculated_efuse |= AM62L3_SUPPORT_E_MPU_OPP;
+	}
+
+	return calculated_efuse;
+}
+
 static struct ti_cpufreq_soc_data am3x_soc_data = {
 	.efuse_xlate = amx3_efuse_xlate,
 	.efuse_fallback = AM33XX_800M_ARM_MPU_MAX_FREQ,
@@ -313,8 +335,9 @@ static struct ti_cpufreq_soc_data am3517_soc_data = {
 static const struct soc_device_attribute k3_cpufreq_soc[] = {
 	{ .family = "AM62X", },
 	{ .family = "AM62AX", },
-	{ .family = "AM62PX", },
 	{ .family = "AM62DX", },
+	{ .family = "AM62LX", },
+	{ .family = "AM62PX", },
 	{ /* sentinel */ }
 };
 
@@ -335,6 +358,14 @@ static struct ti_cpufreq_soc_data am62a7_soc_data = {
 	.multi_regulator = false,
 };
 
+static struct ti_cpufreq_soc_data am62l3_soc_data = {
+	.efuse_xlate = am62l3_efuse_xlate,
+	.efuse_offset = 0x0,
+	.efuse_mask = 0x07c0,
+	.efuse_shift = 0x6,
+	.multi_regulator = false,
+};
+
 static struct ti_cpufreq_soc_data am62p5_soc_data = {
 	.efuse_xlate = am62p5_efuse_xlate,
 	.efuse_offset = 0x0,
@@ -463,6 +494,7 @@ static const struct of_device_id ti_cpufreq_of_match[]  __maybe_unused = {
 	{ .compatible = "ti,am625", .data = &am625_soc_data, },
 	{ .compatible = "ti,am62a7", .data = &am62a7_soc_data, },
 	{ .compatible = "ti,am62d2", .data = &am62a7_soc_data, },
+	{ .compatible = "ti,am62l3", .data = &am62l3_soc_data, },
 	{ .compatible = "ti,am62p5", .data = &am62p5_soc_data, },
 	/* legacy */
 	{ .compatible = "ti,omap3430", .data = &omap34xx_soc_data, },

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq
  2026-01-20 11:47 [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Dhruva Gole
  2026-01-20 11:47 ` [PATCH v3 1/3] cpufreq: dt-platdev: Add ti,am62l3 to blocklist Dhruva Gole
  2026-01-20 11:47 ` [PATCH v3 2/3] cpufreq: ti-cpufreq: add support for AM62L3 SoC Dhruva Gole
@ 2026-01-20 11:47 ` Dhruva Gole
  2026-01-21 16:27   ` Kendall Willis
  2026-01-21  6:28 ` [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Viresh Kumar
  3 siblings, 1 reply; 10+ messages in thread
From: Dhruva Gole @ 2026-01-20 11:47 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree, Dhruva Gole

Enable CPUFreq support for AM62L SoC by adding the relevant OPP efuse table
syscon to k3-am62l-wakeup.dtsi for speed grade detection.

Add the operating-points-v2 table with CPU frequency steps from 200MHz to
1.25GHz to k3-am62l3.dtsi

Configure CPU clocks to reference the SCMI clock controller for frequency
scaling

This enables proper CPU frequency scaling capabilities for the AM62L SoC
using the ARM SCMI protocol to interact with the power management firmware.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi |  5 +++
 arch/arm64/boot/dts/ti/k3-am62l3.dtsi       | 47 +++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
index 61bfcdcfc66ea8d802a36ed43cd01fbbf3decc70..a42ccd0d2fcc4d204cae81508f839c44ce83f558 100644
--- a/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
@@ -127,6 +127,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@2000 {
 			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
 			reg = <0x2000 0x8>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62l3.dtsi b/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
index da220b85151227c63f59b2b8ec48ae2ebb37e7bf..f7146421918f7037c6a192cc4765e8814a508afc 100644
--- a/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
@@ -39,6 +39,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 = <&scmi_clk 356>;
 		};
 
 		cpu1: cpu@1 {
@@ -53,6 +55,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 = <&scmi_clk 356>;
 		};
 	};
 
@@ -64,4 +68,47 @@ l2_0: l2-cache0 {
 		cache-line-size = <64>;
 		cache-sets = <256>;
 	};
+
+	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 0x0003>;
+			clock-latency-ns = <6000000>;
+			opp-suspend;
+		};
+	};
 };

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/3] cpufreq: ti-cpufreq: add support for AM62L3 SoC
  2026-01-20 11:47 ` [PATCH v3 2/3] cpufreq: ti-cpufreq: add support for AM62L3 SoC Dhruva Gole
@ 2026-01-20 23:09   ` Kendall Willis
  0 siblings, 0 replies; 10+ messages in thread
From: Kendall Willis @ 2026-01-20 23:09 UTC (permalink / raw)
  To: Dhruva Gole, Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Sebin Francis, Bryan Brattlof, linux-pm, linux-kernel,
	linux-arm-kernel, devicetree

On 1/20/26 05:47, Dhruva Gole wrote:
> Add CPUFreq support for the AM62L3 SoC with the appropriate
> AM62L3 speed grade constants according to the datasheet [1].
> 
> This follows the same architecture-specific implementation pattern
> as other TI SoCs in the AM6x family.
> 
> While at it, also sort instances where the SOC family names
> were not sorted alphabetically.
> 
> [1] https://www.ti.com/lit/pdf/SPRSPA1
> 
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
> ---
>   drivers/cpufreq/ti-cpufreq.c | 34 +++++++++++++++++++++++++++++++++-
>   1 file changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> index 6ee76f5fe9c567b0b88797ddb51764a2a5606b16..3d1129aeed02b06f5877663a1b87521a230e3b32 100644
> --- a/drivers/cpufreq/ti-cpufreq.c
> +++ b/drivers/cpufreq/ti-cpufreq.c
> @@ -70,6 +70,12 @@ enum {
>   #define AM62A7_SUPPORT_R_MPU_OPP		BIT(1)
>   #define AM62A7_SUPPORT_V_MPU_OPP		BIT(2)
>   
> +#define AM62L3_EFUSE_E_MPU_OPP			5
> +#define AM62L3_EFUSE_O_MPU_OPP			15
> +
> +#define AM62L3_SUPPORT_E_MPU_OPP		BIT(0)
> +#define AM62L3_SUPPORT_O_MPU_OPP		BIT(1)
> +
>   #define AM62P5_EFUSE_O_MPU_OPP			15
>   #define AM62P5_EFUSE_S_MPU_OPP			19
>   #define AM62P5_EFUSE_T_MPU_OPP			20
> @@ -213,6 +219,22 @@ static unsigned long am625_efuse_xlate(struct ti_cpufreq_data *opp_data,
>   	return calculated_efuse;
>   }
>   
> +static unsigned long am62l3_efuse_xlate(struct ti_cpufreq_data *opp_data,
> +				       unsigned long efuse)
> +{
> +	unsigned long calculated_efuse = AM62L3_SUPPORT_E_MPU_OPP;
> +
> +	switch (efuse) {
> +	case AM62L3_EFUSE_O_MPU_OPP:
> +		calculated_efuse |= AM62L3_SUPPORT_O_MPU_OPP;
> +		fallthrough;
> +	case AM62L3_EFUSE_E_MPU_OPP:
> +		calculated_efuse |= AM62L3_SUPPORT_E_MPU_OPP;
> +	}
> +
> +	return calculated_efuse;
> +}
> +
>   static struct ti_cpufreq_soc_data am3x_soc_data = {
>   	.efuse_xlate = amx3_efuse_xlate,
>   	.efuse_fallback = AM33XX_800M_ARM_MPU_MAX_FREQ,
> @@ -313,8 +335,9 @@ static struct ti_cpufreq_soc_data am3517_soc_data = {
>   static const struct soc_device_attribute k3_cpufreq_soc[] = {
>   	{ .family = "AM62X", },
>   	{ .family = "AM62AX", },
> -	{ .family = "AM62PX", },
>   	{ .family = "AM62DX", },
> +	{ .family = "AM62LX", },
> +	{ .family = "AM62PX", },
>   	{ /* sentinel */ }
>   };
>   
> @@ -335,6 +358,14 @@ static struct ti_cpufreq_soc_data am62a7_soc_data = {
>   	.multi_regulator = false,
>   };
>   
> +static struct ti_cpufreq_soc_data am62l3_soc_data = {
> +	.efuse_xlate = am62l3_efuse_xlate,
> +	.efuse_offset = 0x0,
> +	.efuse_mask = 0x07c0,
> +	.efuse_shift = 0x6,
> +	.multi_regulator = false,
> +};
> +
>   static struct ti_cpufreq_soc_data am62p5_soc_data = {
>   	.efuse_xlate = am62p5_efuse_xlate,
>   	.efuse_offset = 0x0,
> @@ -463,6 +494,7 @@ static const struct of_device_id ti_cpufreq_of_match[]  __maybe_unused = {
>   	{ .compatible = "ti,am625", .data = &am625_soc_data, },
>   	{ .compatible = "ti,am62a7", .data = &am62a7_soc_data, },
>   	{ .compatible = "ti,am62d2", .data = &am62a7_soc_data, },
> +	{ .compatible = "ti,am62l3", .data = &am62l3_soc_data, },
>   	{ .compatible = "ti,am62p5", .data = &am62p5_soc_data, },
>   	/* legacy */
>   	{ .compatible = "ti,omap3430", .data = &omap34xx_soc_data, },
> 

Hi Dhruva,

Reviewed-by: Kendall Willis <k-willis@ti.com>

Best,
Kendall Willis


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC
  2026-01-20 11:47 [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Dhruva Gole
                   ` (2 preceding siblings ...)
  2026-01-20 11:47 ` [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq Dhruva Gole
@ 2026-01-21  6:28 ` Viresh Kumar
  2026-01-21  6:38   ` Dhruva Gole
  3 siblings, 1 reply; 10+ messages in thread
From: Viresh Kumar @ 2026-01-21  6:28 UTC (permalink / raw)
  To: Dhruva Gole
  Cc: Rafael J. Wysocki, Nishanth Menon, Vignesh Raghavendra,
	Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree

On 20-01-26, 17:17, Dhruva Gole wrote:
> Hello,
> 
> This series adds CPU frequency scaling support for the TI AM62L3 SoC.
> 
> The AM62L3 is a low-power, low-cost SoC from Texas Instruments. This
> series enables cpufreq support by:
> 1. Adding the SoC to the cpufreq-dt-platdev blocklist to prevent the generic driver from probing.
> 2. Extending the ti-cpufreq driver to support AM62L3 speed grading by reading the efuse.
> 3. Updating the device tree with the necessary operating points and clock configurations.
> 
> Tested on AM62L3 EVM [1]
> 
> [1] https://gist.github.com/DhruvaG2000/6dcceb80cf7bbd1e624ec210532538cb
> 
> Signed-off-by: Dhruva Gole <d-gole@ti.com>

I should be applying only patch 1 and 3 ?

-- 
viresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC
  2026-01-21  6:28 ` [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Viresh Kumar
@ 2026-01-21  6:38   ` Dhruva Gole
  2026-01-21  7:07     ` Viresh Kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Dhruva Gole @ 2026-01-21  6:38 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Nishanth Menon, Vignesh Raghavendra,
	Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree

On Jan 21, 2026 at 11:58:23 +0530, Viresh Kumar wrote:
> On 20-01-26, 17:17, Dhruva Gole wrote:
> > Hello,
> > 
> > This series adds CPU frequency scaling support for the TI AM62L3 SoC.
> > 
> > The AM62L3 is a low-power, low-cost SoC from Texas Instruments. This
> > series enables cpufreq support by:
> > 1. Adding the SoC to the cpufreq-dt-platdev blocklist to prevent the generic driver from probing.
> > 2. Extending the ti-cpufreq driver to support AM62L3 speed grading by reading the efuse.
> > 3. Updating the device tree with the necessary operating points and clock configurations.
> > 
> > Tested on AM62L3 EVM [1]
> > 
> > [1] https://gist.github.com/DhruvaG2000/6dcceb80cf7bbd1e624ec210532538cb
> > 
> > Signed-off-by: Dhruva Gole <d-gole@ti.com>
> 
> I should be applying only patch 1 and 3 ?

From what I spoke with Nishanth yesterday, the DT patch (3/3) will have to go via
his tree as it's ti-k3.

The first 2 patches are the cpufreq subsystem ones, once you apply those
and they are integrated Nishanth can pick up the DT patch.

-- 
Best regards,
Dhruva Gole
Texas Instruments Incorporated

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC
  2026-01-21  6:38   ` Dhruva Gole
@ 2026-01-21  7:07     ` Viresh Kumar
  0 siblings, 0 replies; 10+ messages in thread
From: Viresh Kumar @ 2026-01-21  7:07 UTC (permalink / raw)
  To: Dhruva Gole
  Cc: Rafael J. Wysocki, Nishanth Menon, Vignesh Raghavendra,
	Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Kendall Willis, Sebin Francis, Bryan Brattlof, linux-pm,
	linux-kernel, linux-arm-kernel, devicetree

On 21-01-26, 12:08, Dhruva Gole wrote:
> On Jan 21, 2026 at 11:58:23 +0530, Viresh Kumar wrote:
> > On 20-01-26, 17:17, Dhruva Gole wrote:
> > > Hello,
> > > 
> > > This series adds CPU frequency scaling support for the TI AM62L3 SoC.
> > > 
> > > The AM62L3 is a low-power, low-cost SoC from Texas Instruments. This
> > > series enables cpufreq support by:
> > > 1. Adding the SoC to the cpufreq-dt-platdev blocklist to prevent the generic driver from probing.
> > > 2. Extending the ti-cpufreq driver to support AM62L3 speed grading by reading the efuse.
> > > 3. Updating the device tree with the necessary operating points and clock configurations.
> > > 
> > > Tested on AM62L3 EVM [1]
> > > 
> > > [1] https://gist.github.com/DhruvaG2000/6dcceb80cf7bbd1e624ec210532538cb
> > > 
> > > Signed-off-by: Dhruva Gole <d-gole@ti.com>
> > 
> > I should be applying only patch 1 and 3 ?

Ahh, I meant 1 and 2.

> >From what I spoke with Nishanth yesterday, the DT patch (3/3) will have to go via
> his tree as it's ti-k3.
> 
> The first 2 patches are the cpufreq subsystem ones, once you apply those
> and they are integrated Nishanth can pick up the DT patch.

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq
  2026-01-20 11:47 ` [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq Dhruva Gole
@ 2026-01-21 16:27   ` Kendall Willis
  2026-01-22 10:36     ` Dhruva Gole
  0 siblings, 1 reply; 10+ messages in thread
From: Kendall Willis @ 2026-01-21 16:27 UTC (permalink / raw)
  To: Dhruva Gole, Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Sebin Francis, Bryan Brattlof, linux-pm, linux-kernel,
	linux-arm-kernel, devicetree

On 1/20/26 05:47, Dhruva Gole wrote:
> Enable CPUFreq support for AM62L SoC by adding the relevant OPP efuse table
> syscon to k3-am62l-wakeup.dtsi for speed grade detection.
> 
> Add the operating-points-v2 table with CPU frequency steps from 200MHz to
> 1.25GHz to k3-am62l3.dtsi
> 
> Configure CPU clocks to reference the SCMI clock controller for frequency
> scaling
> 
> This enables proper CPU frequency scaling capabilities for the AM62L SoC
> using the ARM SCMI protocol to interact with the power management firmware.
> 
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
> ---
>   arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi |  5 +++
>   arch/arm64/boot/dts/ti/k3-am62l3.dtsi       | 47 +++++++++++++++++++++++++++++
>   2 files changed, 52 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
> index 61bfcdcfc66ea8d802a36ed43cd01fbbf3decc70..a42ccd0d2fcc4d204cae81508f839c44ce83f558 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
> @@ -127,6 +127,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@2000 {
>   			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
>   			reg = <0x2000 0x8>;
> diff --git a/arch/arm64/boot/dts/ti/k3-am62l3.dtsi b/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
> index da220b85151227c63f59b2b8ec48ae2ebb37e7bf..f7146421918f7037c6a192cc4765e8814a508afc 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
> @@ -39,6 +39,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 = <&scmi_clk 356>;
>   		};
>   
>   		cpu1: cpu@1 {
> @@ -53,6 +55,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 = <&scmi_clk 356>;
>   		};
>   	};
>   
> @@ -64,4 +68,47 @@ l2_0: l2-cache0 {
>   		cache-line-size = <64>;
>   		cache-sets = <256>;
>   	};
> +
> +	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 0x0003>;

What is determining the opp-supported-hw values? To my understanding 
based on the DT bindings docs, the values should be based on the number 
of unique speed grades, which there are two for AM62L. Looking at the 
values used here, it looks like it shows 3 unique speed grades.

By this logic, the value of opp-supported-hw should be something like 
0x03 for all OPPs below 833 MHz and 0x02 for all values above it.

> +			clock-latency-ns = <6000000>;
> +			opp-suspend;
> +		};
> +	};
>   };
> 

Best,
Kendall Willis <k-willis@ti.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq
  2026-01-21 16:27   ` Kendall Willis
@ 2026-01-22 10:36     ` Dhruva Gole
  0 siblings, 0 replies; 10+ messages in thread
From: Dhruva Gole @ 2026-01-22 10:36 UTC (permalink / raw)
  To: Kendall Willis
  Cc: Rafael J. Wysocki, Viresh Kumar, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Sebin Francis, Bryan Brattlof,
	linux-pm, linux-kernel, linux-arm-kernel, devicetree

On Jan 21, 2026 at 10:27:15 -0600, Kendall Willis wrote:
> On 1/20/26 05:47, Dhruva Gole wrote:
> > Enable CPUFreq support for AM62L SoC by adding the relevant OPP efuse table
> > syscon to k3-am62l-wakeup.dtsi for speed grade detection.
> > 
> > Add the operating-points-v2 table with CPU frequency steps from 200MHz to
> > 1.25GHz to k3-am62l3.dtsi
> > 
> > Configure CPU clocks to reference the SCMI clock controller for frequency
> > scaling
> > 
> > This enables proper CPU frequency scaling capabilities for the AM62L SoC
> > using the ARM SCMI protocol to interact with the power management firmware.
> > 
> > Signed-off-by: Dhruva Gole <d-gole@ti.com>
> > ---
> >   arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi |  5 +++
> >   arch/arm64/boot/dts/ti/k3-am62l3.dtsi       | 47 +++++++++++++++++++++++++++++
> >   2 files changed, 52 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
> > index 61bfcdcfc66ea8d802a36ed43cd01fbbf3decc70..a42ccd0d2fcc4d204cae81508f839c44ce83f558 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62l-wakeup.dtsi
> > @@ -127,6 +127,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@2000 {
> >   			compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
> >   			reg = <0x2000 0x8>;
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62l3.dtsi b/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
> > index da220b85151227c63f59b2b8ec48ae2ebb37e7bf..f7146421918f7037c6a192cc4765e8814a508afc 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62l3.dtsi
> > @@ -39,6 +39,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 = <&scmi_clk 356>;
> >   		};
> >   		cpu1: cpu@1 {
> > @@ -53,6 +55,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 = <&scmi_clk 356>;
> >   		};
> >   	};
> > @@ -64,4 +68,47 @@ l2_0: l2-cache0 {
> >   		cache-line-size = <64>;
> >   		cache-sets = <256>;
> >   	};
> > +
> > +	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 0x0003>;
> 
> What is determining the opp-supported-hw values? To my understanding based
> on the DT bindings docs, the values should be based on the number of unique
> speed grades, which there are two for AM62L. Looking at the values used
> here, it looks like it shows 3 unique speed grades.
> 
> By this logic, the value of opp-supported-hw should be something like 0x03
> for all OPPs below 833 MHz and 0x02 for all values above it.

That's an astute observation indeed, and I will go fix it right now.
Thanks for reviewing thoroughly! I will anyway send this patch on it's
own now that the driver patches are merged and the DT needs to go
separately at this point.

-- 
Best regards,
Dhruva Gole
Texas Instruments Incorporated

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-22 10:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-20 11:47 [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Dhruva Gole
2026-01-20 11:47 ` [PATCH v3 1/3] cpufreq: dt-platdev: Add ti,am62l3 to blocklist Dhruva Gole
2026-01-20 11:47 ` [PATCH v3 2/3] cpufreq: ti-cpufreq: add support for AM62L3 SoC Dhruva Gole
2026-01-20 23:09   ` Kendall Willis
2026-01-20 11:47 ` [PATCH v3 3/3] arm64: dts: ti: k3-am62l: support cpufreq Dhruva Gole
2026-01-21 16:27   ` Kendall Willis
2026-01-22 10:36     ` Dhruva Gole
2026-01-21  6:28 ` [PATCH v3 0/3] cpufreq: ti: Add support for AM62L3 SoC Viresh Kumar
2026-01-21  6:38   ` Dhruva Gole
2026-01-21  7:07     ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®