From eba92b3fd97b9ee93d9296385c93412f9d80bb52 Mon Sep 17 00:00:00 2001 From: celele64 Date: Thu, 30 May 2024 13:04:32 +0200 Subject: [PATCH] arm64: dts: qcom: msm8916-samsung-heatqlte: Add touchkeys Add support for the tm2-touchkey input device providing the menu and back keys and their backlight leds. Signed-off-by: Celeste Lucero --- .../dts/qcom/msm8916-samsung-heatqlte.dts | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts index 839e67ec59118b..a7085f46bc6633 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts @@ -20,6 +20,59 @@ model = "Samsung Galaxy Ace 4 (SM-G357FZ)"; compatible = "samsung,heatqlte", "qcom,msm8916"; chassis-type = "handset"; + + 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 = <®_vcc_touchkey>; + vdd-supply = <®_vdd_touchkey_led>; + + pinctrl-0 = <&touchkey_int_default>; + pinctrl-names = "default"; + + linux,keycodes = ; + }; + }; + + 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"; + }; }; &battery { @@ -35,3 +88,33 @@ &panel { compatible = "samsung,s6288a0"; }; + +&tlmm { + 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; + }; + + 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; + }; +};