]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: rockchip: rk3399: Add SCLK_USB3OTGx_REF support
authorJonas Karlman <jonas@kwiboo.se>
Wed, 1 May 2024 16:22:21 +0000 (16:22 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 7 May 2024 07:56:09 +0000 (15:56 +0800)
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 <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/clk/rockchip/clk_rk3399.c

index 0b3223611a328f4d129bc2bd29d8f40aba6f47be..67b2c05ec9ed30fe0a80af13e9dbf286b2c89fd5 100644 (file)
@@ -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: