[PATCH] riscv: dts: sifive unmatched: Add gpio poweroff

Ron Economos posted 1 patch 4 years, 6 months ago
arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] riscv: dts: sifive unmatched: Add gpio poweroff
Posted by Ron Economos 4 years, 6 months ago
This patch is required for the following commit to work.

commit f2928e224d85 ("riscv: set default pm_power_off to NULL")

Signed-off-by: Ron Economos <w6rz@comcast.net>
---
 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 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 @@ rtcclk: rtcclk {
 		clock-frequency = <RTCCLK_FREQ>;
 		clock-output-names = "rtcclk";
 	};
+
+	gpio-poweroff {
+		compatible = "gpio-poweroff";
+		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &uart0 {
-- 
2.25.1

Re: [PATCH] riscv: dts: sifive unmatched: Add gpio poweroff
Posted by James Clarke 4 years, 6 months ago
On 31 Dec 2021, at 06:11, Ron Economos <w6rz@comcast.net> wrote:
> 
> This patch is required for the following commit to work.
> 
> commit f2928e224d85 ("riscv: set default pm_power_off to NULL")
> 
> Signed-off-by: Ron Economos <w6rz@comcast.net>
> ---
> 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 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 @@ rtcclk: rtcclk {
>        clock-frequency = <RTCCLK_FREQ>;
>        clock-output-names = "rtcclk";
>    };
> +
> +    gpio-poweroff {
> +        compatible = "gpio-poweroff";
> +        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
> +    };

Why? It’s abstracted by firmware, which works.

Jess

Re: [PATCH] riscv: dts: sifive unmatched: Add gpio poweroff
Posted by Ron Economos 4 years, 6 months ago
On 12/30/21 10:58 PM, James Clarke wrote:
> On 31 Dec 2021, at 06:11, Ron Economos <w6rz@comcast.net> wrote:
>> This patch is required for the following commit to work.
>>
>> commit f2928e224d85 ("riscv: set default pm_power_off to NULL")
>>
>> Signed-off-by: Ron Economos <w6rz@comcast.net>
>> ---
>> 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 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 @@ rtcclk: rtcclk {
>>         clock-frequency = <RTCCLK_FREQ>;
>>         clock-output-names = "rtcclk";
>>     };
>> +
>> +    gpio-poweroff {
>> +        compatible = "gpio-poweroff";
>> +        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
>> +    };
> Why? It’s abstracted by firmware, which works.
>
> Jess
>
I didn't realize that OpenSBI 1.0 had been released last week. Please 
disregard this patch.

Ron