diff mbox series

[v4,3/5] dt-bindings: watchdog: add Allwinner H6 r_watchdog

Message ID 20190521160330.28402-4-peron.clem@gmail.com
State Changes Requested, archived
Headers show
Series Allwinner H6 watchdog support | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Clément Péron May 21, 2019, 4:03 p.m. UTC
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 <peron.clem@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxime Ripard May 22, 2019, 10:32 a.m. UTC | #1
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 <peron.clem@gmail.com>

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
Clément Péron May 22, 2019, 4:15 p.m. UTC | #2
Hi Maxime,

On Wed, 22 May 2019 at 12:32, Maxime Ripard <maxime.ripard@bootlin.com> 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 <peron.clem@gmail.com>
>
> 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
Maxime Ripard May 23, 2019, 12:57 p.m. UTC | #3
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 <maxime.ripard@bootlin.com> 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 <peron.clem@gmail.com>
> >
> > 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
Clément Péron May 23, 2019, 2:02 p.m. UTC | #4
On Thu, 23 May 2019 at 14:57, Maxime Ripard <maxime.ripard@bootlin.com> 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 <maxime.ripard@bootlin.com> 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 <peron.clem@gmail.com>
> > >
> > > 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
diff mbox series

Patch

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.