From: sashiko-bot@kernel.org
To: SignKirigami <prcups@krgm.moe>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 2/4] clk: qcom: Add the Netrani global clock controller
Date: Wed, 25 Nov 2026 13:16:21 +0000 [thread overview]
Message-ID: <sashiko-outbox-233476@kernel.org> (raw)
In-Reply-To: <20261125-netrani-clock-v3-v3-2-9b19d320f422@krgm.moe>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] clk: qcom: gcc-netrani: inconsistent QUPv3 SE5 div and QSPI0
offsets
--
commit b262655da83f0e19b2cd700f2ff0d1064e955f7c
Author: SignKirigami <prcups@krgm.moe>
clk: qcom: Add the Netrani global clock controller
This commit adds the global clock controller driver for Qualcomm Netrani,
including clock topology, reset controls, QUPv3 DFS roots, and PCIe, USB,
and UFS GDSCs.
> diff --git a/drivers/clk/qcom/gcc-netrani.c b/drivers/clk/qcom/gcc-netrani.c
> new file mode 100644
> index 0000000000000..a2b09b88adb53
> --- /dev/null
> +++ b/drivers/clk/qcom/gcc-netrani.c
> @@ -0,0 +1,2726 @@
[ ... ]
> +static struct clk_regmap_div gcc_qupv3_wrap0_s5_div_clk_src = {
> + .reg = 0x2774c,
> + .shift = 0,
> + .width = 4,
> + .clkr.hw.init = &(const struct clk_init_data) {
> + .name = "gcc_qupv3_wrap0_s5_div_clk_src",
> + .parent_hws = (const struct clk_hw*[]) {
> + &gcc_qupv3_wrap0_s5_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_regmap_div_ro_ops,
> + },
> +};
> +
> +static struct clk_branch gcc_qupv3_wrap0_s5_clk = {
> + .halt_reg = 0x27610,
> + .halt_check = BRANCH_HALT_VOTED,
> + .clkr = {
> + .enable_reg = 0x62008,
> + .enable_mask = BIT(15),
> + .hw.init = &(const struct clk_init_data) {
> + .name = "gcc_qupv3_wrap0_s5_clk",
> + .parent_hws = (const struct clk_hw*[]) {
> + &gcc_qupv3_wrap0_s5_div_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> +static struct clk_branch gcc_qupv3_wrap0_qspi0_clk = {
> + .halt_reg = 0x27744,
> + .halt_check = BRANCH_HALT_VOTED,
> + .clkr = {
> + .enable_reg = 0x62010,
> + .enable_mask = BIT(24),
> + .hw.init = &(const struct clk_init_data) {
> + .name = "gcc_qupv3_wrap0_qspi0_clk",
> + .parent_hws = (const struct clk_hw*[]) {
> + &gcc_qupv3_wrap0_s5_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> +static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init = {
> + .name = "gcc_qupv3_wrap1_s5_clk_src",
> + .parent_data = gcc_parent_data_0,
> + .num_parents = ARRAY_SIZE(gcc_parent_data_0),
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_rcg2_shared_ops,
> +};
> +
> +static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src = {
> + .cmd_rcgr = 0x28618,
> + .mnd_width = 16,
> + .hid_width = 5,
> + .parent_map = gcc_parent_map_0,
> + .freq_tbl = ftbl_gcc_qupv3_wrap0_s5_clk_src,
> + .clkr.hw.init = &gcc_qupv3_wrap1_s5_clk_src_init,
> +};
> +
> +static struct clk_regmap_div gcc_qupv3_wrap1_s5_div_clk_src = {
> + .reg = 0x28744,
> + .shift = 0,
> + .width = 4,
> + .clkr.hw.init = &(const struct clk_init_data) {
> + .name = "gcc_qupv3_wrap1_s5_div_clk_src",
> + .parent_hws = (const struct clk_hw*[]) {
> + &gcc_qupv3_wrap1_s5_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_regmap_div_ro_ops,
> + },
> +};
> +
> +static struct clk_branch gcc_qupv3_wrap1_s5_clk = {
> + .halt_reg = 0x28610,
> + .halt_check = BRANCH_HALT_VOTED,
> + .clkr = {
> + .enable_reg = 0x62008,
> + .enable_mask = BIT(27),
> + .hw.init = &(const struct clk_init_data) {
> + .name = "gcc_qupv3_wrap1_s5_clk",
> + .parent_hws = (const struct clk_hw*[]) {
> + &gcc_qupv3_wrap1_s5_div_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> +static struct clk_branch gcc_qupv3_wrap1_qspi0_clk = {
> + .halt_reg = 0x28748,
> + .halt_check = BRANCH_HALT_VOTED,
> + .clkr = {
> + .enable_reg = 0x62010,
> + .enable_mask = BIT(25),
> + .hw.init = &(const struct clk_init_data) {
> + .name = "gcc_qupv3_wrap1_qspi0_clk",
> + .parent_hws = (const struct clk_hw*[]) {
> + &gcc_qupv3_wrap1_s5_clk_src.clkr.hw,
> + },
> + .num_parents = 1,
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
[Severity: Medium]
Are the register offsets for the SE5 divider and QSPI0 branch clock
consistent between QUPv3 wrapper 0 and wrapper 1?
Every other register across wrapper 0 (base 0x27000) and wrapper 1 (base
0x28000) uses identical relative offsets, including the SE5 RCG at +0x618.
After that 0x12c-byte DFS RCG block, wrapper 0 places
gcc_qupv3_wrap0_qspi0_clk.halt_reg at +0x744 (0x27744) and
gcc_qupv3_wrap0_s5_div_clk_src.reg at +0x74c (0x2774c), whereas wrapper 1
places gcc_qupv3_wrap1_s5_div_clk_src.reg at +0x744 (0x28744) and
gcc_qupv3_wrap1_qspi0_clk.halt_reg at +0x748 (0x28748).
If the two wrappers share the same register layout (typically QSPI0 CBCR
at +0x744 and SE5 CDIVR at +0x748), reading the wrong register will cause
clk_regmap_div_ro_ops to miscalculate the SE5 clock rate and
clk_branch2_ops to poll the divider register for QSPI0 branch halt status.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-netrani-clock-v3-v3-0-9b19d320f422@krgm.moe?part=2
next prev parent reply other threads:[~2026-11-25 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 12:59 [PATCH v3 0/4] Add Qualcomm Netrani clock support SignKirigami
2026-11-25 12:59 ` [PATCH v3 1/4] dt-bindings: clock: Add Qualcomm Netrani GCC SignKirigami
2026-11-25 12:59 ` [PATCH v3 2/4] clk: qcom: Add the Netrani global clock controller SignKirigami
2026-11-25 13:16 ` sashiko-bot [this message]
2026-11-25 12:59 ` [PATCH v3 3/4] dt-bindings: clock: Add Netrani RPMh clocks SignKirigami
2026-11-25 12:59 ` [PATCH v3 4/4] clk: qcom: rpmh: Add Netrani clock resources SignKirigami
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-233476@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=prcups@krgm.moe \
--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