[PATCH dev-5.10 v1] ARM: dts: nuvoton: add fans-efuse GPIO and fix naming

George Hung ghung.quanta at gmail.com
Tue Apr 27 23:21:51 AEST 2021


* add fans-efuse GPIO to gpio-keys
* use the same node name for all the pca9535 nodes
* convert the gpio nodes to phandle

Signed-off-by: George Hung <george.hung at quantatw.com>
---
 arch/arm/boot/dts/nuvoton-npcm730-gbs.dts | 188 ++++++++++++----------
 1 file changed, 100 insertions(+), 88 deletions(-)

diff --git a/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts b/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts
index 24fae0e4f454..3d53fbe54055 100644
--- a/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts
+++ b/arch/arm/boot/dts/nuvoton-npcm730-gbs.dts
@@ -141,6 +141,12 @@
 			gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
 			linux,code = <121>;
 		};
+
+		fans-efuse {
+			label = "fans-efuse";
+			gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;
+			linux,code = <146>;
+		};
 	};
 
 	iio-hwmon {
@@ -623,14 +629,14 @@
 	clock-frequency = <100000>;
 	status = "okay";
 
-	pca9535_ifdet: pca9535-ifdet at 24 {
+	pca9535_ifdet: pca9535 at 24 {
 		compatible = "nxp,pca9535";
 		reg = <0x24>;
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
 
-	pca9535_pwren: pca9535-pwren at 20 {
+	pca9535_pwren: pca9535 at 20 {
 		compatible = "nxp,pca9535";
 		reg = <0x20>;
 		gpio-controller;
@@ -647,14 +653,14 @@
 			"pwr_u2_13_en","pwr_u2_12_en";
 	};
 
-	pca9535_pwrgd: pca9535-pwrgd at 21 {
+	pca9535_pwrgd: pca9535 at 21 {
 		compatible = "nxp,pca9535";
 		reg = <0x21>;
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
 
-	pca9535_ledlocate: pca9535-ledlocate at 22 {
+	pca9535_ledlocate: pca9535 at 22 {
 		compatible = "nxp,pca9535";
 		reg = <0x22>;
 		gpio-controller;
@@ -662,7 +668,7 @@
 
 	};
 
-	pca9535_ledfault: pca9535-ledfault at 23 {
+	pca9535_ledfault: pca9535 at 23 {
 		compatible = "nxp,pca9535";
 		reg = <0x23>;
 		gpio-controller;
@@ -670,7 +676,7 @@
 
 	};
 
-	pca9535_pwrdisable: pca9535-pwrdisable at 25 {
+	pca9535_pwrdisable: pca9535 at 25 {
 		compatible = "nxp,pca9535";
 		reg = <0x25>;
 		gpio-controller;
@@ -687,7 +693,7 @@
 			"u2_13_pwr_dis","u2_12_pwr_dis";
 	};
 
-	pca9535_perst: pca9535-perst at 26 {
+	pca9535_perst: pca9535 at 26 {
 		compatible = "nxp,pca9535";
 		reg = <0x26>;
 		gpio-controller;
@@ -1086,94 +1092,100 @@
 	};
 };
 
-&pinctrl {
-	pinctrl-names = "default";
+&gpio0 {
+	/* POWER_OUT=gpio07, RESET_OUT=gpio06, PS_PWROK=gpio13 */
+	gpio-line-names =
+	/*0-31*/
+	"","","","","","","RESET_OUT","POWER_OUT",
+	"","","","","","PS_PWROK","","",
+	"","","","","","","","",
+	"","","","","","","","";
+};
 
-	gpio0: gpio at f0010000 {
-		/* POWER_OUT=gpio07, RESET_OUT=gpio06, PS_PWROK=gpio13 */
-		gpio-line-names =
-		/*0-31*/
-		"","","","","","","RESET_OUT","POWER_OUT",
-		"","","","","","PS_PWROK","","",
-		"","","","","","","","",
-		"","","","","","","","";
-	};
-	gpio1: gpio at f0011000 {
-		/* SIO_POWER_GOOD=gpio59 */
-		gpio-line-names =
-		/*32-63*/
-		"","","","","","","","",
-		"","","","","","","","",
-		"","","","","","","","",
-		"","","","SIO_POWER_GOOD","","","","";
+&gpio1 {
+	/* SIO_POWER_GOOD=gpio59 */
+	gpio-line-names =
+	/*32-63*/
+	"","","","","","","","",
+	"","","","","","","","",
+	"","","","","","","","",
+	"","","","SIO_POWER_GOOD","","","","";
+};
+
+&gpio2 {
+	bmc_usb_mux_oe_n {
+		gpio-hog;
+		gpios = <25 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "bmc-usb-mux-oe-n";
 	};
-	gpio2: gpio at f0012000 {
-		bmc_usb_mux_oe_n {
-			gpio-hog;
-			gpios = <25 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "bmc-usb-mux-oe-n";
-		};
-		bmc_usb_mux_sel {
-			gpio-hog;
-			gpios = <26 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "bmc-usb-mux-sel";
-		};
-		bmc_usb2517_reset_n {
-			gpio-hog;
-			gpios = <27 GPIO_ACTIVE_LOW>;
-			output-low;
-			line-name = "bmc-usb2517-reset-n";
-		};
+	bmc_usb_mux_sel {
+		gpio-hog;
+		gpios = <26 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "bmc-usb-mux-sel";
 	};
-	gpio3: gpio at f0013000 {
-		assert_cpu0_reset {
-			gpio-hog;
-			gpios = <14 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "assert-cpu0-reset";
-		};
-		assert_pwrok_cpu0_n {
-			gpio-hog;
-			gpios = <15 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "assert-pwrok-cpu0-n";
-		};
-		assert_cpu0_prochot {
-			gpio-hog;
-			gpios = <16 GPIO_ACTIVE_HIGH>;
-			output-low;
-			line-name = "assert-cpu0-prochot";
-		};
+	bmc_usb2517_reset_n {
+		gpio-hog;
+		gpios = <27 GPIO_ACTIVE_LOW>;
+		output-low;
+		line-name = "bmc-usb2517-reset-n";
 	};
-	gpio4: gpio at f0014000 {
-		/* POST_COMPLETE=gpio143 */
-		gpio-line-names =
-			/*128-159*/
-			"","","","","","","","",
-			"","","","","","","","POST_COMPLETE",
-			"","","","","","","","",
-			"","","","","","","","";
+};
+
+&gpio3 {
+	assert_cpu0_reset {
+		gpio-hog;
+		gpios = <14 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "assert-cpu0-reset";
 	};
-	gpio5: gpio at f0015000 {
-		/* POWER_BUTTON=gpio177 */
-		gpio-line-names =
-			/*160-191*/
-			"","","","","","","","",
-			"","","","","","","","",
-			"","POWER_BUTTON","","","","","","",
-			"","","","","","","","";
+	assert_pwrok_cpu0_n {
+		gpio-hog;
+		gpios = <15 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "assert-pwrok-cpu0-n";
 	};
-	gpio6: gpio at f0016000 {
-		/* SIO_S5=gpio199, RESET_BUTTON=gpio203 */
-		gpio-line-names =
-			/*192-223*/
-			"","","","","","","","SIO_S5",
-			"","","","RESET_BUTTON","","","","",
-			"","","","","","","","",
-			"","","","","","","","";
+	assert_cpu0_prochot {
+		gpio-hog;
+		gpios = <16 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "assert-cpu0-prochot";
 	};
+};
+
+&gpio4 {
+	/* POST_COMPLETE=gpio143 */
+	gpio-line-names =
+	/*128-159*/
+	"","","","","","","","",
+	"","","","","","","","POST_COMPLETE",
+	"","","","","","","","",
+	"","","","","","","","";
+};
+
+&gpio5 {
+	/* POWER_BUTTON=gpio177 */
+	gpio-line-names =
+	/*160-191*/
+	"","","","","","","","",
+	"","","","","","","","",
+	"","POWER_BUTTON","","","","","","",
+	"","","","","","","","";
+};
+
+&gpio6 {
+	/* SIO_S5=gpio199, RESET_BUTTON=gpio203 */
+	gpio-line-names =
+	/*192-223*/
+	"","","","","","","","SIO_S5",
+	"","","","RESET_BUTTON","","","","",
+	"","","","","","","","",
+	"","","","","","","","";
+};
+
+&pinctrl {
+	pinctrl-names = "default";
 
 	gpio224ol_pins: gpio224ol-pins {
 		pins = "GPIO224/SPIXCK";
-- 
2.21.0



More information about the openbmc mailing list