@@ -235,6 +235,17 @@ static const struct of_device_id sama7g5_ws_ids[] = {
235235 { /* sentinel */ }
236236};
237237
238+ static const struct of_device_id sam9x7_ws_ids [] = {
239+ { .compatible = "microchip,sam9x60-rtc" , .data = & ws_info [1 ] },
240+ { .compatible = "atmel,at91rm9200-ohci" , .data = & ws_info [2 ] },
241+ { .compatible = "usb-ohci" , .data = & ws_info [2 ] },
242+ { .compatible = "atmel,at91sam9g45-ehci" , .data = & ws_info [2 ] },
243+ { .compatible = "usb-ehci" , .data = & ws_info [2 ] },
244+ { .compatible = "microchip,sam9x60-rtt" , .data = & ws_info [4 ] },
245+ { .compatible = "microchip,sam9x7-gem" , .data = & ws_info [5 ] },
246+ { /* sentinel */ }
247+ };
248+
238249static int at91_pm_device_in_list (const struct platform_device * pdev ,
239250 const struct of_device_id * ids )
240251{
@@ -1219,6 +1230,7 @@ static const struct of_device_id gmac_ids[] __initconst = {
12191230 { .compatible = "atmel,sama5d2-gem" },
12201231 { .compatible = "atmel,sama5d29-gem" },
12211232 { .compatible = "microchip,sama7g5-gem" },
1233+ { .compatible = "microchip,sam9x7-gem" },
12221234 { },
12231235};
12241236
@@ -1450,6 +1462,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
14501462 { .compatible = "atmel,sama5d2-pmc" , .data = & pmc_infos [1 ] },
14511463 { .compatible = "microchip,sam9x60-pmc" , .data = & pmc_infos [4 ] },
14521464 { .compatible = "microchip,sama7g5-pmc" , .data = & pmc_infos [5 ] },
1465+ { .compatible = "microchip,sam9x7-pmc" , .data = & pmc_infos [4 ] },
14531466 { /* sentinel */ },
14541467};
14551468
@@ -1587,6 +1600,28 @@ void __init sam9x60_pm_init(void)
15871600 soc_pm .config_pmc_ws = at91_sam9x60_config_pmc_ws ;
15881601}
15891602
1603+ void __init sam9x7_pm_init (void )
1604+ {
1605+ static const int modes [] __initconst = {
1606+ AT91_PM_STANDBY , AT91_PM_ULP0 ,
1607+ };
1608+
1609+ int ret ;
1610+
1611+ if (!IS_ENABLED (CONFIG_SOC_SAM9X7 ))
1612+ return ;
1613+
1614+ at91_pm_modes_validate (modes , ARRAY_SIZE (modes ));
1615+ ret = at91_dt_ramc (false);
1616+ if (ret )
1617+ return ;
1618+
1619+ at91_pm_init (NULL );
1620+
1621+ soc_pm .ws_ids = sam9x7_ws_ids ;
1622+ soc_pm .config_pmc_ws = at91_sam9x60_config_pmc_ws ;
1623+ }
1624+
15901625void __init at91sam9_pm_init (void )
15911626{
15921627 int ret ;
0 commit comments