diff mbox series

[2/3] dt-bindings: watchdog: sunxi: Add compatible for D1

Message ID 20210726035143.53132-2-samuel@sholland.org
State Superseded
Headers show
Series None | expand

Commit Message

Samuel Holland July 26, 2021, 3:51 a.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.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml   | 2 ++
 1 file changed, 2 insertions(+)

Comments

Guenter Roeck July 29, 2021, 4:24 a.m. UTC | #1
On Sun, Jul 25, 2021 at 10:51:42PM -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.

> 

> Signed-off-by: Samuel Holland <samuel@sholland.org>

> ---

>  .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml   | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

> index 853ceb1b7c0f..756e6ab99860 100644

> --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

> +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

> @@ -29,6 +29,7 @@ properties:

>        - items:

>            - const: allwinner,suniv-f1c100s-wdt

>            - const: allwinner,sun4i-a10-wdt

> +      - const: allwinner,sun20i-d1-wdt


Alignment is off.

Guenter

>  

>    reg:

>      maxItems: 1

> @@ -59,6 +60,7 @@ if:

>      compatible:

>        contains:

>          enum:

> +          - allwinner,sun20i-d1-wdt

>            - allwinner,sun50i-r329-wdt

>  

>  then:
Rob Herring July 29, 2021, 10:39 p.m. UTC | #2
On Wed, Jul 28, 2021 at 09:24:49PM -0700, Guenter Roeck wrote:
> On Sun, Jul 25, 2021 at 10:51:42PM -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.

> > 

> > Signed-off-by: Samuel Holland <samuel@sholland.org>

> > ---

> >  .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml   | 2 ++

> >  1 file changed, 2 insertions(+)

> > 

> > diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

> > index 853ceb1b7c0f..756e6ab99860 100644

> > --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

> > +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

> > @@ -29,6 +29,7 @@ properties:

> >        - items:

> >            - const: allwinner,suniv-f1c100s-wdt

> >            - const: allwinner,sun4i-a10-wdt

> > +      - const: allwinner,sun20i-d1-wdt

> 

> Alignment is off.


No, it's correct. It's not part of the above list, but a new 'oneOf' 
entry.

Rob
Rob Herring July 29, 2021, 10:40 p.m. UTC | #3
On Sun, 25 Jul 2021 22:51:42 -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.

> 

> Signed-off-by: Samuel Holland <samuel@sholland.org>

> ---

>  .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml   | 2 ++

>  1 file changed, 2 insertions(+)

> 


Reviewed-by: Rob Herring <robh@kernel.org>
Guenter Roeck July 30, 2021, 1:14 a.m. UTC | #4
On 7/29/21 3:39 PM, Rob Herring wrote:
> On Wed, Jul 28, 2021 at 09:24:49PM -0700, Guenter Roeck wrote:

>> On Sun, Jul 25, 2021 at 10:51:42PM -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.

>>>

>>> Signed-off-by: Samuel Holland <samuel@sholland.org>

>>> ---

>>>   .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml   | 2 ++

>>>   1 file changed, 2 insertions(+)

>>>

>>> diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

>>> index 853ceb1b7c0f..756e6ab99860 100644

>>> --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

>>> +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

>>> @@ -29,6 +29,7 @@ properties:

>>>         - items:

>>>             - const: allwinner,suniv-f1c100s-wdt

>>>             - const: allwinner,sun4i-a10-wdt

>>> +      - const: allwinner,sun20i-d1-wdt

>>

>> Alignment is off.

> 

> No, it's correct. It's not part of the above list, but a new 'oneOf'

> entry.

> 


Ok, I really should not try to review devicetree files.

Thanks,
Guenter
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 853ceb1b7c0f..756e6ab99860 100644
--- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
@@ -29,6 +29,7 @@  properties:
       - items:
           - const: allwinner,suniv-f1c100s-wdt
           - const: allwinner,sun4i-a10-wdt
+      - const: allwinner,sun20i-d1-wdt
 
   reg:
     maxItems: 1
@@ -59,6 +60,7 @@  if:
     compatible:
       contains:
         enum:
+          - allwinner,sun20i-d1-wdt
           - allwinner,sun50i-r329-wdt
 
 then: