Skip to content

Commit 8e96f50

Browse files
ryan-wannerclaudiubeznea
authored andcommitted
ARM: at91: pm: add DT compatible support for sama7d65
Add support for SAMA7D65 new compatible strings in pm.c file for wakeup source IDs and PMC. This is the first bits of PM for this new SoC. PM depends on other patches. Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> [nicolas.ferre@microchip.com: split patch and address only the pm.c changes] Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/06b64869f2de4b499835d153411ba30512409168.1740671156.git.Ryan.Wanner@microchip.com [claudiu.beznea: add proper entry in pmc_infos[] for SAMA7D65 instead of using wrong data and fixing it in the next commits] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1 parent bc4722c commit 8e96f50

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

  • arch/arm/mach-at91

arch/arm/mach-at91/pm.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,16 @@ static const struct of_device_id sam9x60_ws_ids[] = {
222222
{ /* sentinel */ }
223223
};
224224

225-
static const struct of_device_id sama7g5_ws_ids[] = {
225+
static const struct of_device_id sama7_ws_ids[] = {
226+
{ .compatible = "microchip,sama7d65-rtc", .data = &ws_info[1] },
226227
{ .compatible = "microchip,sama7g5-rtc", .data = &ws_info[1] },
227228
{ .compatible = "microchip,sama7g5-ohci", .data = &ws_info[2] },
228229
{ .compatible = "usb-ohci", .data = &ws_info[2] },
229230
{ .compatible = "atmel,at91sam9g45-ehci", .data = &ws_info[2] },
230231
{ .compatible = "usb-ehci", .data = &ws_info[2] },
232+
{ .compatible = "microchip,sama7d65-sdhci", .data = &ws_info[3] },
231233
{ .compatible = "microchip,sama7g5-sdhci", .data = &ws_info[3] },
234+
{ .compatible = "microchip,sama7d65-rtt", .data = &ws_info[4] },
232235
{ .compatible = "microchip,sama7g5-rtt", .data = &ws_info[4] },
233236
{ /* sentinel */ }
234237
};
@@ -1362,7 +1365,11 @@ static const struct pmc_info pmc_infos[] __initconst = {
13621365
.mckr = 0x28,
13631366
.version = AT91_PMC_V2,
13641367
},
1365-
1368+
{
1369+
.uhp_udp_mask = AT91SAM926x_PMC_UHP,
1370+
.mckr = 0x28,
1371+
.version = AT91_PMC_V2,
1372+
},
13661373
};
13671374

13681375
static const struct of_device_id atmel_pmc_ids[] __initconst = {
@@ -1379,6 +1386,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
13791386
{ .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] },
13801387
{ .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] },
13811388
{ .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] },
1389+
{ .compatible = "microchip,sama7d65-pmc", .data = &pmc_infos[6] },
13821390
{ .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] },
13831391
{ /* sentinel */ },
13841392
};
@@ -1672,7 +1680,7 @@ void __init sama7_pm_init(void)
16721680
at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
16731681
at91_pm_init(NULL);
16741682

1675-
soc_pm.ws_ids = sama7g5_ws_ids;
1683+
soc_pm.ws_ids = sama7_ws_ids;
16761684
soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
16771685

16781686
soc_pm.sfrbu_regs.pswbu.key = (0x4BD20C << 8);

0 commit comments

Comments
 (0)