linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2"
@ 2017-02-03 15:24 Lukasz Majewski
  2017-02-03 15:24 ` [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation Lukasz Majewski
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-03 15:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, Viresh Kumar
  Cc: linux-omap, linux-kernel, devicetree, linux-arm-kernel,
	Kishon Vijay Abraham I, Lukasz Majewski

The "operating-points" property have been replaced with
"operating-points-v2". Only entries with the same frequencies have
been added, so no reqression should be introduced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 arch/arm/boot/dts/dra7.dtsi | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 3c228f9..a860a56 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -80,11 +80,7 @@
 			compatible = "arm,cortex-a15";
 			reg = <0>;
 
-			operating-points = <
-				/* kHz    uV */
-				1000000	1060000
-				1176000	1160000
-				>;
+			operating-points-v2 = <&cpu0_opp_table>;
 
 			clocks = <&dpll_mpu_ck>;
 			clock-names = "cpu";
@@ -98,6 +94,22 @@
 		};
 	};
 
+	cpu0_opp_table: opp_table0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp_nom@1000000000 {
+			opp-hz = /bits/ 64 <1000000000>;
+			opp-microvolt = <1060000 850000 1150000>;
+			opp-suspend;
+		};
+
+		opp_od@1176000000 {
+			opp-hz = /bits/ 64 <1176000000>;
+			opp-microvolt = <1160000 885000 1160000>;
+		};
+	};
+
 	/*
 	 * The soc node represents the soc top level view. It is used for IPs
 	 * that are not memory mapped in the MPU view or for the MPU itself.
-- 
2.1.4

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

* [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 15:24 [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Lukasz Majewski
@ 2017-02-03 15:24 ` Lukasz Majewski
  2017-02-03 16:48   ` Nishanth Menon
  2017-02-03 16:56   ` Dave Gerlach
  2017-02-03 16:54 ` [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Dave Gerlach
  2017-02-06  3:43 ` Viresh Kumar
  2 siblings, 2 replies; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-03 15:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, Viresh Kumar
  Cc: linux-omap, linux-kernel, devicetree, linux-arm-kernel,
	Kishon Vijay Abraham I, Lukasz Majewski

The "opp_high" property brings support for 1.5 GHz CPU frequency for TI's
am57xx line of processors.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 arch/arm/boot/dts/dra7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index a860a56..5e678cd 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -108,6 +108,11 @@
 			opp-hz = /bits/ 64 <1176000000>;
 			opp-microvolt = <1160000 885000 1160000>;
 		};
