public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm64: dts: uniphier: add CPU clock and OPP table for LD11 SoC
Date: Wed, 19 Oct 2016 19:25:22 +0530	[thread overview]
Message-ID: <20161019135522.GH11471@vireshk-i7> (raw)
In-Reply-To: <CAK7LNATc2XxAZf-rvMkRjGn3q_18yB=9aycAE1j9+n0==xzaHQ@mail.gmail.com>

On 19-10-16, 17:33, Masahiro Yamada wrote:
> Hi Viresh,
> 
> 
> 2016-10-18 20:25 GMT+09:00 Viresh Kumar <viresh.kumar@linaro.org>:
> > On 16-10-16, 23:59, Masahiro Yamada wrote:
> >> +     cluster0_opp: opp_table {
> >> +             compatible = "operating-points-v2";
> >> +             opp-shared;
> >> +
> >> +             opp at 245000000 {
> >> +                     opp-hz = /bits/ 64 <245000000>;
> >> +                     clock-latency-ns = <300>;
> >> +             };
> >> +             opp at 250000000 {
> >> +                     opp-hz = /bits/ 64 <250000000>;
> >> +                     clock-latency-ns = <300>;
> >> +             };
> >> +             opp at 490000000 {
> >> +                     opp-hz = /bits/ 64 <490000000>;
> >> +                     clock-latency-ns = <300>;
> >> +             };
> >> +             opp at 500000000 {
> >> +                     opp-hz = /bits/ 64 <500000000>;
> >> +                     clock-latency-ns = <300>;
> >> +             };
> >> +             opp at 653333333 {
> >
> > Why isn't ^^ matching with below values ? Same in next patch as well.
> 
> 
> 
> When I try to update /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq,
> it did not work as I had expected.
> 
> 
> scaling_max_freq is specified by kHz unit,
> on the other hand, clock frequency in the clk driver is specified by Hz.
> 
> 
> 
> If the operating point is 653333kHz, the cpufreq requests
> the clk driver to set 653333000, but it is lower than
> the exact clock, 653333333.
> So, the next lower frequency, 500000000 is selected.
> As a result, the operating point 653333kHz is never enabled.
> 
> 
> So, the operating point must be equal or a little bit bigger.
> 
> 
> Do you know a better way to solve this distortion?

I am not sure about how to fix that problem but there is no reason to
have the exact frequency in opp@*** name. Just use what you have used
in opp-hz line and you will have the exact same behavior.

Right now, its a bit confusing if we read the DT.

-- 
viresh

  reply	other threads:[~2016-10-19 13:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-16 14:59 [PATCH 0/3] arm64: dts: uniphier: switch to PSCI, DT-side support for cpufreq driver Masahiro Yamada
2016-10-16 14:59 ` [PATCH 1/3] arm64: dts: uniphier: switch over to PSCI enable method Masahiro Yamada
2016-10-16 14:59 ` [PATCH 2/3] arm64: dts: uniphier: add CPU clock and OPP table for LD11 SoC Masahiro Yamada
2016-10-18 11:25   ` Viresh Kumar
2016-10-19  8:33     ` Masahiro Yamada
2016-10-19 13:55       ` Viresh Kumar [this message]
2016-10-16 14:59 ` [PATCH 3/3] arm64: dts: uniphier: add CPU clocks and OPP tables for LD20 SoC Masahiro Yamada

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=20161019135522.GH11471@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --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