mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuan Liu <chuan.liu@amlogic.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
	"Christian Hewitt" <christianshewitt@gmail.com>,
	"Jerome Brunet" <jbrunet@baylibre.com>,
	christian.koever-draxl@student.uibk.ac.at,
	neil.armstrong@linaro.org, sboyd@kernel.org,
	bmasney+clk@redhat.com, khilman@baylibre.com, rafael@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	"Christian Stefan Kövér-Draxl" <ckoever@outlook.de>
Subject: Re: [PATCH 4/4] cpufreq: add an Amlogic speed-bin driver
Date: Thu, 26 Nov 2026 17:49:26 +0800	[thread overview]
Message-ID: <1dbf65eb-fd04-41a3-876b-e2941cc10172@amlogic.com> (raw)
In-Reply-To: <awe_Wur5fVbeqV2d@vireshk-B250M-D3H>

Hi Viresh,

Thanks for your reply.

On 11/26/2026 1:10 PM, Viresh Kumar wrote:
> [ EXTERNAL EMAIL ]
> 
> On 23-11-26, 20:23, Chuan Liu wrote:
>> I have already completed the support on A9, but cpufreq-dt currently only
>> supports the single-clock case, for example:
>> dt_cpufreq_early_init()
>>    ->dev_pm_opp_init_cpufreq_table()
>>      ->dev_pm_opp_find_freq_ceil()
>>        ->_find_key_ceil()
>>          ->assert_single_clk()
>>
>> set_target()
>>    ->dev_pm_opp_set_rate()
>>      ->_find_freq_ceil()
>>        ->assert_single_clk()
>>
>> Both of the interfaces above are limited to "single_clk", so SoCs that need
>> to adjust the DSU clock in coordination with the CPU clock (such as SM1, S7,
>> A9, etc. mentioned above) cannot directly work on top of cpufreq-dt.
> 
> Have you tried something like this ?

Yes, as shown in this patch [1], I forced the above two 
"assert_single_clk()" to "assert_clk_index()" and it worked.

> 
> drivers/ufs/core/ufshcd.c:int ufshcd_opp_config_clks(struct device *dev, struct opp_table *opp_table,
> 
> Finding the right OPP should be done based on the primary clock only (right ?),

Yes, I took a look at the ufshcd.c:int ufshcd_opp_config_clks(), which 
is similar to ours, where the Amlogic A9 cpufreq needs to manage 2 clocks:
   - CPU clock
   - DSU clock

The Amlogic A9 need to match and set the frequency of DSU clock based on 
the frequency of CPU clock (primary clock). The opp-table is defined 
like this [2].

> but configuring multiple clocks is possible via the OPP core.

Yes, currently OPP core supports managing multiple clocks, but it seems 
that cpufreq-dt does not support.

For your opinion on this situation, you would prefer cpufreq-dt to add 
support for multiple clocks, or add a new Amlogic cpufreq_driver 
(directly base on OPP core) independent of cpufreq-dt?


[1] 
https://github.com/chuan-aml/linux/commit/aab760f8f2de732aa997aa0d1d752b6b5f284880#diff-61bacca23d8a12c4b91049198f76c77a145795446fb9c18d0c64cf18491f5d35
[2] 
https://github.com/chuan-aml/linux/commit/aab760f8f2de732aa997aa0d1d752b6b5f284880#diff-333a52bc56bdbaa937ff052164a781fdb456178ad6f313c5bee322e790b6baea

> 
> --
> viresh

-- 
Best regards,
Chuan


  reply	other threads:[~2026-11-26  9:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 19:22 [PATCH 0/4] arm64: amlogic: S4 CPU frequency scaling christian.koever-draxl
2026-10-25 19:22 ` [PATCH 1/4] dt-bindings: clock: amlogic,s4-pll-clkc: add the CPU clock christian.koever-draxl
2026-10-30 11:15   ` Krzysztof Kozlowski
2026-10-25 19:22 ` [PATCH 2/4] clk: meson: s4-pll: " christian.koever-draxl
2026-10-25 19:22 ` [PATCH 3/4] firmware: meson: sm: add the CPU speed bin call christian.koever-draxl
2026-10-25 19:22 ` [PATCH 4/4] cpufreq: add an Amlogic speed-bin driver christian.koever-draxl
2026-10-26  5:30   ` Viresh Kumar
2026-10-26  8:57     ` Jerome Brunet
2026-10-26  8:59       ` Viresh Kumar
2026-10-26 10:08         ` Christain Stefan Köver-Draxl
2026-10-27  9:26         ` Chuan Liu
2026-10-27 10:22           ` Christian Hewitt
2026-10-29  5:29             ` Chuan Liu
2026-11-01 22:51               ` Martin Blumenstingl
2026-11-03  9:45                 ` Chuan Liu
2026-11-08 21:45                   ` Martin Blumenstingl
2026-11-09  8:44                     ` neil.armstrong
2026-11-13 14:32                       ` Jerome Brunet
2026-11-23 12:23                     ` Chuan Liu
2026-11-26  5:10                       ` Viresh Kumar
2026-11-26  9:49                         ` Chuan Liu [this message]
2026-11-26 10:34                           ` Viresh Kumar
2026-11-06  8:56               ` Christain Stefan Köver-Draxl
2026-10-26 10:10       ` Christain Stefan Köver-Draxl
2026-10-27  9:31       ` Chuan Liu

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=1dbf65eb-fd04-41a3-876b-e2941cc10172@amlogic.com \
    --to=chuan.liu@amlogic.com \
    --cc=bmasney+clk@redhat.com \
    --cc=christian.koever-draxl@student.uibk.ac.at \
    --cc=christianshewitt@gmail.com \
    --cc=ckoever@outlook.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®