Skip to contentSkip to conversation

watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

PATCH New Martin Blumenstingl 4 participants 8 messages Jun 11, 2017 – Jun 22, 2017

Subsystems (3)
lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

---
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 6 +++++-
 drivers/watchdog/meson_wdt.c                             | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/watchdog/meson-wdt.txt +5 -1
index ae70185d96e6..f2fbe1a39d31 100644
@@ -2,7 +2,11 @@ Meson SoCs Watchdog timer
 
 Required properties:
 
-- compatible : should be "amlogic,meson6-wdt" or "amlogic,meson8b-wdt"
+- compatible : depending on the SoC this should be one of:
+	"amlogic,meson6-wdt"
+	"amlogic,meson8-wdt"
+	"amlogic,meson8b-wdt"
+	"amlogic,meson8m2-wdt"
 - reg : Specifies base physical address and size of the registers.
 
 Example:
drivers/watchdog/meson_wdt.c +2 -0
index 491b9bf13d84..304274c67735 100644
@@ -155,7 +155,9 @@ static const struct watchdog_ops meson_wdt_ops = {
 
 static const struct of_device_id meson_wdt_dt_ids[] = {
 	{ .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data },
+	{ .compatible = "amlogic,meson8-wdt", .data = &meson6_wdt_data },
 	{ .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data },
+	{ .compatible = "amlogic,meson8m2-wdt", .data = &meson8b_wdt_data },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);
Signature · 1 line
2.13.1
#1 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

Quoted 37 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

---
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 6 +++++-
 drivers/watchdog/meson_wdt.c                             | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/watchdog/meson-wdt.txt +5 -1
index ae70185d96e6..f2fbe1a39d31 100644
@@ -2,7 +2,11 @@ Meson SoCs Watchdog timer
 
 Required properties:
 
-- compatible : should be "amlogic,meson6-wdt" or "amlogic,meson8b-wdt"
+- compatible : depending on the SoC this should be one of:
+	"amlogic,meson6-wdt"
+	"amlogic,meson8-wdt"
+	"amlogic,meson8b-wdt"
+	"amlogic,meson8m2-wdt"
 - reg : Specifies base physical address and size of the registers.
 
 Example:
drivers/watchdog/meson_wdt.c +0 -0
index 491b9bf13d84..304274c67735 100644

drivers/watchdog/meson_wdt.c static const struct watchdog_ops meson_wdt_ops = { · line 163

Quoted 9 lines
drivers/watchdog/meson_wdt.c +2 -0
@@ -155,7 +155,9 @@ static const struct watchdog_ops meson_wdt_ops = {
 
 static const struct of_device_id meson_wdt_dt_ids[] = {
 	{ .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data },
+	{ .compatible = "amlogic,meson8-wdt", .data = &meson6_wdt_data },
 	{ .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data },
+	{ .compatible = "amlogic,meson8m2-wdt", .data = &meson8b_wdt_data },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);
maintainer
#2 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

In reply to Martin Blumenstingl
Quoted 9 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

In general, changes like this are not necessary, though. The dts file is supposed to reference both generic and specific compatible strings.

Thanks,
Guenter

Quoted 39 lines
---
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 6 +++++-
 drivers/watchdog/meson_wdt.c                             | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/watchdog/meson-wdt.txt +5 -1
index ae70185d96e6..f2fbe1a39d31 100644
@@ -2,7 +2,11 @@ Meson SoCs Watchdog timer
 
 Required properties:
 
-- compatible : should be "amlogic,meson6-wdt" or "amlogic,meson8b-wdt"
+- compatible : depending on the SoC this should be one of:
+	"amlogic,meson6-wdt"
+	"amlogic,meson8-wdt"
+	"amlogic,meson8b-wdt"
+	"amlogic,meson8m2-wdt"
 - reg : Specifies base physical address and size of the registers.
 
 Example:
drivers/watchdog/meson_wdt.c +2 -0
index 491b9bf13d84..304274c67735 100644
@@ -155,7 +155,9 @@ static const struct watchdog_ops meson_wdt_ops = {
 
 static const struct of_device_id meson_wdt_dt_ids[] = {
 	{ .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data },
+	{ .compatible = "amlogic,meson8-wdt", .data = &meson6_wdt_data },
 	{ .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data },
+	{ .compatible = "amlogic,meson8m2-wdt", .data = &meson8b_wdt_data },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);
Signature · 1 line
2.13.1
author reviewer
#3 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Quoted 7 lines
Quoted 5 lines

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

thank you!
is there anything holding you up from taking this patch (for example:
are you still missing any specific Signed-off-by / Acked-by)?

Quoted 2 lines

In general, changes like this are not necessary, though. The dts file is supposed to reference both generic and specific compatible strings.

I thought about skipping this patch, but I find that it looks strange without.

the hierarchy and the corresponding compatible strings would be:
meson.dtsi / compatible = "amlogic,meson6-wdt";
|- meson8.dtsi / compatible = "amlogic,meson8-wdt", "amlogic,meson6-wdt";
|- meson8m2.dtsi (upcoming) / compatible = "amlogic,meson8m2-wdt",
"amlogic,meson8b-wdt";
|- meson8b.dtsi / compatible = "amlogic,meson8b-wdt";

instead of this seemingly random mixup of compatible strings I decided to introduce separate ones for each SoC.

Martin

maintainer
#4 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

Quoted 12 lines · Martin Blumenstingl
Quoted 11 lines · Guenter Roeck
Quoted 9 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

Quoted 7 lines
Quoted 1 line

thank you!
is there anything holding you up from taking this patch (for example:
are you still missing any specific Signed-off-by / Acked-by)?

From Rob.

Guenter

Quoted 15 lines
Quoted 2 lines

In general, changes like this are not necessary, though. The dts file is supposed to reference both generic and specific compatible strings.

I thought about skipping this patch, but I find that it looks strange without.

the hierarchy and the corresponding compatible strings would be:
meson.dtsi / compatible = "amlogic,meson6-wdt";
|- meson8.dtsi / compatible = "amlogic,meson8-wdt", "amlogic,meson6-wdt";
|- meson8m2.dtsi (upcoming) / compatible = "amlogic,meson8m2-wdt",
"amlogic,meson8b-wdt";
|- meson8b.dtsi / compatible = "amlogic,meson8b-wdt";

instead of this seemingly random mixup of compatible strings I decided to introduce separate ones for each SoC.

Martin

maintainer
#5 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

In reply to Martin Blumenstingl
Quoted 28 lines · Martin Blumenstingl
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Quoted 7 lines
Quoted 5 lines

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

thank you!
is there anything holding you up from taking this patch (for example:
are you still missing any specific Signed-off-by / Acked-by)?

Quoted 2 lines

In general, changes like this are not necessary, though. The dts file is supposed to reference both generic and specific compatible strings.

I thought about skipping this patch, but I find that it looks strange without.

the hierarchy and the corresponding compatible strings would be:
meson.dtsi / compatible = "amlogic,meson6-wdt";
|- meson8.dtsi / compatible = "amlogic,meson8-wdt", "amlogic,meson6-wdt";
|- meson8m2.dtsi (upcoming) / compatible = "amlogic,meson8m2-wdt",
"amlogic,meson8b-wdt";
|- meson8b.dtsi / compatible = "amlogic,meson8b-wdt";

Quoted 2 lines

instead of this seemingly random mixup of compatible strings I decided to introduce separate ones for each SoC.

But if the block is backwards compatible, you should also provide a fallback compatible string.

Rob

author reviewer
#6 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

Hi Rob,

Quoted 29 lines · Rob Herring
Quoted 28 lines · Martin Blumenstingl
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Quoted 7 lines
Quoted 5 lines

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

thank you!
is there anything holding you up from taking this patch (for example:
are you still missing any specific Signed-off-by / Acked-by)?

Quoted 2 lines

In general, changes like this are not necessary, though. The dts file is supposed to reference both generic and specific compatible strings.

I thought about skipping this patch, but I find that it looks strange without.

the hierarchy and the corresponding compatible strings would be:
meson.dtsi / compatible = "amlogic,meson6-wdt";
|- meson8.dtsi / compatible = "amlogic,meson8-wdt", "amlogic,meson6-wdt";
|- meson8m2.dtsi (upcoming) / compatible = "amlogic,meson8m2-wdt",
"amlogic,meson8b-wdt";
|- meson8b.dtsi / compatible = "amlogic,meson8b-wdt";

Quoted 5 lines
Quoted 2 lines

instead of this seemingly random mixup of compatible strings I decided to introduce separate ones for each SoC.

But if the block is backwards compatible, you should also provide a fallback compatible string.

OK, fine with me - do you want me to update the documentation to reflect this (or is it enough if I take care of it in the .dts files)? the resulting documentation could look like this:
"amlogic,meson6-wdt" on Meson6 SoCs
"amlogic,meson8-wdt" along with "amlogic,meson6-wdt" on Meson8 SoCs "amlogic,meson8b-wdt" on Meson8b SoCs "amlogic,meson8m2-wdt" along with "amlogic,meson8b-wdt" on Meson8m2 SoCs

Regards,
Martin

maintainer
#7 lore raw

PATCH 1/1 watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2

Quoted 37 lines · Martin Blumenstingl

Hi Rob,

Quoted 29 lines · Rob Herring
Quoted 28 lines · Martin Blumenstingl
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Martin Blumenstingl

The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b.

Quoted 7 lines
Quoted 5 lines

Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though.

thank you!
is there anything holding you up from taking this patch (for example:
are you still missing any specific Signed-off-by / Acked-by)?

Quoted 2 lines

In general, changes like this are not necessary, though. The dts file is supposed to reference both generic and specific compatible strings.

I thought about skipping this patch, but I find that it looks strange without.

the hierarchy and the corresponding compatible strings would be:
meson.dtsi / compatible = "amlogic,meson6-wdt";
|- meson8.dtsi / compatible = "amlogic,meson8-wdt", "amlogic,meson6-wdt";
|- meson8m2.dtsi (upcoming) / compatible = "amlogic,meson8m2-wdt",
"amlogic,meson8b-wdt";
|- meson8b.dtsi / compatible = "amlogic,meson8b-wdt";

Quoted 5 lines
Quoted 2 lines

instead of this seemingly random mixup of compatible strings I decided to introduce separate ones for each SoC.

But if the block is backwards compatible, you should also provide a fallback compatible string.

Quoted 7 lines

OK, fine with me - do you want me to update the documentation to reflect this (or is it enough if I take care of it in the .dts files)? the resulting documentation could look like this:
"amlogic,meson6-wdt" on Meson6 SoCs
"amlogic,meson8-wdt" along with "amlogic,meson6-wdt" on Meson8 SoCs "amlogic,meson8b-wdt" on Meson8b SoCs "amlogic,meson8m2-wdt" along with "amlogic,meson8b-wdt" on Meson8m2 SoCs

Yes, like this.

Rob