linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ta.omasab@gmail.com (Thomas Abraham)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 3/6] ARM: dts: Exynos: add CPU OPP and regulator supply property
Date: Thu, 31 Jul 2014 09:36:28 +0530	[thread overview]
Message-ID: <CAJuA9ahcg39YmSS43eTdLov-q=Eu0kaOQ_hFfiZeU2E_u6eCXQ@mail.gmail.com> (raw)
In-Reply-To: <CAD=FV=Vq7+ujjzwBCR4bvQ13-0qV4VVktVOWy8z51RF-9=LKXA@mail.gmail.com>

On Thu, Jul 31, 2014 at 9:23 AM, Doug Anderson <dianders@chromium.org> wrote:
> Thomas,
>
> On Wed, Jul 30, 2014 at 8:21 PM, Thomas Abraham <ta.omasab@gmail.com> wrote:
>> Hi Doug,
>>
>> On Thu, Jul 31, 2014 at 6:07 AM, Doug Anderson <dianders@chromium.org> wrote:
>>> Thomas,
>>>
>>> On Wed, Jul 30, 2014 at 1:07 AM, Thomas Abraham <thomas.ab@samsung.com> wrote:
>>>> diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
>>>> index d0de1f5..3b12a97 100644
>>>> --- a/arch/arm/boot/dts/exynos5250-arndale.dts
>>>> +++ b/arch/arm/boot/dts/exynos5250-arndale.dts
>>>> @@ -575,3 +575,7 @@
>>>>                 usb-phy = <&usb2_phy>;
>>>>         };
>>>>  };
>>>> +
>>>> +&cpu0 {
>>>> +       cpu0-supply = <&buck2_reg>;
>>>> +};
>>>> diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
>>>> index b4b35ad..f07e834 100644
>>>> --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
>>>> +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
>>>> @@ -414,3 +414,7 @@
>>>>                 };
>>>>         };
>>>>  };
>>>> +
>>>> +&cpu0 {
>>>> +       cpu0-supply = <&buck2_reg>;
>>>> +};
>>>> diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
>>>> index f2b8c41..91acca7 100644
>>>> --- a/arch/arm/boot/dts/exynos5250-snow.dts
>>>> +++ b/arch/arm/boot/dts/exynos5250-snow.dts
>>>> @@ -509,4 +509,8 @@
>>>>         };
>>>>  };
>>>>
>>>> +&cpu0 {
>>>> +       cpu0-supply = <&buck2_reg>;
>>>> +};
>>>> +
>>>>  #include "cros-ec-keyboard.dtsi"
>>>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>>>> index 492e1ef..97b282c 100644
>>>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>>>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>>>> @@ -58,11 +58,34 @@
>>>>                 #address-cells = <1>;
>>>>                 #size-cells = <0>;
>>>>
>>>> -               cpu at 0 {
>>>> +               cpu0: cpu at 0 {
>>>>                         device_type = "cpu";
>>>>                         compatible = "arm,cortex-a15";
>>>>                         reg = <0>;
>>>>                         clock-frequency = <1700000000>;
>>>> +
>>>> +                       clocks = <&clock CLK_ARM_CLK>;
>>>> +                       clock-names = "cpu";
>>>> +                       clock-latency = <140000>;
>>>
>>> Where did the 140000 number come from?  My old calculations show that
>>> with lock time of 270 ad P up to 6 we were at 67.5us lock time.
>>
>> I measured the time taken by clk_set_rate call in the cpufreq driver
>> using do_gettimeofday(). The time taken to change the clock speed was
>> between 87us to 134us for Exynos5420. So I just took the worst case
>> time of 140us. Also, the time taken to change the CPU clock speed
>> includes the settling time for changes to dividers and mux clock
>> blocks.
>
> Interesting.  I wonder why the difference between my earlier
> calculations.  It seems just about double.  :-/

In your calculation, only the PLL lock time is being considered. But
the 140us latency is for the whole clk_set_rate() call.

>
>
>>>> +                       operating-points = <
>>>> +                               1700000 1300000
>>>> +                               1600000 1250000
>>>> +                               1500000 1225000
>>>> +                               1400000 1200000
>>>> +                               1300000 1150000
>>>> +                               1200000 1125000
>>>> +                               1100000 1100000
>>>> +                               1000000 1075000
>>>> +                                900000 1050000
>>>> +                                800000 1025000
>>>> +                                700000 1012500
>>>> +                                600000 1000000
>>>> +                                500000  975000
>>>> +                                400000  950000
>>>> +                                300000  937500
>>>> +                                200000  925000
>>>> +                       >;
>>>>                 };
>>>>                 cpu at 1 {
>>>>                         device_type = "cpu";
>>>> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
>>>> index cb2b70e..3154b4c 100644
>>>> --- a/arch/arm/boot/dts/exynos5420.dtsi
>>>> +++ b/arch/arm/boot/dts/exynos5420.dtsi
>>>> @@ -59,8 +59,26 @@
>>>>                         device_type = "cpu";
>>>>                         compatible = "arm,cortex-a15";
>>>>                         reg = <0x0>;
>>>> +                       clocks = <&clock CLK_ARM_CLK>;
>>>> +                       clock-names = "cpu-cluster.0";
>>>>                         clock-frequency = <1800000000>;
>>>>                         cci-control-port = <&cci_control1>;
>>>> +                       clock-latency = <140000>;
>>>> +
>>>> +                       operating-points = <
>>>> +                               1800000 1250000
>>>> +                               1700000 1212500
>>>> +                               1600000 1175000
>>>> +                               1500000 1137500
>>>> +                               1400000 1112500
>>>> +                               1300000 1062500
>>>> +                               1200000 1037500
>>>> +                               1100000 1012500
>>>> +                               1000000 987500
>>>> +                                900000 962500
>>>> +                                800000 937500
>>>> +                                700000 912500
>>>> +                       >;
>>>>                 };
>>>>
>>>>                 cpu1: cpu at 1 {
>>>> @@ -69,6 +87,7 @@
>>>>                         reg = <0x1>;
>>>>                         clock-frequency = <1800000000>;
>>>>                         cci-control-port = <&cci_control1>;
>>>> +                       clock-latency = <140000>;
>>>>                 };
>>>>
>>>>                 cpu2: cpu at 2 {
>>>> @@ -77,6 +96,7 @@
>>>>                         reg = <0x2>;
>>>>                         clock-frequency = <1800000000>;
>>>>                         cci-control-port = <&cci_control1>;
>>>> +                       clock-latency = <140000>;
>>>>                 };
>>>>
>>>>                 cpu3: cpu at 3 {
>>>> @@ -85,14 +105,29 @@
>>>>                         reg = <0x3>;
>>>>                         clock-frequency = <1800000000>;
>>>>                         cci-control-port = <&cci_control1>;
>>>> +                       clock-latency = <140000>;
>>>>                 };
>>>>
>>>>                 cpu4: cpu at 100 {
>>>>                         device_type = "cpu";
>>>>                         compatible = "arm,cortex-a7";
>>>>                         reg = <0x100>;
>>>> +                       clocks = <&clock CLK_KFC_CLK>;
>>>> +                       clock-names = "cpu-cluster.1";
>>>>                         clock-frequency = <1000000000>;
>>>
>>> It does't start out at its maximum?
>>
>> The A7 CPU clock need not start with the maximum. On the SMDK5420
>> board, the firmware has set the A7 CPU clock to 1GHz. So I used the
>> same value here.
>
> Does it need to match the firmware?  On exynos5420-peach-pit and
> peach-pi I think the firmware starts the kernel at 1.7GHz.

It need not strictly match with the firmware. 1.7GHz for A7 seems too
high since the max A7 speed was 1.3GHz. Probably peach-pit/pi had
600MHz starting frequency for A7 CPU.

Thanks,
Thomas.

>
>
>>>>                         cci-control-port = <&cci_control0>;
>>>> +                       clock-latency = <140000>;
>>>> +
>>>> +                       operating-points = <
>>>> +                               1300000 1275000
>>>> +                               1200000 1212500
>>>> +                               1100000 1162500
>>>> +                               1000000 1112500
>>>> +                                900000 1062500
>>>> +                                800000 1025000
>>>> +                                700000 975000
>>>> +                                600000 937500
>>>> +                       >;
>>>>                 };
>>>>
>>>>                 cpu5: cpu at 101 {
>>>> @@ -101,6 +136,7 @@
>>>>                         reg = <0x101>;
>>>>                         clock-frequency = <1000000000>;
>>>>                         cci-control-port = <&cci_control0>;
>>>> +                       clock-latency = <140000>;
>>>>                 };
>>>>
>>>>                 cpu6: cpu at 102 {
>>>> @@ -109,6 +145,7 @@
>>>>                         reg = <0x102>;
>>>>                         clock-frequency = <1000000000>;
>>>>                         cci-control-port = <&cci_control0>;
>>>> +                       clock-latency = <140000>;
>>>>                 };
>>>>
>>>>                 cpu7: cpu at 103 {
>>>> @@ -117,6 +154,7 @@
>>>>                         reg = <0x103>;
>>>>                         clock-frequency = <1000000000>;
>>>>                         cci-control-port = <&cci_control0>;
>>>> +                       clock-latency = <140000>;
>>>>                 };
>>>>         };
>>>
>>> Don't you need to put a reference to the supply in the 5420 board
>>> files?  ...or is that not possible yet since the max77802 hasn't
>>> landed yet?
>>
>> The arm big.little cpufreq driver does not have voltage scaling
>> support yet. So the supply was not mentioned.
>>
>>>
>>> If that's not possible, is there any reason to post the 5420.dtsi
>>> patch now?  Also: what about 5800?  It's so similar to 5420 that it
>>> seems a shame not to do them at the same time.
>>
>> This patch series has support for Exynos5800 as well. But it is A15
>> clock is restricted to 1.8GHz for now since we do not have a way to
>> handle the vdd_arm and vdd_int voltage difference with 1.9GHz and
>> 2.0GHZ in upstream yet.
>
> Oh, right!  The 5800 includes the 5420 dtsi...
>
> -Doug

  reply	other threads:[~2014-07-31  4:06 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30  8:07 [PATCH v9 0/6] cpufreq: use generic cpufreq drivers for exynos platforms Thomas Abraham
2014-07-30  8:07 ` [PATCH v9 1/6] clk: samsung: add infrastructure to register cpu clocks Thomas Abraham
2014-09-01 22:29   ` Mike Turquette
2014-09-02 13:53     ` Thomas Abraham
2014-07-30  8:07 ` [PATCH v9 2/6] clk: samsung: add cpu clock configuration data and instantiate cpu clock Thomas Abraham
2014-09-01 22:29   ` Mike Turquette
2014-07-30  8:07 ` [PATCH v9 3/6] ARM: dts: Exynos: add CPU OPP and regulator supply property Thomas Abraham
2014-07-30 11:28   ` Andreas Färber
2014-07-31  2:55     ` Thomas Abraham
2014-07-31  0:37   ` Doug Anderson
2014-07-31  3:21     ` Thomas Abraham
2014-07-31  3:53       ` Doug Anderson
2014-07-31  4:06         ` Thomas Abraham [this message]
2014-07-31  4:08           ` Doug Anderson
2014-07-31  4:18             ` Thomas Abraham
2014-08-02  3:49   ` Javier Martinez Canillas
2014-08-04  3:00     ` Thomas Abraham
2014-07-30  8:07 ` [PATCH v9 4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4210/5250/5420 Thomas Abraham
2014-07-31 18:32   ` Kukjin Kim
2014-07-31 18:40     ` Tomasz Figa
2014-07-31 18:54       ` Tomasz Figa
2014-07-31 19:25         ` Thomas Abraham
2014-07-31 19:30           ` Tomasz Figa
2014-08-04  3:24             ` Thomas Abraham
2014-08-22 23:54       ` Kevin Hilman
2014-08-23  0:02         ` Tomasz Figa
2014-08-25  6:53           ` Lukasz Majewski
2014-08-25 12:15           ` Chander Kashyap
2014-08-25 15:32             ` Kevin Hilman
2014-08-25 15:56               ` Tomasz Figa
2014-08-26  4:54                 ` Viresh Kumar
2014-08-26  5:25               ` Chander Kashyap
2014-08-26 15:15                 ` Kevin Hilman
2014-08-26 22:25                   ` Kevin Hilman
2014-08-29 12:52                     ` Thomas Abraham
2014-08-29 15:03                       ` Kevin Hilman
2014-09-01  8:47                         ` Thomas Abraham
2014-09-02 19:32                           ` Kevin Hilman
2014-09-03  4:26                             ` Thomas Abraham
2014-09-03 13:18                               ` Thomas Abraham
2014-09-03 23:15                                 ` Kevin Hilman
2014-09-04 10:22                                   ` Thomas Abraham
2014-09-04 13:30                                     ` Kevin Hilman
2014-09-05 13:41                                       ` Thomas Abraham
2014-08-25  8:11         ` Sjoerd Simons
2014-07-30  8:07 ` [PATCH v9 5/6] cpufreq: exynos: remove exynos4210/5250 specific cpufreq driver support Thomas Abraham
2014-07-30  8:07 ` [PATCH v9 6/6] clk: samsung: remove unused clock aliases and update clock flags Thomas Abraham
2014-07-31 14:13   ` Tomasz Figa
2014-07-31 18:24     ` Thomas Abraham
2014-07-31 18:35       ` Tomasz Figa
2014-07-31 18:41         ` Thomas Abraham
2014-07-31 18:46           ` Tomasz Figa
2014-07-31 18:49             ` Thomas Abraham
2014-09-01 22:31   ` Mike Turquette
2014-07-31  6:20 ` [PATCH v9 0/6] cpufreq: use generic cpufreq drivers for exynos platforms Chander M. Kashyap
2014-07-31 10:59   ` Thomas Abraham
2014-07-31 12:24     ` Chander M. Kashyap
2014-07-31 14:15 ` Tomasz Figa
2014-07-31 18:25   ` Thomas Abraham
2014-07-31 18:34     ` Thomas Abraham
2014-08-01  9:42       ` Viresh Kumar

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='CAJuA9ahcg39YmSS43eTdLov-q=Eu0kaOQ_hFfiZeU2E_u6eCXQ@mail.gmail.com' \
    --to=ta.omasab@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).