arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey
authorLin, Meng-Bo <linmengbo0689@protonmail.com>
Sun, 24 Jul 2022 09:55:43 +0000 (09:55 +0000)
committerBjorn Andersson <andersson@kernel.org>
Mon, 29 Aug 2022 21:13:32 +0000 (16:13 -0500)
On the Samsung Galaxy E5 and E7 the touch key is supplied by a single
fixed regulator (enabled via GPIO 97) that supplies both MCU and LED.
Add it to the device tree.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220724095426.14189-1-linmengbo0689@protonmail.com
arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts

index 9caa8a161d315186c8d0fa2479af16e72d586c27..542010fdfb8a687d7ea951cc22608dad49fec967 100644 (file)
                pinctrl-names = "default";
                pinctrl-0 = <&motor_en_default>;
        };
+
+       reg_touch_key: regulator-touch-key {
+               compatible = "regulator-fixed";
+               regulator-name = "touch_key";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&msmgpio 97 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&tkey_en_default>;
+       };
 };
 
 &blsp_i2c2 {
        /delete-node/ magnetometer@12;
 };
 
+&touchkey {
+       vcc-supply = <&reg_touch_key>;
+       vdd-supply = <&reg_touch_key>;
+};
+
 &msmgpio {
        motor_en_default: motor-en-default {
                pins = "gpio76";
                drive-strength = <2>;
                bias-disable;
        };
+
+       tkey_en_default: tkey-en-default {
+               pins = "gpio97";
+               function = "gpio";
+
+               drive-strength = <2>;
+               bias-disable;
+       };
 };
index 4c1becdb9428ba21dbac68b7980541bd5e425f1e..bc713469897899a610e98259be7b9c778597a29a 100644 (file)
        gpio = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
 };
 
+&reg_touch_key {
+       status = "disabled";
+};
+
 &msmgpio {
        gpio_leds_default: gpio-led-default {
                pins = "gpio60";