2019-05-21 16:05:59

by Clément Péron

[permalink] [raw]
Subject: [PATCH v4 3/5] dt-bindings: watchdog: add Allwinner H6 r_watchdog

Allwinner H6 has a second watchdog on the r-blocks which is
compatible with the A31.

This commit add the H6 compatible for the r_watchdog.

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

diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
index e65198d82a2b..c5bef3dd43d0 100644
--- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -6,6 +6,7 @@ Required properties:
"allwinner,sun4i-a10-wdt"
"allwinner,sun6i-a31-wdt"
"allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
+ "allwinner,sun50i-h6-r-wdt","allwinner,sun6i-a31-wdt"
"allwinner,sun50i-h6-wdt","allwinner,sun6i-a31-wdt"
"allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt"
- reg : Specifies base physical address and size of the registers.
--
2.17.1



2019-05-22 10:34:38

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v4 3/5] dt-bindings: watchdog: add Allwinner H6 r_watchdog

On Tue, May 21, 2019 at 06:03:28PM +0200, Cl?ment P?ron wrote:
> Allwinner H6 has a second watchdog on the r-blocks which is
> compatible with the A31.
>
> This commit add the H6 compatible for the r_watchdog.
>
> Signed-off-by: Cl?ment P?ron <[email protected]>

Unless you have some evidence that the two blocks are different, then
you should just reuse the same one.

Maxime

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

2019-05-22 17:39:15

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v4 3/5] dt-bindings: watchdog: add Allwinner H6 r_watchdog

Hi Maxime,

On Wed, 22 May 2019 at 12:32, Maxime Ripard <[email protected]> wrote:
>
> On Tue, May 21, 2019 at 06:03:28PM +0200, Clément Péron wrote:
> > Allwinner H6 has a second watchdog on the r-blocks which is
> > compatible with the A31.
> >
> > This commit add the H6 compatible for the r_watchdog.
> >
> > Signed-off-by: Clément Péron <[email protected]>
>
> Unless you have some evidence that the two blocks are different, then
> you should just reuse the same one.

I have no evidence it's different nor identical, it's not documented
in the user manual.
I thought it would better to have separate bindings in case there is a
difference.
Than don't have and find later that we have to introduce one.

But as you prefer.

Regards,
Clément



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

2019-05-23 12:58:40

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v4 3/5] dt-bindings: watchdog: add Allwinner H6 r_watchdog

On Wed, May 22, 2019 at 06:15:26PM +0200, Cl?ment P?ron wrote:
> Hi Maxime,
>
> On Wed, 22 May 2019 at 12:32, Maxime Ripard <[email protected]> wrote:
> >
> > On Tue, May 21, 2019 at 06:03:28PM +0200, Cl?ment P?ron wrote:
> > > Allwinner H6 has a second watchdog on the r-blocks which is
> > > compatible with the A31.
> > >
> > > This commit add the H6 compatible for the r_watchdog.
> > >
> > > Signed-off-by: Cl?ment P?ron <[email protected]>
> >
> > Unless you have some evidence that the two blocks are different, then
> > you should just reuse the same one.
>
> I have no evidence it's different nor identical, it's not documented
> in the user manual.
> I thought it would better to have separate bindings in case there is a
> difference.
> Than don't have and find later that we have to introduce one.

It's a tradeoff. Pushing your logic to the limit, we would have a
compatible for each controller embedded in an SoC.

This would be unmaintainable, and slightly useless since that case is
very unlikely.

However, having differences between SoCs is quite common, hence why we
have different compatibles for each SoC.

Maxime

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


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

2019-05-23 14:06:26

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v4 3/5] dt-bindings: watchdog: add Allwinner H6 r_watchdog

On Thu, 23 May 2019 at 14:57, Maxime Ripard <[email protected]> wrote:
>
> On Wed, May 22, 2019 at 06:15:26PM +0200, Clément Péron wrote:
> > Hi Maxime,
> >
> > On Wed, 22 May 2019 at 12:32, Maxime Ripard <[email protected]> wrote:
> > >
> > > On Tue, May 21, 2019 at 06:03:28PM +0200, Clément Péron wrote:
> > > > Allwinner H6 has a second watchdog on the r-blocks which is
> > > > compatible with the A31.
> > > >
> > > > This commit add the H6 compatible for the r_watchdog.
> > > >
> > > > Signed-off-by: Clément Péron <[email protected]>
> > >
> > > Unless you have some evidence that the two blocks are different, then
> > > you should just reuse the same one.
> >
> > I have no evidence it's different nor identical, it's not documented
> > in the user manual.
> > I thought it would better to have separate bindings in case there is a
> > difference.
> > Than don't have and find later that we have to introduce one.
>
> It's a tradeoff. Pushing your logic to the limit, we would have a
> compatible for each controller embedded in an SoC.
>
> This would be unmaintainable, and slightly useless since that case is
> very unlikely.
>
> However, having differences between SoCs is quite common, hence why we
> have different compatibles for each SoC.
Yes, that make sense, I will send a new version soon,

Thanks for the review,
Clément

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