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: r9a09g057: Add clock and reset entries for DSI and LCDC

Add clock and reset entries for the DSI and LCDC peripherals.

Co-developed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251015192611.241920-5-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
66a470ab d67c39be

+65
+62
drivers/clk/renesas/r9a09g057-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> ··· 31 30 CLK_PLLCA55, 32 31 CLK_PLLVDO, 33 32 CLK_PLLETH, 33 + CLK_PLLDSI, 34 34 CLK_PLLGPU, 35 35 36 36 /* Internal Core Clocks */ ··· 66 64 CLK_SMUX2_GBE0_RXCLK, 67 65 CLK_SMUX2_GBE1_TXCLK, 68 66 CLK_SMUX2_GBE1_RXCLK, 67 + CLK_CDIV4_PLLETH_LPCLK, 68 + CLK_PLLETH_LPCLK_GEAR, 69 + CLK_PLLDSI_GEAR, 69 70 CLK_PLLGPU_GEAR, 70 71 71 72 /* Module Clocks */ ··· 97 92 {0, 0}, 98 93 }; 99 94 95 + static const struct clk_div_table dtable_2_32[] = { 96 + {0, 2}, 97 + {1, 4}, 98 + {2, 6}, 99 + {3, 8}, 100 + {4, 10}, 101 + {5, 12}, 102 + {6, 14}, 103 + {7, 16}, 104 + {8, 18}, 105 + {9, 20}, 106 + {10, 22}, 107 + {11, 24}, 108 + {12, 26}, 109 + {13, 28}, 110 + {14, 30}, 111 + {15, 32}, 112 + {0, 0}, 113 + }; 114 + 100 115 static const struct clk_div_table dtable_2_64[] = { 101 116 {0, 2}, 102 117 {1, 4}, ··· 132 107 {2, 100}, 133 108 {0, 0}, 134 109 }; 110 + 111 + static const struct clk_div_table dtable_16_128[] = { 112 + {0, 16}, 113 + {1, 32}, 114 + {2, 64}, 115 + {3, 128}, 116 + {0, 0}, 117 + }; 118 + 119 + RZV2H_CPG_PLL_DSI_LIMITS(rzv2h_cpg_pll_dsi_limits); 120 + #define PLLDSI PLL_PACK_LIMITS(0xc0, 1, 0, &rzv2h_cpg_pll_dsi_limits) 135 121 136 122 /* Mux clock tables */ 137 123 static const char * const smux2_gbe0_rxclk[] = { ".plleth_gbe0", "et0_rxclk" }; ··· 165 129 DEF_PLL(".pllca55", CLK_PLLCA55, CLK_QEXTAL, PLLCA55), 166 130 DEF_FIXED(".pllvdo", CLK_PLLVDO, CLK_QEXTAL, 105, 2), 167 131 DEF_FIXED(".plleth", CLK_PLLETH, CLK_QEXTAL, 125, 3), 132 + DEF_PLLDSI(".plldsi", CLK_PLLDSI, CLK_QEXTAL, PLLDSI), 168 133 DEF_PLL(".pllgpu", CLK_PLLGPU, CLK_QEXTAL, PLLGPU), 169 134 170 135 /* Internal Core Clocks */ ··· 207 170 DEF_SMUX(".smux2_gbe0_rxclk", CLK_SMUX2_GBE0_RXCLK, SSEL0_SELCTL3, smux2_gbe0_rxclk), 208 171 DEF_SMUX(".smux2_gbe1_txclk", CLK_SMUX2_GBE1_TXCLK, SSEL1_SELCTL0, smux2_gbe1_txclk), 209 172 DEF_SMUX(".smux2_gbe1_rxclk", CLK_SMUX2_GBE1_RXCLK, SSEL1_SELCTL1, smux2_gbe1_rxclk), 173 + DEF_FIXED(".cdiv4_plleth_lpclk", CLK_CDIV4_PLLETH_LPCLK, CLK_PLLETH, 1, 4), 174 + DEF_CSDIV(".plleth_lpclk_gear", CLK_PLLETH_LPCLK_GEAR, CLK_CDIV4_PLLETH_LPCLK, 175 + CSDIV0_DIVCTL2, dtable_16_128), 176 + 177 + DEF_PLLDSI_DIV(".plldsi_gear", CLK_PLLDSI_GEAR, CLK_PLLDSI, 178 + CSDIV1_DIVCTL2, dtable_2_32), 210 179 211 180 DEF_DDIV(".pllgpu_gear", CLK_PLLGPU_GEAR, CLK_PLLGPU, CDDIV3_DIVCTL1, dtable_2_64), 212 181 ··· 426 383 BUS_MSTOP(9, BIT(9))), 427 384 DEF_MOD("isp_0_isp_sclk", CLK_PLLVDO_ISP, 14, 5, 7, 5, 428 385 BUS_MSTOP(9, BIT(9))), 386 + DEF_MOD("dsi_0_pclk", CLK_PLLDTY_DIV16, 14, 8, 7, 8, 387 + BUS_MSTOP(9, BIT(14) | BIT(15))), 388 + DEF_MOD("dsi_0_aclk", CLK_PLLDTY_ACPU_DIV2, 14, 9, 7, 9, 389 + BUS_MSTOP(9, BIT(14) | BIT(15))), 390 + DEF_MOD("dsi_0_vclk1", CLK_PLLDSI_GEAR, 14, 10, 7, 10, 391 + BUS_MSTOP(9, BIT(14) | BIT(15))), 392 + DEF_MOD("dsi_0_lpclk", CLK_PLLETH_LPCLK_GEAR, 14, 11, 7, 11, 393 + BUS_MSTOP(9, BIT(14) | BIT(15))), 394 + DEF_MOD("dsi_0_pllref_clk", CLK_QEXTAL, 14, 12, 7, 12, 395 + BUS_MSTOP(9, BIT(14) | BIT(15))), 396 + DEF_MOD("lcdc_0_clk_a", CLK_PLLDTY_ACPU_DIV2, 14, 13, 7, 13, 397 + BUS_MSTOP(10, BIT(1) | BIT(2) | BIT(3))), 398 + DEF_MOD("lcdc_0_clk_p", CLK_PLLDTY_DIV16, 14, 14, 7, 14, 399 + BUS_MSTOP(10, BIT(1) | BIT(2) | BIT(3))), 400 + DEF_MOD("lcdc_0_clk_d", CLK_PLLDSI_GEAR, 14, 15, 7, 15, 401 + BUS_MSTOP(10, BIT(1) | BIT(2) | BIT(3))), 429 402 DEF_MOD("gpu_0_clk", CLK_PLLGPU_GEAR, 15, 0, 7, 16, 430 403 BUS_MSTOP(3, BIT(4))), 431 404 DEF_MOD("gpu_0_axi_clk", CLK_PLLDTY_ACPU_DIV2, 15, 1, 7, 17, ··· 523 464 DEF_RST(13, 2, 6, 3), /* ISP_0_REG_ARESETN */ 524 465 DEF_RST(13, 3, 6, 4), /* ISP_0_ISP_SRESETN */ 525 466 DEF_RST(13, 4, 6, 5), /* ISP_0_PRESETN */ 467 + DEF_RST(13, 7, 6, 8), /* DSI_0_PRESETN */ 468 + DEF_RST(13, 8, 6, 9), /* DSI_0_ARESETN */ 469 + DEF_RST(13, 12, 6, 13), /* LCDC_0_RESET_N */ 526 470 DEF_RST(13, 13, 6, 14), /* GPU_0_RESETN */ 527 471 DEF_RST(13, 14, 6, 15), /* GPU_0_AXI_RESETN */ 528 472 DEF_RST(13, 15, 6, 16), /* GPU_0_ACE_RESETN */
+3
drivers/clk/renesas/rzv2h-cpg.h
··· 127 127 #define CPG_CDDIV3 (0x40C) 128 128 #define CPG_CDDIV4 (0x410) 129 129 #define CPG_CSDIV0 (0x500) 130 + #define CPG_CSDIV1 (0x504) 130 131 131 132 #define CDDIV0_DIVCTL1 DDIV_PACK(CPG_CDDIV0, 4, 3, 1) 132 133 #define CDDIV0_DIVCTL2 DDIV_PACK(CPG_CDDIV0, 8, 3, 2) ··· 145 144 146 145 #define CSDIV0_DIVCTL0 DDIV_PACK(CPG_CSDIV0, 0, 2, CSDIV_NO_MON) 147 146 #define CSDIV0_DIVCTL1 DDIV_PACK(CPG_CSDIV0, 4, 2, CSDIV_NO_MON) 147 + #define CSDIV0_DIVCTL2 DDIV_PACK(CPG_CSDIV0, 8, 2, CSDIV_NO_MON) 148 148 #define CSDIV0_DIVCTL3 DDIV_PACK_NO_RMW(CPG_CSDIV0, 12, 2, CSDIV_NO_MON) 149 + #define CSDIV1_DIVCTL2 DDIV_PACK(CPG_CSDIV1, 8, 4, CSDIV_NO_MON) 149 150 150 151 #define SSEL0_SELCTL2 SMUX_PACK(CPG_SSEL0, 8, 1) 151 152 #define SSEL0_SELCTL3 SMUX_PACK(CPG_SSEL0, 12, 1)