Skip to contentSkip to conversation

ARM: dts: imx: add fsl, imx35-wdt compatible to all relevant watchdog nodes

PATCH New Vladimir Zapolskiy 2 participants 2 messages Jan 17, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: imx: add fsl, imx35-wdt compatible to all relevant watchdog nodes

Watchdog device controller found on all modern SoCs from i.MX series and firstly introduced in i.MX35 is not one in one compatible with the watchdog controllers on i.MX21, i.MX27 and i.MX31, the latter controlles don't have WICR (and pretimeout notification support) and WMCR registers. To get benefit from the more advanced watchdog device and to avoid operations over non-existing registers on legacy SoCs add fsl,imx35-wdt compatible to descriptions of all i.MX35 compatible watchdog controllers.

---
RFC change is found at https://patchwork.kernel.org/patch/9350007

Changes from RFC to v1:
* added the same change to devicetree bindings documentation, thanks to Baruch Siach for review,
* replaced a new shared compatible derived from i.MX25 with an earlier from i.MX35 SoC one, thanks to Uwe Kleine-K?nig for review.

Compatible "fsl,imx21-wdt" is preserved as a generic one, because interface to a watchdog controller on i.MX35 is a superset of the interface to a i.MX21 watchdog controller.

 Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt |  2 +-
 arch/arm/boot/dts/imx25.dtsi                               |  3 ++-
 arch/arm/boot/dts/imx50.dtsi                               |  3 ++-
 arch/arm/boot/dts/imx51.dtsi                               |  6 ++++--
 arch/arm/boot/dts/imx53.dtsi                               |  6 ++++--
 arch/arm/boot/dts/imx6qdl.dtsi                             |  6 ++++--
 arch/arm/boot/dts/imx6sl.dtsi                              |  6 ++++--
 arch/arm/boot/dts/imx6sx.dtsi                              |  9 ++++++---
 arch/arm/boot/dts/imx6ul.dtsi                              |  6 ++++--
 arch/arm/boot/dts/imx7s.dtsi                               | 12 ++++++++----
 arch/arm/boot/dts/ls1021a.dtsi                             |  2 +-
 arch/arm/boot/dts/vfxxx.dtsi                               |  3 ++-
 12 files changed, 42 insertions(+), 22 deletions(-)
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt +1 -1
index 107280e..9551088 100644
@@ -15,7 +15,7 @@ Optional properties:
 Examples:
 
 wdt at 73f98000 {
-	compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
+	compatible = "fsl,imx51-wdt", "fsl,imx35-wdt", "fsl,imx21-wdt";
 	reg = <0x73f98000 0x4000>;
 	interrupts = <58>;
 	big-endian;
arch/arm/boot/dts/imx25.dtsi +2 -1
index 213d86e..1194fe2 100644
@@ -505,7 +505,8 @@
 			};
 
 			wdog at 53fdc000 {
-				compatible = "fsl,imx25-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx25-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x53fdc000 0x4000>;
 				clocks = <&clks 126>;
 				clock-names = "";
arch/arm/boot/dts/imx50.dtsi +2 -1
index fe0221e..476f54e 100644
@@ -270,7 +270,8 @@
 			};
 
 			wdog1: wdog at 53f98000 {
-				compatible = "fsl,imx50-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx50-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x53f98000 0x4000>;
 				interrupts = <58>;
 				clocks = <&clks IMX5_CLK_DUMMY>;
arch/arm/boot/dts/imx51.dtsi +4 -2
index 33526ca..a67870b 100644
@@ -347,14 +347,16 @@
 			};
 
 			wdog1: wdog at 73f98000 {
-				compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx51-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x73f98000 0x4000>;
 				interrupts = <58>;
 				clocks = <&clks IMX5_CLK_DUMMY>;
 			};
 
 			wdog2: wdog at 73f9c000 {
-				compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx51-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x73f9c000 0x4000>;
 				interrupts = <59>;
 				clocks = <&clks IMX5_CLK_DUMMY>;
arch/arm/boot/dts/imx53.dtsi +4 -2
index ca51dc0..4d0c5c8 100644
@@ -402,14 +402,16 @@
 			};
 
 			wdog1: wdog at 53f98000 {
-				compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx53-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x53f98000 0x4000>;
 				interrupts = <58>;
 				clocks = <&clks IMX5_CLK_DUMMY>;
 			};
 
 			wdog2: wdog at 53f9c000 {
-				compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx53-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x53f9c000 0x4000>;
 				interrupts = <59>;
 				clocks = <&clks IMX5_CLK_DUMMY>;
arch/arm/boot/dts/imx6qdl.dtsi +4 -2
index 53e6e63..16ee492 100644
@@ -594,14 +594,16 @@
 			};
 
 			wdog1: wdog at 020bc000 {
-				compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6q-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020bc000 0x4000>;
 				interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6QDL_CLK_DUMMY>;
 			};
 
 			wdog2: wdog at 020c0000 {
-				compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6q-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020c0000 0x4000>;
 				interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6QDL_CLK_DUMMY>;
arch/arm/boot/dts/imx6sl.dtsi +4 -2
index 4fd6de2..794f44d 100644
@@ -479,14 +479,16 @@
 			};
 
 			wdog1: wdog at 020bc000 {
-				compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6sl-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020bc000 0x4000>;
 				interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SL_CLK_DUMMY>;
 			};
 
 			wdog2: wdog at 020c0000 {
-				compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6sl-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020c0000 0x4000>;
 				interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SL_CLK_DUMMY>;
arch/arm/boot/dts/imx6sx.dtsi +6 -3
index 076a30f..e36ead9 100644
@@ -534,14 +534,16 @@
 			};
 
 			wdog1: wdog at 020bc000 {
-				compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6sx-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020bc000 0x4000>;
 				interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SX_CLK_DUMMY>;
 			};
 
 			wdog2: wdog at 020c0000 {
-				compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6sx-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020c0000 0x4000>;
 				interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SX_CLK_DUMMY>;
@@ -1200,7 +1202,8 @@
 			};
 
 			wdog3: wdog at 02288000 {
-				compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6sx-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x02288000 0x4000>;
 				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SX_CLK_DUMMY>;
arch/arm/boot/dts/imx6ul.dtsi +4 -2
index 0f69a3f..33d9a2c 100644
@@ -491,14 +491,16 @@
 			};
 
 			wdog1: wdog at 020bc000 {
-				compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6ul-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020bc000 0x4000>;
 				interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6UL_CLK_WDOG1>;
 			};
 
 			wdog2: wdog at 020c0000 {
-				compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx6ul-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x020c0000 0x4000>;
 				interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6UL_CLK_WDOG2>;
arch/arm/boot/dts/imx7s.dtsi +8 -4
index 8db1eb9..ba38b69 100644
@@ -399,14 +399,16 @@
 			};
 
 			wdog1: wdog at 30280000 {
-				compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx7d-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x30280000 0x10000>;
 				interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX7D_WDOG1_ROOT_CLK>;
 			};
 
 			wdog2: wdog at 30290000 {
-				compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx7d-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x30290000 0x10000>;
 				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX7D_WDOG2_ROOT_CLK>;
@@ -414,7 +416,8 @@
 			};
 
 			wdog3: wdog at 302a0000 {
-				compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx7d-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x302a0000 0x10000>;
 				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX7D_WDOG3_ROOT_CLK>;
@@ -422,7 +425,8 @@
 			};
 
 			wdog4: wdog at 302b0000 {
-				compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,imx7d-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x302b0000 0x10000>;
 				interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX7D_WDOG4_ROOT_CLK>;
arch/arm/boot/dts/ls1021a.dtsi +1 -1
index 282d854..41f5afa 100644
@@ -521,7 +521,7 @@
 		};
 
 		wdog0: watchdog at 2ad0000 {
-			compatible = "fsl,imx21-wdt";
+			compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
 			reg = <0x0 0x2ad0000 0x0 0x10000>;
 			interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&platform_clk 1>;
arch/arm/boot/dts/vfxxx.dtsi +2 -1
index 5d654b5..360d590 100644
@@ -326,7 +326,8 @@
 			};
 
 			wdoga5: wdog at 4003e000 {
-				compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
+				compatible = "fsl,vf610-wdt", "fsl,imx35-wdt",
+					     "fsl,imx21-wdt";
 				reg = <0x4003e000 0x1000>;
 				interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks VF610_CLK_WDT>;
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 ARM: dts: imx: add fsl, imx35-wdt compatible to all relevant watchdog nodes

Quoted 19 lines · Vladimir Zapolskiy

Watchdog device controller found on all modern SoCs from i.MX series and firstly introduced in i.MX35 is not one in one compatible with the watchdog controllers on i.MX21, i.MX27 and i.MX31, the latter controlles don't have WICR (and pretimeout notification support) and WMCR registers. To get benefit from the more advanced watchdog device and to avoid operations over non-existing registers on legacy SoCs add fsl,imx35-wdt compatible to descriptions of all i.MX35 compatible watchdog controllers.

---
RFC change is found at https://patchwork.kernel.org/patch/9350007

Changes from RFC to v1:
* added the same change to devicetree bindings documentation, thanks to Baruch Siach for review,
* replaced a new shared compatible derived from i.MX25 with an earlier from i.MX35 SoC one, thanks to Uwe Kleine-K?nig for review.

Quoted 3 lines

Compatible "fsl,imx21-wdt" is preserved as a generic one, because interface to a watchdog controller on i.MX35 is a superset of the interface to a i.MX21 watchdog controller.

One could argue here, but apart from the discussion if this is correct or not, choosing this way has the upside that teaching the driver after this change about the i.MX35 type doesn't make the machines based on the newer type suffer from a breakage for one commit.

Quoted 1 line
 Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt |  2 +-

When I created my patch set for this breakage I wondered if the documentation should point out which are the unique types.

Quoted 11 lines
 arch/arm/boot/dts/imx25.dtsi                               |  3 ++-
 arch/arm/boot/dts/imx50.dtsi                               |  3 ++-
 arch/arm/boot/dts/imx51.dtsi                               |  6 ++++--
 arch/arm/boot/dts/imx53.dtsi                               |  6 ++++--
 arch/arm/boot/dts/imx6qdl.dtsi                             |  6 ++++--
 arch/arm/boot/dts/imx6sl.dtsi                              |  6 ++++--
 arch/arm/boot/dts/imx6sx.dtsi                              |  9 ++++++---
 arch/arm/boot/dts/imx6ul.dtsi                              |  6 ++++--
 arch/arm/boot/dts/imx7s.dtsi                               | 12 ++++++++----
 arch/arm/boot/dts/ls1021a.dtsi                             |  2 +-
 arch/arm/boot/dts/vfxxx.dtsi                               |  3 ++-

The imx21 type is also used in

	arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
	arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi

What about these?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |