Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: renesas: r9a09g056: Add clocks and resets for DSI and LCDC modules

Add clock and reset definitions required to support the DSI and LCDC
hardware blocks on the RZ/V2N SoC. This includes new core clocks, clock
dividers, module clocks, and reset entries, as well as PLL and divider
configurations specific to these peripherals.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251023210724.666476-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

authored by

Lad Prabhakar and committed by
Geert Uytterhoeven
d64522b5 79276fb0

+64
+64
drivers/clk/renesas/r9a09g056-cpg.c
··· 6 6 */ 7 7 8 8 #include <linux/clk-provider.h> 9 + #include <linux/clk/renesas.h> 9 10 #include <linux/device.h> 10 11 #include <linux/init.h> 11 12 #include <linux/kernel.h> ··· 30 29 CLK_PLLDTY, 31 30 CLK_PLLCA55, 32 31 CLK_PLLETH, 32 + CLK_PLLDSI, 33 33 CLK_PLLGPU, 34 34 35 35 /* Internal Core Clocks */ ··· 49 47 CLK_PLLDTY_ACPU_DIV2, 50 48 CLK_PLLDTY_ACPU_DIV4, 51 49 CLK_PLLDTY_DIV8, 50 + CLK_PLLDTY_DIV16, 52 51 CLK_PLLETH_DIV_250_FIX, 53 52 CLK_PLLETH_DIV_125_FIX, 54 53 CLK_CSDIV_PLLETH_GBE0, ··· 58 55 CLK_SMUX2_GBE0_RXCLK, 59 56 CLK_SMUX2_GBE1_TXCLK, 60 57 CLK_SMUX2_GBE1_RXCLK, 58 + CLK_CDIV4_PLLETH_LPCLK, 59 + CLK_PLLETH_LPCLK_GEAR, 60 + CLK_PLLDSI_GEAR, 61 61 CLK_PLLGPU_GEAR, 62 62 63 63 /* Module Clocks */ ··· 83 77 {0, 0}, 84 78 }; 85 79 80 + static const struct clk_div_table dtable_2_32[] = { 81 + {0, 2}, 82 + {1, 4}, 83 + {2, 6}, 84 + {3, 8}, 85 + {4, 10}, 86 + {5, 12}, 87 + {6, 14}, 88 + {7, 16}, 89 + {8, 18}, 90 + {9, 20}, 91 + {10, 22}, 92 + {11, 24}, 93 + {12, 26}, 94 + {13, 28}, 95 + {14, 30}, 96 + {15, 32}, 97 + {0, 0}, 98 + }; 99 + 86 100 static const struct clk_div_table dtable_2_64[] = { 87 101 {0, 2}, 88 102 {1, 4}, ··· 118 92 {2, 100}, 119 93 {0, 0}, 120 94 }; 95 + 96 + static const struct clk_div_table dtable_16_128[] = { 97 + {0, 16}, 98 + {1, 32}, 99 + {2, 64}, 100 + {3, 128}, 101 + {0, 0}, 102 + }; 103 + 104 + RZV2H_CPG_PLL_DSI_LIMITS(rzv2n_cpg_pll_dsi_limits); 105 + #define PLLDSI PLL_PACK_LIMITS(0xc0, 1, 0, &rzv2n_cpg_pll_dsi_limits) 121 106 122 107 /* Mux clock tables */ 123 108 static const char * const smux2_gbe0_rxclk[] = { ".plleth_gbe0", "et0_rxclk" }; ··· 150 113 DEF_FIXED(".plldty", CLK_PLLDTY, CLK_QEXTAL, 200, 3), 151 114 DEF_PLL(".pllca55", CLK_PLLCA55, CLK_QEXTAL, PLLCA55), 152 115 DEF_FIXED(".plleth", CLK_PLLETH, CLK_QEXTAL, 125, 3), 116 + DEF_PLLDSI(".plldsi", CLK_PLLDSI, CLK_QEXTAL, PLLDSI), 153 117 DEF_PLL(".pllgpu", CLK_PLLGPU, CLK_QEXTAL, PLLGPU), 154 118 155 119 /* Internal Core Clocks */ ··· 172 134 DEF_FIXED(".plldty_acpu_div2", CLK_PLLDTY_ACPU_DIV2, CLK_PLLDTY_ACPU, 1, 2), 173 135 DEF_FIXED(".plldty_acpu_div4", CLK_PLLDTY_ACPU_DIV4, CLK_PLLDTY_ACPU, 1, 4), 174 136 DEF_FIXED(".plldty_div8", CLK_PLLDTY_DIV8, CLK_PLLDTY, 1, 8), 137 + DEF_FIXED(".plldty_div16", CLK_PLLDTY_DIV16, CLK_PLLDTY, 1, 16), 175 138 176 139 DEF_FIXED(".plleth_250_fix", CLK_PLLETH_DIV_250_FIX, CLK_PLLETH, 1, 4), 177 140 DEF_FIXED(".plleth_125_fix", CLK_PLLETH_DIV_125_FIX, CLK_PLLETH_DIV_250_FIX, 1, 2), ··· 184 145 DEF_SMUX(".smux2_gbe0_rxclk", CLK_SMUX2_GBE0_RXCLK, SSEL0_SELCTL3, smux2_gbe0_rxclk), 185 146 DEF_SMUX(".smux2_gbe1_txclk", CLK_SMUX2_GBE1_TXCLK, SSEL1_SELCTL0, smux2_gbe1_txclk), 186 147 DEF_SMUX(".smux2_gbe1_rxclk", CLK_SMUX2_GBE1_RXCLK, SSEL1_SELCTL1, smux2_gbe1_rxclk), 148 + DEF_FIXED(".cdiv4_plleth_lpclk", CLK_CDIV4_PLLETH_LPCLK, CLK_PLLETH, 1, 4), 149 + DEF_CSDIV(".plleth_lpclk_gear", CLK_PLLETH_LPCLK_GEAR, CLK_CDIV4_PLLETH_LPCLK, 150 + CSDIV0_DIVCTL2, dtable_16_128), 151 + 152 + DEF_PLLDSI_DIV(".plldsi_gear", CLK_PLLDSI_GEAR, CLK_PLLDSI, 153 + CSDIV1_DIVCTL2, dtable_2_32), 187 154 188 155 DEF_DDIV(".pllgpu_gear", CLK_PLLGPU_GEAR, CLK_PLLGPU, CDDIV3_DIVCTL1, dtable_2_64), 189 156 ··· 334 289 BUS_MSTOP(8, BIT(6))), 335 290 DEF_MOD("gbeth_1_aclk_i", CLK_PLLDTY_DIV8, 12, 3, 6, 3, 336 291 BUS_MSTOP(8, BIT(6))), 292 + DEF_MOD("dsi_0_pclk", CLK_PLLDTY_DIV16, 14, 8, 7, 8, 293 + BUS_MSTOP(9, BIT(14) | BIT(15))), 294 + DEF_MOD("dsi_0_aclk", CLK_PLLDTY_ACPU_DIV2, 14, 9, 7, 9, 295 + BUS_MSTOP(9, BIT(14) | BIT(15))), 296 + DEF_MOD("dsi_0_vclk1", CLK_PLLDSI_GEAR, 14, 10, 7, 10, 297 + BUS_MSTOP(9, BIT(14) | BIT(15))), 298 + DEF_MOD("dsi_0_lpclk", CLK_PLLETH_LPCLK_GEAR, 14, 11, 7, 11, 299 + BUS_MSTOP(9, BIT(14) | BIT(15))), 300 + DEF_MOD("dsi_0_pllref_clk", CLK_QEXTAL, 14, 12, 7, 12, 301 + BUS_MSTOP(9, BIT(14) | BIT(15))), 302 + DEF_MOD("lcdc_0_clk_a", CLK_PLLDTY_ACPU_DIV2, 14, 13, 7, 13, 303 + BUS_MSTOP(10, BIT(1) | BIT(2) | BIT(3))), 304 + DEF_MOD("lcdc_0_clk_p", CLK_PLLDTY_DIV16, 14, 14, 7, 14, 305 + BUS_MSTOP(10, BIT(1) | BIT(2) | BIT(3))), 306 + DEF_MOD("lcdc_0_clk_d", CLK_PLLDSI_GEAR, 14, 15, 7, 15, 307 + BUS_MSTOP(10, BIT(1) | BIT(2) | BIT(3))), 337 308 DEF_MOD("gpu_0_clk", CLK_PLLGPU_GEAR, 15, 0, 7, 16, 338 309 BUS_MSTOP(3, BIT(4))), 339 310 DEF_MOD("gpu_0_axi_clk", CLK_PLLDTY_ACPU_DIV2, 15, 1, 7, 17, ··· 396 335 DEF_RST(10, 15, 5, 0), /* USB2_0_PRESETN */ 397 336 DEF_RST(11, 0, 5, 1), /* GBETH_0_ARESETN_I */ 398 337 DEF_RST(11, 1, 5, 2), /* GBETH_1_ARESETN_I */ 338 + DEF_RST(13, 7, 6, 8), /* DSI_0_PRESETN */ 339 + DEF_RST(13, 8, 6, 9), /* DSI_0_ARESETN */ 340 + DEF_RST(13, 12, 6, 13), /* LCDC_0_RESET_N */ 399 341 DEF_RST(13, 13, 6, 14), /* GPU_0_RESETN */ 400 342 DEF_RST(13, 14, 6, 15), /* GPU_0_AXI_RESETN */ 401 343 DEF_RST(13, 15, 6, 16), /* GPU_0_ACE_RESETN */