From: Johan Jonker <jbx6244@gmail.com>
To: kever.yang@rock-chips.com
Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, trini@konsulko.com,
hl@rock-chips.com, jernej.skrabec@gmail.com, w.egorov@phytec.de,
jagan@amarulasolutions.com, heiko@sntech.de, jonas@kwiboo.se,
michael@amarulasolutions.com, lukma@denx.de, marex@denx.de,
u-boot@lists.denx.de, upstream@lists.phytec.de
Subject: [PATCH v3 04/12] rockchip: clk: rk3288: add SCLK_OTGPHYx enable and disable
Date: Sun, 31 May 2026 23:02:32 +0200 [thread overview]
Message-ID: <2d88bc68-a40d-4e5a-89f5-e90648fef114@gmail.com> (raw)
In-Reply-To: <3a63b606-621d-486c-9aae-3a819ef05430@gmail.com>
Add rk3288 SCLK_OTGPHYx enable and disable.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
GATE(SCLK_OTGPHY0, "sclk_otgphy0", "xin24m", CLK_IGNORE_UNUSED,
RK3288_CLKGATE_CON(13), 4, GFLAGS),
GATE(SCLK_OTGPHY1, "sclk_otgphy1", "xin24m", CLK_IGNORE_UNUSED,
RK3288_CLKGATE_CON(13), 5, GFLAGS),
GATE(SCLK_OTGPHY2, "sclk_otgphy2", "xin24m", CLK_IGNORE_UNUSED,
RK3288_CLKGATE_CON(13), 6, GFLAGS),
---
drivers/clk/rockchip/clk_rk3288.c | 40 +++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index a4ff1c41abb8..07d539a9f703 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -946,7 +946,47 @@ static int __maybe_unused rk3288_clk_set_parent(struct clk *clk, struct clk *par
return -ENOENT;
}
+static int rk3288_clk_enable(struct clk *clk)
+{
+ struct rk3288_clk_priv *priv = dev_get_priv(clk->dev);
+
+ switch (clk->id) {
+ case SCLK_OTGPHY0:
+ rk_clrreg(&priv->cru->cru_clkgate_con[13], BIT(4));
+ break;
+ case SCLK_OTGPHY1:
+ rk_clrreg(&priv->cru->cru_clkgate_con[13], BIT(5));
+ break;
+ case SCLK_OTGPHY2:
+ rk_clrreg(&priv->cru->cru_clkgate_con[13], BIT(6));
+ break;
+ }
+
+ return 0;
+}
+
+static int rk3288_clk_disable(struct clk *clk)
+{
+ struct rk3288_clk_priv *priv = dev_get_priv(clk->dev);
+
+ switch (clk->id) {
+ case SCLK_OTGPHY0:
+ rk_setreg(&priv->cru->cru_clkgate_con[13], BIT(4));
+ break;
+ case SCLK_OTGPHY1:
+ rk_setreg(&priv->cru->cru_clkgate_con[13], BIT(5));
+ break;
+ case SCLK_OTGPHY2:
+ rk_setreg(&priv->cru->cru_clkgate_con[13], BIT(6));
+ break;
+ }
+
+ return 0;
+}
+
static struct clk_ops rk3288_clk_ops = {
+ .disable = rk3288_clk_disable,
+ .enable = rk3288_clk_enable,
.get_rate = rk3288_clk_get_rate,
.set_rate = rk3288_clk_set_rate,
#if CONFIG_IS_ENABLED(OF_REAL)
--
2.39.5
next prev parent reply other threads:[~2026-05-31 21:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 20:58 [PATCH v3 00/12] Add Rockchip USBPHY DM driver Johan Jonker
2026-05-31 21:01 ` [PATCH v3 01/12] rockchip: configs: compile rk3066 SPL with SPL_OF_REAL Johan Jonker
2026-05-31 21:01 ` [PATCH v3 02/12] rockchip: clk: rk3066: add SCLK_OTGPHYx enable and disable Johan Jonker
2026-05-31 21:02 ` [PATCH v3 03/12] rockchip: clk: rk3188: " Johan Jonker
2026-05-31 21:02 ` Johan Jonker [this message]
2026-05-31 21:02 ` [PATCH v3 05/12] phy: rockchip: add phy-rockchip-usb2.c Johan Jonker
2026-05-31 22:00 ` Jonas Karlman
2026-05-31 21:03 ` [PATCH v3 06/12] usb: phy: remove rockchip_usb2_phy.c Johan Jonker
2026-05-31 21:28 ` Jonas Karlman
2026-05-31 21:03 ` [PATCH v3 07/12] rockchip: reset: make reset-rockchip available in SPL Johan Jonker
2026-05-31 22:07 ` Jonas Karlman
2026-05-31 21:03 ` [PATCH v3 08/12] rockchip: phy: make phy-rockchip-usb2 " Johan Jonker
2026-05-31 22:12 ` Jonas Karlman
2026-05-31 21:03 ` [PATCH v3 09/12] usb: make dwc2_usb " Johan Jonker
2026-05-31 22:17 ` Jonas Karlman
2026-05-31 21:04 ` [PATCH v3 10/12] rockchip: spl-boot-order: add usb boot option Johan Jonker
2026-05-31 21:18 ` Jonas Karlman
2026-05-31 21:04 ` [PATCH v3 11/12] arm: dts: rockchip: add USB required properties in SPL for mk808 Johan Jonker
2026-05-31 21:04 ` [PATCH v3 12/12] rockchip: configs: enable USB " Johan Jonker
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=2d88bc68-a40d-4e5a-89f5-e90648fef114@gmail.com \
--to=jbx6244@gmail.com \
--cc=heiko@sntech.de \
--cc=hl@rock-chips.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=michael@amarulasolutions.com \
--cc=philipp.tomsich@vrull.eu \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=upstream@lists.phytec.de \
--cc=w.egorov@phytec.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.