git: 8559cae1ebf2 - main - rk3568_cru: Allow the GMAC RGMII speed clock to reparent
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Nov 2026 13:55:47 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=8559cae1ebf28dba263e81975e737dd5889095e1
commit 8559cae1ebf28dba263e81975e737dd5889095e1
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-10-21 10:07:57 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-20 13:55:19 +0000
rk3568_cru: Allow the GMAC RGMII speed clock to reparent
The RGMII speed mux selects between the 125MHz GMAC clock and fixed
dividers of it that provide the 25MHz (100M) and 2.5MHz (10M) clocks.
Without RK_CLK_MUX_REPARENT the mux does not try its parents and the
rate request is forwarded to clk_gmac0 (and above), where it fails with
EBUSY because that clock is enabled by more than one consumer.
Mark both RGMII speed muxes as reparenting so that the rate is achieved
by selecting the appropriate fixed divider.
Reviewed by: oh
Differential Revision: https://reviews.freebsd.org/D61019
---
sys/dev/clk/rockchip/rk3568_cru.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/clk/rockchip/rk3568_cru.c b/sys/dev/clk/rockchip/rk3568_cru.c
index c3de5e9213c9..19143ad70b2d 100644
--- a/sys/dev/clk/rockchip/rk3568_cru.c
+++ b/sys/dev/clk/rockchip/rk3568_cru.c
@@ -512,7 +512,7 @@ static struct rk_clk rk3568_clks[] = {
MUX(SCLK_GMAC0_RMII_SPEED, "clk_gmac0_rmii_speed",
mux_gmac0_rmii_speed_p, 0, 31, 3, 1),
MUX(SCLK_GMAC0_RGMII_SPEED, "clk_gmac0_rgmii_speed",
- mux_gmac0_rgmii_speed_p, 0, 31, 4, 2),
+ mux_gmac0_rgmii_speed_p, RK_CLK_MUX_REPARENT, 31, 4, 2),
MUX(0, "clk_mac0_2top_sel", clk_mac_2top_p, 0, 31, 8, 2),
MUX(0, "clk_gmac0_ptp_ref_sel", clk_gmac_ptp_p, 0, 31, 12, 2),
MUX(0, "clk_mac0_out_sel", cpll125_cpll50_cpll25_xin24m_p, 0, 31, 14, 2),
@@ -537,7 +537,7 @@ static struct rk_clk rk3568_clks[] = {
MUX(SCLK_GMAC1_RMII_SPEED, "clk_gmac1_rmii_speed",
mux_gmac1_rmii_speed_p, 0, 33, 3, 1),
MUX(SCLK_GMAC1_RGMII_SPEED, "clk_gmac1_rgmii_speed",
- mux_gmac1_rgmii_speed_p, 0, 33, 4, 2),
+ mux_gmac1_rgmii_speed_p, RK_CLK_MUX_REPARENT, 33, 4, 2),
/* 6:7 Reserved */
MUX(0, "clk_mac1_2top_sel", clk_mac_2top_p, 0, 33, 8, 2),
MUX(0, "clk_gmac1_ptp_ref_sel", clk_gmac_ptp_p, 0, 33, 12, 2),