From: sashiko-bot@kernel.org
To: "Konrad Dybcio" <konradybcio@kernel.org>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 4/4] clk: qcom: gcc-glymur: Convert USB4 clocks to use phymux ops
Date: Mon, 23 Nov 2026 18:57:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-229891@kernel.org> (raw)
In-Reply-To: <20261123-topic-usb4_clks-v1-4-531ab5635c03@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] clk: qcom: gcc-glymur: USB4 PHY RX branch clocks poll halt with
phymux parent
- [Medium] clk: qcom: gcc-glymur:
gcc_usb4_{0,1,2}_phy_p2rr2p_pipe_clk_src not converted
--
commit b685bd7088c460b8ed23d2168b56f940cdb682c3
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
clk: qcom: gcc-glymur: Convert USB4 clocks to use phymux ops
This commit converts gcc_usb4_{0,1,2}_phy_rx{0,1}_clk_src from
clk_regmap_mux with clk_regmap_mux_closest_ops to clk_regmap_phy_mux with
clk_regmap_phy_mux_ops.
> diff --git a/drivers/clk/qcom/gcc-glymur.c b/drivers/clk/qcom/gcc-glymur.c
> index 96d1c07348bcb..186c779e30846 100644
> --- a/drivers/clk/qcom/gcc-glymur.c
> +++ b/drivers/clk/qcom/gcc-glymur.c
[ ... ]
> @@ -1099,32 +1033,30 @@ static struct clk_regmap_mux gcc_usb4_0_phy_pcie_pipe_mux_clk_src = {
> },
> };
>
> -static struct clk_regmap_mux gcc_usb4_0_phy_rx0_clk_src = {
> +static struct clk_regmap_phy_mux gcc_usb4_0_phy_rx0_clk_src = {
> .reg = 0x2b0c0,
> - .shift = 0,
> - .width = 2,
> - .parent_map = gcc_parent_map_34,
> .clkr = {
> .hw.init = &(const struct clk_init_data) {
> .name = "gcc_usb4_0_phy_rx0_clk_src",
> - .parent_data = gcc_parent_data_34,
> - .num_parents = ARRAY_SIZE(gcc_parent_data_34),
> - .ops = &clk_regmap_mux_closest_ops,
> + .parent_data = &(const struct clk_parent_data){
> + .index = DT_QUSB4PHY_0_GCC_USB4_RX0_CLK,
> + },
> + .num_parents = 1,
> + .ops = &clk_regmap_phy_mux_ops,
> },
> },
> };
[Severity: High]
Should the child branches gcc_usb4_{0,1,2}_phy_rx{0,1}_clk use
BRANCH_HALT_SKIP instead of BRANCH_HALT now that their parents use
clk_regmap_phy_mux_ops?
With clk_regmap_phy_mux_ops, phy_mux_enable() switches the parent mux from
BI_TCXO to the external PHY RX clock before enabling the child branch, and
clk_branch2_disable() disables the child branch before phy_mux_disable()
parks the mux back on BI_TCXO. If the PHY is not actively driving the RX
clock when the branch is toggled, clk_branch_wait() will time out polling
CBCR_CLK_OFF, trigger a WARN, and fail with -EBUSY.
[Severity: Medium]
Should gcc_usb4_{0,1,2}_phy_p2rr2p_pipe_clk_src also be converted to
clk_regmap_phy_mux with clk_regmap_phy_mux_ops (as in
drivers/clk/qcom/gcc-x1e80100.c)?
Those three muxes have the same 2-bit phymux layout switching between
P_USB4_{0,1,2}_PHY_GCC_USB4_PCIE_PIPE_CLK (0) and P_BI_TCXO (2). Because
qmp_combo_usb4_init() and qmp_combo_usb4_exit() only call
clk_prepare_enable() and clk_disable_unprepare() on qmp->p2rr2p_pipe_clk
without calling clk_set_parent(), leaving them on
clk_regmap_mux_closest_ops prevents the mux from switching between the PHY
pipe clock and BI_TCXO.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-topic-usb4_clks-v1-0-531ab5635c03@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-11-23 18:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 18:34 [PATCH 0/4] Glymur USB4 clock fixups Konrad Dybcio
2026-11-23 18:34 ` [PATCH 1/4] dt-bindings: clock: qcom,glymur-gcc: Add missing USB4 resets Konrad Dybcio
2026-11-23 18:34 ` [PATCH 2/4] clk: qcom: gcc-glymur: " Konrad Dybcio
2026-11-23 19:14 ` Abel Vesa
2026-11-23 18:34 ` [PATCH 3/4] clk: qcom: gcc-glymur: Set FORCE_MEM_ON for USB4 uC clocks Konrad Dybcio
2026-11-23 18:43 ` sashiko-bot
2026-11-23 19:15 ` Abel Vesa
2026-11-23 18:34 ` [PATCH 4/4] clk: qcom: gcc-glymur: Convert USB4 clocks to use phymux ops Konrad Dybcio
2026-11-23 18:57 ` sashiko-bot [this message]
2026-11-23 19:16 ` Abel Vesa
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-229891@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.