linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml
@ 2021-05-27 10:01 Eugen Hristev
  2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Eugen Hristev @ 2021-05-27 10:01 UTC (permalink / raw)
  To: wim, linux, robh+dt
  Cc: nicolas.ferre, linux-watchdog, devicetree, linux-arm-kernel,
	linux-kernel, Eugen Hristev

Convert the old txt binding to yaml format.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 .../bindings/watchdog/atmel,sama5d4-wdt.yaml  | 73 +++++++++++++++++++
 .../bindings/watchdog/atmel-sama5d4-wdt.txt   | 34 ---------
 2 files changed, 73 insertions(+), 34 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
 delete mode 100644 Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt

diff --git a/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
new file mode 100644
index 000000000000..0d0ab81da040
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/atmel,sama5d4-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel SAMA5D4 Watchdog Timer (WDT) Controller
+
+maintainers:
+  - Eugen Hristev <eugen.hristev@microchip.com>
+
+allOf:
+  - $ref: "watchdog.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - atmel,sama5d4-wdt
+      - microchip,sam9x60-wdt
+
+  reg:
+    maxItems: 1
+
+  atmel,watchdog-type:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: should be hardware or software.
+    oneOf:
+      - description:
+          Enable watchdog fault reset. A watchdog fault triggers
+          watchdog reset.
+        const: hardware
+      - description:
+          Enable watchdog fault interrupt. A watchdog fault asserts
+          watchdog interrupt.
+        const: software
+    default: hardware
+
+  atmel,idle-halt:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: |
+      present if you want to stop the watchdog when the CPU is in idle state.
+      CAUTION: This property should be used with care, it actually makes the
+      watchdog not counting when the CPU is in idle state, therefore the
+      watchdog reset time depends on mean CPU usage and will not reset at all
+      if the CPU stop working while it is in idle state, which is probably
+      not what you want.
+
+  atmel,dbg-halt:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: |
+      present if you want to stop the watchdog when the CPU is in debug state.
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    watchdog@fc068640 {
+      compatible = "atmel,sama5d4-wdt";
+      reg = <0xfc068640 0x10>;
+      interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
+      timeout-sec = <10>;
+      atmel,watchdog-type = "hardware";
+      atmel,dbg-halt;
+      atmel,idle-halt;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
deleted file mode 100644
index 44727fcc2729..000000000000
--- a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-* Atmel SAMA5D4 Watchdog Timer (WDT) Controller
-
-Required properties:
-- compatible: "atmel,sama5d4-wdt" or "microchip,sam9x60-wdt"
-- reg: base physical address and length of memory mapped region.
-
-Optional properties:
-- timeout-sec: watchdog timeout value (in seconds).
-- interrupts: interrupt number to the CPU.
-- atmel,watchdog-type: should be "hardware" or "software".
-	"hardware": enable watchdog fault reset. A watchdog fault triggers
-		    watchdog reset.
-	"software": enable watchdog fault interrupt. A watchdog fault asserts
-		    watchdog interrupt.
-- atmel,idle-halt: present if you want to stop the watchdog when the CPU is
-		   in idle state.
-	CAUTION: This property should be used with care, it actually makes the
-	watchdog not counting when the CPU is in idle state, therefore the
-	watchdog reset time depends on mean CPU usage and will not reset at all
-	if the CPU stop working while it is in idle state, which is probably
-	not what you want.
-- atmel,dbg-halt: present if you want to stop the watchdog when the CPU is
-		  in debug state.
-
-Example:
-	watchdog@fc068640 {
-		compatible = "atmel,sama5d4-wdt";
-		reg = <0xfc068640 0x10>;
-		interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
-		timeout-sec = <10>;
-		atmel,watchdog-type = "hardware";
-		atmel,dbg-halt;
-		atmel,idle-halt;
-	};
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt
  2021-05-27 10:01 [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Eugen Hristev
@ 2021-05-27 10:01 ` Eugen Hristev
  2021-05-27 12:09   ` Nicolas Ferre
  2021-05-27 16:55   ` Guenter Roeck
  2021-05-27 10:01 ` [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible " Eugen Hristev
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 12+ messages in thread
From: Eugen Hristev @ 2021-05-27 10:01 UTC (permalink / raw)
  To: wim, linux, robh+dt
  Cc: nicolas.ferre, linux-watchdog, devicetree, linux-arm-kernel,
	linux-kernel, Eugen Hristev

Add support for compatible sama7g5-wdt.
The sama7g5 wdt is the same hardware block as on sam9x60.
Adapt the driver to use the sam9x60/sama7g5 variant if either
of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index e5d11d6a2600..ec20ad4e534f 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
 	wdd->min_timeout = MIN_WDT_TIMEOUT;
 	wdd->max_timeout = MAX_WDT_TIMEOUT;
 	wdt->last_ping = jiffies;
-	wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
-						       "microchip,sam9x60-wdt");
+
+	if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
+	    of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
+		wdt->sam9x60_support = true;
 
 	watchdog_set_drvdata(wdd, wdt);
 
@@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
 	{
 		.compatible = "microchip,sam9x60-wdt",
 	},
+	{
+		.compatible = "microchip,sama7g5-wdt",
+	},
+
 	{ }
 };
 MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible for sama7g5-wdt
  2021-05-27 10:01 [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Eugen Hristev
  2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev
@ 2021-05-27 10:01 ` Eugen Hristev
  2021-06-04 20:20   ` Rob Herring
  2021-06-04 20:20 ` [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Rob Herring
  2021-06-06 16:52 ` Nicolas Ferre
  3 siblings, 1 reply; 12+ messages in thread
From: Eugen Hristev @ 2021-05-27 10:01 UTC (permalink / raw)
  To: wim, linux, robh+dt
  Cc: nicolas.ferre, linux-watchdog, devicetree, linux-arm-kernel,
	linux-kernel, Eugen Hristev

This driver is also compatible with the watchdog on sama7g5 SoC.
Add the corresponding compatible string to the binding.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 .../devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
index 0d0ab81da040..9856cd76c28d 100644
--- a/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
@@ -17,6 +17,7 @@ properties:
     enum:
       - atmel,sama5d4-wdt
       - microchip,sam9x60-wdt
+      - microchip,sama7g5-wdt
 
   reg:
     maxItems: 1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt
  2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev
@ 2021-05-27 12:09   ` Nicolas Ferre
  2021-05-27 16:55   ` Guenter Roeck
  1 sibling, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2021-05-27 12:09 UTC (permalink / raw)
  To: Eugen Hristev, wim, linux, robh+dt
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-kernel

On 27/05/2021 at 12:01, Eugen Hristev wrote:
> Add support for compatible sama7g5-wdt.
> The sama7g5 wdt is the same hardware block as on sam9x60.
> Adapt the driver to use the sam9x60/sama7g5 variant if either
> of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

Looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks, best regards,
   Nicolas

> ---
>   drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index e5d11d6a2600..ec20ad4e534f 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>   	wdd->min_timeout = MIN_WDT_TIMEOUT;
>   	wdd->max_timeout = MAX_WDT_TIMEOUT;
>   	wdt->last_ping = jiffies;
> -	wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
> -						       "microchip,sam9x60-wdt");
> +
> +	if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
> +	    of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
> +		wdt->sam9x60_support = true;
>   
>   	watchdog_set_drvdata(wdd, wdt);
>   
> @@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
>   	{
>   		.compatible = "microchip,sam9x60-wdt",
>   	},
> +	{
> +		.compatible = "microchip,sama7g5-wdt",
> +	},
> +
>   	{ }
>   };
>   MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt
  2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev
  2021-05-27 12:09   ` Nicolas Ferre
@ 2021-05-27 16:55   ` Guenter Roeck
  2021-06-11  7:19     ` Nicolas Ferre
  1 sibling, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-05-27 16:55 UTC (permalink / raw)
  To: Eugen Hristev
  Cc: wim, robh+dt, nicolas.ferre, linux-watchdog, devicetree,
	linux-arm-kernel, linux-kernel

On Thu, May 27, 2021 at 01:01:19PM +0300, Eugen Hristev wrote:
> Add support for compatible sama7g5-wdt.
> The sama7g5 wdt is the same hardware block as on sam9x60.
> Adapt the driver to use the sam9x60/sama7g5 variant if either
> of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index e5d11d6a2600..ec20ad4e534f 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;
>  	wdd->max_timeout = MAX_WDT_TIMEOUT;
>  	wdt->last_ping = jiffies;
> -	wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
> -						       "microchip,sam9x60-wdt");
> +
> +	if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
> +	    of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
> +		wdt->sam9x60_support = true;
>  
>  	watchdog_set_drvdata(wdd, wdt);
>  
> @@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
>  	{
>  		.compatible = "microchip,sam9x60-wdt",
>  	},
> +	{
> +		.compatible = "microchip,sama7g5-wdt",
> +	},
> +
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml
  2021-05-27 10:01 [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Eugen Hristev
  2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev
  2021-05-27 10:01 ` [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible " Eugen Hristev
@ 2021-06-04 20:20 ` Rob Herring
  2021-06-06 16:52 ` Nicolas Ferre
  3 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2021-06-04 20:20 UTC (permalink / raw)
  To: Eugen Hristev
  Cc: devicetree, linux, robh+dt, wim, linux-watchdog, linux-kernel,
	linux-arm-kernel, nicolas.ferre

On Thu, 27 May 2021 13:01:18 +0300, Eugen Hristev wrote:
> Convert the old txt binding to yaml format.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
>  .../bindings/watchdog/atmel,sama5d4-wdt.yaml  | 73 +++++++++++++++++++
>  .../bindings/watchdog/atmel-sama5d4-wdt.txt   | 34 ---------
>  2 files changed, 73 insertions(+), 34 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible for sama7g5-wdt
  2021-05-27 10:01 ` [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible " Eugen Hristev
@ 2021-06-04 20:20   ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2021-06-04 20:20 UTC (permalink / raw)
  To: Eugen Hristev
  Cc: nicolas.ferre, linux, linux-watchdog, wim, linux-kernel,
	linux-arm-kernel, robh+dt, devicetree

On Thu, 27 May 2021 13:01:20 +0300, Eugen Hristev wrote:
> This driver is also compatible with the watchdog on sama7g5 SoC.
> Add the corresponding compatible string to the binding.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
>  .../devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml          | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml
  2021-05-27 10:01 [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Eugen Hristev
                   ` (2 preceding siblings ...)
  2021-06-04 20:20 ` [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Rob Herring
@ 2021-06-06 16:52 ` Nicolas Ferre
  2021-06-11 12:19   ` Nicolas Ferre
  3 siblings, 1 reply; 12+ messages in thread
From: Nicolas Ferre @ 2021-06-06 16:52 UTC (permalink / raw)
  To: Eugen Hristev, wim, linux, robh+dt
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-kernel

On 27/05/2021 at 12:01, Eugen Hristev wrote:
> Convert the old txt binding to yaml format.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

Series queued on at91-dt for 5.14. Will be sent to arm-soc soon.
Thanks, best regards,
   Nicolas

> ---
>   .../bindings/watchdog/atmel,sama5d4-wdt.yaml  | 73 +++++++++++++++++++
>   .../bindings/watchdog/atmel-sama5d4-wdt.txt   | 34 ---------
>   2 files changed, 73 insertions(+), 34 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
>   delete mode 100644 Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
> new file mode 100644
> index 000000000000..0d0ab81da040
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
> @@ -0,0 +1,73 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/atmel,sama5d4-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel SAMA5D4 Watchdog Timer (WDT) Controller
> +
> +maintainers:
> +  - Eugen Hristev <eugen.hristev@microchip.com>
> +
> +allOf:
> +  - $ref: "watchdog.yaml#"
> +
> +properties:
> +  compatible:
> +    enum:
> +      - atmel,sama5d4-wdt
> +      - microchip,sam9x60-wdt
> +
> +  reg:
> +    maxItems: 1
> +
> +  atmel,watchdog-type:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: should be hardware or software.
> +    oneOf:
> +      - description:
> +          Enable watchdog fault reset. A watchdog fault triggers
> +          watchdog reset.
> +        const: hardware
> +      - description:
> +          Enable watchdog fault interrupt. A watchdog fault asserts
> +          watchdog interrupt.
> +        const: software
> +    default: hardware
> +
> +  atmel,idle-halt:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: |
> +      present if you want to stop the watchdog when the CPU is in idle state.
> +      CAUTION: This property should be used with care, it actually makes the
> +      watchdog not counting when the CPU is in idle state, therefore the
> +      watchdog reset time depends on mean CPU usage and will not reset at all
> +      if the CPU stop working while it is in idle state, which is probably
> +      not what you want.
> +
> +  atmel,dbg-halt:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: |
> +      present if you want to stop the watchdog when the CPU is in debug state.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    watchdog@fc068640 {
> +      compatible = "atmel,sama5d4-wdt";
> +      reg = <0xfc068640 0x10>;
> +      interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
> +      timeout-sec = <10>;
> +      atmel,watchdog-type = "hardware";
> +      atmel,dbg-halt;
> +      atmel,idle-halt;
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
> deleted file mode 100644
> index 44727fcc2729..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -* Atmel SAMA5D4 Watchdog Timer (WDT) Controller
> -
> -Required properties:
> -- compatible: "atmel,sama5d4-wdt" or "microchip,sam9x60-wdt"
> -- reg: base physical address and length of memory mapped region.
> -
> -Optional properties:
> -- timeout-sec: watchdog timeout value (in seconds).
> -- interrupts: interrupt number to the CPU.
> -- atmel,watchdog-type: should be "hardware" or "software".
> -	"hardware": enable watchdog fault reset. A watchdog fault triggers
> -		    watchdog reset.
> -	"software": enable watchdog fault interrupt. A watchdog fault asserts
> -		    watchdog interrupt.
> -- atmel,idle-halt: present if you want to stop the watchdog when the CPU is
> -		   in idle state.
> -	CAUTION: This property should be used with care, it actually makes the
> -	watchdog not counting when the CPU is in idle state, therefore the
> -	watchdog reset time depends on mean CPU usage and will not reset at all
> -	if the CPU stop working while it is in idle state, which is probably
> -	not what you want.
> -- atmel,dbg-halt: present if you want to stop the watchdog when the CPU is
> -		  in debug state.
> -
> -Example:
> -	watchdog@fc068640 {
> -		compatible = "atmel,sama5d4-wdt";
> -		reg = <0xfc068640 0x10>;
> -		interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
> -		timeout-sec = <10>;
> -		atmel,watchdog-type = "hardware";
> -		atmel,dbg-halt;
> -		atmel,idle-halt;
> -	};
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt
  2021-05-27 16:55   ` Guenter Roeck
@ 2021-06-11  7:19     ` Nicolas Ferre
  2021-06-11 10:35       ` Guenter Roeck
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Ferre @ 2021-06-11  7:19 UTC (permalink / raw)
  To: wim, Guenter Roeck, linux-watchdog, Eugen Hristev
  Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel

On 27/05/2021 at 18:55, Guenter Roeck wrote:
> On Thu, May 27, 2021 at 01:01:19PM +0300, Eugen Hristev wrote:
>> Add support for compatible sama7g5-wdt.
>> The sama7g5 wdt is the same hardware block as on sam9x60.
>> Adapt the driver to use the sam9x60/sama7g5 variant if either
>> of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).
>>
>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> 
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Guenter, Wim,

