]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: dts: msm8916-longcheer-l8150: Add Volume buttons
authorNikita Travkin <nikitos.tr@gmail.com>
Sat, 12 Oct 2019 14:58:21 +0000 (19:58 +0500)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 15 Oct 2019 06:25:22 +0000 (23:25 -0700)
Add nodes for Volume UP button connected to GPIO and Volume DOWN button,
which is handled by the pm8916 as is common with msm8916 devices.

Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Nikita Travkin <nikitos.tr@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts

index e4d467e7dedb3f252504f2ecd1b62aca6178026b..d1ccb9472c8bdb027ae9b37c938b405aa0b185d7 100644 (file)
@@ -5,6 +5,7 @@
 #include "msm8916.dtsi"
 #include "pm8916.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "Longcheer L8150";
@@ -113,9 +114,36 @@ usb_vbus: usb-vbus {
                pinctrl-names = "default";
                pinctrl-0 = <&usb_vbus_default>;
        };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys_default>;
+
+               label = "GPIO Buttons";
+
+               volume-up {
+                       label = "Volume Up";
+                       gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+       };
 };
 
 &msmgpio {
+       gpio_keys_default: gpio_keys_default {
+               pinmux {
+                       function = "gpio";
+                       pins = "gpio107";
+               };
+               pinconf {
+                       pins = "gpio107";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+       };
+
        usb_vbus_default: usb-vbus-default {
                pinmux {
                        function = "gpio";
@@ -128,6 +156,19 @@ pinconf {
        };
 };
 
+&spmi_bus {
+       pm8916@0 {
+               pon@800 {
+                       volume-down {
+                               compatible = "qcom,pm8941-resin";
+                               interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+                               bias-pull-up;
+                               linux,code = <KEY_VOLUMEDOWN>;
+                       };
+               };
+       };
+};
+
 &smd_rpm_regulators {
        vdd_l1_l2_l3-supply = <&pm8916_s3>;
        vdd_l4_l5_l6-supply = <&pm8916_s4>;