Skip to contentSkip to conversation

ARM: at91/dt: update to existing drivers for the sam9x60 SoC

PATCH Superseded Nicolas Ferre 3 participants 21 messages Jan 16, 2019 – Feb 6, 2019

Subsystems (8)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nicolas Ferre

author maintainer
#0 lore raw

cover ARM: at91/dt: update to existing drivers for the sam9x60 SoC

Hi,

This serries collects some little modifications to DT bindings and associated drivers changes for supporting the upcoming SAM9X60 SoC.

I took the advantage of this series for fixing some of the leftovers in DT bindings for reset controller and Ethernet macb.

These changes touch several sub-systems but I would like that these (mostly trivial) patches stay together for facilitating reviews, prevent breaking dependencies and facilitating the tracking of acceptance status. However, tell me if you think otherwise.
My intentions are that the series would enter Mainline through arm-soc tree:
sounds okay to everyone? If okay, I'm ready to collect Ack tags...

For the first batch, I send the whole series to everyone. I'll try my best to reduce subsequent message deliveries if one part of the serries needs rework.

Best regards,
Nicolas

Nicolas Ferre (8):
dt-bindings: arm: atmel: add missing samx7 to reset controller
dt-bindings: arm: atmel: add new sam9x60 reset controller binding
dt-bindings: arm: atmel: add new sam9x60 SFR binding net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100
interface
net/macb: bindings doc: add sam9x60 binding
power: reset: at91-reset: add support for sam9x60 SoC
USB: host: ohci-at91: add sam9x60-sfr definition for ohci
net: macb: add sam9x60-macb compatibility string

 .../devicetree/bindings/arm/atmel-sysregs.txt       |  4 +++-
 Documentation/devicetree/bindings/net/macb.txt      |  4 ++--
 drivers/net/ethernet/cadence/macb_main.c            |  1 +
 drivers/power/reset/at91-reset.c                    | 13 +++++++++++++
 drivers/usb/host/ohci-at91.c                        |  7 +++++--
 5 files changed, 24 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

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

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

---
 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 14f319f694b7..36952cc39993 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
maintainer Reviewed-by on v1 1/8
#2 lore raw

Re: [PATCH 1/8] dt-bindings: arm: atmel: add missing samx7 to reset controller

Quoted 8 lines · Nicolas Ferre

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

---
 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
author maintainer
#3 lore raw

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

In reply to Nicolas Ferre

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

---
 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
index 36952cc39993..badce6ef3ab3 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
#4 lore raw

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

Quoted 12 lines · Nicolas Ferre

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

---
 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +0 -0
index 36952cc39993..badce6ef3ab3 100644

Documentation/devicetree/bindings/arm/atmel-sysregs.txt Its subnodes can be: · line 25

Quoted 4 lines
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
@@ -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"

How is this related to at91sam9260-rstc?

The 'x' is a wildcard? We generally avoid wildcards.

Quoted 6 lines
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +0 -0
 - reg: Should contain registers location and length
 - clocks: phandle to input clock.
 
Signature · 1 line
2.17.1
author maintainer
#5 lore raw

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

Hi Rob,

Quoted 8 lines · Rob Herring
Quoted 7 lines · Nicolas Ferre

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

---
  Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
  1 file changed, 1 insertion(+)
Quoted 11 lines

Documentation/devicetree/bindings/arm/atmel-sysregs.txt Its subnodes can be: · line 25

Quoted 9 lines
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
index 36952cc39993..badce6ef3ab3 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"

How is this related to at91sam9260-rstc?

at91sam9260 and sam9x60 are completely different products (they share the same core though...). I know the naming could be misleading but it is like it is...

Quoted 1 line

The 'x' is a wildcard? We generally avoid wildcards.

Here, the 'x' is definitively not a wildcard nor a kind of "family" name, it's included in the (upcoming) single product's name.

I hope it clarifies.

Best regards,
Nicolas

Quoted 7 lines
Quoted 6 lines
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +0 -0
  - reg: Should contain registers location and length
  - clocks: phandle to input clock.
 
Signature · 1 line
2.17.1
Signature · 1 line
Nicolas Ferre
maintainer Reviewed-by
#6 lore raw

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

