From: Varadarajan Narayanan via U-Boot <u-boot@lists.u-boot-project.org>
To: Sumit Garg <sumit.garg@kernel.org>,
u-boot-qcom@groups.io, u-boot@lists.u-boot-project.org
Cc: Lukasz Majewski <lukma@denx.de>,
Casey Connolly <casey.connolly@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Tom Rini <trini@konsulko.com>,
Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>,
David Lechner <dlechner@baylibre.com>,
Luca Weiss <luca.weiss@fairphone.com>,
Biswapriyo Nath <nathbappai@gmail.com>,
Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>,
Sumit Garg <sumit.garg@oss.qualcomm.com>
Subject: [PATCH 1/5] clk/qcom: Add USB related clocks for IPQ9574
Date: Thu, 06 Aug 2026 07:51:04 +0530 [thread overview]
Message-ID: <20260806-fastboot-v1-1-cab7d64e592b@oss.qualcomm.com> (raw)
In-Reply-To: <20260806-fastboot-v1-0-cab7d64e592b@oss.qualcomm.com>
Add the USB controller and phy related clocks.
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
drivers/clk/qcom/clock-ipq9574.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
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:[~2026-08-06 2:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 2:21 [PATCH 0/5] Enable fastboot support for IPQ9574 based boards Varadarajan Narayanan via U-Boot
2026-08-06 2:21 ` Varadarajan Narayanan via U-Boot [this message]
2026-08-06 2:21 ` [PATCH 2/5] phy: Add IPQ9574 support to Qualcomm QUSB2 phy Varadarajan Narayanan via U-Boot
2026-08-06 2:21 ` [PATCH 3/5] phy: qcom: Add QMP USB PHY driver Varadarajan Narayanan via U-Boot
2026-08-06 2:21 ` [PATCH 4/5] configs: ipq9574: Enable fastboot support Varadarajan Narayanan via U-Boot
2026-08-06 2:21 ` [PATCH 5/5] doc: board/qualcomm: Update RDP flashing instructions Varadarajan Narayanan via U-Boot
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=20260806-fastboot-v1-1-cab7d64e592b@oss.qualcomm.com \
--to=u-boot@lists.u-boot-project.org \
--cc=balaji.selvanathan@oss.qualcomm.com \
--cc=casey.connolly@linaro.org \
--cc=dlechner@baylibre.com \
--cc=jh80.chung@samsung.com \
--cc=luca.weiss@fairphone.com \
--cc=lukma@denx.de \
--cc=nathbappai@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=peng.fan@nxp.com \
--cc=sumit.garg@kernel.org \
--cc=sumit.garg@oss.qualcomm.com \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--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