devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Jie Luo <quic_luoj@quicinc.com>,
	agross@kernel.org, andersson@kernel.org, catalin.marinas@arm.com,
	conor+dt@kernel.org, konrad.dybcio@linaro.org,
	krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com,
	p.zabel@pengutronix.de, robh+dt@kernel.org, will@kernel.org
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	quic_srichara@quicinc.com
Subject: Re: [PATCH v6 4/4] clk: qcom: add clock controller driver for qca8386/qca8084
Date: Tue, 12 Sep 2023 10:18:11 -0700	[thread overview]
Message-ID: <82adb75659e0d278e25b65b0e81df99a.sboyd@kernel.org> (raw)
In-Reply-To: <f67b354c-8a4b-49f5-6275-66b7d614301a@quicinc.com>

Quoting Jie Luo (2023-09-12 05:07:02)
> 
> 
> On 9/12/2023 4:11 AM, Stephen Boyd wrote:
> > Quoting Jie Luo (2023-09-08 04:10:35)
> >>
> >> For example, when the uniphy works on PHY_INTERFACE_MODE_2500BASEX, then
> >> the parent uniphy clock rate is 312.5M, which is decided by hardware and
> >> can't be changed. when a branch clock requires a 25M clock, the parent
> >> uniphy clock maybe updated to 125M by clock framework if the flag
> >> CLK_SET_RATE_PARENT is set here, but the actual hardware clock rate of
> >> uniphy is still 315.5M since the uniphy still works in the interface
> >> mode PHY_INTERFACE_MODE_2500BASEX.
> >>
> > 
> > If the parent rate can't change because CLK_SET_RATE_PARENT is missing
> > and the hardware doesn't allow it, then perhaps instead of having a
> > frequency table we should have rcg clk ops for determine_rate that
> > simply looks at the parent rates and finds the rate closest to what is
> > desired. And for the set_rate clk_op we can have it be simple and just
> > program a fixed divider. The benefit is less frequency tables that don't
> > do anything and less hard-coding of the frequency. I thought we already
> > had those rcg clk_ops but I couldn't find them with a quick glance.
> 
> Thanks Stephen for the suggestion.
> looks you are saying the clk ops clk_dp_ops for the fix parent rate? 
> which seems not meet the clock requirement of this clock.

Yeah that is close, but the determine_rate clk_op needs to look at all
possible parents. With the dp clk_ops we assume that only one parent is
possible.

> 
> For the device qca8k, it is also possible to switch the interface modes 
> between PHY_INTERFACE_MODE_2500BASEX(312.5M) and 
> PHY_INTERFACE_MODE_SGMII(125M) during the running time, and there are 
> multiple parent clock source(P_UNIPHY0_RX or P_UNIPHY0_TX) for the RCG 
> clocks to select according to the current work mode. so the parent_map 
> and freq_tbl are necessary to this clock.

I still don't see why the freq_tbl is necessary.

  reply	other threads:[~2023-09-12 17:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01  9:18 [PATCH v6 0/4] add clock controller of qca8386/qca8084 Luo Jie
2023-09-01  9:18 ` [PATCH v6 1/4] clk: qcom: branch: Add clk_branch2_prepare_ops Luo Jie
2023-09-05 20:44   ` Stephen Boyd
2023-09-01  9:18 ` [PATCH v6 2/4] dt-bindings: clock: add qca8386/qca8084 clock and reset definitions Luo Jie
2023-09-01  9:18 ` [PATCH v6 3/4] clk: qcom: common: commonize qcom_cc_really_probe Luo Jie
2023-09-05 20:45   ` Stephen Boyd
2023-09-01  9:18 ` [PATCH v6 4/4] clk: qcom: add clock controller driver for qca8386/qca8084 Luo Jie
2023-09-05 21:36   ` Stephen Boyd
2023-09-07  8:36     ` Jie Luo
2023-09-07 22:45       ` Stephen Boyd
2023-09-08 11:10         ` Jie Luo
2023-09-11 20:11           ` Stephen Boyd
2023-09-12 12:07             ` Jie Luo
2023-09-12 17:18               ` Stephen Boyd [this message]
2023-09-13  3:27                 ` Jie Luo
2023-09-14 16:30                   ` Stephen Boyd
2023-09-15  9:57                     ` Jie Luo
2023-09-23 11:26                     ` Jie Luo

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=82adb75659e0d278e25b65b0e81df99a.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_luoj@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=will@kernel.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).