Skip to contentSkip to conversation

ARM: dts: aspeed: rainier: Enable fan watchdog

PATCH In review Eddie James 4 participants 6 messages Mar 10, 2021 – Apr 12, 2021

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

PATCH 1/3 ARM: dts: aspeed: rainier: Enable fan watchdog

Set watchdog 1 to pulse the fan watchdog circuit that drives the FAULT pin of the MAX31785, resulting in fans running at full speed, if at any point the BMC stops pulsing it, such as a BMC reboot at runtime. Enable watchdog 2 for BMC reboots.

---
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +14 -0
index 85fb60d16fdf..9f34136ec40f 100644
@@ -3193,6 +3193,20 @@ flash@0 {
 	};
 };
 
+&wdt1 {
+	aspeed,reset-type = "none";
+	aspeed,external-signal;
+	aspeed,ext-push-pull;
+	aspeed,ext-active-high;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_wdtrst1_default>;
+};
+
+&wdt2 {
+	status = "okay";
+};
+
 &xdma {
 	status = "okay";
 	memory-region = <&vga_memory>;
Signature · 1 line
2.27.0
#1 lore raw

PATCH 2/3 ARM: dts: aspeed: everest: Enable fan watchdog

Set watchdog 1 to pulse the fan watchdog circuit that drives the FAULT pin of the MAX31785, resulting in fans running at full speed, if at any point the BMC stops pulsing it, such as a BMC reboot at runtime. Enable watchdog 2 for BMC reboots.

---
 arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts +14 -0
index f33c22f824cd..4836750776d0 100644
@@ -2335,6 +2335,20 @@ &mac3 {
 	use-ncsi;
 };
 
+&wdt1 {
+	aspeed,reset-type = "none";
+	aspeed,external-signal;
+	aspeed,ext-push-pull;
+	aspeed,ext-active-high;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_wdtrst1_default>;
+};
+
+&wdt2 {
+	status = "okay";
+};
+
 &xdma {
 	status = "okay";
 	memory-region = <&vga_memory>;
Signature · 1 line
2.27.0
Acked-by on v1 2/3
#2 lore raw

Re: [PATCH linux dev-5.10 2/3] ARM: dts: aspeed: everest: Enable fan watchdog

Quoted 7 lines · Eddie James

Set watchdog 1 to pulse the fan watchdog circuit that drives the FAULT pin of the MAX31785, resulting in fans running at full speed, if at any point the BMC stops pulsing it, such as a BMC reboot at runtime. Enable watchdog 2 for BMC reboots.

#3 lore raw

PATCH 3/3 ARM: dts: aspeed: Add Rainier 1S4U machine

In reply to Eddie James

The 1S4U version of the Rainier system has only 4 fans. Create a new tree, include the 4U version, and delete the 2 extra fans.

---
 arch/arm/boot/dts/Makefile                        |  1 +
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts | 14 ++++++++++++++
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts      |  2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts
arch/arm/boot/dts/Makefile +1 -0
index 7b24be9cf961..535a467822f9 100644
@@ -1398,6 +1398,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-ibm-everest.dtb \
 	aspeed-bmc-ibm-rainier.dtb \
 	aspeed-bmc-ibm-rainier-v2.dtb \
+	aspeed-bmc-ibm-rainier-1s4u.dtb \
 	aspeed-bmc-ibm-rainier-4u.dtb \
 	aspeed-bmc-ibm-rainier-4u-v2.dtb \
 	aspeed-bmc-intel-s2600wf.dtb \
arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts new file +14 -0
new file mode 100644
index 000000000000..78b2dab63624
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2021 IBM Corp.
+/dts-v1/;
+
+#include "aspeed-bmc-ibm-rainier-4u-v2.dts"
+
+/ {
+	model = "Rainier 1S4U";
+};
+
+&max {
+	/delete-node/ fan4;
+	/delete-node/ fan5;
+};
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +1 -1
index 9f34136ec40f..dad90a152174 100644
@@ -1978,7 +1978,7 @@ tmp275@48 {
 		reg = <0x48>;
 	};
 
-	max31785@52 {
+	max: max31785@52 {
 		compatible = "maxim,max31785a";
 		reg = <0x52>;
 		#address-cells = <1>;
Signature · 1 line
2.27.0
#4 lore raw

Re: [PATCH linux dev-5.10 3/3] ARM: dts: aspeed: Add Rainier 1S4U machine

Quoted 35 lines · Eddie James

The 1S4U version of the Rainier system has only 4 fans. Create a new tree, include the 4U version, and delete the 2 extra fans.

---

arch/arm/boot/dts/Makefile                        |  1 +
arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts | 14 ++++++++++++++
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts      |  2 +-
3 files changed, 16 insertions(+), 1 deletion(-)

create mode 100644 arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts

arch/arm/boot/dts/Makefile +1 -0
index 7b24be9cf961..535a467822f9 100644
@@ -1398,6 +1398,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-ibm-everest.dtb \
 	aspeed-bmc-ibm-rainier.dtb \
 	aspeed-bmc-ibm-rainier-v2.dtb \
+	aspeed-bmc-ibm-rainier-1s4u.dtb \
 	aspeed-bmc-ibm-rainier-4u.dtb \
 	aspeed-bmc-ibm-rainier-4u-v2.dtb \
 	aspeed-bmc-intel-s2600wf.dtb \
arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts new file +2 -0
new file mode 100644
index 000000000000..78b2dab63624
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2021 IBM Corp.

arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts line 12

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts new file +10 -0
+/dts-v1/;
+
+#include "aspeed-bmc-ibm-rainier-4u-v2.dts"
+
+/ {
+	model = "Rainier 1S4U";
+};
+
+&max {
+	/delete-node/ fan4;

Testing brought to light that the hardware actually uses slots 0, 1, 2, and 4 for the 4 fans. So need to replace the delete of fan4 here with fan3.

Otherwise, looks good, thanks.

Quoted 18 lines
arch/arm/boot/dts/aspeed-bmc-ibm-rainier-1s4u.dts new file +2 -0
+	/delete-node/ fan5;
+};
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +1 -1
index 9f34136ec40f..dad90a152174 100644
@@ -1978,7 +1978,7 @@ tmp275@48 {
 		reg = <0x48>;
 	};
 
-	max31785@52 {
+	max: max31785@52 {
 		compatible = "maxim,max31785a";
 		reg = <0x52>;
 		#address-cells = <1>;
Signature · 1 line
2.27.0
maintainer
#5 lore raw
In reply to Eddie James
Quoted 5 lines · Eddie James

Set watchdog 1 to pulse the fan watchdog circuit that drives the FAULT pin of the MAX31785, resulting in fans running at full speed, if at any point the BMC stops pulsing it, such as a BMC reboot at runtime. Enable watchdog 2 for BMC reboots.

This patch looks okay, assuming you have tested rebooting still works.

Have we tested that u-boot reboots still work, and do not trigger the reset?

Have you considered making a common ibm-p10 device tree, and including/removing nodes as appropriate for the various rainier and everest systems? I think this will reduce the work required to maintain the trees, particularly as it avoids adding changes like this twice.

Cheers,

Joel

Quoted 35 lines
---
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +14 -1
index 85fb60d16fdf..9f34136ec40f 100644
@@ -3193,6 +3193,20 @@ flash@0 {
        };
 };
 
+&wdt1 {
+       aspeed,reset-type = "none";
+       aspeed,external-signal;
+       aspeed,ext-push-pull;
+       aspeed,ext-active-high;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_wdtrst1_default>;
+};
+
+&wdt2 {
+       status = "okay";
+};
+
 &xdma {
        status = "okay";
        memory-region = <&vga_memory>;
--

2.27.0