+
+		opp_high@1500000000 {
+			opp-hz = /bits/ 64 <1500000000>;
+			opp-microvolt = <1210000 950000 1250000>;
+		};
 	};
 
 	/*
-- 
2.1.4

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 15:24 ` [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation Lukasz Majewski
@ 2017-02-03 16:48   ` Nishanth Menon
  2017-02-03 23:06     ` Lukasz Majewski
  2017-02-03 16:56   ` Dave Gerlach
  1 sibling, 1 reply; 14+ messages in thread
From: Nishanth Menon @ 2017-02-03 16:48 UTC (permalink / raw)
  To: Lukasz Majewski, Rob Herring, Mark Rutland, Tony Lindgren,
	Benoît Cousson, Russell King, Viresh Kumar
  Cc: linux-omap, linux-kernel, devicetree, linux-arm-kernel,
	Kishon Vijay Abraham I

On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> The "opp_high" property brings support for 1.5 GHz CPU frequency for TI's
> am57xx line of processors.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  arch/arm/boot/dts/dra7.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index a860a56..5e678cd 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -108,6 +108,11 @@
>  			opp-hz = /bits/ 64 <1176000000>;
>  			opp-microvolt = <1160000 885000 1160000>;
>  		};
> +
> +		opp_high@1500000000 {
> +			opp-hz = /bits/ 64 <1500000000>;
> +			opp-microvolt = <1210000 950000 1250000>;
> +		};
>  	};
>
>  	/*
>
Please keep this out of the way till we get the AVS class0 integrated 
in. devices wont be save at 1.5GHz without the opp powerdomain + AVS 
Class0 implementation.

-- 
Regards,
Nishanth Menon

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

* Re: [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2"
  2017-02-03 15:24 [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Lukasz Majewski
  2017-02-03 15:24 ` [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation Lukasz Majewski
@ 2017-02-03 16:54 ` Dave Gerlach
  2017-02-06  3:43 ` Viresh Kumar
  2 siblings, 0 replies; 14+ messages in thread
From: Dave Gerlach @ 2017-02-03 16:54 UTC (permalink / raw)
  To: Lukasz Majewski, Rob Herring, Mark Rutland, Tony Lindgren,
	Benoît Cousson, Russell King, Viresh Kumar
  Cc: linux-omap, linux-kernel, devicetree, linux-arm-kernel,
	Kishon Vijay Abraham I

Hi,
On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> The "operating-points" property have been replaced with
> "operating-points-v2". Only entries with the same frequencies have
> been added, so no reqression should be introduced.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  arch/arm/boot/dts/dra7.dtsi | 22 +++++++++++++++++-----
>  1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index 3c228f9..a860a56 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -80,11 +80,7 @@
>  			compatible = "arm,cortex-a15";
>  			reg = <0>;
>
> -			operating-points = <
> -				/* kHz    uV */
> -				1000000	1060000
> -				1176000	1160000
> -				>;
> +			operating-points-v2 = <&cpu0_opp_table>;
>
>  			clocks = <&dpll_mpu_ck>;
>  			clock-names = "cpu";
> @@ -98,6 +94,22 @@
>  		};
>  	};
>
> +	cpu0_opp_table: opp_table0 {
> +		compatible = "operating-points-v2";
> +		opp-shared;
> +
> +		opp_nom@1000000000 {
> +			opp-hz = /bits/ 64 <1000000000>;
> +			opp-microvolt = <1060000 850000 1150000>;
> +			opp-suspend;
> +		};
> +
> +		opp_od@1176000000 {
> +			opp-hz = /bits/ 64 <1176000000>;
> +			opp-microvolt = <1160000 885000 1160000>;
> +		};
> +	};
> +

This is being done here already [1] as these OPPs have specific requirements 
depending on the SoC in use. I have sent proper operating-points-v2 tables here 
[2] already, they won't be ready to merge until after the driver at [1] is merged.

Regards,
Dave

[1] http://www.spinics.net/lists/devicetree/msg158967.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-May/430209.html