Quoted 28 lines · On Tue, Jan 22, 2019 at 3:00 AM <[email protected]> wrote:

Hi Rob,

Quoted 8 lines · Rob Herring
Quoted 7 lines · Nicolas Ferre

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

---
  Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
  1 file changed, 1 insertion(+)
Quoted 11 lines

Documentation/devicetree/bindings/arm/atmel-sysregs.txt Its subnodes can be: · line 25

Quoted 9 lines
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
index 36952cc39993..badce6ef3ab3 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"

How is this related to at91sam9260-rstc?

at91sam9260 and sam9x60 are completely different products (they share the same core though...). I know the naming could be misleading but it is like it is...

Quoted 6 lines
Quoted 1 line

The 'x' is a wildcard? We generally avoid wildcards.

Here, the 'x' is definitively not a wildcard nor a kind of "family" name, it's included in the (upcoming) single product's name.

I hope it clarifies.

Yes, thanks.

author maintainer
#7 lore raw

PATCH 3/8 dt-bindings: arm: atmel: add new sam9x60 SFR binding

In reply to Nicolas Ferre

Add this SFR compatible definition for the sam9x60 SoC. Will be needed in OHCI driver: ohci-at91.c.

---
 Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/atmel-sysregs.txt +1 -0
index badce6ef3ab3..dfc91bc02b97 100644
@@ -148,6 +148,7 @@ required properties:
 - compatible: Should be "atmel,<chip>-sfr", "syscon" or
 	"atmel,<chip>-sfrbu", "syscon"
   <chip> can be "sama5d3", "sama5d4" or "sama5d2".
