From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: [PATCH 4/4] arm64: dts: qcom: sm8250-edo: Rectify gpio-keys
Date: Wed, 14 Jun 2023 14:11:49 +0200 [thread overview]
Message-ID: <20230614-topic-edo_pinsgpiopmic-v1-4-cf88a0bac26c@linaro.org> (raw)
In-Reply-To: <20230614-topic-edo_pinsgpiopmic-v1-0-cf88a0bac26c@linaro.org>
Set up the corresponding GPIOs properly and add the leftover hardware
buttons to mark this piece of the puzzle complete.
Fixes: 69cdb97ef652 ("arm64: dts: qcom: sm8250: Add support for SONY Xperia 1 II / 5 II (Edo platform)")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
.../dts/qcom/sm8250-sony-xperia-edo-pdx206.dts | 10 ++++
.../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 54 +++++++++++++++++++---
2 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
index ea4571bf4fbf..58a521046f5f 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
@@ -20,6 +20,8 @@ &framebuffer {
};
&gpio_keys {
+ pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &g_assist_n>;
+
g-assist-key {
label = "Google Assistant Key";
linux,code = <KEY_LEFTMETA>;
@@ -48,6 +50,14 @@ &pm8150_gpios {
"SP_ARI_PWR_ALARM",
"NC",
"NC"; /* GPIO_10 */
+
+ g_assist_n: g-assist-n-state {
+ pins = "gpio6";
+ function = "normal";
+ power-source = <1>;
+ bias-pull-up;
+ input-enable;
+ };
};
&pm8150b_gpios {
diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
index 9f9e7e9784fe..e55a94e5ff08 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
@@ -50,12 +50,26 @@ framebuffer: framebuffer@9c000000 {
gpio_keys: gpio-keys {
compatible = "gpio-keys";
- /*
- * Camera focus (light press) and camera snapshot (full press)
- * seem not to work properly.. Adding the former one stalls the CPU
- * and the latter kills the volume down key for whatever reason. In any
- * case, they are both on &pm8150b_gpios: camera focus(2), camera snapshot(1).
- */
+ pinctrl-0 = <&focus_n &snapshot_n &vol_down_n>;
+ pinctrl-names = "default";
+
+ key-camera-focus {
+ label = "Camera Focus";
+ linux,code = <KEY_CAMERA_FOCUS>;
+ gpios = <&pm8150b_gpios 2 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ gpio-key,wakeup;
+ };
+
+ key-camera-snapshot {
+ label = "Camera Snapshot";
+ linux,code = <KEY_CAMERA>;
+ gpios = <&pm8150b_gpios 1 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ gpio-key,wakeup;
+ };
key-vol-down {
label = "Volume Down";
@@ -543,6 +557,34 @@ &pcie2_phy {
vdda-pll-supply = <&vreg_l9a_1p2>;
};
+&pm8150_gpios {
+ vol_down_n: vol-down-n-state {
+ pins = "gpio1";
+ function = "normal";
+ power-source = <0>;
+ bias-pull-up;
+ input-enable;
+ };
+};
+
+&pm8150b_gpios {
+ snapshot_n: snapshot-n-state {
+ pins = "gpio1";
+ function = "normal";
+ power-source = <0>;
+ bias-pull-up;
+ input-enable;
+ };
+
+ focus_n: focus-n-state {
+ pins = "gpio2";
+ function = "normal";
+ power-source = <0>;
+ bias-pull-up;
+ input-enable;
+ };
+};
+
&pon_pwrkey {
status = "okay";
};
--
2.41.0
next prev parent reply other threads:[~2023-06-14 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 12:11 [PATCH 0/4] SM8250 Edo pins, keys & pmic Konrad Dybcio
2023-06-14 12:11 ` [PATCH 1/4] arm64: dts: qcom: sm8250-edo: Add gpio line names for TLMM Konrad Dybcio
2023-06-14 12:11 ` [PATCH 2/4] arm64: dts: qcom: sm8250-edo: Add GPIO line names for PMIC GPIOs Konrad Dybcio
2023-06-14 12:11 ` [PATCH 3/4] arm64: dts: qcom: sm8250-pdx203: Configure SLG51000 PMIC Konrad Dybcio
2023-06-14 12:11 ` Konrad Dybcio [this message]
2023-06-14 12:27 ` [PATCH 4/4] arm64: dts: qcom: sm8250-edo: Rectify gpio-keys Marijn Suijten
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230614-topic-edo_pinsgpiopmic-v1-4-cf88a0bac26c@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).