Skip to content

Commit e781bff

Browse files
Elaine Zhangmmind
authored andcommitted
clk: rockchip: Add new pll type pll_rk3588_ddr
That PLL type is similar to the other rk3588 pll types but the actual rate is twice the configured rate. Therefore, the returned calculated rate must be multiplied by two. Signed-off-by: Elaine Zhang <[email protected]> Signed-off-by: Detlev Casanova <[email protected]> Acked-by: Dragan Simic <[email protected]> Link: https://lore.kernel.org/r/0102019199a76ec4-9d5846d4-d76a-4e69-a241-c88c2983d607-000000@eu-west-1.amazonses.com Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 49c0445 commit e781bff

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/clk/rockchip/clk-pll.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,10 @@ static unsigned long rockchip_rk3588_pll_recalc_rate(struct clk_hw *hw, unsigned
914914
}
915915
rate64 = rate64 >> cur.s;
916916

917-
return (unsigned long)rate64;
917+
if (pll->type == pll_rk3588_ddr)
918+
return (unsigned long)rate64 * 2;
919+
else
920+
return (unsigned long)rate64;
918921
}
919922

920923
static int rockchip_rk3588_pll_set_params(struct rockchip_clk_pll *pll,
@@ -1167,6 +1170,7 @@ struct clk *rockchip_clk_register_pll(struct rockchip_clk_provider *ctx,
11671170
break;
11681171
case pll_rk3588:
11691172
case pll_rk3588_core:
1173+
case pll_rk3588_ddr:
11701174
if (!pll->rate_table)
11711175
init.ops = &rockchip_rk3588_pll_clk_norate_ops;
11721176
else

drivers/clk/rockchip/clk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ enum rockchip_pll_type {
287287
pll_rk3399,
288288
pll_rk3588,
289289
pll_rk3588_core,
290+
pll_rk3588_ddr,
290291
};
291292

292293
#define RK3036_PLL_RATE(_rate, _refdiv, _fbdiv, _postdiv1, \

0 commit comments

Comments
 (0)