From: Ron Economos <w6rz@comcast.net>
Date: Fri, 31 Dec 2021 06:11:06 +0000 (-0800)
Subject: riscv: dts: sifive unmatched: Add gpio poweroff
X-Git-Tag: howlett/maple/20220722_2~1345^2~2
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=db3f02df1853acf4d678bcddb3f1eab23219b410;p=users%2Fjedix%2Flinux-maple.git

riscv: dts: sifive unmatched: Add gpio poweroff

Some of the GPIO pins on the Unmatched are wire up to control the power
of the board, indicate that in the device tree.

Signed-off-by: Ron Economos <w6rz@comcast.net>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index 6bfa1f24d3de..c4ed9efdff03 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -39,6 +39,11 @@
 		clock-frequency = <RTCCLK_FREQ>;
 		clock-output-names = "rtcclk";
 	};
+
+	gpio-poweroff {
+		compatible = "gpio-poweroff";
+		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &uart0 {