diff mbox series

[RESEND,4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey

Message ID 20220715102413.4119-1-linmengbo0689@protonmail.com
State Superseded
Headers show
Series [RESEND,1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices | expand

Commit Message

Lin, Meng-Bo July 15, 2022, 10:25 a.m. UTC
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>
---
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 26 +++++++++++++++++++
 .../dts/qcom/msm8916-samsung-grandmax.dts     |  4 +++
 2 files changed, 30 insertions(+)

--
2.30.2
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 373154ee2643..9f3aca17130d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -19,6 +19,19 @@  muic: extcon@14 {
 		};
 	};

+	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>;
+	};
+
 	vibrator: vibrator {
 		compatible = "gpio-vibrator";
 		enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>;
@@ -28,6 +41,11 @@  vibrator: vibrator {
 	};
 };

+&touchkey {
+	vcc-supply = <&reg_touch_key>;
+	vdd-supply = <&reg_touch_key>;
+};
+
 &msmgpio {
 	motor_en_default: motor-en-default {
 		pins = "gpio76";
@@ -36,4 +54,12 @@  motor_en_default: motor-en-default {
 		drive-strength = <2>;
 		bias-disable;
 	};
+
+	tkey_en_default: tkey-en-default {
+		pins = "gpio97";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
index 41aada4bfb80..f68dd3d69a33 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
@@ -27,6 +27,10 @@  / {
 	/delete-node/ i2c-tkey;
 };

+&reg_touch_key {
+	status = "disabled";
+};
+
 &vibrator {
 	enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
 };