dts: starfive: Enable gpio restart
authorJianlong Huang <jianlong.huang@starfivetech.com>
Tue, 27 Sep 2022 02:50:28 +0000 (10:50 +0800)
committerJianlong Huang <jianlong.huang@starfivetech.com>
Thu, 3 Nov 2022 09:23:29 +0000 (17:23 +0800)
Add gpio restart dts node
Enable gpio restart config

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dts
arch/riscv/configs/starfive_visionfive2_defconfig

index 3815a8db94d489bb0f2ca5321defd3140e37b4e1..dfcb5bad7a39f7d170587d9adcf39697587e48e0 100644 (file)
 / {
        model = "StarFive VisionFive V2";
        compatible = "starfive,visionfive-v2", "starfive,jh7110";
+
+       gpio-restart {
+               compatible = "gpio-restart";
+               gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
+               priority = <224>;
+       };
+
 };
 
 &gpio {
index 345323436c4f28316a4f6fdf5679176585b0ea83..86a38e4f6da48301b0b80de431a9da2171c2d111 100644 (file)
@@ -172,6 +172,7 @@ CONFIG_PINCTRL_STARFIVE=y
 CONFIG_PINCTRL_STARFIVE_JH7110=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO_RESTART=y
 CONFIG_POWER_RESET_SYSCON=y
 CONFIG_POWER_RESET_SYSCON_POWEROFF=y
 CONFIG_SENSORS_SFCTEMP=y