Skip to content

Commit fc7dd51

Browse files
prabhakarladgeertu
authored andcommitted
clk: renesas: r9a09g057: Add XSPI clock/reset
Add clock and reset entries for the XSPI interface on the R9A09G057 SoC. While at it, rename CLK_PLLCM33_DIV4_PLLCM33 to CLK_PLLCM33_GEAR to align with the terminology used in the hardware manual. Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 20e3120 commit fc7dd51

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

drivers/clk/renesas/r9a09g057-cpg.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ enum clk_ids {
3636
CLK_PLLCM33_DIV3,
3737
CLK_PLLCM33_DIV4,
3838
CLK_PLLCM33_DIV5,
39-
CLK_PLLCM33_DIV4_PLLCM33,
4039
CLK_PLLCM33_DIV16,
40+
CLK_PLLCM33_GEAR,
4141
CLK_SMUX2_XSPI_CLK0,
4242
CLK_SMUX2_XSPI_CLK1,
4343
CLK_PLLCM33_XSPI,
@@ -134,7 +134,7 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
134134
DEF_FIXED(".pllcm33_div3", CLK_PLLCM33_DIV3, CLK_PLLCM33, 1, 3),
135135
DEF_FIXED(".pllcm33_div4", CLK_PLLCM33_DIV4, CLK_PLLCM33, 1, 4),
136136
DEF_FIXED(".pllcm33_div5", CLK_PLLCM33_DIV5, CLK_PLLCM33, 1, 5),
137-
DEF_DDIV(".pllcm33_div4_pllcm33", CLK_PLLCM33_DIV4_PLLCM33,
137+
DEF_DDIV(".pllcm33_gear", CLK_PLLCM33_GEAR,
138138
CLK_PLLCM33_DIV4, CDDIV0_DIVCTL1, dtable_2_64),
139139
DEF_FIXED(".pllcm33_div16", CLK_PLLCM33_DIV16, CLK_PLLCM33, 1, 16),
140140
DEF_SMUX(".smux2_xspi_clk0", CLK_SMUX2_XSPI_CLK0, SSEL1_SELCTL2, smux2_xspi_clk0),
@@ -189,10 +189,12 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
189189
CLK_PLLETH_DIV_125_FIX, 1, 1),
190190
DEF_FIXED("gbeth_1_clk_ptp_ref_i", R9A09G057_GBETH_1_CLK_PTP_REF_I,
191191
CLK_PLLETH_DIV_125_FIX, 1, 1),
192+
DEF_FIXED_MOD_STATUS("spi_clk_spi", R9A09G057_SPI_CLK_SPI, CLK_PLLCM33_XSPI, 1, 2,
193+
FIXED_MOD_CONF_XSPI),
192194
};
193195

194196
static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
195-
DEF_MOD("dmac_0_aclk", CLK_PLLCM33_DIV4_PLLCM33, 0, 0, 0, 0,
197+
DEF_MOD("dmac_0_aclk", CLK_PLLCM33_GEAR, 0, 0, 0, 0,
196198
BUS_MSTOP(5, BIT(9))),
197199
DEF_MOD("dmac_1_aclk", CLK_PLLDTY_ACPU_DIV2, 0, 1, 0, 1,
198200
BUS_MSTOP(3, BIT(2))),
@@ -276,6 +278,12 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
276278
BUS_MSTOP(1, BIT(7))),
277279
DEF_MOD("riic_7_ckm", CLK_PLLCLN_DIV16, 9, 11, 4, 27,
278280
BUS_MSTOP(1, BIT(8))),
281+
DEF_MOD("spi_hclk", CLK_PLLCM33_GEAR, 9, 15, 4, 31,
282+
BUS_MSTOP(4, BIT(5))),
283+
DEF_MOD("spi_aclk", CLK_PLLCM33_GEAR, 10, 0, 5, 0,
284+
BUS_MSTOP(4, BIT(5))),
285+
DEF_MOD("spi_clk_spix2", CLK_PLLCM33_XSPI, 10, 1, 5, 2,
286+
BUS_MSTOP(4, BIT(5))),
279287
DEF_MOD("sdhi_0_imclk", CLK_PLLCLN_DIV8, 10, 3, 5, 3,
280288
BUS_MSTOP(8, BIT(2))),
281289
DEF_MOD("sdhi_0_imclk2", CLK_PLLCLN_DIV8, 10, 4, 5, 4,
@@ -404,6 +412,8 @@ static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
404412
DEF_RST(9, 14, 4, 15), /* RIIC_6_MRST */
405413
DEF_RST(9, 15, 4, 16), /* RIIC_7_MRST */
406414
DEF_RST(10, 0, 4, 17), /* RIIC_8_MRST */
415+
DEF_RST(10, 3, 4, 20), /* SPI_HRESETN */
416+
DEF_RST(10, 4, 4, 21), /* SPI_ARESETN */
407417
DEF_RST(10, 7, 4, 24), /* SDHI_0_IXRST */
408418
DEF_RST(10, 8, 4, 25), /* SDHI_1_IXRST */
409419
DEF_RST(10, 9, 4, 26), /* SDHI_2_IXRST */

0 commit comments

Comments
 (0)