Skip to content

Commit 887f655

Browse files
committed
Merge tag 'sunxi-clk-for-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Chen-Yu Tsai: Just one change for this cycle, implementing support for the r-spi module clock in the A523 PRCM block, which was somehow missing during the initial bring-up. * tag 'sunxi-clk-for-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: sun55i-a523-r: Add missing r-spi module clock
2 parents c369299 + fb20ccf commit 887f655

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,22 @@ static SUNXI_CCU_MUX_DATA_WITH_GATE(r_pwmctrl_clk, "r-pwmctrl",
8383
static SUNXI_CCU_GATE_HW(bus_r_pwmctrl_clk, "bus-r-pwmctrl",
8484
&r_apb0_clk.common.hw, 0x13c, BIT(0), 0);
8585

86-
/* SPI clock is /M/N (same as new MMC?) */
86+
static const struct clk_parent_data r_spi_parents[] = {
87+
{ .fw_name = "hosc" },
88+
{ .fw_name = "pll-periph" },
89+
{ .name = "pll-periph0-300M" },
90+
{ .name = "pll-periph1-300M" },
91+
{ .name = "pll-audio" },
92+
};
93+
static SUNXI_CCU_DUALDIV_MUX_GATE(r_spi_clk, "r-spi", r_spi_parents, 0x150,
94+
0, 5, /* M */
95+
8, 5, /* P */
96+
24, 3, /* mux */
97+
BIT(31), /* gate */
98+
0);
8799
static SUNXI_CCU_GATE_HW(bus_r_spi_clk, "bus-r-spi",
88100
&r_ahb_clk.common.hw, 0x15c, BIT(0), 0);
101+
89102
static SUNXI_CCU_GATE_HW(bus_r_spinlock_clk, "bus-r-spinlock",
90103
&r_ahb_clk.common.hw, 0x16c, BIT(0), 0);
91104
static SUNXI_CCU_GATE_HW(bus_r_msgbox_clk, "bus-r-msgbox",
@@ -138,6 +151,7 @@ static struct ccu_common *sun55i_a523_r_ccu_clks[] = {
138151
&bus_r_twd_clk.common,
139152
&r_pwmctrl_clk.common,
140153
&bus_r_pwmctrl_clk.common,
154+
&r_spi_clk.common,
141155
&bus_r_spi_clk.common,
142156
&bus_r_spinlock_clk.common,
143157
&bus_r_msgbox_clk.common,
@@ -169,6 +183,7 @@ static struct clk_hw_onecell_data sun55i_a523_r_hw_clks = {
169183
[CLK_BUS_R_TWD] = &bus_r_twd_clk.common.hw,
170184
[CLK_R_PWMCTRL] = &r_pwmctrl_clk.common.hw,
171185
[CLK_BUS_R_PWMCTRL] = &bus_r_pwmctrl_clk.common.hw,
186+
[CLK_R_SPI] = &r_spi_clk.common.hw,
172187
[CLK_BUS_R_SPI] = &bus_r_spi_clk.common.hw,
173188
[CLK_BUS_R_SPINLOCK] = &bus_r_spinlock_clk.common.hw,
174189
[CLK_BUS_R_MSGBOX] = &bus_r_msgbox_clk.common.hw,

0 commit comments

Comments
 (0)