Skip to contentSkip to conversation

arm64: dts: ti: k3-am642-phyboard-electra: Add gpio-poweroff

PATCH New Garrett Giordano 1 participant 1 message Nov 16

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

PATCH 1/1 arm64: dts: ti: k3-am642-phyboard-electra: Add gpio-poweroff

"poweroff" currently only halts the board, and the RTI watchdog resets it about a minute later.

Use GPIO0_41 (GPMC0_CSn0) to drive PBC_nKILL low, turning off VCC_5V0_MAIN.

Pushing S9 brings the board back up.

---
 .../boot/dts/ti/k3-am642-phyboard-electra-rdk.dts  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts +14 -0
index e4afa8c0a8ca..4663dfdec036 100644
@@ -164,6 +164,14 @@ led-2 {
 		};
 	};
 
+	poweroff {
+		compatible = "gpio-poweroff";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pbc_kill_pins_default>;
+		/* PBC_nKILL: driving it low turns off VCC_5V0_MAIN */
+		gpios = <&main_gpio0 41 GPIO_ACTIVE_LOW>;
+	};
+
 	vcc_3v3_mmc: regulator-sd {
 		/* TPS22963C */
 		compatible = "regulator-fixed";
@@ -312,6 +320,12 @@ AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0)	/* (E19) USB0_DRVVBUS */
 		>;
 	};
 
+	pbc_kill_pins_default: pbc-kill-default-pins {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x00a8, PIN_OUTPUT, 7)	/* (R19) GPMC0_CSn0.GPIO0_41 */
+		>;
+	};
+
 	user_leds_pins_default: user-leds-default-pins {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x003c, PIN_OUTPUT, 7)	/* (T20) GPMC0_AD0.GPIO0_15 */
Signature · 1 line
2.47.3