devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
To: Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
Cc: Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU
Date: Tue, 06 Feb 2018 17:10:26 +0800	[thread overview]
Message-ID: <D4A773D5-E57C-4767-9D3C-0D386BF76DED@aosc.io> (raw)
In-Reply-To: <20180206090656.r52hs7sk7w5iynrk@flea>



于 2018年2月6日 GMT+08:00 下午5:06:56, Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 写到:
>On Tue, Feb 06, 2018 at 12:49:00PM +0800, Icenowy Zheng wrote:
>> The CPU on Allwinner H3 can do dynamic frequency scaling.
>> 
>> Add a DVFS table based on the one shipped with Allwinner's H3 SDK.
>The
>> voltage-frequency relationship seems to be conservative, and Armbian
>has
>> another DVFS table which uses lower voltage at a certain frequency.
>> However, the official one is chosen for safety.
>> 
>> Frequencies higher than 1008MHz are temporarily dropped in the table,
>as
>> they may lead to over voltage on boards without proper regulator
>> settings or over temperature on boards with proper regulator
>settings.
>> They will be added back once regulator settings are ready and thermal
>> sensor driver is merged.
>> 
>> In order to satisfy all different regulators (SY8106A which is 50mV
>per
>> level, SY8113B which have two states: 1.1V and 1.3V, and some board
>with
>> non-tweakable regulators), all the OPPs are defined with a range
>which has
>> the target value as the minimum allowed value, and 1.3V (the highest
>> VDD-CPUX voltage suggested by the datasheet) as the maximum allowed
>value.
>> It's proven to work well with a board with SY8113B.
>> 
>> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
>> ---
>> Changes in v2:
>> - Switch to BSP OPP table, which is more conservative.
>> 
>>  arch/arm/boot/dts/sun8i-h3.dtsi | 32
>+++++++++++++++++++++++++++++++-
>>  1 file changed, 31 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi
>b/arch/arm/boot/dts/sun8i-h3.dtsi
>> index 8495deecedad..36608c03f02b 100644
>> --- a/arch/arm/boot/dts/sun8i-h3.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-h3.dtsi
>> @@ -43,32 +43,62 @@
>>  #include "sunxi-h3-h5.dtsi"
>>  
>>  / {
>> +	cpu0_opp_table: opp_table0 {
>> +		compatible = "operating-points-v2";
>> +		opp-shared;
>> +
>> +		opp@648000000 {
>> +			opp-hz = /bits/ 64 <648000000>;
>> +			opp-microvolt = <1040000 1040000 1300000>;
>> +			clock-latency-ns = <244144>; /* 8 32k periods */
>> +		};
>> +
>> +		opp@816000000 {
>> +			opp-hz = /bits/ 64 <816000000>;
>> +			opp-microvolt = <1100000 1100000 1300000>;
>> +			clock-latency-ns = <244144>; /* 8 32k periods */
>> +		};
>> +
>> +		opp@1008000000 {
>> +			opp-hz = /bits/ 64 <1008000000>;
>> +			opp-microvolt = <1200000 1200000 1300000>;
>> +			clock-latency-ns = <244144>; /* 8 32k periods */
>> +		};
>> +	};
>> +
>>  	cpus {
>>  		#address-cells = <1>;
>>  		#size-cells = <0>;
>>  
>> -		cpu@0 {
>> +		cpu0: cpu@0 {
>>  			compatible = "arm,cortex-a7";
>>  			device_type = "cpu";
>>  			reg = <0>;
>> +			clocks = <&ccu CLK_CPUX>;
>> +			clock-names = "cpu";
>> +			operating-points-v2 = <&cpu0_opp_table>;
>> +			#cooling-cells = <0x2>;
>
>So, that would be 2?

Okay.

>
>There's this pattern on pretty much all the other patches following
>this one as well, you should address them too.
>
>Maxime

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2018-02-06  9:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06  4:48 [PATCH v2 00/10] Allwinner H3 DVFS support Icenowy Zheng
2018-02-06  4:48 ` [PATCH v2 01/10] dt-bindings: add binding for the SY8106A voltage regulator Icenowy Zheng
     [not found] ` <20180206044905.30508-1-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-06  4:48   ` [PATCH v2 02/10] regulator: add support for SY8106A regulator Icenowy Zheng
     [not found]     ` <20180206044905.30508-3-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  8:03       ` Chen-Yu Tsai
2018-02-06  4:48   ` [PATCH v2 03/10] ARM: sunxi: h3/h5: Add r_i2c pinmux node Icenowy Zheng
2018-02-06  4:48   ` [PATCH v2 04/10] ARM: sunxi: h3/h5: Add r_i2c I2C controller Icenowy Zheng
2018-02-06  4:49   ` [PATCH v2 05/10] ARM: sun8i: h3: add operating-points-v2 table for CPU Icenowy Zheng
     [not found]     ` <20180206044905.30508-6-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-06  9:06       ` Maxime Ripard
2018-02-06  9:10         ` Icenowy Zheng [this message]
2018-02-06  4:49   ` [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board Icenowy Zheng
     [not found]     ` <20180206044905.30508-7-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  7:49       ` Chen-Yu Tsai
2018-02-06  4:49   ` [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Icenowy Zheng
2018-02-06  9:10     ` Maxime Ripard
2018-02-06  4:49   ` [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC Icenowy Zheng
     [not found]     ` <20180206044905.30508-9-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  8:16       ` Chen-Yu Tsai
2018-02-06  4:49   ` [PATCH v2 10/10] ARM: sun8i: h3: set the cpu-supply to VDD-CPUX on ALL-H3-CC H3 ver Icenowy Zheng
2018-04-16  4:41   ` [PATCH v2 00/10] Allwinner H3 DVFS support Chen-Yu Tsai
     [not found]     ` <CAGb2v67FaU3_su9XGaGj4zVSoAnpfN8cAhbBHEJu3Owt=Qicmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-16  4:47       ` Chen-Yu Tsai
2018-04-24  2:10     ` [linux-sunxi] " Chen-Yu Tsai
2018-02-06  4:49 ` [PATCH v2 09/10] ARM: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage Icenowy Zheng
     [not found]   ` <20180206044905.30508-10-icenowy-h8G6r0blFSE@public.gmane.org>
2018-03-30  7:43     ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4A773D5-E57C-4767-9D3C-0D386BF76DED@aosc.io \
    --to=icenowy-h8g6r0blfse@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).