]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: rockchip: rk3328: Add SCLK_USB3OTG_REF support
authorJonas Karlman <jonas@kwiboo.se>
Wed, 1 May 2024 19:23:50 +0000 (19:23 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 7 May 2024 07:56:10 +0000 (15:56 +0800)
The SCLK_USB3OTG_REF clocks is used as reference clock for USB3 block.

Add simple support to get rate of SCLK_USB3OTG_REF clocks to fix
reference clock period configuration.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/clk/rockchip/clk_rk3328.c

index 87075ec71340ee6c49d1998adb4ab0879d3bd9cf..314b903eaa03ea8b05044bbd4408da99946106f7 100644 (file)
@@ -706,6 +706,9 @@ static ulong rk3328_clk_get_rate(struct clk *clk)
        case PCLK_HDMIPHY:
                rate = rk3328_hdmiphy_get_clk(priv->cru);
                break;
+       case SCLK_USB3OTG_REF:
+               rate = OSC_HZ;
+               break;
        default:
                return -ENOENT;
        }
@@ -780,6 +783,7 @@ static ulong rk3328_clk_set_rate(struct clk *clk, ulong rate)
        case PCLK_DDR:
        case ACLK_GMAC:
        case PCLK_GMAC:
+       case SCLK_USB3OTG_REF:
        case SCLK_USB3OTG_SUSPEND:
        case USB480M:
                return 0;