>  	/*
>  	 * The soc node represents the soc top level view. It is used for IPs
>  	 * that are not memory mapped in the MPU view or for the MPU itself.
>

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 15:24 ` [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation Lukasz Majewski
  2017-02-03 16:48   ` Nishanth Menon
@ 2017-02-03 16:56   ` Dave Gerlach
  2017-02-03 23:21     ` Lukasz Majewski
  2017-02-06 14:24     ` Lukasz Majewski
  1 sibling, 2 replies; 14+ messages in thread
From: Dave Gerlach @ 2017-02-03 16:56 UTC (permalink / raw)
  To: Lukasz Majewski, Rob Herring, Mark Rutland, Tony Lindgren,
	Benoît Cousson, Russell King, Viresh Kumar
  Cc: linux-omap, linux-kernel, devicetree, linux-arm-kernel,
	Kishon Vijay Abraham I

On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> The "opp_high" property brings support for 1.5 GHz CPU frequency for TI's
> am57xx line of processors.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  arch/arm/boot/dts/dra7.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
>

This can't be blindly enabled for all am57xx SoCs, there is a forthcoming 
ti-cpufreq [1] driver that is needed that will decided which OPPs can and cannot 
be enabled for the specific variant in use.

Regards,
Dave

[1] http://www.spinics.net/lists/devicetree/msg158967.html

> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index a860a56..5e678cd 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -108,6 +108,11 @@
>  			opp-hz = /bits/ 64 <1176000000>;
>  			opp-microvolt = <1160000 885000 1160000>;
>  		};
> +
> +		opp_high@1500000000 {
> +			opp-hz = /bits/ 64 <1500000000>;
> +			opp-microvolt = <1210000 950000 1250000>;
> +		};
>  	};
>
>  	/*
>

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 16:48   ` Nishanth Menon
@ 2017-02-03 23:06     ` Lukasz Majewski
  2017-02-03 23:14       ` Nishanth Menon
  0 siblings, 1 reply; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-03 23:06 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, Viresh Kumar, linux-omap, linux-kernel, devicetree,
	linux-arm-kernel, Kishon Vijay Abraham I

Hi Nishanth,

> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> > The "opp_high" property brings support for 1.5 GHz CPU frequency
> > for TI's am57xx line of processors.
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >  arch/arm/boot/dts/dra7.dtsi | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/dra7.dtsi
> > b/arch/arm/boot/dts/dra7.dtsi index a860a56..5e678cd 100644
> > --- a/arch/arm/boot/dts/dra7.dtsi
> > +++ b/arch/arm/boot/dts/dra7.dtsi
> > @@ -108,6 +108,11 @@
> >  			opp-hz = /bits/ 64 <1176000000>;
> >  			opp-microvolt = <1160000 885000 1160000>;
> >  		};
> > +
> > +		opp_high@1500000000 {
> > +			opp-hz = /bits/ 64 <1500000000>;
> > +			opp-microvolt = <1210000 950000 1250000>;
> > +		};
> >  	};
> >
> >  	/*
> >
> Please keep this out of the way till we get the AVS class0 integrated 
> in. devices wont be save at 1.5GHz without the opp powerdomain + AVS 
> Class0 implementation.
> 

Yes, correct. My AM5728 works with this opp, but AM5718 hangs when this
frequency is enabled.



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 23:06     ` Lukasz Majewski
@ 2017-02-03 23:14       ` Nishanth Menon
  0 siblings, 0 replies; 14+ messages in thread
From: Nishanth Menon @ 2017-02-03 23:14 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, Viresh Kumar, linux-omap, lkml, dt list,
	linux-arm-kernel, Kishon Vijay Abraham I

On Fri, Feb 3, 2017 at 5:06 PM, Lukasz Majewski <lukma@denx.de> wrote:
[...]
>> > +           opp_high@1500000000 {
>> > +                   opp-hz = /bits/ 64 <1500000000>;
>> > +                   opp-microvolt = <1210000 950000 1250000>;
>> > +           };
>> >     };
>> >
>> >     /*
>> >
>> Please keep this out of the way till we get the AVS class0 integrated
>> in. devices wont be save at 1.5GHz without the opp powerdomain + AVS
>> Class0 implementation.
>>
>
> Yes, correct. My AM5728 works with this opp, but AM5718 hangs when this
> frequency is enabled.

Right, and if you leave it on for too long without avs class0, you
might need a new silicon as well :(

If you'd like to help, I saw Dave's response, it will be good if you
can help us get the dependencies out of the way to enable 1.5G
cleanly.
-- 
---
Regards,
Nishanth Menon

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 16:56   ` Dave Gerlach
@ 2017-02-03 23:21     ` Lukasz Majewski
  2017-02-04  0:21       ` Nishanth Menon
  2017-02-06 14:24     ` Lukasz Majewski
  1 sibling, 1 reply; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-03 23:21 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, Viresh Kumar, linux-omap, linux-kernel, devicetree,
	linux-arm-kernel, Kishon Vijay Abraham I

Hi Dave,

Thanks for sharing the knowledge :-)

> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> > The "opp_high" property brings support for 1.5 GHz CPU frequency
> > for TI's am57xx line of processors.
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >  arch/arm/boot/dts/dra7.dtsi | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> 
> This can't be blindly enabled for all am57xx SoCs, 

Yes, I'm fully aware of AVS, which uses fuses and SoC silicon revision
to assess if frequency can be enabled.

Example from my playground:

- AM5728 works with 1.5 GHz enabled

- AM5718 hangs when I try to enable 1.5 GHz frequency


> there is a
> forthcoming ti-cpufreq [1] driver 

I've backported and tested this code on v4.9 vanilla. It works :-)

> that is needed that will decided
> which OPPs can and cannot be enabled for the specific variant in use.

I do have a question:

Do you know the correct opp-supported-hw value for 1.5 GHz on AM57x8
SoC?
In TI's SDK Linux (v4.4): opp-supported-hw = <0xFF 0x04>; but this seems
to be always enabled (and not taking silicon revision and efuse into
account).

For my use case it would be best to see what data should prevent my
AM5718 from 1.5 GHz OPP. 

In other words I need to be 100% sure that my silicon SoC version
doesn't support the 1.5 GHz frequency.


> 
> Regards,
> Dave
> 
> [1] http://www.spinics.net/lists/devicetree/msg158967.html
> 
> > diff --git a/arch/arm/boot/dts/dra7.dtsi
> > b/arch/arm/boot/dts/dra7.dtsi index a860a56..5e678cd 100644
> > --- a/arch/arm/boot/dts/dra7.dtsi
> > +++ b/arch/arm/boot/dts/dra7.dtsi
> > @@ -108,6 +108,11 @@
> >  			opp-hz = /bits/ 64 <1176000000>;
> >  			opp-microvolt = <1160000 885000 1160000>;
> >  		};
> > +
> > +		opp_high@1500000000 {
> > +			opp-hz = /bits/ 64 <1500000000>;
> > +			opp-microvolt = <1210000 950000 1250000>;
> > +		};
> >  	};
> >
> >  	/*
> >
> 


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 23:21     ` Lukasz Majewski
@ 2017-02-04  0:21       ` Nishanth Menon
  2017-02-04  5:30         ` Lukasz Majewski
  0 siblings, 1 reply; 14+ messages in thread
From: Nishanth Menon @ 2017-02-04  0:21 UTC (permalink / raw)
  To: Lukasz Majewski, Dave Gerlach
  Cc: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, Viresh Kumar, linux-omap, linux-kernel, devicetree,
	linux-arm-kernel, Kishon Vijay Abraham I

On 02/03/2017 05:21 PM, Lukasz Majewski wrote:
> Hi Dave,
>
> Thanks for sharing the knowledge :-)
>
>> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
>>> The "opp_high" property brings support for 1.5 GHz CPU frequency
>>> for TI's am57xx line of processors.
>>>
>>> Signed-off-by: Lukasz Majewski <lukma@denx.de>
>>> ---
>>>  arch/arm/boot/dts/dra7.dtsi | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>
>> This can't be blindly enabled for all am57xx SoCs,
>
> Yes, I'm fully aware of AVS, which uses fuses and SoC silicon revision
> to assess if frequency can be enabled.
>
> Example from my playground:
>
> - AM5728 works with 1.5 GHz enabled
>
> - AM5718 hangs when I try to enable 1.5 GHz frequency
>
>
>> there is a
>> forthcoming ti-cpufreq [1] driver
>
> I've backported and tested this code on v4.9 vanilla. It works :-)
>
>> that is needed that will decided
>> which OPPs can and cannot be enabled for the specific variant in use.
>
> I do have a question:
>
> Do you know the correct opp-supported-hw value for 1.5 GHz on AM57x8
> SoC?
> In TI's SDK Linux (v4.4): opp-supported-hw = <0xFF 0x04>; but this seems
> to be always enabled (and not taking silicon revision and efuse into
> account).

There is a TISDK 4.9 being built up as well (we typically do let the 
driver soak for a test cycle prior to posting it upstream) but if it 
is of interest.. it should match the version Dave posted upstream..

http://git.ti.com/ti-linux-kernel/ti-linux-kernel/blobs/ti-lsk-linux-4.9.y/arch/arm/boot/dts/dra7.dtsi#line100

> For my use case it would be best to see what data should prevent my
> AM5718 from 1.5 GHz OPP.
>
> In other words I need to be 100% sure that my silicon SoC version
> doesn't support the 1.5 GHz frequency.
>

look at dra7_efuse_xlate which does a speed grade decode of the speeds 
permitted.. a value of 15 or 23 should permit 1.5GHz. those are common 
for DRA7/AM57 SoCs.

If the efuses seem set for 1.5GHz, the chip should be capable of 
1.5GHz, i'd start suspecting regulators, slew rates and the like.

http://www.ti.com/lit/pdf/spruhz7
rev d: page 371 -> 23 (0x17) = X speed designator Refer to device DM 
for supported speed grades for a given device, and the definition for 
supported speed grades.
So, if you go to 
http://www.ti.com/product/AM5718/datasheet/specifications#SWPS043-7245x 
-> you will see the "X" designator in AM5718xxX which does support 23 
and 1.5GHz.


Now, if you did get one of the pre-production samples, it is possible 
to have efuses slightly messed up on very initial samples - at least 
internally, we have had them replaced and none of those samples should 
have exited TI.. but mistakes might happen.. if the efuse value does 
not meet the speed grade in documentation, then, please contact TI FAE 
your company works with and let them know for what to do 
alternatively, you can also file it on e2e.ti.com for further support.

-- 
Regards,
Nishanth Menon

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-04  0:21       ` Nishanth Menon
@ 2017-02-04  5:30         ` Lukasz Majewski
  0 siblings, 0 replies; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-04  5:30 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Dave Gerlach, Rob Herring, Mark Rutland, Tony Lindgren,
	Benoît Cousson, Russell King, Viresh Kumar, linux-omap,
	linux-kernel, devicetree, linux-arm-kernel,
	Kishon Vijay Abraham I

Hi Nishanth,

> On 02/03/2017 05:21 PM, Lukasz Majewski wrote:
> > Hi Dave,
> >
> > Thanks for sharing the knowledge :-)
> >
> >> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> >>> The "opp_high" property brings support for 1.5 GHz CPU frequency
> >>> for TI's am57xx line of processors.
> >>>
> >>> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >>> ---
> >>>  arch/arm/boot/dts/dra7.dtsi | 5 +++++
> >>>  1 file changed, 5 insertions(+)
> >>>
> >>
> >> This can't be blindly enabled for all am57xx SoCs,
> >
> > Yes, I'm fully aware of AVS, which uses fuses and SoC silicon
> > revision to assess if frequency can be enabled.
> >
> > Example from my playground:
> >
> > - AM5728 works with 1.5 GHz enabled
> >
> > - AM5718 hangs when I try to enable 1.5 GHz frequency
> >
> >
> >> there is a
> >> forthcoming ti-cpufreq [1] driver
> >
> > I've backported and tested this code on v4.9 vanilla. It works :-)
> >
> >> that is needed that will decided
> >> which OPPs can and cannot be enabled for the specific variant in
> >> use.
> >
> > I do have a question:
> >
> > Do you know the correct opp-supported-hw value for 1.5 GHz on AM57x8
> > SoC?
> > In TI's SDK Linux (v4.4): opp-supported-hw = <0xFF 0x04>; but this
> > seems to be always enabled (and not taking silicon revision and
> > efuse into account).
> 
> There is a TISDK 4.9 being built up as well (we typically do let the 
> driver soak for a test cycle prior to posting it upstream) but if it 
> is of interest.. it should match the version Dave posted upstream..
> 
> http://git.ti.com/ti-linux-kernel/ti-linux-kernel/blobs/ti-lsk-linux-4.9.y/arch/arm/boot/dts/dra7.dtsi#line100

This opp_table0 DTS node definition is different than the one sent to ML
by Dave (e.g. opp-microvolt has different definition).

> 
> > For my use case it would be best to see what data should prevent my
> > AM5718 from 1.5 GHz OPP.
> >
> > In other words I need to be 100% sure that my silicon SoC version
> > doesn't support the 1.5 GHz frequency.
> >
> 
> look at dra7_efuse_xlate which does a speed grade decode of the
> speeds permitted.. a value of 15 or 23 should permit 1.5GHz. those
> are common for DRA7/AM57 SoCs.

Ok, I've checked this and both SoCs have value 23, so they should
support 1.5 GHz operation. Hence, the AM5718 should not hang.

> 
> If the efuses seem set for 1.5GHz, the chip should be capable of 
> 1.5GHz, i'd start suspecting regulators, slew rates and the like.

Then I do need to examine them.

> 
> http://www.ti.com/lit/pdf/spruhz7
> rev d: page 371 -> 23 (0x17) = X speed designator Refer to device DM 
> for supported speed grades for a given device, and the definition for 
> supported speed grades.
> So, if you go to 
> http://www.ti.com/product/AM5718/datasheet/specifications#SWPS043-7245x 
> -> you will see the "X" designator in AM5718xxX which does support 23 
> and 1.5GHz.

Yes, correct.

> 
> 
> Now, if you did get one of the pre-production samples,

Is there any prod_id (or any other register value), which indicates the
production sample?

> it is possible 
> to have efuses slightly messed up on very initial samples - at least 
> internally, we have had them replaced and none of those samples
> should have exited TI.. but mistakes might happen.. if the efuse
> value does not meet the speed grade in documentation, then, please
> contact TI FAE your company works with and let them know for what to
> do alternatively, you can also file it on e2e.ti.com for further
> support.
> 

Thanks for support.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

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

* Re: [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2"
  2017-02-03 15:24 [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Lukasz Majewski
  2017-02-03 15:24 ` [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation Lukasz Majewski
  2017-02-03 16:54 ` [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Dave Gerlach
@ 2017-02-06  3:43 ` Viresh Kumar
  2 siblings, 0 replies; 14+ messages in thread
From: Viresh Kumar @ 2017-02-06  3:43 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Rob Herring, Mark Rutland, Tony Lindgren, Benoît Cousson,
	Russell King, linux-omap, linux-kernel, devicetree,
	linux-arm-kernel, Kishon Vijay Abraham I

On 03-02-17, 16:24, Lukasz Majewski wrote:
> The "operating-points" property have been replaced with
> "operating-points-v2". Only entries with the same frequencies have
> been added, so no reqression should be introduced.

Don't use "obsolete" word here. Its not obsolete and both bindings
will be supported.

-- 
viresh

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-03 16:56   ` Dave Gerlach
  2017-02-03 23:21     ` Lukasz Majewski
@ 2017-02-06 14:24     ` Lukasz Majewski
  2017-02-06 15:24       ` Dave Gerlach
  1 sibling, 1 reply; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-06 14:24 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: Benoît Cousson, linux-omap, linux-kernel, linux-arm-kernel,
	Kishon Vijay Abraham I, Menon, Nishanth

Hi Dave,

> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> > The "opp_high" property brings support for 1.5 GHz CPU frequency
> > for TI's am57xx line of processors.
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >  arch/arm/boot/dts/dra7.dtsi | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> 
> This can't be blindly enabled for all am57xx SoCs, there is a
> forthcoming ti-cpufreq [1] driver that is needed that will decided
> which OPPs can and cannot be enabled for the specific variant in use.

Do you know if there is ongoing work on using Avs0 voltage (encoded in
efuse) to control the per SoC PMIC voltage value when switching to
opp_high (1.5 GHz)?


> 
> Regards,
> Dave
> 
> [1] http://www.spinics.net/lists/devicetree/msg158967.html
> 
> > diff --git a/arch/arm/boot/dts/dra7.dtsi
> > b/arch/arm/boot/dts/dra7.dtsi index a860a56..5e678cd 100644
> > --- a/arch/arm/boot/dts/dra7.dtsi
> > +++ b/arch/arm/boot/dts/dra7.dtsi
> > @@ -108,6 +108,11 @@
> >  			opp-hz = /bits/ 64 <1176000000>;
> >  			opp-microvolt = <1160000 885000 1160000>;
> >  		};
> > +
> > +		opp_high@1500000000 {
> > +			opp-hz = /bits/ 64 <1500000000>;
> > +			opp-microvolt = <1210000 950000 1250000>;
> > +		};
> >  	};
> >
> >  	/*
> >
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-06 14:24     ` Lukasz Majewski
@ 2017-02-06 15:24       ` Dave Gerlach
  2017-02-07  4:27         ` Lukasz Majewski
  0 siblings, 1 reply; 14+ messages in thread
From: Dave Gerlach @ 2017-02-06 15:24 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Benoît Cousson, linux-omap, linux-kernel, linux-arm-kernel,
	Kishon Vijay Abraham I, Menon, Nishanth

Hi,
On 02/06/2017 08:24 AM, Lukasz Majewski wrote:
> Hi Dave,
> 
>> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
>>> The "opp_high" property brings support for 1.5 GHz CPU frequency
>>> for TI's am57xx line of processors.
>>>
>>> Signed-off-by: Lukasz Majewski <lukma@denx.de>
>>> ---
>>>  arch/arm/boot/dts/dra7.dtsi | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>
>> This can't be blindly enabled for all am57xx SoCs, there is a
>> forthcoming ti-cpufreq [1] driver that is needed that will decided
>> which OPPs can and cannot be enabled for the specific variant in use.
> 
> Do you know if there is ongoing work on using Avs0 voltage (encoded in
> efuse) to control the per SoC PMIC voltage value when switching to
> opp_high (1.5 GHz)?

Yes, Viresh Kumar introduced multi-regulator support in the OPP core recently
[1] which I wrote a test driver for here [2] which hooks into the OPP framework
to do both ABB regulator scaling and also programs the AVS0 voltages. The
current implementation I have cleaned up will depend on the ti-cpufreq driver so
once that is merged I will send the AVS0 and ABB support driver upstream as
well. If you are curious you can look at current internal implementation here [3].

Regards,
Dave

[1] http://www.spinics.net/lists/devicetree/msg153212.html
[2] https://www.spinics.net/lists/kernel/msg2384336.html
[3]
http://git.ti.com/ti-linux-kernel/ti-linux-kernel/blobs/ti-lsk-linux-4.9.y/drivers/base/power/opp/ti-opp-supply.c


> 
> 
>>
>> Regards,
>> Dave
>>
>> [1] http://www.spinics.net/lists/devicetree/msg158967.html
>>
>>> diff --git a/arch/arm/boot/dts/dra7.dtsi
>>> b/arch/arm/boot/dts/dra7.dtsi index a860a56..5e678cd 100644
>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>> @@ -108,6 +108,11 @@
>>>  			opp-hz = /bits/ 64 <1176000000>;
>>>  			opp-microvolt = <1160000 885000 1160000>;
>>>  		};
>>> +
>>> +		opp_high@1500000000 {
>>> +			opp-hz = /bits/ 64 <1500000000>;
>>> +			opp-microvolt = <1210000 950000 1250000>;
>>> +		};
>>>  	};
>>>
>>>  	/*
>>>
>>
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> 

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

* Re: [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation
  2017-02-06 15:24       ` Dave Gerlach
@ 2017-02-07  4:27         ` Lukasz Majewski
  0 siblings, 0 replies; 14+ messages in thread
From: Lukasz Majewski @ 2017-02-07  4:27 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: Benoît Cousson, linux-omap, linux-kernel, linux-arm-kernel,
	Kishon Vijay Abraham I, Menon, Nishanth

Hi Dave,

> Hi,
> On 02/06/2017 08:24 AM, Lukasz Majewski wrote:
> > Hi Dave,
> > 
> >> On 02/03/2017 09:24 AM, Lukasz Majewski wrote:
> >>> The "opp_high" property brings support for 1.5 GHz CPU frequency
> >>> for TI's am57xx line of processors.
> >>>
> >>> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >>> ---
> >>>  arch/arm/boot/dts/dra7.dtsi | 5 +++++
> >>>  1 file changed, 5 insertions(+)
> >>>
> >>
> >> This can't be blindly enabled for all am57xx SoCs, there is a
> >> forthcoming ti-cpufreq [1] driver that is needed that will decided
> >> which OPPs can and cannot be enabled for the specific variant in
> >> use.
> > 
> > Do you know if there is ongoing work on using Avs0 voltage (encoded
> > in efuse) to control the per SoC PMIC voltage value when switching
> > to opp_high (1.5 GHz)?
> 
> Yes, Viresh Kumar introduced multi-regulator support in the OPP core
> recently [1] which I wrote a test driver for here [2] which hooks
> into the OPP framework to do both ABB regulator scaling and also
> programs the AVS0 voltages.

Thanks for sharing this info.

> The current implementation I have cleaned
> up will depend on the ti-cpufreq driver so once that is merged I will
> send the AVS0 and ABB support driver upstream as well. 

The ti-cpufreq.c seems to be solid and working, so I hope that it will
be merged sooner than latter.

> If you are
> curious you can look at current internal implementation here [3].

I will try it.

> 
> Regards,
> Dave
> 
> [1] http://www.spinics.net/lists/devicetree/msg153212.html
> [2] https://www.spinics.net/lists/kernel/msg2384336.html
> [3]
> http://git.ti.com/ti-linux-kernel/ti-linux-kernel/blobs/ti-lsk-linux-4.9.y/drivers/base/power/opp/ti-opp-supply.c
> 
> 
> > 
> > 
> >>
> >> Regards,
> >> Dave
> >>
> >> [1] http://www.spinics.net/lists/devicetree/msg158967.html
> >>
> >>> diff --git a/arch/arm/boot/dts/dra7.dtsi
> >>> b/arch/arm/boot/dts/dra7.dtsi index a860a56..5e678cd 100644
> >>> --- a/arch/arm/boot/dts/dra7.dtsi
> >>> +++ b/arch/arm/boot/dts/dra7.dtsi
> >>> @@ -108,6 +108,11 @@
> >>>  			opp-hz = /bits/ 64 <1176000000>;
> >>>  			opp-microvolt = <1160000 885000 1160000>;
> >>>  		};
> >>> +
> >>> +		opp_high@1500000000 {
> >>> +			opp-hz = /bits/ 64 <1500000000>;
> >>> +			opp-microvolt = <1210000 950000 1250000>;
> >>> +		};
> >>>  	};
> >>>
> >>>  	/*
> >>>
> >>
> > 
> > 
> > 
> > 
> > Best regards,
> > 
> > Lukasz Majewski
> > 
> > --
> > 
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > wd@denx.de
> > 
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

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

end of thread, other threads:[~2017-02-07  4:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-03 15:24 [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Lukasz Majewski
2017-02-03 15:24 ` [PATCH 2/2] DTS: dra7: Add "opp_high" opp node to support 1.5 GHz SoC operation Lukasz Majewski
2017-02-03 16:48   ` Nishanth Menon
2017-02-03 23:06     ` Lukasz Majewski
2017-02-03 23:14       ` Nishanth Menon
2017-02-03 16:56   ` Dave Gerlach
2017-02-03 23:21     ` Lukasz Majewski
2017-02-04  0:21       ` Nishanth Menon
2017-02-04  5:30         ` Lukasz Majewski
2017-02-06 14:24     ` Lukasz Majewski
2017-02-06 15:24       ` Dave Gerlach
2017-02-07  4:27         ` Lukasz Majewski
2017-02-03 16:54 ` [PATCH 1/2] DTS: dra7: Replace obsolete "operating-points" property with "operating-points-v2" Dave Gerlach
2017-02-06  3:43 ` Viresh Kumar

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).