Skip to content

Commit

Permalink
arm64: dts: qcom: sm8250-edo: Add hardware keys
Browse files Browse the repository at this point in the history
Volume Down, GAssist (pdx206 only) and camera keys live on PMIC pins,
with the latter kind being broken for now.. Add these and PON-connected
Volume Up & PWR.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20210616122708.144770-1-konrad.dybcio@somainline.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
  • Loading branch information
konradybcio authored and andersson committed Jun 18, 2021
1 parent 5b85e8f commit 46e1490
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
stride = <(1080 * 4)>;
};

&gpio_keys {
g-assist-key {
label = "Google Assistant Key";
linux,code = <KEY_LEFTMETA>;
gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
debounce-interval = <15>;
linux,can-disable;
gpio-key,wakeup;
};
};

&vreg_l2f_1p3 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
Expand Down
30 changes: 30 additions & 0 deletions arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@
};
};

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).
*/

vol-down {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
gpios = <&pm8150_gpios 1 GPIO_ACTIVE_LOW>;
debounce-interval = <15>;
linux,can-disable;
gpio-key,wakeup;
};
};

vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
Expand Down Expand Up @@ -436,6 +456,16 @@
/* Richwave RTC6226 FM Radio Receiver @ 64 */
};

&pon_pwrkey {
status = "okay";
};

&pon_resin {
status = "okay";

linux,code = <KEY_VOLUMEUP>;
};

&qupv3_id_0 {
status = "okay";
};
Expand Down

0 comments on commit 46e1490

Please sign in to comment.