From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Shawn Lin <shawn.lin@rock-chips.com>,
Heiko Stuebner <heiko@sntech.de>,
Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH] clk: rockchip: rk3568: Add PCIe pipe clock gates
Date: Thu, 28 May 2026 15:15:31 +0300 [thread overview]
Message-ID: <20260528121532.1242489-2-eagle.alexander923@gmail.com> (raw)
In-Reply-To: <20260528121532.1242489-1-eagle.alexander923@gmail.com>
From: Shawn Lin <shawn.lin@rock-chips.com>
The PCIe pipe clocks are currently left as orphan clocks and remain
enabled indefinitely, which is suboptimal. Add the missing clock gates
so the PCIe driver can explicitly manage them when not in use. In order
not to break compatibility with old DTB, mark them as CLK_IGNORE_UNUSED.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://patch.msgid.link/1772799641-32164-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/clk/rockchip/clk-rk3568.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c
index 3b0cfdb865..12b3514afb 100644
--- a/drivers/clk/rockchip/clk-rk3568.c
+++ b/drivers/clk/rockchip/clk-rk3568.c
@@ -830,6 +830,8 @@ static struct rockchip_clk_branch rk3568_clk_branches[] __initdata = {
RK3568_CLKGATE_CON(12), 3, GFLAGS),
GATE(CLK_PCIE20_AUX_NDFT, "clk_pcie20_aux_ndft", "xin24m", 0,
RK3568_CLKGATE_CON(12), 4, GFLAGS),
+ GATE(CLK_PCIE20_PIPE_DFT, "clk_pcie20_pipe_dft", "aclk_pipe", CLK_IGNORE_UNUSED,
+ RK3568_CLKGATE_CON(12), 5, GFLAGS),
GATE(ACLK_PCIE30X1_MST, "aclk_pcie30x1_mst", "aclk_pipe", 0,
RK3568_CLKGATE_CON(12), 8, GFLAGS),
GATE(ACLK_PCIE30X1_SLV, "aclk_pcie30x1_slv", "aclk_pipe", 0,
@@ -840,6 +842,8 @@ static struct rockchip_clk_branch rk3568_clk_branches[] __initdata = {
RK3568_CLKGATE_CON(12), 11, GFLAGS),
GATE(CLK_PCIE30X1_AUX_NDFT, "clk_pcie30x1_aux_ndft", "xin24m", 0,
RK3568_CLKGATE_CON(12), 12, GFLAGS),
+ GATE(CLK_PCIE30X1_PIPE_DFT, "clk_pcie30x1_pipe_dft", "aclk_pipe", CLK_IGNORE_UNUSED,
+ RK3568_CLKGATE_CON(12), 13, GFLAGS),
GATE(ACLK_PCIE30X2_MST, "aclk_pcie30x2_mst", "aclk_pipe", 0,
RK3568_CLKGATE_CON(13), 0, GFLAGS),
GATE(ACLK_PCIE30X2_SLV, "aclk_pcie30x2_slv", "aclk_pipe", 0,
@@ -850,6 +854,8 @@ static struct rockchip_clk_branch rk3568_clk_branches[] __initdata = {
RK3568_CLKGATE_CON(13), 3, GFLAGS),
GATE(CLK_PCIE30X2_AUX_NDFT, "clk_pcie30x2_aux_ndft", "xin24m", 0,
RK3568_CLKGATE_CON(13), 4, GFLAGS),
+ GATE(CLK_PCIE30X2_PIPE_DFT, "clk_pcie30x2_pipe_dft", "aclk_pipe", CLK_IGNORE_UNUSED,
+ RK3568_CLKGATE_CON(13), 5, GFLAGS),
GATE(ACLK_SATA0, "aclk_sata0", "aclk_pipe", 0,
RK3568_CLKGATE_CON(11), 0, GFLAGS),
GATE(CLK_SATA0_PMALIVE, "clk_sata0_pmalive", "gpll_20m", 0,
--
2.52.0
next prev parent reply other threads:[~2026-05-28 12:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 12:15 [PATCH] clk: rockchip: Fix error pointer check after rockchip_clk_register_gate_link() Alexander Shiyan
2026-05-28 12:15 ` Alexander Shiyan [this message]
2026-05-29 11:43 ` [PATCH] clk: rockchip: rk3568: Add PCIe pipe clock gates Sascha Hauer
2026-05-29 11:43 ` Sascha Hauer
2026-05-28 12:46 ` [PATCH] clk: rockchip: Fix error pointer check after rockchip_clk_register_gate_link() Sascha Hauer
2026-05-29 11:43 ` (subset) " Sascha Hauer
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=20260528121532.1242489-2-eagle.alexander923@gmail.com \
--to=eagle.alexander923@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=heiko@sntech.de \
--cc=shawn.lin@rock-chips.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