devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key
@ 2025-03-07 17:10 Johan Hovold
  2025-03-08 16:26 ` Konrad Dybcio
  2025-03-17  2:55 ` Bjorn Andersson
  0 siblings, 2 replies; 5+ messages in thread
From: Johan Hovold @ 2025-03-07 17:10 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel, Johan Hovold

Add support for the keypad volume-up key on the debug extension board.

This is useful to have when testing PMIC interrupt handling, and the key
can also be used to wake up from deep suspend states (CX shutdown).

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index 75adaa19d1c3..8badf7f49b95 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -37,6 +37,20 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&kypd_vol_up_n>;
+		pinctrl-names = "default";
+
+		key-vol-up {
+			label = "volume_up";
+			gpios = <&pmc8280_1_gpios 6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+		};
+	};
+
 	pmic-glink {
 		compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";
 
@@ -885,6 +899,14 @@ edp_bl_reg_en: edp-bl-reg-en-state {
 		function = "normal";
 	};
 
+	kypd_vol_up_n: kypd-vol-up-n-state {
+		pins = "gpio6";
+		function = "normal";
+		power-source = <0>; /* 3.3 V */
+		bias-pull-up;
+		input-enable;
+	};
+
 	misc_3p3_reg_en: misc-3p3-reg-en-state {
 		pins = "gpio2";
 		function = "normal";
-- 
2.45.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key
  2025-03-07 17:10 [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key Johan Hovold
@ 2025-03-08 16:26 ` Konrad Dybcio
  2025-03-10 12:18   ` Johan Hovold
  2025-03-17  2:55 ` Bjorn Andersson
  1 sibling, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2025-03-08 16:26 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

On 7.03.2025 6:10 PM, Johan Hovold wrote:
> Add support for the keypad volume-up key on the debug extension board.
> 
> This is useful to have when testing PMIC interrupt handling, and the key
> can also be used to wake up from deep suspend states (CX shutdown).
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

I'm lukewarm about this since there is no "actual" button for that.
Does the power button not work here?

If systemd induces a shutdown, try setting

HandlePowerKey=ignore

in /etc/systemd/logind.conf

Konrad

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key
  2025-03-08 16:26 ` Konrad Dybcio
@ 2025-03-10 12:18   ` Johan Hovold
  2025-03-11 17:26     ` Konrad Dybcio
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2025-03-10 12:18 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Johan Hovold, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On Sat, Mar 08, 2025 at 05:26:26PM +0100, Konrad Dybcio wrote:
> On 7.03.2025 6:10 PM, Johan Hovold wrote:
> > Add support for the keypad volume-up key on the debug extension board.
> > 
> > This is useful to have when testing PMIC interrupt handling, and the key
> > can also be used to wake up from deep suspend states (CX shutdown).
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> 
> I'm lukewarm about this since there is no "actual" button for that.

There is certainly a physical button on the debug board. And the UEFI
firmware also supports it (e.g. it can be used in GRUB).

> Does the power button not work here?

For wake up, yes, but not for testing PMIC GPIO interrupts.

> If systemd induces a shutdown, try setting
> 
> HandlePowerKey=ignore
> 
> in /etc/systemd/logind.conf

I'm aware of that, but the volume key can be used without updating user
space (possibly also for CI testing if that signal can be controlled
remotely like the power button).

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key
  2025-03-10 12:18   ` Johan Hovold
@ 2025-03-11 17:26     ` Konrad Dybcio
  0 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2025-03-11 17:26 UTC (permalink / raw)
  To: Johan Hovold, Konrad Dybcio
  Cc: Johan Hovold, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On 3/10/25 1:18 PM, Johan Hovold wrote:
> On Sat, Mar 08, 2025 at 05:26:26PM +0100, Konrad Dybcio wrote:
>> On 7.03.2025 6:10 PM, Johan Hovold wrote:
>>> Add support for the keypad volume-up key on the debug extension board.
>>>
>>> This is useful to have when testing PMIC interrupt handling, and the key
>>> can also be used to wake up from deep suspend states (CX shutdown).
>>>
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>
>> I'm lukewarm about this since there is no "actual" button for that.
> 
> There is certainly a physical button on the debug board. And the UEFI
> firmware also supports it (e.g. it can be used in GRUB).
> 
>> Does the power button not work here?
> 
> For wake up, yes, but not for testing PMIC GPIO interrupts.
> 
>> If systemd induces a shutdown, try setting
>>
>> HandlePowerKey=ignore
>>
>> in /etc/systemd/logind.conf
> 
> I'm aware of that, but the volume key can be used without updating user
> space (possibly also for CI testing if that signal can be controlled
> remotely like the power button).

Alright, I see

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key
  2025-03-07 17:10 [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key Johan Hovold
  2025-03-08 16:26 ` Konrad Dybcio
@ 2025-03-17  2:55 ` Bjorn Andersson
  1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2025-03-17  2:55 UTC (permalink / raw)
  To: Konrad Dybcio, Johan Hovold
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel


On Fri, 07 Mar 2025 18:10:36 +0100, Johan Hovold wrote:
> Add support for the keypad volume-up key on the debug extension board.
> 
> This is useful to have when testing PMIC interrupt handling, and the key
> can also be used to wake up from deep suspend states (CX shutdown).
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key
      commit: 3529d9536105b78d9756ef81722554a7f9e3c6b0

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-17  2:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 17:10 [PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key Johan Hovold
2025-03-08 16:26 ` Konrad Dybcio
2025-03-10 12:18   ` Johan Hovold
2025-03-11 17:26     ` Konrad Dybcio
2025-03-17  2:55 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).