Skip to content

Commit

Permalink
arm64: dts: msm8916-samsung-a2015-common: add gpio-based buttons and …
Browse files Browse the repository at this point in the history
…a gpio based hall sensor; add volume down (pm8941-resin)
  • Loading branch information
Mis012 committed Jun 27, 2019
1 parent 65394d5 commit 541aaf7
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
25 changes: 25 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common-pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,29 @@
bias-disable;
};
};
gpio_keys_default: gpio_keys_default {
pinmux {
function = "gpio";
pins = "gpio107", "gpio109";
};

pinconf {
pins = "gpio107", "gpio109";
drive-strength = <2>;
bias-pull-up;
};
};

hall_gpio_default: hall_gpio_default {
pinmux {
function = "gpio";
pins = "gpio52";
};

pinconf {
pins = "gpio52";
drive-strength = <2>;
bias-disable;
};
};
};
48 changes: 48 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "pm8916.dtsi"
#include "msm8916-samsung-a2015-common-pins.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/sound/apq8016-lpass.h>

Expand Down Expand Up @@ -84,6 +85,40 @@
pinctrl-1 = <&blsp1_uart2_sleep>;
};

gpio-keys {
compatible = "gpio-keys";

pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_default>;

volume-up {
label = "Volume Up";
gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};

home {
label = "Home";
gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
};
};

hall-gpio {
compatible = "gpio-keys";

pinctrl-names = "default";
pinctrl-0 = <&hall_gpio_default>;

hall-sensor {
label = "hall_sensor";
gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
linux,can-disable;
};
};

usb@78d9000 {
status = "okay";
dr_mode = "peripheral"; // TODO: OTG
Expand Down Expand Up @@ -283,3 +318,16 @@
regulator-max-microvolt = <2700000>;
};
};

&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>;
};
};
};
};

0 comments on commit 541aaf7

Please sign in to comment.