Skip to contentSkip to conversation

cpufreq: ti-cpufreq: Add support for AM3517

PATCH In review Adam Ford 2 participants 5 messages Sep 9, 2019

Subsystems (2)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/2 cpufreq: ti-cpufreq: Add support for AM3517

The AM3517 only lists 600MHz @ 1.2V, but the revister values for 0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz).

This patch simply enable adds the am3517 to the compatible table using the omap3630 structure instead of the 3430.

drivers/cpufreq/ti-cpufreq.c +1 -0
index f2f58d689320..6b69fb1d6bdf 100644
@@ -270,6 +270,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
 
 static const struct of_device_id ti_cpufreq_of_match[] = {
 	{ .compatible = "ti,am33xx", .data = &am3x_soc_data, },
+	{ .compatible = "ti,am3517", .data = &omap36xx_soc_data, },
 	{ .compatible = "ti,am43", .data = &am4x_soc_data, },
 	{ .compatible = "ti,dra7", .data = &dra7_soc_data },
 	{ .compatible = "ti,omap34xx", .data = &omap34xx_soc_data, },
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 ARM: dts: Add OPP-V2 table for AM3517

The AM3517 only lists 600MHz @ 1.2V, but the revister values for 0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz).

This patch sets up the OPP50 and OPP100 tables at 300MHz and 600MHz for the AM3517 with each having an operating voltage at 1.2V.

arch/arm/boot/dts/am3517.dtsi +31 -0
index 23ea381d363f..a0f23361d4bc 100644
@@ -16,6 +16,37 @@
 		can = &hecc;
 	};
 
+	cpus {
+		cpu: cpu@0 {
+			/* Based on OMAP3630 variants OPP50 and OPP100 */
+			operating-points-v2 = <&cpu0_opp_table>;
+
+			clock-latency = <300000>; /* From legacy driver */
+		};
+	};
+
+	cpu0_opp_table: opp-table {
+		compatible = "operating-points-v2-ti-cpu";
+		syscon = <&scm_conf>;
+		/*
+		 * AM3517 TRM only lists 600MHz @ 1.2V, but omap36xx
+		 * appear to operate at 300MHz as well. Since AM3517 only
+		 * lists one operating voltage, it will remain fixed at 1.2V
+		 */
+		opp50-300000000 {
+			opp-hz = /bits/ 64 <300000000>;
+			opp-microvolt = <1200000>;
+			opp-supported-hw = <0xffffffff 0xffffffff>;
+			opp-suspend;
+		};
+
+		opp100-600000000 {
+			opp-hz = /bits/ 64 <600000000>;
+			opp-microvolt = <1200000>;
+			opp-supported-hw = <0xffffffff 0xffffffff>;
+		};
+	};
+
 	ocp@68000000 {
 		am35x_otg_hs: am35x_otg_hs@5c040000 {
 			compatible = "ti,omap3-musb";
Signature · 1 line
2.17.1
#2 lore raw
In reply to Adam Ford

Hi Adam,

Quoted 3 lines

Am 09.09.2019 um 17:45 schrieb Adam Ford <[email protected]>:

The AM3517 only lists 600MHz @ 1.2V, but the revister values for

a small typo...

s/revister/register/

Quoted 24 lines

0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz).

This patch simply enable adds the am3517 to the compatible table using the omap3630 structure instead of the 3430.

drivers/cpufreq/ti-cpufreq.c +1 -0
index f2f58d689320..6b69fb1d6bdf 100644
@@ -270,6 +270,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
 
 static const struct of_device_id ti_cpufreq_of_match[] = {
 	{ .compatible = "ti,am33xx", .data = &am3x_soc_data, },
+	{ .compatible = "ti,am3517", .data = &omap36xx_soc_data, },
 	{ .compatible = "ti,am43", .data = &am4x_soc_data, },
 	{ .compatible = "ti,dra7", .data = &dra7_soc_data },
 	{ .compatible = "ti,omap34xx", .data = &omap34xx_soc_data, },
Signature · 1 line
2.17.1

Looks good to me.

Should I include your two patches to my patch set (and resend)? Or should we keep them separated?

BR and thanks,
Nikolaus

author
#3 lore raw
Quoted 38 lines · H. Nikolaus Schaller

Hi Adam,

Quoted 3 lines

Am 09.09.2019 um 17:45 schrieb Adam Ford <[email protected]>:

The AM3517 only lists 600MHz @ 1.2V, but the revister values for

a small typo...

s/revister/register/

Quoted 22 lines

0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz).

This patch simply enable adds the am3517 to the compatible table using the omap3630 structure instead of the 3430.

drivers/cpufreq/ti-cpufreq.c +1 -1
index f2f58d689320..6b69fb1d6bdf 100644
@@ -270,6 +270,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
 
 static const struct of_device_id ti_cpufreq_of_match[] = {
      { .compatible = "ti,am33xx", .data = &am3x_soc_data, },
+     { .compatible = "ti,am3517", .data = &omap36xx_soc_data, },
      { .compatible = "ti,am43", .data = &am4x_soc_data, },
      { .compatible = "ti,dra7", .data = &dra7_soc_data },
      { .compatible = "ti,omap34xx", .data = &omap34xx_soc_data, },
--
Quoted 2 lines

2.17.1

Looks good to me.

Quoted 2 lines

Should I include your two patches to my patch set (and resend)? Or should we keep them separated?

Go ahead and take credit for them. I just did what you told me to do and tested them.
Go ahead and mark it as Tested-by with my name.

adam

Quoted 4 lines

BR and thanks,
Nikolaus

#4 lore raw

Hi,

Quoted 41 lines

Am 09.09.2019 um 20:17 schrieb Adam Ford <[email protected]>:

Quoted 38 lines · H. Nikolaus Schaller

Hi Adam,

Quoted 3 lines

Am 09.09.2019 um 17:45 schrieb Adam Ford <[email protected]>:

The AM3517 only lists 600MHz @ 1.2V, but the revister values for

a small typo...

s/revister/register/

Quoted 22 lines

0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which has OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz).

This patch simply enable adds the am3517 to the compatible table using the omap3630 structure instead of the 3430.

drivers/cpufreq/ti-cpufreq.c +1 -1
index f2f58d689320..6b69fb1d6bdf 100644
@@ -270,6 +270,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
 
 static const struct of_device_id ti_cpufreq_of_match[] = {
     { .compatible = "ti,am33xx", .data = &am3x_soc_data, },
+     { .compatible = "ti,am3517", .data = &omap36xx_soc_data, },
     { .compatible = "ti,am43", .data = &am4x_soc_data, },
     { .compatible = "ti,dra7", .data = &dra7_soc_data },
     { .compatible = "ti,omap34xx", .data = &omap34xx_soc_data, },
--
Quoted 2 lines

2.17.1

Looks good to me.

Quoted 5 lines
Quoted 2 lines

Should I include your two patches to my patch set (and resend)? Or should we keep them separated?

Go ahead and take credit for them. I just did what you told me to do and tested them.

Well, you are still the Author, the one who wrote down the ideas :) I think git will even keep the author name untouched.

Quoted 1 line

Go ahead and mark it as Tested-by with my name.

Best is to keep your Signed-Off + mine and add a tested-by as well :)

BR and thanks,
Nikolaus