From: sashiko-bot@kernel.org
To: "Luo Jie" <jie.luo@oss.qualcomm.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/3] clk: qcom: Add NSS clock controller driver for IPQ5210 SoC
Date: Thu, 12 Nov 2026 10:01:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-210917@kernel.org> (raw)
In-Reply-To: <20261111-qcom_ipq5210_nsscc-v2-2-7e2c1dda3ed2@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] clk: qcom: nsscc-ipq5210: CLK_SET_RATE_PARENT on XGMAC PTP
dividers
--
commit ba0d35b1d755dedd51b7ae9f8752c3443ce8f41c
Author: Luo Jie <jie.luo@oss.qualcomm.com>
clk: qcom: Add NSS clock controller driver for IPQ5210 SoC
This commit adds the NSS clock controller driver for IPQ5210, providing
clocks, resets, and interconnect clock paths for the networking subsystem.
> diff --git a/drivers/clk/qcom/nsscc-ipq5210.c b/drivers/clk/qcom/nsscc-ipq5210.c
> new file mode 100644
> index 0000000000000..97673d01c9569
> --- /dev/null
> +++ b/drivers/clk/qcom/nsscc-ipq5210.c
> @@ -0,0 +1,2202 @@
[ ... ]
> +static const struct freq_tbl ftbl_nss_cc_ppe_clk_src[] = {
> + F(24000000, P_XO, 1, 0, 0),
> + F(429000000, P_CMN_PLL_NSS_CLK_429M, 1, 0, 0),
> + { }
> +};
> +
> +static struct clk_rcg2 nss_cc_ppe_clk_src = {
> + .cmd_rcgr = 0x3ec,
> + .mnd_width = 0,
> + .hid_width = 5,
> + .parent_map = nss_cc_parent_map_ppe,
> + .freq_tbl = ftbl_nss_cc_ppe_clk_src,
> + .clkr.hw.init = &(const struct clk_init_data){
> + .name = "nss_cc_ppe_clk_src",
> + .parent_data = nss_cc_ppe_parent_data_ppe,
> + .num_parents = ARRAY_SIZE(nss_cc_ppe_parent_data_ppe),
> + .ops = &clk_rcg2_ops,
> + },
> +};
> +
> +/*
> + * The XGMAC PTP reference clock rate needs to be configurable, so the
> + * PTP reference dividers use the writable divider ops.
> + */
> +static struct clk_regmap_div nss_cc_xgmac0_ptp_ref_div_clk_src = {
> + .reg = 0x3f4,
> + .shift = 0,
> + .width = 4,
> + .clkr.hw.init = &(const struct clk_init_data) {
> + .name = "nss_cc_xgmac0_ptp_ref_div_clk_src",
> + .parent_hws = (const struct clk_hw*[]){
> + &nss_cc_ppe_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_regmap_div_ops,
> + },
> +};
> +
> +static struct clk_regmap_div nss_cc_xgmac1_ptp_ref_div_clk_src = {
> + .reg = 0x3f8,
> + .shift = 0,
> + .width = 4,
> + .clkr.hw.init = &(const struct clk_init_data) {
> + .name = "nss_cc_xgmac1_ptp_ref_div_clk_src",
> + .parent_hws = (const struct clk_hw*[]){
> + &nss_cc_ppe_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_regmap_div_ops,
> + },
> +};
> +
> +static struct clk_regmap_div nss_cc_xgmac2_ptp_ref_div_clk_src = {
> + .reg = 0x3fc,
> + .shift = 0,
> + .width = 4,
> + .clkr.hw.init = &(const struct clk_init_data) {
> + .name = "nss_cc_xgmac2_ptp_ref_div_clk_src",
> + .parent_hws = (const struct clk_hw*[]){
> + &nss_cc_ppe_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_regmap_div_ops,
> + },
> +};
[Severity: Medium]
Should nss_cc_xgmac0_ptp_ref_div_clk_src,
nss_cc_xgmac1_ptp_ref_div_clk_src, and nss_cc_xgmac2_ptp_ref_div_clk_src
omit CLK_SET_RATE_PARENT now that they use writable clk_regmap_div_ops
(like nss_cc_uniphy_port1_rx_div4_clk_src)?
Because these 4-bit dividers can only divide the 429 MHz parent down to
429000000 / 16 = 26812500 Hz, requesting a PTP reference rate of 25 MHz or
24 MHz causes clk_divider_bestdiv() (with CLK_DIVIDER_ROUND_CLOSEST) to
select F(24000000, P_XO, 1, 0, 0) on nss_cc_ppe_clk_src. That reparents
the shared nss_cc_ppe_clk_src root clock from 429 MHz to the 24 MHz XO,
throttling the PPE switch, EDMA, MACs, PON, and NSSNOC PPE.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-qcom_ipq5210_nsscc-v2-0-7e2c1dda3ed2@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-11-12 10:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 10:00 [PATCH v2 0/3] clk: qcom: Add NSS clock controller support for IPQ5210 SoC Luo Jie
2026-11-11 10:00 ` [PATCH v2 1/3] dt-bindings: clock: qcom: Add NSS clock controller " Luo Jie
2026-11-12 10:57 ` Krzysztof Kozlowski
2026-11-11 10:00 ` [PATCH v2 2/3] clk: qcom: Add NSS clock controller driver " Luo Jie
2026-11-11 14:30 ` Abel Vesa
2026-11-12 10:01 ` sashiko-bot [this message]
2026-11-11 10:00 ` [PATCH v2 3/3] arm64: dts: qcom: ipq5210: Add NSS clock controller node Luo Jie
2026-11-12 10:01 ` sashiko-bot
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=sashiko-outbox-210917@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jie.luo@oss.qualcomm.com \
--cc=linux-clk@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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