2019-05-18 15:29:47

by Clément Péron

[permalink] [raw]
Subject: [PATCH v3 1/4] dt-bindings: watchdog: add Allwinner H6 watchdog

Allwinner H6 has a similar watchdog as the A64 which is already
a compatible of the A31.

This commit sort the lines and add the H6 compatible.

Signed-off-by: Clément Péron <[email protected]>
---
.../devicetree/bindings/watchdog/sunxi-wdt.txt | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
index 46055254e8dd..f4810f8ad1c5 100644
--- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -3,10 +3,12 @@ Allwinner SoCs Watchdog timer
Required properties:

- compatible : should be one of
- "allwinner,sun4i-a10-wdt"
- "allwinner,sun6i-a31-wdt"
- "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
- "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt"
+ - "allwinner,sun4i-a10-wdt"
+ - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
+ - "allwinner,sun50i-h6-wdt","allwinner,sun50i-a64-wdt",
+ "allwinner,sun6i-a31-wdt"
+ - "allwinner,sun6i-a31-wdt"
+ - "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt"
- reg : Specifies base physical address and size of the registers.

Optional properties:
--
2.17.1


2019-05-20 08:50:55

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: watchdog: add Allwinner H6 watchdog

On Sat, May 18, 2019 at 05:23:52PM +0200, Cl?ment P?ron wrote:
> Allwinner H6 has a similar watchdog as the A64 which is already
> a compatible of the A31.
>
> This commit sort the lines and add the H6 compatible.
>
> Signed-off-by: Cl?ment P?ron <[email protected]>
> ---
> .../devicetree/bindings/watchdog/sunxi-wdt.txt | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> index 46055254e8dd..f4810f8ad1c5 100644
> --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> @@ -3,10 +3,12 @@ Allwinner SoCs Watchdog timer
> Required properties:
>
> - compatible : should be one of
> - "allwinner,sun4i-a10-wdt"
> - "allwinner,sun6i-a31-wdt"
> - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
> - "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt"

That sorting was kind of intentional

> + - "allwinner,sun4i-a10-wdt"
> + - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
> + - "allwinner,sun50i-h6-wdt","allwinner,sun50i-a64-wdt",
> + "allwinner,sun6i-a31-wdt"

Is there a reason to keep the A64 compatible?

Thanks,
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (1.37 kB)
signature.asc (235.00 B)
Download all attachments

2019-05-20 09:39:47

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: watchdog: add Allwinner H6 watchdog

Hi Maxime,

On Mon, 20 May 2019 at 09:35, Maxime Ripard <[email protected]> wrote:
>
> On Sat, May 18, 2019 at 05:23:52PM +0200, Clément Péron wrote:
> > Allwinner H6 has a similar watchdog as the A64 which is already
> > a compatible of the A31.
> >
> > This commit sort the lines and add the H6 compatible.
> >
> > Signed-off-by: Clément Péron <[email protected]>
> > ---
> > .../devicetree/bindings/watchdog/sunxi-wdt.txt | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> > index 46055254e8dd..f4810f8ad1c5 100644
> > --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> > @@ -3,10 +3,12 @@ Allwinner SoCs Watchdog timer
> > Required properties:
> >
> > - compatible : should be one of
> > - "allwinner,sun4i-a10-wdt"
> > - "allwinner,sun6i-a31-wdt"
> > - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
> > - "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt"
>
> That sorting was kind of intentional
Arg indeed, I will remove it.


>
> > + - "allwinner,sun4i-a10-wdt"
> > + - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
> > + - "allwinner,sun50i-h6-wdt","allwinner,sun50i-a64-wdt",
> > + "allwinner,sun6i-a31-wdt"
>
> Is there a reason to keep the A64 compatible?
Yes, A64 and H6 has the exact same memory mapping looking at the datasheet.
So if there is an errata or a new feature for the A64, it should be
also compatible with the H6.
Which is not the case with A31 (WDT_KEY_FIELD is not preset)

Thanks,
Clement

>
> Thanks,
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

2019-05-20 18:13:27

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: watchdog: add Allwinner H6 watchdog

On Mon, May 20, 2019 at 10:14:10AM +0200, Cl?ment P?ron wrote:
> >
> > > + - "allwinner,sun4i-a10-wdt"
> > > + - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
> > > + - "allwinner,sun50i-h6-wdt","allwinner,sun50i-a64-wdt",
> > > + "allwinner,sun6i-a31-wdt"
> >
> > Is there a reason to keep the A64 compatible?
>
> Yes, A64 and H6 has the exact same memory mapping looking at the datasheet.
> So if there is an errata or a new feature for the A64, it should be
> also compatible with the H6.
> Which is not the case with A31 (WDT_KEY_FIELD is not preset)

The thing is, if you use those three compatibles, then you're saying
that it's ok for the OS to use first the H6 driver, then the A64
driver, and then the A31 driver.

If the A31 isn't compatible, then it shouldn't be listed there. And if
it is, then you can skip the A64 compatible.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (985.00 B)
signature.asc (235.00 B)
Download all attachments

2019-05-20 18:16:16

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: watchdog: add Allwinner H6 watchdog

On Mon, 20 May 2019 at 16:43, Maxime Ripard <[email protected]> wrote:
>
> On Mon, May 20, 2019 at 10:14:10AM +0200, Clément Péron wrote:
> > >
> > > > + - "allwinner,sun4i-a10-wdt"
> > > > + - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
> > > > + - "allwinner,sun50i-h6-wdt","allwinner,sun50i-a64-wdt",
> > > > + "allwinner,sun6i-a31-wdt"
> > >
> > > Is there a reason to keep the A64 compatible?
> >
> > Yes, A64 and H6 has the exact same memory mapping looking at the datasheet.
> > So if there is an errata or a new feature for the A64, it should be
> > also compatible with the H6.
> > Which is not the case with A31 (WDT_KEY_FIELD is not preset)
>
> The thing is, if you use those three compatibles, then you're saying
> that it's ok for the OS to use first the H6 driver, then the A64
> driver, and then the A31 driver.
>
> If the A31 isn't compatible, then it shouldn't be listed there. And if
> it is, then you can skip the A64 compatible.

Hi Maxime,

I'm just supposing that A31 is the version 1.0 of the IP, A64 is the
version 1.1 and H6 is 1.2.
And if an issue is found for A64 there is more chance that we will
have to fix it also for H6.
But bindings the driver with :
"allwinner,sun50i-h6-wdt","allwinner,sun50i-a31-wdt" is also fine for
me.

Regards,
Clement
>
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com