From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Jie Luo <quic_luoj@quicinc.com>,
andersson@kernel.org, agross@kernel.org, mturquette@baylibre.com,
sboyd@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
catalin.marinas@arm.com, will@kernel.org, p.zabel@pengutronix.de
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 v3 3/3] clk: qcom: add clock controller driver for qca8386/qca8084
Date: Sat, 12 Aug 2023 12:56:06 +0200 [thread overview]
Message-ID: <631d5a82-7d24-49cd-9868-74c7b3c08bcd@linaro.org> (raw)
In-Reply-To: <9a55016f-0049-f185-f2be-d138fe33384b@quicinc.com>
On 11.08.2023 13:49, Jie Luo wrote:
>
>
> On 8/10/2023 8:59 PM, Konrad Dybcio wrote:
>> On 10.08.2023 13:54, Luo Jie wrote:
>>> Add clock & reset controller driver for qca8386/qca8084.
>>>
>>> Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
>>> ---
>>
>>> +struct qcom_cc {
>>> + struct qcom_reset_controller reset;
>>> + struct clk_regmap **rclks;
>>> + size_t num_rclks;
>>> +};
>> This all, including the probe func, is required because of the MDIO dance,
>> I assume?
>>
>> Commonizing that would make more sense should more clocks like this appear
>> in the future.
>>
> Hi Konrad,
> Thanks for the review.
> the structure qcom_cc is not because of MDIO dance, this is the common structure used by other qcom clock drivers such as gcc-ipq9574 in the probe function.
>
> seems that we can't make any more commonization on this, please let me know if there is any idea on this.
My main point is, why can't you use qcom_cc_really_probe?
>
>> [...]
>>
>>> +static struct clk_branch nss_cc_switch_core_clk = {
>>> + .halt_reg = 0x8,
>>> + .clkr = {
>>> + .enable_reg = 0x8,
>>> + .enable_mask = BIT(0),
>>> + .hw.init = &(const struct clk_init_data) {
>>> + .name = "nss_cc_switch_core_clk",
>>> + .parent_hws = (const struct clk_hw *[]) {
>>> + &nss_cc_switch_core_clk_src.clkr.hw,
>>> + },
>>> + .num_parents = 1,
>>> + /* Can be disabled in PHY mode for power saving */
>> Well it clearly cannot be disabled if it has the CLK_IS_CRITICAL flag :D
>>
>> What's the "PHY mode" you're talking about?
> Yes, the clock with flag CLK_IS_CRITICAL needs to be enabled, the hardware register needs to be configured to enable it, it is disabled by default.
>
> this clock branch is necessary for the switch mode that has switch features such routing and fdb forwarding, i will remove the CLK_IS_CRITICAL from the clock that is not needed for the PHY mode, we can enable it later when configuring it as switch mode.
>
> As for PHY mode, the device works as only PHY device, that includes 4 PHY ports, no switch functions.
It's still not obvious at all what "phy mode" or "switch mode" are.
Are they usecases for a device based on this SoC?
Konrad
>
>>
>>> + .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
>>> + .ops = &clk_branch2_mdio_ops,
>>> + },
>>> + },
>>> +};
>> I see a whole bunch of CRITICAL clocks.. please make sure these clocks
>> are actually necessary for Linux to know about (i.e. if we don't need
>> to call any operations on them, we might just skip registering them
>> with the driver).
>>
>> Konrad
>>
> yes, Konrad, the clocks with CLK_IS_CRITICAL need to be enabled manually, all clocks are disabled after reset(by default).
next prev parent reply other threads:[~2023-08-12 10:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 11:54 [PATCH v3 0/3] add clock controller of qca8386/qca8084 Luo Jie
2023-08-10 11:54 ` [PATCH v3 1/3] clk: qcom: branch: Add clk_branch2_mdio_ops Luo Jie
2023-08-10 11:54 ` [PATCH v3 2/3] dt-bindings: clock: add qca8386/qca8084 clock and reset definitions Luo Jie
2023-08-10 12:21 ` Rob Herring
2023-08-10 21:11 ` Rob Herring
2023-08-10 11:54 ` [PATCH v3 3/3] clk: qcom: add clock controller driver for qca8386/qca8084 Luo Jie
2023-08-10 12:59 ` Konrad Dybcio
2023-08-11 11:49 ` Jie Luo
2023-08-12 10:56 ` Konrad Dybcio [this message]
2023-08-14 10:58 ` Jie Luo
2023-08-22 19:10 ` Stephen Boyd
2023-08-23 5:50 ` 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=631d5a82-7d24-49cd-9868-74c7b3c08bcd@linaro.org \
--to=konrad.dybcio@linaro.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=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=sboyd@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).