From: Jonas Karlman Date: Wed, 1 May 2024 16:22:21 +0000 (+0000) Subject: clk: rockchip: rk3399: Add SCLK_USB3OTGx_REF support X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=add8cef67be9eacd7a0693131309fd1b344bf53c;p=u-boot.git clk: rockchip: rk3399: Add SCLK_USB3OTGx_REF support The SCLK_USB3OTGx_REF clocks is used as reference clock for USB3 block. Add simple support to get rate of SCLK_USB3OTGx_REF clocks to fix reference clock period configuration. Also replace use of 24000000 with the OSC_HZ constant. Signed-off-by: Jonas Karlman Reviewed-by: Quentin Schulz Reviewed-by: Kever Yang --- diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 0b3223611a..67b2c05ec9 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -976,7 +976,9 @@ static ulong rk3399_clk_get_rate(struct clk *clk) case SCLK_UART1: case SCLK_UART2: case SCLK_UART3: - return 24000000; + case SCLK_USB3OTG0_REF: + case SCLK_USB3OTG1_REF: + return OSC_HZ; case PCLK_HDMI_CTRL: break; case DCLK_VOP0: