[linux-riscv][J][PATCHv2 17/17] riscv: dts: sifive unmatched: Add gpio poweroff

Dimitri John Ledkov dimitri.ledkov at canonical.com
Fri Feb 25 20:54:50 UTC 2022


From: Ron Economos <w6rz at comcast.net>

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 at comcast.net>
Signed-off-by: Palmer Dabbelt <palmer at rivosinc.com>
(cherry picked from commit db3f02df1853acf4d678bcddb3f1eab23219b410)
BugLink: https://bugs.launchpad.net/bugs/1962010
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
---
 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 5 +++++
 1 file changed, 5 insertions(+)

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




More information about the kernel-team mailing list