[08/14] arm64: dts: qcom: sa8775p: pmic: add the power key

Message ID 20230314183043.619997-9-brgl@bgdev.pl
State New
Headers
Series arm64: dts: qcom: sa8775p: add basic PMIC support |

Commit Message

Bartosz Golaszewski March 14, 2023, 6:30 p.m. UTC
  From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Add the power key node under the PON node for PMIC #0 on sa8775p.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Konrad Dybcio March 14, 2023, 8:26 p.m. UTC | #1
On 14.03.2023 19:30, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Add the power key node under the PON node for PMIC #0 on sa8775p.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> index 5d73212fbd16..874460d087db 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> @@ -18,6 +18,13 @@ pmk8775_0_pon: pon@1200 {
>  			reg = <0x1200>, <0x800>;
>  			mode-recovery = <0x1>;
>  			mode-bootloader = <0x2>;
> +
> +			pmk8775_0_pon_pwrkey: pwrkey {
> +				compatible = "qcom,pmk8350-pwrkey";
> +				interrupts-extended = <&spmi_bus 0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
> +				linux,code = <KEY_POWER>;
> +				status = "disabled";
Does it make any sense to disable the power button?

Konrad
> +			};
>  		};
>  	};
>
  
Bartosz Golaszewski March 20, 2023, 10:52 a.m. UTC | #2
On Tue, Mar 14, 2023 at 9:26 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
>
>
> On 14.03.2023 19:30, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > Add the power key node under the PON node for PMIC #0 on sa8775p.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> > index 5d73212fbd16..874460d087db 100644
> > --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> > @@ -18,6 +18,13 @@ pmk8775_0_pon: pon@1200 {
> >                       reg = <0x1200>, <0x800>;
> >                       mode-recovery = <0x1>;
> >                       mode-bootloader = <0x2>;
> > +
> > +                     pmk8775_0_pon_pwrkey: pwrkey {
> > +                             compatible = "qcom,pmk8350-pwrkey";
> > +                             interrupts-extended = <&spmi_bus 0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
> > +                             linux,code = <KEY_POWER>;
> > +                             status = "disabled";
> Does it make any sense to disable the power button?
>

Since this is an automotive platform, I'd say yes - you wouldn't
normally have physical access to the board or even be sure for it to
have a power button? But if you prefer it the other way, I won't be
dying on this hill.

Bart

> Konrad
> > +                     };
> >               };
> >       };
> >
  
Konrad Dybcio March 20, 2023, 11:01 a.m. UTC | #3
On 20.03.2023 11:52, Bartosz Golaszewski wrote:
> On Tue, Mar 14, 2023 at 9:26 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>>
>>
>> On 14.03.2023 19:30, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>
>>> Add the power key node under the PON node for PMIC #0 on sa8775p.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
>>> index 5d73212fbd16..874460d087db 100644
>>> --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
>>> @@ -18,6 +18,13 @@ pmk8775_0_pon: pon@1200 {
>>>                       reg = <0x1200>, <0x800>;
>>>                       mode-recovery = <0x1>;
>>>                       mode-bootloader = <0x2>;
>>> +
>>> +                     pmk8775_0_pon_pwrkey: pwrkey {
>>> +                             compatible = "qcom,pmk8350-pwrkey";
>>> +                             interrupts-extended = <&spmi_bus 0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
>>> +                             linux,code = <KEY_POWER>;
>>> +                             status = "disabled";
>> Does it make any sense to disable the power button?
>>
> 
> Since this is an automotive platform, I'd say yes - you wouldn't
> normally have physical access to the board or even be sure for it to
> have a power button?
On Qualcomm platforms there's little different ways to turn on the
device short of giving it DC power (though that may also be config
dependent), so I'd expect *something* would be connected to PON_PWR..

>But if you prefer it the other way, I won't be
> dying on this hill.
Yeah if you could, please leave it on (unless somebody has strong
arguments against that)

Konrad
> 
> Bart
> 
>> Konrad
>>> +                     };
>>>               };
>>>       };
>>>
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
index 5d73212fbd16..874460d087db 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
@@ -18,6 +18,13 @@  pmk8775_0_pon: pon@1200 {
 			reg = <0x1200>, <0x800>;
 			mode-recovery = <0x1>;
 			mode-bootloader = <0x2>;
+
+			pmk8775_0_pon_pwrkey: pwrkey {
+				compatible = "qcom,pmk8350-pwrkey";
+				interrupts-extended = <&spmi_bus 0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
+				linux,code = <KEY_POWER>;
+				status = "disabled";
+			};
 		};
 	};