Skip to content

Commit e43b186

Browse files
Tommaso Merciaigeertu
authored andcommitted
clk: renesas: r9a09g047: Add clock and reset entries for USB2
Add clock and reset entries for USB2. Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20251001212709.579080-10-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent daa5a9b commit e43b186

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

drivers/clk/renesas/r9a09g047-cpg.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
enum clk_ids {
1818
/* Core Clock Outputs exported to DT */
19-
LAST_DT_CORE_CLK = R9A09G047_USB3_0_CLKCORE,
19+
LAST_DT_CORE_CLK = R9A09G047_USB2_0_CLK_CORE1,
2020

2121
/* External Input Clocks */
2222
CLK_AUDIO_EXTAL,
@@ -177,6 +177,8 @@ static const struct cpg_core_clk r9a09g047_core_clks[] __initconst = {
177177
CDDIV1_DIVCTL3, dtable_1_8),
178178
DEF_FIXED("iotop_0_shclk", R9A09G047_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
179179
DEF_FIXED("spi_clk_spi", R9A09G047_SPI_CLK_SPI, CLK_PLLCM33_XSPI, 1, 2),
180+
DEF_FIXED("usb2_0_clk_core0", R9A09G047_USB2_0_CLK_CORE0, CLK_QEXTAL, 1, 1),
181+
DEF_FIXED("usb2_0_clk_core1", R9A09G047_USB2_0_CLK_CORE1, CLK_QEXTAL, 1, 1),
180182
DEF_FIXED("gbeth_0_clk_ptp_ref_i", R9A09G047_GBETH_0_CLK_PTP_REF_I,
181183
CLK_PLLETH_DIV_125_FIX, 1, 1),
182184
DEF_FIXED("gbeth_1_clk_ptp_ref_i", R9A09G047_GBETH_1_CLK_PTP_REF_I,
@@ -282,6 +284,16 @@ static const struct rzv2h_mod_clk r9a09g047_mod_clks[] __initconst = {
282284
BUS_MSTOP(7, BIT(12))),
283285
DEF_MOD("usb3_0_pclk_usbtst", CLK_PLLDTY_ACPU_DIV4, 11, 0, 5, 16,
284286
BUS_MSTOP(7, BIT(14))),
287+
DEF_MOD("usb2_0_u2h0_hclk", CLK_PLLDTY_DIV8, 11, 3, 5, 19,
288+
BUS_MSTOP(7, BIT(7))),
289+
DEF_MOD("usb2_0_u2h1_hclk", CLK_PLLDTY_DIV8, 11, 4, 5, 20,
290+
BUS_MSTOP(7, BIT(8))),
291+
DEF_MOD("usb2_0_u2p_exr_cpuclk", CLK_PLLDTY_ACPU_DIV4, 11, 5, 5, 21,
292+
BUS_MSTOP(7, BIT(9))),
293+
DEF_MOD("usb2_0_pclk_usbtst0", CLK_PLLDTY_ACPU_DIV4, 11, 6, 5, 22,
294+
BUS_MSTOP(7, BIT(10))),
295+
DEF_MOD("usb2_0_pclk_usbtst1", CLK_PLLDTY_ACPU_DIV4, 11, 7, 5, 23,
296+
BUS_MSTOP(7, BIT(11))),
285297
DEF_MOD_MUX_EXTERNAL("gbeth_0_clk_tx_i", CLK_SMUX2_GBE0_TXCLK, 11, 8, 5, 24,
286298
BUS_MSTOP(8, BIT(5)), 1),
287299
DEF_MOD_MUX_EXTERNAL("gbeth_0_clk_rx_i", CLK_SMUX2_GBE0_RXCLK, 11, 9, 5, 25,
@@ -359,6 +371,10 @@ static const struct rzv2h_reset r9a09g047_resets[] __initconst = {
359371
DEF_RST(10, 8, 4, 25), /* SDHI_1_IXRST */
360372
DEF_RST(10, 9, 4, 26), /* SDHI_2_IXRST */
361373
DEF_RST(10, 10, 4, 27), /* USB3_0_ARESETN */
374+
DEF_RST(10, 12, 4, 29), /* USB2_0_U2H0_HRESETN */
375+
DEF_RST(10, 13, 4, 30), /* USB2_0_U2H1_HRESETN */
376+
DEF_RST(10, 14, 4, 31), /* USB2_0_U2P_EXL_SYSRST */
377+
DEF_RST(10, 15, 5, 0), /* USB2_0_PRESETN */
362378
DEF_RST(11, 0, 5, 1), /* GBETH_0_ARESETN_I */
363379
DEF_RST(11, 1, 5, 2), /* GBETH_1_ARESETN_I */
364380
DEF_RST(12, 5, 5, 22), /* CRU_0_PRESETN */

0 commit comments

Comments
 (0)