Skip to content

Commit 93f2878

Browse files
prabhakarladgeertu
authored andcommitted
clk: renesas: r9a09g057: Add clock and reset entries for USB2
Add clock and reset entries for USB2. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250407165202.197570-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 4902413 commit 93f2878

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

drivers/clk/renesas/r9a09g057-cpg.c

Lines changed: 19 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 = R9A09G057_IOTOP_0_SHCLK,
19+
LAST_DT_CORE_CLK = R9A09G057_GBETH_1_CLK_PTP_REF_I,
2020

2121
/* External Input Clocks */
2222
CLK_AUDIO_EXTAL,
@@ -41,6 +41,7 @@ enum clk_ids {
4141
CLK_PLLDTY_ACPU,
4242
CLK_PLLDTY_ACPU_DIV2,
4343
CLK_PLLDTY_ACPU_DIV4,
44+
CLK_PLLDTY_DIV8,
4445
CLK_PLLDTY_DIV16,
4546
CLK_PLLDTY_RCPU,
4647
CLK_PLLDTY_RCPU_DIV4,
@@ -104,6 +105,7 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
104105
DEF_DDIV(".plldty_acpu", CLK_PLLDTY_ACPU, CLK_PLLDTY, CDDIV0_DIVCTL2, dtable_2_64),
105106
DEF_FIXED(".plldty_acpu_div2", CLK_PLLDTY_ACPU_DIV2, CLK_PLLDTY_ACPU, 1, 2),
106107
DEF_FIXED(".plldty_acpu_div4", CLK_PLLDTY_ACPU_DIV4, CLK_PLLDTY_ACPU, 1, 4),
108+
DEF_FIXED(".plldty_div8", CLK_PLLDTY_DIV8, CLK_PLLDTY, 1, 8),
107109
DEF_FIXED(".plldty_div16", CLK_PLLDTY_DIV16, CLK_PLLDTY, 1, 16),
108110
DEF_DDIV(".plldty_rcpu", CLK_PLLDTY_RCPU, CLK_PLLDTY, CDDIV3_DIVCTL2, dtable_2_64),
109111
DEF_FIXED(".plldty_rcpu_div4", CLK_PLLDTY_RCPU_DIV4, CLK_PLLDTY_RCPU, 1, 4),
@@ -126,6 +128,8 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
126128
DEF_DDIV("ca55_0_coreclk3", R9A09G057_CA55_0_CORE_CLK3, CLK_PLLCA55,
127129
CDDIV1_DIVCTL3, dtable_1_8),
128130
DEF_FIXED("iotop_0_shclk", R9A09G057_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
131+
DEF_FIXED("usb2_0_clk_core0", R9A09G057_USB2_0_CLK_CORE0, CLK_QEXTAL, 1, 1),
132+
DEF_FIXED("usb2_0_clk_core1", R9A09G057_USB2_0_CLK_CORE1, CLK_QEXTAL, 1, 1),
129133
};
130134

131135
static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
@@ -219,6 +223,16 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
219223
BUS_MSTOP(8, BIT(4))),
220224
DEF_MOD("sdhi_2_aclk", CLK_PLLDTY_ACPU_DIV4, 10, 14, 5, 14,
221225
BUS_MSTOP(8, BIT(4))),
226+
DEF_MOD("usb2_0_u2h0_hclk", CLK_PLLDTY_DIV8, 11, 3, 5, 19,
227+
BUS_MSTOP(7, BIT(7))),
228+
DEF_MOD("usb2_0_u2h1_hclk", CLK_PLLDTY_DIV8, 11, 4, 5, 20,
229+
BUS_MSTOP(7, BIT(8))),
230+
DEF_MOD("usb2_0_u2p_exr_cpuclk", CLK_PLLDTY_ACPU_DIV4, 11, 5, 5, 21,
231+
BUS_MSTOP(7, BIT(9))),
232+
DEF_MOD("usb2_0_pclk_usbtst0", CLK_PLLDTY_ACPU_DIV4, 11, 6, 5, 22,
233+
BUS_MSTOP(7, BIT(10))),
234+
DEF_MOD("usb2_0_pclk_usbtst1", CLK_PLLDTY_ACPU_DIV4, 11, 7, 5, 23,
235+
BUS_MSTOP(7, BIT(11))),
222236
DEF_MOD("cru_0_aclk", CLK_PLLDTY_ACPU_DIV2, 13, 2, 6, 18,
223237
BUS_MSTOP(9, BIT(4))),
224238
DEF_MOD_NO_PM("cru_0_vclk", CLK_PLLVDO_CRU0, 13, 3, 6, 19,
@@ -286,6 +300,10 @@ static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
286300
DEF_RST(10, 7, 4, 24), /* SDHI_0_IXRST */
287301
DEF_RST(10, 8, 4, 25), /* SDHI_1_IXRST */
288302
DEF_RST(10, 9, 4, 26), /* SDHI_2_IXRST */
303+
DEF_RST(10, 12, 4, 29), /* USB2_0_U2H0_HRESETN */
304+
DEF_RST(10, 13, 4, 30), /* USB2_0_U2H1_HRESETN */
305+
DEF_RST(10, 14, 4, 31), /* USB2_0_U2P_EXL_SYSRST */
306+
DEF_RST(10, 15, 5, 0), /* USB2_0_PRESETN */
289307
DEF_RST(12, 5, 5, 22), /* CRU_0_PRESETN */
290308
DEF_RST(12, 6, 5, 23), /* CRU_0_ARESETN */
291309
DEF_RST(12, 7, 5, 24), /* CRU_0_S_RESETN */

0 commit comments

Comments
 (0)