summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2022-06-10 12:24:13 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2022-06-17 17:20:00 +0200
commita22c8e8834bcc55e44d0bae738f0915df7e6f573 (patch)
tree51ed151ac1a0594bcd398cb1f29eff9f0e6d3360 /drivers/power
parent5f37c797a4df2a3a5b6406af48cc565020c01d98 (diff)
downloadlinux-rt-a22c8e8834bcc55e44d0bae738f0915df7e6f573.tar.gz
power: reset: at91-reset: add support for SAMA7G5
Add support for SAMA7G5 including reset_controller_dev support for 3 lines (which are USB PHYs). Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/reset/at91-reset.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
index bc9f1d9e7867..741e44a017c3 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -22,6 +22,8 @@
#include <soc/at91/at91sam9_ddrsdr.h>
#include <soc/at91/at91sam9_sdramc.h>
+#include <dt-bindings/reset/sama7g5-reset.h>
+
#define AT91_RSTC_CR 0x00 /* Reset Controller Control Register */
#define AT91_RSTC_PROCRST BIT(0) /* Processor Reset */
#define AT91_RSTC_PERRST BIT(2) /* Peripheral Reset */
@@ -206,6 +208,13 @@ static const struct at91_reset_data samx7 = {
.reset_args = AT91_RSTC_KEY | AT91_RSTC_PROCRST,
};
+static const struct at91_reset_data sama7g5 = {
+ .reset_args = AT91_RSTC_KEY | AT91_RSTC_PROCRST,
+ .n_device_reset = 3,
+ .device_reset_min_id = SAMA7G5_RESET_USB_PHY1,
+ .device_reset_max_id = SAMA7G5_RESET_USB_PHY3,
+};
+
static const struct of_device_id at91_reset_of_match[] = {
{
.compatible = "atmel,at91sam9260-rstc",
@@ -227,6 +236,10 @@ static const struct of_device_id at91_reset_of_match[] = {
.compatible = "microchip,sam9x60-rstc",
.data = &samx7,
},
+ {
+ .compatible = "microchip,sama7g5-rstc",
+ .data = &sama7g5,
+ },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, at91_reset_of_match);