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: Mon, 11 Sep 2023 13:11:48 -0700	[thread overview]
Message-ID: <92058c25fb11b75ee0a2298a684825e9.sboyd@kernel.org> (raw)
In-Reply-To: <5a4805f7-f802-b1ba-9804-59c0fe6c7f26@quicinc.com>

Quoting Jie Luo (2023-09-08 04:10:35)
> 
> 
> Yes, the uniphy implements the clock provider that supports changing 
> rate, which will be upstream later, and nss_cc_mac5_rx_clk_src is the 
> special case, which is only used in the switch device qca8386.

Ok great.

> 
> For the phy device qca8084(uniphy has only 312.5M fix clock which is 
> registered by device tree), this clock nss_cc_mac5_rx_clk_src is not used.
> 
> The issue for the switch device(qca8386) here is the clock rate of 
> parent uniphy can't be changed because of the clock rate requirement of 
> branch clock, since the uniphy clock rate is decided by the current 
> working interface mode(PHY_INTERFACE_MODE_2500BASEX with 312.5M or 
> PHY_INTERFACE_MODE_SGMII with 125M).

Got it.

> 
> 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.

  reply	other threads:[~2023-09-11 20:53 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 [this message]
2023-09-12 12:07             ` Jie Luo
2023-09-12 17:18               ` Stephen Boyd
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=92058c25fb11b75ee0a2298a684825e9.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).