Skip to contentSkip to conversation

arm64: dts: fsl: imx8mq: add watchdog devices

PATCH Superseded Baruch Siach 3 participants 5 messages Feb 5, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm64: dts: fsl: imx8mq: add watchdog devices

---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +24 -0
index 50ed302d299a..740457e2a0bf 100644
@@ -250,6 +250,30 @@
 				              "clk_ext1", "clk_ext2",
 				              "clk_ext3", "clk_ext4";
 			};
+
+			wdog1: wdog at 30280000 {
+				compatible = "fsl,imx21-wdt";
+				reg = <0x30280000 0x10000>;
+				interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MQ_CLK_WDOG1_ROOT>;
+				status = "disabled";
+			};
+
+			wdog2: wdog at 30290000 {
+				compatible = "fsl,imx21-wdt";
+				reg = <0x30290000 0x10000>;
+				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MQ_CLK_WDOG2_ROOT>;
+				status = "disabled";
+			};
+
+			wdog3: wdog at 302a0000 {
+				compatible = "fsl,imx21-wdt";
+				reg = <0x302a0000 0x10000>;
+				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MQ_CLK_WDOG3_ROOT>;
+				status = "disabled";
+			};
 		};
 
 		bus at 30400000 { /* AIPS2 */
Signature · 1 line
2.15.1
#1 lore raw

PATCH 2/2 arm64: dts: fsl: imx8mq-evk: enable watchdog

The external nWDOG signal connects to the EVK board reset circuit.

Tested on the i.MX8MQ EVK rev B3.

---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +15 -0
index c0e5ee5d6243..757ba226a2fc 100644
@@ -170,6 +170,13 @@
 	status = "okay";
 };
 
+&wdog1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_wdog>;
+	fsl,ext-reset-output;
+	status = "okay";
+};
+
 &iomuxc {
 	pinctrl_fec1_mdc: fec1mdcgrp {
 		pinmux = <MX8MQ_IOMUXC_ENET_MDC_ENET1_MDC>;
@@ -402,4 +409,12 @@
 		bias-pull-up;
 		input-schmitt-enable;
 	};
+
+	pinctrl_wdog: wdoggrp {
+		fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B>;
+		drive-strength = <6>;
+		slew-rate = <0>;
+		bias-pull-up;
+		input-schmitt-enable;
+	};
 };
Signature · 1 line
2.15.1
#2 lore raw

PATCH 2/2 arm64: dts: fsl: imx8mq-evk: enable watchdog

Am Montag, den 05.02.2018, 09:45 +0200 schrieb Baruch Siach:

Quoted 29 lines

The external nWDOG signal connects to the EVK board reset circuit.

Tested on the i.MX8MQ EVK rev B3.

---
?arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 15 +++++++++++++++ ?1 file changed, 15 insertions(+)

arch/arm64/boot/dts/freescale/imx8mq-evk.dts +0 -0
index c0e5ee5d6243..757ba226a2fc 100644
@@ -170,6 +170,13 @@
 ?	status = "okay";
 ?};

?
+&wdog1 {

arch/arm64/boot/dts/freescale/imx8mq-evk.dts +6 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_wdog>;
+	fsl,ext-reset-output;
+	status = "okay";
+};
+

?&iomuxc {
? pinctrl_fec1_mdc: fec1mdcgrp {
? pinmux = <MX8MQ_IOMUXC_ENET_MDC_ENET1_MDC>;

arch/arm64/boot/dts/freescale/imx8mq-evk.dts line 418

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +7 -0
@@ -402,4 +409,12 @@
 ?		bias-pull-up;
 ?		input-schmitt-enable;
 ?	};
+
+	pinctrl_wdog: wdoggrp {
+		fsl,pins = <MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B>;
+		drive-strength = <6>;
+		slew-rate = <0>;
+		bias-pull-up;
+		input-schmitt-enable;

This might be a plain copy of the downstream pinctrl, but the watchdog pin being an output, does it really make sense to enable the schmitt- trigger?

Regards,
Lucas

reviewer
#3 lore raw

PATCH 1/2 arm64: dts: fsl: imx8mq: add watchdog devices

In reply to Baruch Siach

Hi Baruch,

Quoted 10 lines · Baruch Siach
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
index 50ed302d299a..740457e2a0bf 100644

arch/arm64/boot/dts/freescale/imx8mq.dtsi line 255

Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +3 -0
@@ -250,6 +250,30 @@
                                              "clk_ext1", "clk_ext2",
                                              "clk_ext3", "clk_ext4";
                        };
+
+                       wdog1: wdog at 30280000 {
+                               compatible = "fsl,imx21-wdt";

Please use:

compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; instead.

This is the preferred way as it allows us to apply specific mx8qm fixes if needed.

Thanks

#4 lore raw

PATCH 1/2 arm64: dts: fsl: imx8mq: add watchdog devices

In reply to Baruch Siach

Am Montag, den 05.02.2018, 09:45 +0200 schrieb Baruch Siach:

Quoted 10 lines
Quoted 1 line

---
?arch/arm64/boot/dts/freescale/imx8mq.dtsi | 24 ++++++++++++++++++++++++ ?1 file changed, 24 insertions(+)

arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
index 50ed302d299a..740457e2a0bf 100644

arch/arm64/boot/dts/freescale/imx8mq.dtsi line 254

Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +2 -0
@@ -250,6 +250,30 @@
 > ?				??????????????"clk_ext1", "clk_ext2",
 > ?				??????????????"clk_ext3", "clk_ext4";
 > ?			};
+
+			wdog1: wdog at 30280000 {

watchdog@, please.

Otherwise looks good to me, so with this fixed:

Quoted 25 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				compatible = "fsl,imx21-wdt";
 > +				reg = <0x30280000 0x10000>;
 > +				interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
 > +				clocks = <&clk IMX8MQ_CLK_WDOG1_ROOT>;

Review

Quoted 2 lines
(quoted diff) +2 -0
+				status = "disabled";
+			};

+

arch/arm64/boot/dts/freescale/imx8mq.dtsi line 268

Quoted 7 lines
Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+			wdog2: wdog at 30290000 {
arch/arm64/boot/dts/freescale/imx8mq.dtsi +6 -0
+				compatible = "fsl,imx21-wdt";
+				reg = <0x30290000 0x10000>;
+				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MQ_CLK_WDOG2_ROOT>;
+				status = "disabled";
+			};

+

Quoted 8 lines
Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+			wdog3: wdog at 302a0000 {
arch/arm64/boot/dts/freescale/imx8mq.dtsi +6 -0
+				compatible = "fsl,imx21-wdt";
+				reg = <0x302a0000 0x10000>;
+				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MQ_CLK_WDOG3_ROOT>;
+				status = "disabled";
+			};

? };

?

Quoted 1 line

? bus at 30400000 { /* AIPS2 */