Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517
@ 2019-09-09 15:45 Adam Ford
  2019-09-09 15:45 ` [PATCH 2/2] ARM: dts: Add OPP-V2 table " Adam Ford
  2019-09-09 18:13 ` [PATCH 1/2] cpufreq: ti-cpufreq: Add support " H. Nikolaus Schaller
  0 siblings, 2 replies; 5+ messages in thread
From: Adam Ford @ 2019-09-09 15:45 UTC (permalink / raw)
  To: linux-omap
  Cc: neolynx, letux-kernel, andreas, tony, adam.ford, hns, Adam Ford,
	Benoît Cousson, Rob Herring, Mark Rutland,
	Rafael J. Wysocki, Viresh Kumar, devicetree, linux-kernel,
	linux-pm

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.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
index f2f58d689320..6b69fb1d6bdf 100644
--- a/drivers/cpufreq/ti-cpufreq.c
+++ b/drivers/cpufreq/ti-cpufreq.c
@@ -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, },
-- 
2.17.1


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

* [PATCH 2/2] ARM: dts: Add OPP-V2 table for AM3517
  2019-09-09 15:45 [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517 Adam Ford
@ 2019-09-09 15:45 ` " Adam Ford
  2019-09-09 18:13 ` [PATCH 1/2] cpufreq: ti-cpufreq: Add support " H. Nikolaus Schaller
  1 sibling, 0 replies; 5+ messages in thread
From: Adam Ford @ 2019-09-09 15:45 UTC (permalink / raw)
  To: linux-omap
  Cc: neolynx, letux-kernel, andreas, tony, adam.ford, hns, Adam Ford,
	Benoît Cousson, Rob Herring, Mark Rutland,
	Rafael J. Wysocki, Viresh Kumar, devicetree, linux-kernel,
	linux-pm

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.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/boot/dts/am3517.dtsi b/arch/arm/boot/dts/am3517.dtsi
index 23ea381d363f..a0f23361d4bc 100644
--- a/arch/arm/boot/dts/am3517.dtsi
+++ b/arch/arm/boot/dts/am3517.dtsi
@@ -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";
-- 
2.17.1


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

* Re: [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517
  2019-09-09 15:45 [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517 Adam Ford
  2019-09-09 15:45 ` [PATCH 2/2] ARM: dts: Add OPP-V2 table " Adam Ford
@ 2019-09-09 18:13 ` " H. Nikolaus Schaller
  2019-09-09 18:17   ` Adam Ford
  1 sibling, 1 reply; 5+ messages in thread
From: H. Nikolaus Schaller @ 2019-09-09 18:13 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-omap, neolynx, letux-kernel, andreas, tony, adam.ford,
	Benoît Cousson, Rob Herring, Mark Rutland,
	Rafael J. Wysocki, Viresh Kumar, devicetree, linux-kernel,
	linux-pm

Hi Adam,

> Am 09.09.2019 um 17:45 schrieb Adam Ford <aford173@gmail.com>:
> 
> The AM3517 only lists 600MHz @ 1.2V, but the revister values for

a small typo...

s/revister/register/

> 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.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> index f2f58d689320..6b69fb1d6bdf 100644
> --- a/drivers/cpufreq/ti-cpufreq.c
> +++ b/drivers/cpufreq/ti-cpufreq.c
> @@ -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, },
> -- 
> 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


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

* Re: [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517
  2019-09-09 18:13 ` [PATCH 1/2] cpufreq: ti-cpufreq: Add support " H. Nikolaus Schaller
@ 2019-09-09 18:17   ` Adam Ford
  2019-09-09 18:20     ` H. Nikolaus Schaller
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Ford @ 2019-09-09 18:17 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Linux-OMAP, André Roth, Discussions about the Letux Kernel,
	Andreas Kemnade, Tony Lindgren, Adam Ford, Benoît Cousson,
	Rob Herring, Mark Rutland, Rafael J. Wysocki, Viresh Kumar,
	devicetree, Linux Kernel Mailing List, linux-pm

On Mon, Sep 9, 2019 at 1:13 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> Hi Adam,
>
> > Am 09.09.2019 um 17:45 schrieb Adam Ford <aford173@gmail.com>:
> >
> > The AM3517 only lists 600MHz @ 1.2V, but the revister values for
>
> a small typo...
>
> s/revister/register/
>
> > 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.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> > index f2f58d689320..6b69fb1d6bdf 100644
> > --- a/drivers/cpufreq/ti-cpufreq.c
> > +++ b/drivers/cpufreq/ti-cpufreq.c
> > @@ -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, },
> > --
> > 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?

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
>
> BR and thanks,
> Nikolaus
>

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

* Re: [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517
  2019-09-09 18:17   ` Adam Ford
@ 2019-09-09 18:20     ` H. Nikolaus Schaller
  0 siblings, 0 replies; 5+ messages in thread
From: H. Nikolaus Schaller @ 2019-09-09 18:20 UTC (permalink / raw)
  To: Adam Ford
  Cc: Linux-OMAP, André Roth, Discussions about the Letux Kernel,
	Andreas Kemnade, Tony Lindgren, Adam Ford, Benoît Cousson,
	Rob Herring, Mark Rutland, Rafael J. Wysocki, Viresh Kumar,
	devicetree, Linux Kernel Mailing List, linux-pm

Hi,

> Am 09.09.2019 um 20:17 schrieb Adam Ford <aford173@gmail.com>:
> 
> On Mon, Sep 9, 2019 at 1:13 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
>> 
>> Hi Adam,
>> 
>>> Am 09.09.2019 um 17:45 schrieb Adam Ford <aford173@gmail.com>:
>>> 
>>> The AM3517 only lists 600MHz @ 1.2V, but the revister values for
>> 
>> a small typo...
>> 
>> s/revister/register/
>> 
>>> 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.
>>> 
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>> 
>>> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
>>> index f2f58d689320..6b69fb1d6bdf 100644
>>> --- a/drivers/cpufreq/ti-cpufreq.c
>>> +++ b/drivers/cpufreq/ti-cpufreq.c
>>> @@ -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, },
>>> --
>>> 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?
> 
> 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.

> 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


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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 15:45 [PATCH 1/2] cpufreq: ti-cpufreq: Add support for AM3517 Adam Ford
2019-09-09 15:45 ` [PATCH 2/2] ARM: dts: Add OPP-V2 table " Adam Ford
2019-09-09 18:13 ` [PATCH 1/2] cpufreq: ti-cpufreq: Add support " H. Nikolaus Schaller
2019-09-09 18:17   ` Adam Ford
2019-09-09 18:20     ` H. Nikolaus Schaller

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org linux-pm@archiver.kernel.org
	public-inbox-index linux-pm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox