Skip to contentSkip to conversation

Update the device tree for Mt.Mitchell's BMC platform

PATCH In review Chanh Nguyen 2 participants 4 messages Sep 5, 2024 – Sep 12, 2024

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

cover Update the device tree for Mt.Mitchell's BMC platform

Updates the device tree to support some features on Ampere's Mt.Mitchell BMC.

Chanh Nguyen (2):
ARM: dts: aspeed: mtmitchell: Add I2C FAN controllers
ARM: dts: aspeed: mtmitchell: Add gpio line names for io expanders

 .../aspeed/aspeed-bmc-ampere-mtmitchell.dts    | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 ARM: dts: aspeed: mtmitchell: Add I2C FAN controllers

Add the MAX31790 nodes as i2c fan controllers.

---
 .../boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts   | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts +10 -0
index 0295f5adcfbc..da181f9ae820 100644
@@ -684,6 +684,16 @@ bmc-ocp0-en-hog {
 			line-name = "bmc-ocp0-en-n";
 		};
 	};
+
+	fan-controller0 at 20 {
+		compatible = "maxim,max31790";
+		reg = <0x20>;
+	};
+
+	fan-controller1 at 2f {
+		compatible = "maxim,max31790";
+		reg = <0x2f>;
+	};
 };
 
 &i2c9 {
Signature · 1 line
2.43.0
maintainer
#2 lore raw

Re: [PATCH 1/2] ARM: dts: aspeed: mtmitchell: Add I2C FAN controllers

Quoted 16 lines · Chanh Nguyen

Add the MAX31790 nodes as i2c fan controllers.

---
 .../boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts   | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts +1 -0
index 0295f5adcfbc..da181f9ae820 100644
@@ -684,6 +684,16 @@ bmc-ocp0-en-hog {
 			line-name = "bmc-ocp0-en-n";
 		};
 	};
+

arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts bmc-ocp0-en-hog { · line 697

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts +9 -0
+	fan-controller0 at 20 {
+		compatible = "maxim,max31790";
+		reg = <0x20>;
+	};
+
+	fan-controller1 at 2f {
+		compatible = "maxim,max31790";
+		reg = <0x2f>;
+	};
 };

This generates some warnings based on v6.11-rc1:

Executing: ./scripts/checkpatch.pl --strict -g HEAD
WARNING: DT compatible string "maxim,max31790" appears un-documented -- check ./Documentation/devicetree/bindings/ #25: FILE: arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts:689:
+ compatible = "maxim,max31790";

WARNING: DT compatible string "maxim,max31790" appears un-documented -- check ./Documentation/devicetree/bindings/ #30: FILE: arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts:694:
+ compatible = "maxim,max31790";

total: 0 errors, 2 warnings, 0 checks, 16 lines checked

However, Guenter's applied the binding here:

https://lore.kernel.org/all/3382f952-daae-43ff-bb85-fa4820ecbc5f at roeck-us.net/

make CHECK_DTBS=y aspeed/aspeed-bmc-ampere-mtmitchell.dtb didn't turn up anything interesting after merging in hwmon-next, so I've applied these to be integrated via the BMC tree.

Andrew

#3 lore raw

PATCH 2/2 ARM: dts: aspeed: mtmitchell: Add gpio line names for io expanders

In reply to Chanh Nguyen

Add below gpio line names to io expanders for more platform features.

- ext-vref-sel
- presence-hdd-bp5-n
- presence-hdd-bp6-n
- bmc-ocp0-en-n
- bmc-ocp1-en-n
- bmc-riser-en-n
- gpi0, gpi1

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts +7 -1
index da181f9ae820..2b336aa0146d 100644
@@ -677,6 +677,12 @@ gpio at 77 {
 		#size-cells = <0>;
 		#gpio-cells = <2>;
 
+		gpio-line-names =
+		"ext-vref-sel","","presence-hdd-bp5-n","presence-hdd-bp6-n",
+		"","bmc-riser-en-n","bmc-ocp1-en-n","bmc-ocp0-en-n",
+		"","","","",
+		"","","","";
+
 		bmc-ocp0-en-hog {
 			gpio-hog;
 			gpios = <7 GPIO_ACTIVE_LOW>;
@@ -968,7 +974,7 @@ gpio_expander1: gpio-expander at 22 {
 			"fan-fault","psu-fault",
 			"","",
 			"","",
-			"","",
+			"gpi0","gpi1",
 			"","",
 			"","",
 			"","",
Signature · 1 line
2.43.0