Skip to content

Commit 28548f3

Browse files
bijudasgeertu
authored andcommitted
clk: renesas: r9a09g047: Add XSPI clock/reset
Add XSPI clock and reset entries. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250424081400.135028-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 38a7eb9 commit 28548f3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/clk/renesas/r9a09g047-cpg.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ enum clk_ids {
3535
CLK_PLLCM33_DIV4,
3636
CLK_PLLCM33_DIV5,
3737
CLK_PLLCM33_DIV16,
38+
CLK_PLLCM33_GEAR,
3839
CLK_SMUX2_XSPI_CLK0,
3940
CLK_SMUX2_XSPI_CLK1,
4041
CLK_PLLCM33_XSPI,
@@ -107,6 +108,8 @@ static const struct cpg_core_clk r9a09g047_core_clks[] __initconst = {
107108
DEF_FIXED(".pllcm33_div5", CLK_PLLCM33_DIV5, CLK_PLLCM33, 1, 5),
108109
DEF_FIXED(".pllcm33_div16", CLK_PLLCM33_DIV16, CLK_PLLCM33, 1, 16),
109110

111+
DEF_DDIV(".pllcm33_gear", CLK_PLLCM33_GEAR, CLK_PLLCM33_DIV4, CDDIV0_DIVCTL1, dtable_2_64),
112+
110113
DEF_SMUX(".smux2_xspi_clk0", CLK_SMUX2_XSPI_CLK0, SSEL1_SELCTL2, smux2_xspi_clk0),
111114
DEF_SMUX(".smux2_xspi_clk1", CLK_SMUX2_XSPI_CLK1, SSEL1_SELCTL3, smux2_xspi_clk1),
112115
DEF_CSDIV(".pllcm33_xspi", CLK_PLLCM33_XSPI, CLK_SMUX2_XSPI_CLK1, CSDIV0_DIVCTL3,
@@ -135,6 +138,7 @@ static const struct cpg_core_clk r9a09g047_core_clks[] __initconst = {
135138
DEF_DDIV("ca55_0_coreclk3", R9A09G047_CA55_0_CORECLK3, CLK_PLLCA55,
136139
CDDIV1_DIVCTL3, dtable_1_8),
137140
DEF_FIXED("iotop_0_shclk", R9A09G047_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
141+
DEF_FIXED("spi_clk_spi", R9A09G047_SPI_CLK_SPI, CLK_PLLCM33_XSPI, 1, 2),
138142
};
139143

140144
static const struct rzv2h_mod_clk r9a09g047_mod_clks[] __initconst = {
@@ -180,6 +184,12 @@ static const struct rzv2h_mod_clk r9a09g047_mod_clks[] __initconst = {
180184
BUS_MSTOP(10, BIT(14))),
181185
DEF_MOD("canfd_0_clkc", CLK_PLLCLN_DIV20, 9, 14, 4, 30,
182186
BUS_MSTOP(10, BIT(14))),
187+
DEF_MOD("spi_hclk", CLK_PLLCM33_GEAR, 9, 15, 4, 31,
188+
BUS_MSTOP(4, BIT(5))),
189+
DEF_MOD("spi_aclk", CLK_PLLCM33_GEAR, 10, 0, 5, 0,
190+
BUS_MSTOP(4, BIT(5))),
191+
DEF_MOD_NO_PM("spi_clk_spix2", CLK_PLLCM33_XSPI, 10, 1, 5, 2,
192+
BUS_MSTOP(4, BIT(5))),
183193
DEF_MOD("sdhi_0_imclk", CLK_PLLCLN_DIV8, 10, 3, 5, 3,
184194
BUS_MSTOP(8, BIT(2))),
185195
DEF_MOD("sdhi_0_imclk2", CLK_PLLCLN_DIV8, 10, 4, 5, 4,
@@ -240,6 +250,8 @@ static const struct rzv2h_reset r9a09g047_resets[] __initconst = {
240250
DEF_RST(10, 0, 4, 17), /* RIIC_8_MRST */
241251
DEF_RST(10, 1, 4, 18), /* CANFD_0_RSTP_N */
242252
DEF_RST(10, 2, 4, 19), /* CANFD_0_RSTC_N */
253+
DEF_RST(10, 3, 4, 20), /* SPI_HRESETN */
254+
DEF_RST(10, 4, 4, 21), /* SPI_ARESETN */
243255
DEF_RST(10, 7, 4, 24), /* SDHI_0_IXRST */
244256
DEF_RST(10, 8, 4, 25), /* SDHI_1_IXRST */
245257
DEF_RST(10, 9, 4, 26), /* SDHI_2_IXRST */

0 commit comments

Comments
 (0)