How do we proceed? Do I take this "driver" patch through my tree which 
goes to arm-soc or do you take it with the watchdog tree?

I'm planning to send my pull-requests before the end of this week.

Best regards,
   Nicolas

>> ---
>>   drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
>> index e5d11d6a2600..ec20ad4e534f 100644
>> --- a/drivers/watchdog/sama5d4_wdt.c
>> +++ b/drivers/watchdog/sama5d4_wdt.c
>> @@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>>        wdd->min_timeout = MIN_WDT_TIMEOUT;
>>        wdd->max_timeout = MAX_WDT_TIMEOUT;
>>        wdt->last_ping = jiffies;
>> -     wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
>> -                                                    "microchip,sam9x60-wdt");
>> +
>> +     if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
>> +         of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
>> +             wdt->sam9x60_support = true;
>>
>>        watchdog_set_drvdata(wdd, wdt);
>>
>> @@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
>>        {
>>                .compatible = "microchip,sam9x60-wdt",
>>        },
>> +     {
>> +             .compatible = "microchip,sama7g5-wdt",
>> +     },
>> +
>>        { }
>>   };
>>   MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
>> --
>> 2.25.1
>>


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt
  2021-06-11  7:19     ` Nicolas Ferre
@ 2021-06-11 10:35       ` Guenter Roeck
  2021-06-11 12:24         ` Nicolas Ferre
  0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-06-11 10:35 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: wim, linux-watchdog, Eugen Hristev, robh+dt, devicetree,
	linux-arm-kernel, linux-kernel

On Fri, Jun 11, 2021 at 09:19:56AM +0200, Nicolas Ferre wrote:
> On 27/05/2021 at 18:55, Guenter Roeck wrote:
> > On Thu, May 27, 2021 at 01:01:19PM +0300, Eugen Hristev wrote:
> > > Add support for compatible sama7g5-wdt.
> > > The sama7g5 wdt is the same hardware block as on sam9x60.
> > > Adapt the driver to use the sam9x60/sama7g5 variant if either
> > > of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).
> > > 
> > > Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> > 
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> 
> Guenter, Wim,
> 
> How do we proceed? Do I take this "driver" patch through my tree which goes
> to arm-soc or do you take it with the watchdog tree?

I applied the series to my watchdog-next branch. That is all I can do
from my side.

Guenter

> 
> I'm planning to send my pull-requests before the end of this week.
> 
> Best regards,
>   Nicolas
> 
> > > ---
> > >   drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
> > >   1 file changed, 8 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> > > index e5d11d6a2600..ec20ad4e534f 100644
> > > --- a/drivers/watchdog/sama5d4_wdt.c
> > > +++ b/drivers/watchdog/sama5d4_wdt.c
> > > @@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
> > >        wdd->min_timeout = MIN_WDT_TIMEOUT;
> > >        wdd->max_timeout = MAX_WDT_TIMEOUT;
> > >        wdt->last_ping = jiffies;
> > > -     wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
> > > -                                                    "microchip,sam9x60-wdt");
> > > +
> > > +     if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
> > > +         of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
> > > +             wdt->sam9x60_support = true;
> > > 
> > >        watchdog_set_drvdata(wdd, wdt);
> > > 
> > > @@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
> > >        {
> > >                .compatible = "microchip,sam9x60-wdt",
> > >        },
> > > +     {
> > > +             .compatible = "microchip,sama7g5-wdt",
> > > +     },
> > > +
> > >        { }
> > >   };
> > >   MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
> > > --
> > > 2.25.1
> > > 
> 
> 
> -- 
> Nicolas Ferre

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml
  2021-06-06 16:52 ` Nicolas Ferre
@ 2021-06-11 12:19   ` Nicolas Ferre
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2021-06-11 12:19 UTC (permalink / raw)
  To: Eugen Hristev, wim, linux, robh+dt
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-kernel

On 06/06/2021 at 18:52, Nicolas Ferre wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 27/05/2021 at 12:01, Eugen Hristev wrote:
>> Convert the old txt binding to yaml format.
>>
>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> 
> Series queued on at91-dt for 5.14. Will be sent to arm-soc soon.

Please ignore this comment which has no meaning as all the content of 
this series must progress with the "watchdog" tree and not at91->arm-soc!

Sorry for the noise and confusion. I'm removing the patches from at91-dt 
right now.

Best regards,
   Nicolas

>> ---
>>    .../bindings/watchdog/atmel,sama5d4-wdt.yaml  | 73 +++++++++++++++++++
>>    .../bindings/watchdog/atmel-sama5d4-wdt.txt   | 34 ---------
>>    2 files changed, 73 insertions(+), 34 deletions(-)
>>    create mode 100644 Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
>>    delete mode 100644 Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
>>
>> diff --git a/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
>> new file mode 100644
>> index 000000000000..0d0ab81da040
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/watchdog/atmel,sama5d4-wdt.yaml
>> @@ -0,0 +1,73 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/watchdog/atmel,sama5d4-wdt.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel SAMA5D4 Watchdog Timer (WDT) Controller
>> +
>> +maintainers:
>> +  - Eugen Hristev <eugen.hristev@microchip.com>
>> +
>> +allOf:
>> +  - $ref: "watchdog.yaml#"
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - atmel,sama5d4-wdt
>> +      - microchip,sam9x60-wdt
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  atmel,watchdog-type:
>> +    $ref: /schemas/types.yaml#/definitions/string
>> +    description: should be hardware or software.
>> +    oneOf:
>> +      - description:
>> +          Enable watchdog fault reset. A watchdog fault triggers
>> +          watchdog reset.
>> +        const: hardware
>> +      - description:
>> +          Enable watchdog fault interrupt. A watchdog fault asserts
>> +          watchdog interrupt.
>> +        const: software
>> +    default: hardware
>> +
>> +  atmel,idle-halt:
>> +    $ref: /schemas/types.yaml#/definitions/flag
>> +    description: |
>> +      present if you want to stop the watchdog when the CPU is in idle state.
>> +      CAUTION: This property should be used with care, it actually makes the
>> +      watchdog not counting when the CPU is in idle state, therefore the
>> +      watchdog reset time depends on mean CPU usage and will not reset at all
>> +      if the CPU stop working while it is in idle state, which is probably
>> +      not what you want.
>> +
>> +  atmel,dbg-halt:
>> +    $ref: /schemas/types.yaml#/definitions/flag
>> +    description: |
>> +      present if you want to stop the watchdog when the CPU is in debug state.
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +
>> +    watchdog@fc068640 {
>> +      compatible = "atmel,sama5d4-wdt";
>> +      reg = <0xfc068640 0x10>;
>> +      interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
>> +      timeout-sec = <10>;
>> +      atmel,watchdog-type = "hardware";
>> +      atmel,dbg-halt;
>> +      atmel,idle-halt;
>> +    };
>> +
>> +...
>> diff --git a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
>> deleted file mode 100644
>> index 44727fcc2729..000000000000
>> --- a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt
>> +++ /dev/null
>> @@ -1,34 +0,0 @@
>> -* Atmel SAMA5D4 Watchdog Timer (WDT) Controller
>> -
>> -Required properties:
>> -- compatible: "atmel,sama5d4-wdt" or "microchip,sam9x60-wdt"
>> -- reg: base physical address and length of memory mapped region.
>> -
>> -Optional properties:
>> -- timeout-sec: watchdog timeout value (in seconds).
>> -- interrupts: interrupt number to the CPU.
>> -- atmel,watchdog-type: should be "hardware" or "software".
>> -     "hardware": enable watchdog fault reset. A watchdog fault triggers
>> -                 watchdog reset.
>> -     "software": enable watchdog fault interrupt. A watchdog fault asserts
>> -                 watchdog interrupt.
>> -- atmel,idle-halt: present if you want to stop the watchdog when the CPU is
>> -                in idle state.
>> -     CAUTION: This property should be used with care, it actually makes the
>> -     watchdog not counting when the CPU is in idle state, therefore the
>> -     watchdog reset time depends on mean CPU usage and will not reset at all
>> -     if the CPU stop working while it is in idle state, which is probably
>> -     not what you want.
>> -- atmel,dbg-halt: present if you want to stop the watchdog when the CPU is
>> -               in debug state.
>> -
>> -Example:
>> -     watchdog@fc068640 {
>> -             compatible = "atmel,sama5d4-wdt";
>> -             reg = <0xfc068640 0x10>;
>> -             interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
>> -             timeout-sec = <10>;
>> -             atmel,watchdog-type = "hardware";
>> -             atmel,dbg-halt;
>> -             atmel,idle-halt;
>> -     };
>>
> 
> 
> --
> Nicolas Ferre
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt
  2021-06-11 10:35       ` Guenter Roeck
