arm64: dts: qcom: sm8250-edo: Add hardware keys
authorKonrad Dybcio <konrad.dybcio@somainline.org>
Wed, 16 Jun 2021 12:27:03 +0000 (14:27 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 18 Jun 2021 17:39:22 +0000 (12:39 -0500)
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>
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi

index 999b662f46799af7d079b25aeea5ce35f187cfd6..16c96e8385348f97330ac59a52449dfa5b718dc6 100644 (file)
        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>;
index bbc9b380b166fa194192fce73530726106b20cdd..1a08712b88df41ec621ad66d228ddb3479497a65 100644 (file)
                };
        };
 
+       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";
        /* Richwave RTC6226 FM Radio Receiver @ 64 */
 };
 
+&pon_pwrkey {
+       status = "okay";
+};
+
+&pon_resin {
+       status = "okay";
+
+       linux,code = <KEY_VOLUMEUP>;
+};
+
 &qupv3_id_0 {
        status = "okay";
 };