+  it also can be "microchip,sam9x60-sfr", "syscon".
 - reg: Should contain registers location and length
 
 	sfr@f0038000 {
Signature · 1 line
2.17.1
author maintainer
#8 lore raw

PATCH 4/8 net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100 interface

In reply to Nicolas Ferre

This removes a line left while adding the correct compatibility string for sama5d3 10/100 interface. Now use the "atmel,sama5d3-macb" string.

---
 Documentation/devicetree/bindings/net/macb.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/net/macb.txt +1 -2
index 3e17ac1d5d58..f5c414b10e27 100644
@@ -3,8 +3,7 @@
 Required properties:
 - compatible: Should be "cdns,[<chip>-]{macb|gem}"
   Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
-  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
-  available on sama5d3 SoCs.
+  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs.
   Use "cdns,np4-macb" for NP4 SoC devices.
   Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
   Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
Signature · 1 line
2.17.1
maintainer
#9 lore raw

Re: [PATCH 4/8] net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100 interface

Quoted 13 lines · Nicolas Ferre

This removes a line left while adding the correct compatibility string for sama5d3 10/100 interface. Now use the "atmel,sama5d3-macb" string.

---
 Documentation/devicetree/bindings/net/macb.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/net/macb.txt +0 -0
index 3e17ac1d5d58..f5c414b10e27 100644

Documentation/devicetree/bindings/net/macb.txt line 6

Quoted 6 lines
Documentation/devicetree/bindings/net/macb.txt +1 -2
@@ -3,8 +3,7 @@
 Required properties:
 - compatible: Should be "cdns,[<chip>-]{macb|gem}"
   Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
-  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
-  available on sama5d3 SoCs.
+  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs.

Where is "atmel,sama5d3-macb"?

Quoted 6 lines
Documentation/devicetree/bindings/net/macb.txt +0 -0
   Use "cdns,np4-macb" for NP4 SoC devices.
   Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
   Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
Signature · 1 line
2.17.1
author maintainer
#10 lore raw

Re: [PATCH 4/8] net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100 interface

Hi Rob,

Quoted 9 lines · Rob Herring
Quoted 8 lines · Nicolas Ferre

This removes a line left while adding the correct compatibility string for sama5d3 10/100 interface. Now use the "atmel,sama5d3-macb" string.

---
  Documentation/devicetree/bindings/net/macb.txt | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines

Documentation/devicetree/bindings/net/macb.txt line 6

Quoted 11 lines
Documentation/devicetree/bindings/net/macb.txt +1 -2
index 3e17ac1d5d58..f5c414b10e27 100644
@@ -3,8 +3,7 @@
  Required properties:
  - compatible: Should be "cdns,[<chip>-]{macb|gem}"
    Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
-  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
-  available on sama5d3 SoCs.
+  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs.

Where is "atmel,sama5d3-macb"?

It's actually a couple of line below: line 13 of the resulting macb.txt file. It was already in the file when I removed the leftovers.

Do you advice to try to better sort entries in this file? Is there a common pattern?

Best regards,
Nicolas

Quoted 7 lines
Quoted 6 lines
Documentation/devicetree/bindings/net/macb.txt +0 -0
    Use "cdns,np4-macb" for NP4 SoC devices.
    Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
    Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
Signature · 1 line
2.17.1
Signature · 1 line
Nicolas Ferre
maintainer Reviewed-by
#11 lore raw

Re: [PATCH 4/8] net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100 interface

Quoted 27 lines · On Tue, Jan 22, 2019 at 3:09 AM <[email protected]> wrote:

Hi Rob,

Quoted 9 lines · Rob Herring
Quoted 8 lines · Nicolas Ferre

This removes a line left while adding the correct compatibility string for sama5d3 10/100 interface. Now use the "atmel,sama5d3-macb" string.

---
  Documentation/devicetree/bindings/net/macb.txt | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines

Documentation/devicetree/bindings/net/macb.txt line 6

Quoted 11 lines
Documentation/devicetree/bindings/net/macb.txt +1 -2
index 3e17ac1d5d58..f5c414b10e27 100644
@@ -3,8 +3,7 @@
  Required properties:
  - compatible: Should be "cdns,[<chip>-]{macb|gem}"
    Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
-  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
-  available on sama5d3 SoCs.
+  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs.

Where is "atmel,sama5d3-macb"?

Quoted 5 lines

It's actually a couple of line below: line 13 of the resulting macb.txt file. It was already in the file when I removed the leftovers.

Do you advice to try to better sort entries in this file? Is there a common pattern?

Okay, it's fine.

author maintainer
#12 lore raw

PATCH 5/8 net/macb: bindings doc: add sam9x60 binding

In reply to Nicolas Ferre

Add the compatibility sting documentation for sam9x60 10/100 interface.

---
 Documentation/devicetree/bindings/net/macb.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/net/macb.txt +1 -0
index f5c414b10e27..174f292d8a3e 100644
@@ -4,6 +4,7 @@ Required properties:
 - compatible: Should be "cdns,[<chip>-]{macb|gem}"
   Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
   Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs.
+  Use "cdns,sam9x60-macb" for Microchip sam9x60 SoC.
   Use "cdns,np4-macb" for NP4 SoC devices.
   Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
   Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
Signature · 1 line
2.17.1
author maintainer
#13 lore raw

PATCH 6/8 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.

---
 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
#14 lore raw

Re: [PATCH 6/8] power: reset: at91-reset: add support for sam9x60 SoC

Hi,

Quoted 13 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.

---
 drivers/power/reset/at91-reset.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/power/reset/at91-reset.c +0 -0
index f44a9ffcc2ab..44ca983a49a1 100644

drivers/power/reset/at91-reset.c enum reset_type { · line 49

Quoted 6 lines
drivers/power/reset/at91-reset.c +3 -0
@@ -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,

what happened to 5? :)

Quoted 20 lines
drivers/power/reset/at91-reset.c +9 -0
 };
 
 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;

drivers/power/reset/at91-reset.c static const struct of_device_id at91_reset_of_match[] = { · line 201

Quoted 7 lines
drivers/power/reset/at91-reset.c +1 -0
@@ -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);

Patch looks fine to me. But I will wait a bit with merging, so that Alexandre or Ludovic have a chance to provide feedback.

-- Sebastian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#15 lore raw

Re: [PATCH 6/8] power: reset: at91-reset: add support for sam9x60 SoC

Hi Sebastian,

Quoted 11 lines · Sebastian Reichel

Hi,

Quoted 8 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.

---
  drivers/power/reset/at91-reset.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)
Quoted 13 lines

drivers/power/reset/at91-reset.c enum reset_type { · line 49

Quoted 11 lines
drivers/power/reset/at91-reset.c +3 -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,

what happened to 5? :)

That a good question ;-)

It's marked as "Reserved"... which opens up a whole new field of speculation :-)

[..]

Quoted 8 lines

drivers/power/reset/at91-reset.c static const struct of_device_id at91_reset_of_match[] = { · line 201

Quoted 5 lines
drivers/power/reset/at91-reset.c +1 -0
  	{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },
+	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
  	{ /* sentinel */ }
  };
  MODULE_DEVICE_TABLE(of, at91_reset_of_match);

Patch looks fine to me. But I will wait a bit with merging, so that Alexandre or Ludovic have a chance to provide feedback.

What about merging this patch with the whole series through the at91 then arm-soc trees?

Best regards,

Signature · 1 line
Nicolas Ferre
maintainer Acked-by
#16 lore raw

Re: [PATCH 6/8] power: reset: at91-reset: add support for sam9x60 SoC

Hi,

Quoted 28 lines · On Thu, Jan 24, 2019 at 10:34:50AM +0000, [email protected] wrote:

Hi Sebastian,

Quoted 11 lines · Sebastian Reichel

Hi,

Quoted 8 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.

---
  drivers/power/reset/at91-reset.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)
Quoted 13 lines

drivers/power/reset/at91-reset.c enum reset_type { · line 49

Quoted 11 lines
drivers/power/reset/at91-reset.c +3 -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,

what happened to 5? :)

Quoted 4 lines

That a good question ;-)

It's marked as "Reserved"... which opens up a whole new field of speculation :-)

Ok :)

Quoted 11 lines

[..]

Quoted 8 lines

drivers/power/reset/at91-reset.c static const struct of_device_id at91_reset_of_match[] = { · line 201

Quoted 5 lines

{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },

drivers/power/reset/at91-reset.c +1 -0
+	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
  	{ /* sentinel */ }
  };
  MODULE_DEVICE_TABLE(of, at91_reset_of_match);

Patch looks fine to me. But I will wait a bit with merging, so that Alexandre or Ludovic have a chance to provide feedback.

Quoted 2 lines

What about merging this patch with the whole series through the at91 then arm-soc trees?

It seems to be possible to merge this standalone, but merging through at91/arm-soc is also fine with me.

-- Sebastian

author maintainer
#17 lore raw

PATCH 7/8 USB: host: ohci-at91: add sam9x60-sfr definition for ohci

In reply to Nicolas Ferre

Add this SFR compatible definition for the sam9x60 SoC and manage its use in ohci-at91.c driver.

---
 drivers/usb/host/ohci-at91.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/usb/host/ohci-at91.c +5 -2
index ec6739ef3129..fc35a7993b7b 100644
@@ -141,8 +141,11 @@ static struct regmap *at91_dt_syscon_sfr(void)
 	struct regmap *regmap;
 
 	regmap = syscon_regmap_lookup_by_compatible("atmel,sama5d2-sfr");
-	if (IS_ERR(regmap))
-		regmap = NULL;
+	if (IS_ERR(regmap)) {
+		regmap = syscon_regmap_lookup_by_compatible("microchip,sam9x60-sfr");
+		if (IS_ERR(regmap))
+			regmap = NULL;
+	}
 
 	return regmap;
 }
Signature · 1 line
2.17.1
author maintainer
#18 lore raw

PATCH 8/8 net: macb: add sam9x60-macb compatibility string

In reply to Nicolas Ferre

Add a new compatibility string for this product. It's using at91sam9260-macb layout but has a newer hardware revision: it's safer to use its own string.

---
 drivers/net/ethernet/cadence/macb_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/cadence/macb_main.c +1 -0