@ 2021-06-11 12:24         ` Nicolas Ferre
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2021-06-11 12:24 UTC (permalink / raw)
  To: Guenter Roeck, linux-watchdog, wim
  Cc: Eugen Hristev, robh+dt, devicetree, linux-arm-kernel, linux-kernel

On 11/06/2021 at 12:35, Guenter Roeck wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Fri, Jun 11, 2021 at 09:19:56AM +0200, Nicolas Ferre wrote:
>> On 27/05/2021 at 18:55, Guenter Roeck wrote:
>>> On Thu, May 27, 2021 at 01:01:19PM +0300, Eugen Hristev wrote:
>>>> Add support for compatible sama7g5-wdt.
>>>> The sama7g5 wdt is the same hardware block as on sam9x60.
>>>> Adapt the driver to use the sam9x60/sama7g5 variant if either
>>>> of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).
>>>>
>>>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>>>
>>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>>
>> Guenter, Wim,
>>
>> How do we proceed? Do I take this "driver" patch through my tree which goes
>> to arm-soc or do you take it with the watchdog tree?

Forget what I said above...

> I applied the series to my watchdog-next branch. That is all I can do
> from my side.

Guenter,

Sorry but I was confused and Eugen helped me realize that there was only 
watchdog related contents and associated DT binding documentation in the 
series. So all should go through Wim and your tree.

>> I'm planning to send my pull-requests before the end of this week.

Without "watchdog" material in it... so basically you don't care ;-)

Best regards,
   Nicolas

>>>> ---
>>>>    drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
>>>>    1 file changed, 8 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
>>>> index e5d11d6a2600..ec20ad4e534f 100644
>>>> --- a/drivers/watchdog/sama5d4_wdt.c
>>>> +++ b/drivers/watchdog/sama5d4_wdt.c
>>>> @@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>>>>         wdd->min_timeout = MIN_WDT_TIMEOUT;
>>>>         wdd->max_timeout = MAX_WDT_TIMEOUT;
>>>>         wdt->last_ping = jiffies;
>>>> -     wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
>>>> -                                                    "microchip,sam9x60-wdt");
>>>> +
>>>> +     if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
>>>> +         of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
>>>> +             wdt->sam9x60_support = true;
>>>>
>>>>         watchdog_set_drvdata(wdd, wdt);
>>>>
>>>> @@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
>>>>         {
>>>>                 .compatible = "microchip,sam9x60-wdt",
>>>>         },
>>>> +     {
>>>> +             .compatible = "microchip,sama7g5-wdt",
>>>> +     },
>>>> +
>>>>         { }
>>>>    };
>>>>    MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
>>>> --
>>>> 2.25.1
>>>>
>>
>>
>> --
>> Nicolas Ferre


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-06-11 12:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 10:01 [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Eugen Hristev
2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev
2021-05-27 12:09   ` Nicolas Ferre
2021-05-27 16:55   ` Guenter Roeck
2021-06-11  7:19     ` Nicolas Ferre
2021-06-11 10:35       ` Guenter Roeck
2021-06-11 12:24         ` Nicolas Ferre
2021-05-27 10:01 ` [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible " Eugen Hristev
2021-06-04 20:20   ` Rob Herring
2021-06-04 20:20 ` [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Rob Herring
2021-06-06 16:52 ` Nicolas Ferre
2021-06-11 12:19   ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).