Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-samsung-heatqlte: Add touchkeys
Browse files Browse the repository at this point in the history
Add support for the tm2-touchkey input device providing the menu and
back keys and their backlight leds.

Signed-off-by: Celeste Lucero <[email protected]>
  • Loading branch information
celele64 committed May 30, 2024
1 parent 6cc2342 commit 13b110b
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,89 @@
model = "Samsung Galaxy Ace 4 (SM-G357FZ)";
compatible = "samsung,heatqlte", "qcom,msm8916";
chassis-type = "handset";

reg_vcc_touchkey: regulator-vcc-touchkey {
compatible = "regulator-fixed";
regulator-name = "vcc_touchkey";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;

gpio = <&tlmm 11 GPIO_ACTIVE_HIGH>;
enable-active-high;

pinctrl-0 = <&vdd_touchkey_default>;
pinctrl-names = "default";
};

reg_vdd_touchkey_led: regulator-vdd-touchkey-led {
compatible = "regulator-fixed";
regulator-name = "vdd_touchkey_led";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;

gpio = <&tlmm 60 GPIO_ACTIVE_HIGH>;
enable-active-high;

pinctrl-0 = <&vdd_touchkey_led_default>;
pinctrl-names = "default";
};

i2c-touchkey {
compatible = "i2c-gpio";
sda-gpios = <&tlmm 8 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;

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

#address-cells = <1>;
#size-cells = <0>;

touchkey@20 {
compatible = "cypress,tm2-touchkey";
reg = <0x20>;

interrupts-extended = <&tlmm 9 IRQ_TYPE_EDGE_RISING>;

vcc-supply = <&reg_vcc_touchkey>;
vdd-supply = <&reg_vdd_touchkey_led>;

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

linux,keycodes = <KEY_APPSELECT KEY_BACK>;
};
};
};

&tlmm {
vdd_touchkey_default: vdd-touchkey-default-state {
pins = "gpio11";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

vdd_touchkey_led_default: vdd-touchkey-led-default-state {
pins = "gpio60";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

touchkey_i2c_default: touchkey-i2c-default-state {
pins = "gpio8", "gpio10";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

touchkey_int_default: touchkey-int-default-state {
pins = "gpio9";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
};

&battery {
Expand Down

0 comments on commit 13b110b

Please sign in to comment.