index 66cc7927061a..a0889ef107a1 100644
@@ -3941,6 +3941,7 @@ static const struct of_device_id macb_dt_ids[] = {
 	{ .compatible = "cdns,np4-macb", .data = &np4_config },
 	{ .compatible = "cdns,pc302-gem", .data = &pc302gem_config },
 	{ .compatible = "cdns,gem", .data = &pc302gem_config },
+	{ .compatible = "cdns,sam9x60-macb", .data = &at91sam9260_config },
 	{ .compatible = "atmel,sama5d2-gem", .data = &sama5d2_config },
 	{ .compatible = "atmel,sama5d3-gem", .data = &sama5d3_config },
 	{ .compatible = "atmel,sama5d3-macb", .data = &sama5d3macb_config },
Signature · 1 line
2.17.1
author maintainer
#19 lore raw

Re: [PATCH 8/8] net: macb: add sam9x60-macb compatibility string

Hi David,

Quoted 5 lines · Nicolas Ferre

Add a new compatibility string for this product. It's using at91sam9260-macb layout but has a newer hardware revision: it's safer to use its own string.

I'm thinking of pushing this patch with the others of the series through arm-soc tree. Can I have your "Acked-by" tag then?

Best regards,
Nicolas

Quoted 17 lines
---
  drivers/net/ethernet/cadence/macb_main.c | 1 +
  1 file changed, 1 insertion(+)
drivers/net/ethernet/cadence/macb_main.c +1 -0
index 66cc7927061a..a0889ef107a1 100644
@@ -3941,6 +3941,7 @@ static const struct of_device_id macb_dt_ids[] = {
  	{ .compatible = "cdns,np4-macb", .data = &np4_config },
  	{ .compatible = "cdns,pc302-gem", .data = &pc302gem_config },
  	{ .compatible = "cdns,gem", .data = &pc302gem_config },
+	{ .compatible = "cdns,sam9x60-macb", .data = &at91sam9260_config },
  	{ .compatible = "atmel,sama5d2-gem", .data = &sama5d2_config },
  	{ .compatible = "atmel,sama5d3-gem", .data = &sama5d3_config },
  	{ .compatible = "atmel,sama5d3-macb", .data = &sama5d3macb_config },
Signature · 1 line
Nicolas Ferre
author maintainer
#20 lore raw
In reply to Nicolas Ferre

All,

Quoted 5 lines · Nicolas Ferre

Hi,

This series collects some little modifications to DT bindings and associated drivers changes for supporting the upcoming SAM9X60 SoC.

Quoted 7 lines

I took the advantage of this series for fixing some of the leftovers in DT bindings for reset controller and Ethernet macb.

These changes touch several sub-systems but I would like that these (mostly trivial) patches stay together for facilitating reviews, prevent breaking dependencies and facilitating the tracking of acceptance status. However, tell me if you think otherwise.

It seems it's not the preferred way to go and that I must split and send to sub-system Maintainers so that bindings and driver code go together through Maintainer's git trees (USB, power/reset, netdev).

Quoted 2 lines

My intentions are that the series would enter Mainline through arm-soc tree:
sounds okay to everyone? If okay, I'm ready to collect Ack tags...

I'm re-sending this split series. Some of the "Reviewed-by:" are missing so we'll have the chance to add them on individual series.

Thanks for your reviews so far.

Best regards,
Nicolas

Quoted 25 lines

For the first batch, I send the whole series to everyone. I'll try my best to reduce subsequent message deliveries if one part of the serries needs rework.

Best regards,
Nicolas

Nicolas Ferre (8):
dt-bindings: arm: atmel: add missing samx7 to reset controller
dt-bindings: arm: atmel: add new sam9x60 reset controller binding
dt-bindings: arm: atmel: add new sam9x60 SFR binding net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100
interface
net/macb: bindings doc: add sam9x60 binding
power: reset: at91-reset: add support for sam9x60 SoC
USB: host: ohci-at91: add sam9x60-sfr definition for ohci
net: macb: add sam9x60-macb compatibility string

  .../devicetree/bindings/arm/atmel-sysregs.txt       |  4 +++-
  Documentation/devicetree/bindings/net/macb.txt      |  4 ++--
  drivers/net/ethernet/cadence/macb_main.c            |  1 +
  drivers/power/reset/at91-reset.c                    | 13 +++++++++++++
  drivers/usb/host/ohci-at91.c                        |  7 +++++--
  5 files changed, 24 insertions(+), 5 deletions(-)
Signature · 1 line
Nicolas Ferre