diff mbox series

[v3,2/3] dt-bindings: watchdog: sunxi: Add compatibles for D1

Message ID 20210902225750.29313-3-samuel@sholland.org
State Accepted
Commit 601db217916de339ddebeb3b6f024f09a275562a
Headers show
Series Allwinner R329 and D1 watchdog support | expand

Commit Message

Samuel Holland Sept. 2, 2021, 10:57 p.m. UTC
D1 keeps the same register layout and clock sources as the R329, but it
adds a key field which must be set to update the watchdog's "CFG" and
"MODE" registers. Therefore it is not backward-compatible.

Similarly to the R329, the D1 has three watchdog instances, and only one
of them has the "soft reset" registers. So that instance needs an extra
compatible string.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
Changes v2 to v3:
 - Add additional allwinner,sun20i-d1-wdt-reset compatible
Changes v1 to v2:
 - None

 .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml          | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Guenter Roeck Sept. 4, 2021, 3:11 p.m. UTC | #1
On Thu, Sep 02, 2021 at 05:57:49PM -0500, Samuel Holland wrote:
> D1 keeps the same register layout and clock sources as the R329, but it
> adds a key field which must be set to update the watchdog's "CFG" and
> "MODE" registers. Therefore it is not backward-compatible.
> 
> Similarly to the R329, the D1 has three watchdog instances, and only one
> of them has the "soft reset" registers. So that instance needs an extra
> compatible string.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> Acked-by: Maxime Ripard <maxime@cerno.tech>

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

> ---
> Changes v2 to v3:
>  - Add additional allwinner,sun20i-d1-wdt-reset compatible
> Changes v1 to v2:
>  - None
> 
>  .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml          | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
> index 877f47759814..44cad9427ae6 100644
> --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
> @@ -30,6 +30,10 @@ properties:
>        - items:
>            - const: allwinner,suniv-f1c100s-wdt
>            - const: allwinner,sun4i-a10-wdt
> +      - const: allwinner,sun20i-d1-wdt
> +      - items:
> +          - const: allwinner,sun20i-d1-wdt-reset
> +          - const: allwinner,sun20i-d1-wdt
>  
>    reg:
>      maxItems: 1
> @@ -62,6 +66,8 @@ if:
>      compatible:
>        contains:
>          enum:
> +          - allwinner,sun20i-d1-wdt
> +          - allwinner,sun20i-d1-wdt-reset
>            - allwinner,sun50i-r329-wdt
>            - allwinner,sun50i-r329-wdt-reset
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
index 877f47759814..44cad9427ae6 100644
--- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
@@ -30,6 +30,10 @@  properties:
       - items:
           - const: allwinner,suniv-f1c100s-wdt
           - const: allwinner,sun4i-a10-wdt
+      - const: allwinner,sun20i-d1-wdt
+      - items:
+          - const: allwinner,sun20i-d1-wdt-reset
+          - const: allwinner,sun20i-d1-wdt
 
   reg:
     maxItems: 1
@@ -62,6 +66,8 @@  if:
     compatible:
       contains:
         enum:
+          - allwinner,sun20i-d1-wdt
+          - allwinner,sun20i-d1-wdt-reset
           - allwinner,sun50i-r329-wdt
           - allwinner,sun50i-r329-wdt-reset