Skip to content

Commit 9a49771

Browse files
ryan-wannerclaudiubeznea
authored andcommitted
clk: at91: sama7d65: add sama7d65 pmc driver
Add clock support for SAMA7D65 SoC. Increase maximum number of valid master clocks. The PMC for the SAMA7D65 requires 9 master clocks. Increase maximum amount of PLLs to 9 to support SAMA7D65 SoC PLL requirements. Signed-off-by: Ryan Wanner <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/549fa8590fe9b4380e413f8eed87392f28754395.1734723585.git.Ryan.Wanner@microchip.com [claudiu.beznea: sorted alphanumerically the Makefile entries, reorder the code for resource cleanup in sama7d65_pmc_setup()] Signed-off-by: Claudiu Beznea <[email protected]>
1 parent 1c9eb9e commit 9a49771

File tree

5 files changed

+1379
-2
lines changed

5 files changed

+1379
-2
lines changed

drivers/clk/at91/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ obj-$(CONFIG_SOC_SAM9X7) += sam9x7.o
2424
obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o dt-compat.o
2525
obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o dt-compat.o
2626
obj-$(CONFIG_SOC_SAMA5D2) += sama5d2.o dt-compat.o
27+
obj-$(CONFIG_SOC_SAMA7D65) += sama7d65.o
2728
obj-$(CONFIG_SOC_SAMA7G5) += sama7g5.o

drivers/clk/at91/clk-master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#define PMC_MCR_CSS_SHIFT (16)
2222

23-
#define MASTER_MAX_ID 4
23+
#define MASTER_MAX_ID 9
2424

2525
#define to_clk_master(hw) container_of(hw, struct clk_master, hw)
2626

drivers/clk/at91/clk-sam9x60-pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define UPLL_DIV 2
2424
#define PLL_MUL_MAX (FIELD_GET(PMC_PLL_CTRL1_MUL_MSK, UINT_MAX) + 1)
2525

26-
#define PLL_MAX_ID 7
26+
#define PLL_MAX_ID 9
2727

2828
struct sam9x60_pll_core {
2929
struct regmap *regmap;

drivers/clk/at91/pmc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static struct syscore_ops pmc_syscore_ops = {
151151
static const struct of_device_id pmc_dt_ids[] = {
152152
{ .compatible = "atmel,sama5d2-pmc" },
153153
{ .compatible = "microchip,sama7g5-pmc", },
154+
{ .compatible = "microchip,sama7d65-pmc", },
154155
{ /* sentinel */ }
155156
};
156157

0 commit comments

Comments
 (0)