Skip to content

Commit 3323915

Browse files
parakabebarino
authored andcommitted
clk: ralink: mtmips: fix clock plan for Ralink SoC RT3883
Clock plan for Ralink SoC RT3883 needs an extra 'periph' clock to properly set some peripherals that has this clock as their parent. When this driver was mainlined we could not find any active users of this SoC so we cannot perform any real tests for it. Now, one user of a Belkin f9k1109 version 1 device which uses this SoC appear and reported some issues in openWRT: - openwrt/openwrt#16054 The peripherals that are wrong are 'uart', 'i2c', 'i2s' and 'uartlite' which has a not defined 'periph' clock as parent. Hence, introduce it to have a properly working clock plan for this SoC. Fixes: 6f3b155 ("clk: ralink: add clock and reset driver for MTMIPS SoCs") Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20240910044024.120009-2-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 9bf7cfd commit 3323915

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

drivers/clk/ralink/clk-mtmips.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ static struct mtmips_clk_fixed rt305x_fixed_clocks[] = {
267267
CLK_FIXED("xtal", NULL, 40000000)
268268
};
269269

270+
static struct mtmips_clk_fixed rt3883_fixed_clocks[] = {
271+
CLK_FIXED("xtal", NULL, 40000000),
272+
CLK_FIXED("periph", "xtal", 40000000)
273+
};
274+
270275
static struct mtmips_clk_fixed rt3352_fixed_clocks[] = {
271276
CLK_FIXED("periph", "xtal", 40000000)
272277
};
@@ -779,8 +784,8 @@ static const struct mtmips_clk_data rt3352_clk_data = {
779784
static const struct mtmips_clk_data rt3883_clk_data = {
780785
.clk_base = rt3883_clks_base,
781786
.num_clk_base = ARRAY_SIZE(rt3883_clks_base),
782-
.clk_fixed = rt305x_fixed_clocks,
783-
.num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks),
787+
.clk_fixed = rt3883_fixed_clocks,
788+
.num_clk_fixed = ARRAY_SIZE(rt3883_fixed_clocks),
784789
.clk_factor = NULL,
785790
.num_clk_factor = 0,
786791
.clk_periph = rt5350_pherip_clks,

0 commit comments

Comments
 (0)