Skip to content

Commit 47d072b

Browse files
Danielmachonclaudiubeznea
authored andcommitted
clk: lan966x: add support for lan969x SoC clock driver
Add support for the lan969x SoC clock driver in the existing lan966x driver. The lan969x clock controller contains 3 PLLs - cpu_clk, ddr_clk and sys_clk (same as lan966x) which generates and supplies the clock to various peripherals within the SoC. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://lore.kernel.org/r/20240916-lan969x-clock-v1-4-0e150336074d@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1 parent 118c000 commit 47d072b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

drivers/clk/clk-lan966x.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ static const char * const lan966x_clk_names[] = {
3131
"flexcom4", "timer1", "usb_refclk",
3232
};
3333

34+
static const char * const lan969x_clk_names[] = {
35+
"qspi0", "qspi2", "sdmmc0", "sdmmc1",
36+
"mcan0", "mcan1", "flexcom0",
37+
"flexcom1", "flexcom2", "flexcom3",
38+
"timer1", "usb_refclk",
39+
};
40+
3441
struct lan966x_gck {
3542
struct clk_hw hw;
3643
void __iomem *reg;
@@ -61,6 +68,13 @@ static const struct clk_gate_soc_desc lan966x_clk_gate_desc[] = {
6168
{ }
6269
};
6370

71+
static const struct clk_gate_soc_desc lan969x_clk_gate_desc[] = {
72+
{ "usb_drd", 10 },
73+
{ "mcramc", 9 },
74+
{ "hmatrix", 8 },
75+
{ }
76+
};
77+
6478
struct lan966x_match_data {
6579
char *name;
6680
const char * const *clk_name;
@@ -77,6 +91,14 @@ static struct lan966x_match_data lan966x_desc = {
7791
.num_generic_clks = 14,
7892
};
7993

94+
static struct lan966x_match_data lan969x_desc = {
95+
.name = "lan969x",
96+
.clk_name = lan969x_clk_names,
97+
.clk_gate_desc = lan969x_clk_gate_desc,
98+
.num_total_clks = 15,
99+
.num_generic_clks = 12,
100+
};
101+
80102
static DEFINE_SPINLOCK(clk_gate_lock);
81103
static void __iomem *base;
82104

@@ -281,6 +303,7 @@ static int lan966x_clk_probe(struct platform_device *pdev)
281303

282304
static const struct of_device_id lan966x_clk_dt_ids[] = {
283305
{ .compatible = "microchip,lan966x-gck", .data = &lan966x_desc },
306+
{ .compatible = "microchip,lan9691-gck", .data = &lan969x_desc },
284307
{ }
285308
};
286309
MODULE_DEVICE_TABLE(of, lan966x_clk_dt_ids);

0 commit comments

Comments
 (0)