]> www.infradead.org Git - linux.git/commitdiff
ARM: at91: pm: add DT compatible support for sama7d65
authorRyan Wanner <Ryan.Wanner@microchip.com>
Thu, 27 Feb 2025 15:51:57 +0000 (08:51 -0700)
committerClaudiu Beznea <claudiu.beznea@tuxon.dev>
Sun, 2 Mar 2025 15:32:39 +0000 (17:32 +0200)
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>
arch/arm/mach-at91/pm.c

index 6c3e6aa22606f58bf43f8c5ed4acd3dd9a5d8b03..6c4e168f18447fdbf084e0be45c62c40471bef8a 100644 (file)
@@ -222,13 +222,16 @@ static const struct of_device_id sam9x60_ws_ids[] = {
        { /* sentinel */ }
 };
 
-static const struct of_device_id sama7g5_ws_ids[] = {
+static const struct of_device_id sama7_ws_ids[] = {
+       { .compatible = "microchip,sama7d65-rtc",       .data = &ws_info[1] },
        { .compatible = "microchip,sama7g5-rtc",        .data = &ws_info[1] },
        { .compatible = "microchip,sama7g5-ohci",       .data = &ws_info[2] },
        { .compatible = "usb-ohci",                     .data = &ws_info[2] },
        { .compatible = "atmel,at91sam9g45-ehci",       .data = &ws_info[2] },
        { .compatible = "usb-ehci",                     .data = &ws_info[2] },
+       { .compatible = "microchip,sama7d65-sdhci",     .data = &ws_info[3] },
        { .compatible = "microchip,sama7g5-sdhci",      .data = &ws_info[3] },
+       { .compatible = "microchip,sama7d65-rtt",       .data = &ws_info[4] },
        { .compatible = "microchip,sama7g5-rtt",        .data = &ws_info[4] },
        { /* sentinel */ }
 };
@@ -1362,7 +1365,11 @@ static const struct pmc_info pmc_infos[] __initconst = {
                .mckr = 0x28,
                .version = AT91_PMC_V2,
        },
-
+       {
+               .uhp_udp_mask = AT91SAM926x_PMC_UHP,
+               .mckr = 0x28,
+               .version = AT91_PMC_V2,
+       },
 };
 
 static const struct of_device_id atmel_pmc_ids[] __initconst = {
@@ -1379,6 +1386,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
        { .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] },
        { .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] },
        { .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] },
+       { .compatible = "microchip,sama7d65-pmc", .data = &pmc_infos[6] },
        { .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] },
        { /* sentinel */ },
 };
@@ -1672,7 +1680,7 @@ void __init sama7_pm_init(void)
        at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
        at91_pm_init(NULL);
 
-       soc_pm.ws_ids = sama7g5_ws_ids;
+       soc_pm.ws_ids = sama7_ws_ids;
        soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
 
        soc_pm.sfrbu_regs.pswbu.key = (0x4BD20C << 8);