arm64: dts: qcom: msm8998-yoshino: fix volume-up key
authorSebastian Raase <linux@sraa.de>
Fri, 15 Mar 2024 22:52:29 +0000 (23:52 +0100)
committerBjorn Andersson <andersson@kernel.org>
Wed, 3 Apr 2024 18:49:49 +0000 (13:49 -0500)
The volume-up key is connected to gpio6 on yoshino.
Fix button node ordering while at it.
Disable pm8998_resin, since it is now unused.

Tested on maple and lilac.

Fixes: 390883af89d2e ("arm64: dts: qcom: msm8998: Introduce support for Sony Yoshino platform")
Signed-off-by: Sebastian Raase <linux@sraa.de>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240315225237.1616550-1-linux@sraa.de
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi

index 876c6921ddf0713542fe69d41b1fce9449e3d786..fdd3953938d950698ff56a07d9cc33ba1c850c8f 100644 (file)
        gpio-keys {
                compatible = "gpio-keys";
                label = "Side buttons";
+               pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &vol_up_n>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vol_down_n &focus_n &snapshot_n>;
-               button-vol-down {
-                       label = "Volume Down";
-                       gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
-                       linux,input-type = <EV_KEY>;
-                       linux,code = <KEY_VOLUMEDOWN>;
-                       wakeup-source;
+               button-camera-focus {
+                       label = "Camera Focus";
+                       gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_CAMERA_FOCUS>;
                        debounce-interval = <15>;
                };
 
                button-camera-snapshot {
                        label = "Camera Snapshot";
                        gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
-                       linux,input-type = <EV_KEY>;
                        linux,code = <KEY_CAMERA>;
                        debounce-interval = <15>;
                };
 
-               button-camera-focus {
-                       label = "Camera Focus";
-                       gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
-                       linux,input-type = <EV_KEY>;
-                       linux,code = <KEY_CAMERA_FOCUS>;
+               button-vol-down {
+                       label = "Volume Down";
+                       gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       wakeup-source;
+                       debounce-interval = <15>;
+               };
+
+               button-vol-up {
+                       label = "Volume Up";
+                       gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+                       wakeup-source;
                        debounce-interval = <15>;
                };
        };
                qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
        };
 
+       vol_up_n: vol-up-n-state {
+               pins = "gpio6";
+               function = PMIC_GPIO_FUNC_NORMAL;
+               bias-pull-up;
+               input-enable;
+               qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+       };
+
        focus_n: focus-n-state {
                pins = "gpio7";
                function = PMIC_GPIO_FUNC_NORMAL;
        };
 };
 
-&pm8998_resin {
-       linux,code = <KEY_VOLUMEUP>;
-       status = "okay";
-};
-
 &qusb2phy {
        status = "okay";