From: Sumit Garg <sumit.garg@kernel.org>
To: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Cc: lukma@denx.de, casey.connolly@linaro.org,
neil.armstrong@linaro.org, trini@konsulko.com,
swathi.tamilselvan@oss.qualcomm.com, quic_varada@quicinc.com,
u-boot-qcom@groups.io, u-boot@lists.denx.de
Subject: Re: [PATCH v1] clk: qcom: sa8775p: Fix USB clock configuration and add resets
Date: Fri, 16 Jan 2026 15:34:35 +0530 [thread overview]
Message-ID: <aWoNM-KZbD04Mu-F@sumit-xelite> (raw)
In-Reply-To: <20260113065856.3287772-1-balaji.selvanathan@oss.qualcomm.com>
On Tue, Jan 13, 2026 at 12:28:55PM +0530, Balaji Selvanathan wrote:
> Correct USB30 primary clock RCG configuration and add missing
> USB3_PRIM_PHY_AUX_CMD_RCGR RCG configuration.
> Above taken from Linux commit 08c51ceb12f7 ("clk: qcom: add the GCC driver for sa8775p")
>
> Add missing USB3_PRIM_PHY_PIPE_CLK gate clock definition.
> Extend reset map with USB-related BCR entries and video BCR
> for comprehensive reset control support.
>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
> ---
> drivers/clk/qcom/clock-sa8775p.c | 28 ++++++++++++++++++++++++----
> 1 file changed, 24 insertions(+), 4 deletions(-)
With the indentation fixes, feel free to add:
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
>
> diff --git a/drivers/clk/qcom/clock-sa8775p.c b/drivers/clk/qcom/clock-sa8775p.c
> index 5a6fbd417ff..25c8cd4af9a 100644
> --- a/drivers/clk/qcom/clock-sa8775p.c
> +++ b/drivers/clk/qcom/clock-sa8775p.c
> @@ -15,8 +15,9 @@
> #include <dt-bindings/clock/qcom,sa8775p-gcc.h>
> #include "clock-qcom.h"
>
> -#define USB30_PRIM_MOCK_UTMI_CLK_CMD_RCGR 0xf038
> -#define USB30_PRIM_MASTER_CLK_CMD_RCGR 0xf020
> +#define USB30_PRIM_MOCK_UTMI_CLK_CMD_RCGR 0x1b040
> +#define USB30_PRIM_MASTER_CLK_CMD_RCGR 0x1b028
> +#define USB3_PRIM_PHY_AUX_CMD_RCGR 0x1b06c
>
> #define GCC_QUPV3_WRAP0_S0_CLK_ENA_BIT BIT(10)
> #define GCC_QUPV3_WRAP0_S1_CLK_ENA_BIT BIT(11)
> @@ -59,8 +60,8 @@ static ulong sa8775p_set_rate(struct clk *clk, ulong rate)
> case GCC_USB30_PRIM_MASTER_CLK:
> WARN(rate != 200000000, "Unexpected rate for USB30_PRIM_MASTER_CLK: %lu\n", rate);
> clk_rcg_set_rate_mnd(priv->base, USB30_PRIM_MASTER_CLK_CMD_RCGR,
> - 1, 0, 0, CFG_CLK_SRC_GPLL0_ODD, 8);
> - clk_rcg_set_rate(priv->base, 0xf064, 0, 0);
> + 5, 0, 0, CFG_CLK_SRC_GPLL0, 8);
> + clk_rcg_set_rate(priv->base, USB3_PRIM_PHY_AUX_CMD_RCGR, 0, 0);
> return rate;
> default:
> return 0;
> @@ -75,6 +76,7 @@ static const struct gate_clk sa8775p_clks[] = {
> GATE_CLK(GCC_USB30_PRIM_MOCK_UTMI_CLK, 0x1b024, 1),
> GATE_CLK(GCC_USB3_PRIM_PHY_AUX_CLK, 0x1b05c, 1),
> GATE_CLK(GCC_USB3_PRIM_PHY_COM_AUX_CLK, 0x1b060, 1),
> + GATE_CLK(GCC_USB3_PRIM_PHY_PIPE_CLK, 0x1b064, 1),
>
> /* QUP Wrapper 0 clocks */
> GATE_CLK(GCC_QUPV3_WRAP0_S0_CLK, 0x4b008, GCC_QUPV3_WRAP0_S0_CLK_ENA_BIT),
> @@ -157,6 +159,24 @@ static const struct qcom_reset_map sa8775p_gcc_resets[] = {
> [GCC_TSCSS_BCR] = { 0x21000 },
> [GCC_UFS_CARD_BCR] = { 0x81000 },
> [GCC_UFS_PHY_BCR] = { 0x83000 },
> + [GCC_USB20_PRIM_BCR] = {0x1c000},
> + [GCC_USB2_PHY_PRIM_BCR] = {0x5c028},
> + [GCC_USB2_PHY_SEC_BCR] = {0x5c02c},
> + [GCC_USB30_PRIM_BCR] = {0x1b000},
> + [GCC_USB30_SEC_BCR] = {0x2f000},
> + [GCC_USB3_DP_PHY_PRIM_BCR] = {0x5c008},
> + [GCC_USB3_DP_PHY_SEC_BCR] = {0x5c014},
> + [GCC_USB3_PHY_PRIM_BCR] = {0x5c000},
> + [GCC_USB3_PHY_SEC_BCR] = {0x5c00c},
> + [GCC_USB3_PHY_TERT_BCR] = {0x5c030},
> + [GCC_USB3_UNIPHY_MP0_BCR] = {0x5c018},
> + [GCC_USB3_UNIPHY_MP1_BCR] = {0x5c01c},
> + [GCC_USB3PHY_PHY_PRIM_BCR] = {0x5c004},
> + [GCC_USB3PHY_PHY_SEC_BCR] = {0x5c010},
> + [GCC_USB3UNIPHY_PHY_MP0_BCR] = {0x5c020},
> + [GCC_USB3UNIPHY_PHY_MP1_BCR] = {0x5c024},
> + [GCC_USB_PHY_CFG_AHB2PHY_BCR] = {0x76000},
> + [GCC_VIDEO_BCR] = {0x34000}
> };
>
> static const struct qcom_power_map sa8775p_gdscs[] = {
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-01-16 10:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 6:58 [PATCH v1] clk: qcom: sa8775p: Fix USB clock configuration and add resets Balaji Selvanathan
2026-01-13 7:54 ` Varadarajan Narayanan
2026-01-16 10:04 ` Sumit Garg [this message]
2026-01-16 18:03 ` Casey Connolly
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=aWoNM-KZbD04Mu-F@sumit-xelite \
--to=sumit.garg@kernel.org \
--cc=balaji.selvanathan@oss.qualcomm.com \
--cc=casey.connolly@linaro.org \
--cc=lukma@denx.de \
--cc=neil.armstrong@linaro.org \
--cc=quic_varada@quicinc.com \
--cc=swathi.tamilselvan@oss.qualcomm.com \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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.