From: Sumit Garg <sumit.garg@kernel.org>
To: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Cc: trini@konsulko.com, casey.connolly@linaro.org,
neil.armstrong@linaro.org, peng.fan@nxp.com,
jh80.chung@samsung.com, lukma@denx.de,
marek.vasut+renesas@mailbox.org, michal.simek@amd.com,
alexeymin@postmarketos.org, u-boot@lists.denx.de,
u-boot-qcom@groups.io
Subject: Re: [RESEND v2 1/6] clk/qcom: Add USB related clocks for IPQ9574
Date: Fri, 19 Dec 2025 19:28:05 +0530 [thread overview]
Message-ID: <aUVZ7VQrcjPV4Ftu@sumit-xelite> (raw)
In-Reply-To: <20251218061557.1999367-2-varadarajan.narayanan@oss.qualcomm.com>
On Thu, Dec 18, 2025 at 11:45:52AM +0530, Varadarajan Narayanan wrote:
> Add the USB controller and phy related clocks.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> drivers/clk/qcom/clock-ipq9574.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
> diff --git a/drivers/clk/qcom/clock-ipq9574.c b/drivers/clk/qcom/clock-ipq9574.c
> index b0af4036059..1f5146b29a1 100644
> --- a/drivers/clk/qcom/clock-ipq9574.c
> +++ b/drivers/clk/qcom/clock-ipq9574.c
> @@ -25,6 +25,9 @@
> #define GCC_SDCC1_AHB_CBCR 0x33034
> #define GCC_SDCC1_APPS_CMD_RCGR 0x33004
> #define GCC_SDCC1_ICE_CORE_CBCR 0x33030
> +#define GCC_USB0_MASTER_CMD_RCGR 0x2c004
> +#define GCC_USB0_MOCK_UTMI_CMD_RCGR 0x2c02c
> +#define GCC_USB0_AUX_CMD_RCGR 0x2C018
>
> static ulong ipq9574_set_rate(struct clk *clk, ulong rate)
> {
> @@ -39,6 +42,17 @@ static ulong ipq9574_set_rate(struct clk *clk, ulong rate)
> clk_rcg_set_rate_mnd(priv->base, GCC_SDCC1_APPS_CMD_RCGR,
> 11, 0, 0, CFG_CLK_SRC_GPLL2, 16);
> return rate;
> + case GCC_USB0_MASTER_CLK:
> + clk_rcg_set_rate(priv->base, GCC_USB0_MASTER_CMD_RCGR,
> + 4, CFG_CLK_SRC_GPLL0);
> + return rate;
> + case GCC_USB0_MOCK_UTMI_CLK:
> + clk_rcg_set_rate_mnd(priv->base, GCC_USB0_MOCK_UTMI_CMD_RCGR,
> + 0, 0, 0, CFG_CLK_SRC_CXO, 8);
> + return rate;
> + case GCC_USB0_AUX_CLK:
> + clk_rcg_set_rate_mnd(priv->base, GCC_USB0_AUX_CMD_RCGR, 0, 0, 0,
> + CFG_CLK_SRC_CXO, 8);
> default:
> return -EINVAL;
> }
> @@ -50,6 +64,14 @@ static const struct gate_clk ipq9574_clks[] = {
> GATE_CLK(GCC_SDCC1_AHB_CLK, 0x33034, 0x00000001),
> GATE_CLK(GCC_SDCC1_APPS_CLK, 0x3302C, 0x00000001),
> GATE_CLK(GCC_SDCC1_ICE_CORE_CLK, 0x33030, 0x00000001),
> + GATE_CLK(GCC_SNOC_USB_CLK, 0x2e058, 0x00000001),
> + GATE_CLK(GCC_USB0_MASTER_CLK, 0x2c044, 0x00000001),
> + GATE_CLK(GCC_ANOC_USB_AXI_CLK, 0x2e084, 0x00000001),
> + GATE_CLK(GCC_USB0_SLEEP_CLK, 0x2c058, 0x00000001),
> + GATE_CLK(GCC_USB0_MOCK_UTMI_CLK, 0x2c04c, 0x00000001),
> + GATE_CLK(GCC_USB0_PHY_CFG_AHB_CLK, 0x2c05c, 0x00000001),
> + GATE_CLK(GCC_USB0_AUX_CLK, 0x2c048, 0x00000001),
> + GATE_CLK(GCC_USB0_PIPE_CLK, 0x2c054, 0x00000001),
> };
>
> static int ipq9574_enable(struct clk *clk)
> @@ -67,6 +89,10 @@ static int ipq9574_enable(struct clk *clk)
> }
>
> static const struct qcom_reset_map ipq9574_gcc_resets[] = {
> + [GCC_USB_BCR] = { 0x2c000 },
> + [GCC_QUSB2_0_PHY_BCR] = { 0x2c068 },
> + [GCC_USB0_PHY_BCR] = {0x2c06c, 0},
> + [GCC_USB3PHY_0_PHY_BCR] = {0x2c070, 0},
> [GCC_SDCC_BCR] = { 0x33000 },
> };
>
> @@ -75,6 +101,8 @@ static struct msm_clk_data ipq9574_gcc_data = {
> .num_resets = ARRAY_SIZE(ipq9574_gcc_resets),
> .enable = ipq9574_enable,
> .set_rate = ipq9574_set_rate,
> + .clks = ipq9574_clks,
> + .num_clks = ARRAY_SIZE(ipq9574_clks),
> };
>
> static const struct udevice_id gcc_ipq9574_of_match[] = {
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-12-19 13:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 6:15 [RESEND v2 0/6] Enable fastboot support for IPQ9574 based boards Varadarajan Narayanan
2025-12-18 6:15 ` [RESEND v2 1/6] clk/qcom: Add USB related clocks for IPQ9574 Varadarajan Narayanan
2025-12-19 13:58 ` Sumit Garg [this message]
2026-01-12 14:56 ` Casey Connolly
2025-12-18 6:15 ` [RESEND v2 2/6] phy: Add IPQ9574 support to Qualcomm QUSB2 phy Varadarajan Narayanan
2025-12-19 14:00 ` Sumit Garg
2026-01-12 14:56 ` Casey Connolly
2025-12-18 6:15 ` [RESEND v2 3/6] phy: qcom: Add QMP USB PHY driver Varadarajan Narayanan
2025-12-19 14:13 ` Sumit Garg
2025-12-18 6:15 ` [RESEND v2 4/6] configs: ipq9574: Enable fastboot support Varadarajan Narayanan
2025-12-19 14:29 ` Sumit Garg
2025-12-22 8:44 ` Varadarajan Narayanan
2026-01-12 14:56 ` Casey Connolly
2025-12-18 6:15 ` [RESEND v2 5/6] dts: ipq9574-rdp433-u-boot: Enable USB device mode and MMC Varadarajan Narayanan
2025-12-19 14:41 ` Sumit Garg
2025-12-18 6:15 ` [RESEND v2 6/6] doc: board/qualcomm: Update RDP flashing instructions Varadarajan Narayanan
2025-12-19 14:43 ` Sumit Garg
2025-12-23 5:11 ` Varadarajan Narayanan
2025-12-23 8:27 ` Sumit Garg
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=aUVZ7VQrcjPV4Ftu@sumit-xelite \
--to=sumit.garg@kernel.org \
--cc=alexeymin@postmarketos.org \
--cc=casey.connolly@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=lukma@denx.de \
--cc=marek.vasut+renesas@mailbox.org \
--cc=michal.simek@amd.com \
--cc=neil.armstrong@linaro.org \
--cc=peng.fan@nxp.com \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
--cc=varadarajan.narayanan@oss.qualcomm.com \
/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