Skip to contentSkip to conversation

dt-bindings: arm: atmel: add missing samx7 to reset controller

PATCH In review Nicolas Ferre 3 participants 7 messages Feb 6, 2019 – Feb 19, 2019

Subsystems (3)
lore
Share & tools
lore

Nicolas Ferre

author maintainer
#0 lore raw

PATCH v2 1/3 dt-bindings: arm: atmel: add missing samx7 to reset controller

Add this missing compatibility string to the Reset Controller compatible string chip list.

---
v2: split series and collect tag

 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -1
index df444073d376..dd7864f2bb2b 100644
@@ -21,7 +21,7 @@ Its subnodes can be:
 
 RSTC Reset Controller required properties:
 - compatible: Should be "atmel,<chip>-rstc".
-  <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
+  <chip> can be "at91sam9260", "at91sam9g45", "sama5d3" or "samx7"
 - reg: Should contain registers location and length
 - clocks: phandle to input clock.
 
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH v2 2/3 dt-bindings: arm: atmel: add new sam9x60 reset controller binding

Update the Reset Controller's binding to add new SoC compatibility string.

---
v2: split series and collect tag

 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
index dd7864f2bb2b..dfc91bc02b97 100644
@@ -22,6 +22,7 @@ Its subnodes can be:
 RSTC Reset Controller required properties:
 - compatible: Should be "atmel,<chip>-rstc".
   <chip> can be "at91sam9260", "at91sam9g45", "sama5d3" or "samx7"
+  it also can be "microchip,sam9x60-rstc"
 - reg: Should contain registers location and length
 - clocks: phandle to input clock.
 
Signature · 1 line
2.17.1
maintainer Acked-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] dt-bindings: arm: atmel: add new sam9x60 reset controller binding

Quoted 4 lines · Nicolas Ferre

Update the Reset Controller's binding to add new SoC compatibility string.

Quoted 21 lines

---
v2: split series and collect tag

 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
index dd7864f2bb2b..dfc91bc02b97 100644
@@ -22,6 +22,7 @@ Its subnodes can be:
 RSTC Reset Controller required properties:
 - compatible: Should be "atmel,<chip>-rstc".
   <chip> can be "at91sam9260", "at91sam9g45", "sama5d3" or "samx7"
+  it also can be "microchip,sam9x60-rstc"
 - reg: Should contain registers location and length
 - clocks: phandle to input clock.
 
Signature · 1 line
2.17.1
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author maintainer
#3 lore raw

PATCH v2 3/3 power: reset: at91-reset: add support for sam9x60 SoC

In reply to Nicolas Ferre

Add support for additional reset causes and the proper compatibility string for sam9x60 SoC. The restart function is the same as the samx7.

---
v2: split series and collect tag

Sebastian,
I add your Acked-by tag here but as I would like that you take the 3 patches on your tree now, I let you modify it on your side. I'm expecting Alexandre or Ludovic to have a look as well.

Best regards,
Nicolas

 drivers/power/reset/at91-reset.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/power/reset/at91-reset.c +13 -0
index f44a9ffcc2ab..44ca983a49a1 100644
@@ -44,6 +44,9 @@ enum reset_type {
 	RESET_TYPE_WATCHDOG	= 2,
 	RESET_TYPE_SOFTWARE	= 3,
 	RESET_TYPE_USER		= 4,
+	RESET_TYPE_CPU_FAIL	= 6,
+	RESET_TYPE_XTAL_FAIL	= 7,
+	RESET_TYPE_ULP2		= 8,
 };
 
 static void __iomem *at91_ramc_base[2], *at91_rstc_base;
@@ -164,6 +167,15 @@ static void __init at91_reset_status(struct platform_device *pdev)
 	case RESET_TYPE_USER:
 		reason = "user reset";
 		break;
+	case RESET_TYPE_CPU_FAIL:
+		reason = "CPU clock failure detection";
+		break;
+	case RESET_TYPE_XTAL_FAIL:
+		reason = "32.768 kHz crystal failure detection";
+		break;
+	case RESET_TYPE_ULP2:
+		reason = "ULP2 reset";
+		break;
 	default:
 		reason = "unknown reset";
 		break;
@@ -183,6 +195,7 @@ static const struct of_device_id at91_reset_of_match[] = {
 	{ .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart },
 	{ .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart },
 	{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },
+	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, at91_reset_of_match);
Signature · 1 line
2.17.1
maintainer Reviewed-by on v2 3/3
#4 lore raw

Re: [PATCH v2 3/3] power: reset: at91-reset: add support for sam9x60 SoC

Quoted 5 lines · Nicolas Ferre

Add support for additional reset causes and the proper compatibility string for sam9x60 SoC. The restart function is the same as the samx7.

Quoted 8 lines

---
v2: split series and collect tag

Sebastian,
I add your Acked-by tag here but as I would like that you take the 3 patches on your tree now, I let you modify it on your side. I'm expecting Alexandre or Ludovic to have a look as well.

Sebastian, please take this series through your tree. Thanks!

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

Re: [PATCH v2 3/3] power: reset: at91-reset: add support for sam9x60 SoC

Hi,

Quoted 11 lines · Alexandre Belloni
Quoted 5 lines · Nicolas Ferre

Add support for additional reset causes and the proper compatibility string for sam9x60 SoC. The restart function is the same as the samx7.

Quoted 3 lines

---
v2: split series and collect tag

Quoted 7 lines
Quoted 5 lines

Sebastian,
I add your Acked-by tag here but as I would like that you take the 3 patches on your tree now, I let you modify it on your side. I'm expecting Alexandre or Ludovic to have a look as well.

Sebastian, please take this series through your tree. Thanks!

All right. I just merged them!

-- Sebastian

maintainer Acked-by on v2 1/3
#6 lore raw
In reply to Nicolas Ferre
Quoted 5 lines · Nicolas Ferre

Add this missing compatibility string to the Reset Controller compatible string chip list.

Quoted 22 lines

---
v2: split series and collect tag

 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -1
index df444073d376..dd7864f2bb2b 100644
@@ -21,7 +21,7 @@ Its subnodes can be:
 
 RSTC Reset Controller required properties:
 - compatible: Should be "atmel,<chip>-rstc".
-  <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
+  <chip> can be "at91sam9260", "at91sam9g45", "sama5d3" or "samx7"
 - reg: Should contain registers location and length
 - clocks: phandle to input clock.
 
Signature · 1 line
2.17.1
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com