Skip to content

Commit c7e5884

Browse files
claudiubezneageertu
authored andcommitted
clk: renesas: r9a08g045: Add clock, reset and power domain support for I2C
Add clock, reset and power domain support for the I2C channels available on the Renesas RZ/G3S SoC. Signed-off-by: Claudiu Beznea <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 1f5ed3a commit c7e5884

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/clk/renesas/r9a08g045-cpg.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ static const struct rzg2l_mod_clk r9a08g045_mod_clks[] = {
213213
DEF_COUPLED("eth1_axi", R9A08G045_ETH1_CLK_AXI, R9A08G045_CLK_M0, 0x57c, 1),
214214
DEF_COUPLED("eth1_chi", R9A08G045_ETH1_CLK_CHI, R9A08G045_CLK_ZT, 0x57c, 1),
215215
DEF_MOD("eth1_refclk", R9A08G045_ETH1_REFCLK, R9A08G045_CLK_HP, 0x57c, 9),
216+
DEF_MOD("i2c0_pclk", R9A08G045_I2C0_PCLK, R9A08G045_CLK_P0, 0x580, 0),
217+
DEF_MOD("i2c1_pclk", R9A08G045_I2C1_PCLK, R9A08G045_CLK_P0, 0x580, 1),
218+
DEF_MOD("i2c2_pclk", R9A08G045_I2C2_PCLK, R9A08G045_CLK_P0, 0x580, 2),
219+
DEF_MOD("i2c3_pclk", R9A08G045_I2C3_PCLK, R9A08G045_CLK_P0, 0x580, 3),
216220
DEF_MOD("scif0_clk_pck", R9A08G045_SCIF0_CLK_PCK, R9A08G045_CLK_P0, 0x584, 0),
217221
DEF_MOD("gpio_hclk", R9A08G045_GPIO_HCLK, R9A08G045_OSCCLK, 0x598, 0),
218222
DEF_MOD("vbat_bclk", R9A08G045_VBAT_BCLK, R9A08G045_OSCCLK, 0x614, 0),
@@ -228,6 +232,10 @@ static const struct rzg2l_reset r9a08g045_resets[] = {
228232
DEF_RST(R9A08G045_SDHI2_IXRST, 0x854, 2),
229233
DEF_RST(R9A08G045_ETH0_RST_HW_N, 0x87c, 0),
230234
DEF_RST(R9A08G045_ETH1_RST_HW_N, 0x87c, 1),
235+
DEF_RST(R9A08G045_I2C0_MRST, 0x880, 0),
236+
DEF_RST(R9A08G045_I2C1_MRST, 0x880, 1),
237+
DEF_RST(R9A08G045_I2C2_MRST, 0x880, 2),
238+
DEF_RST(R9A08G045_I2C3_MRST, 0x880, 3),
231239
DEF_RST(R9A08G045_SCIF0_RST_SYSTEM_N, 0x884, 0),
232240
DEF_RST(R9A08G045_GPIO_RSTN, 0x898, 0),
233241
DEF_RST(R9A08G045_GPIO_PORT_RESETN, 0x898, 1),
@@ -275,6 +283,18 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = {
275283
DEF_PD("eth1", R9A08G045_PD_ETHER1,
276284
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(3)),
277285
RZG2L_PD_F_NONE),
286+
DEF_PD("i2c0", R9A08G045_PD_I2C0,
287+
DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(10)),
288+
RZG2L_PD_F_NONE),
289+
DEF_PD("i2c1", R9A08G045_PD_I2C1,
290+
DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(11)),
291+
RZG2L_PD_F_NONE),
292+
DEF_PD("i2c2", R9A08G045_PD_I2C2,
293+
DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(12)),
294+
RZG2L_PD_F_NONE),
295+
DEF_PD("i2c3", R9A08G045_PD_I2C3,
296+
DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(13)),
297+
RZG2L_PD_F_NONE),
278298
DEF_PD("scif0", R9A08G045_PD_SCIF0,
279299
DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(1)),
280300
RZG2L_PD_F_NONE),

0 commit comments

Comments
 (0)