diff mbox series

[4/7] ARM: dts: exynos: k3g: Add touchkeys support

Message ID 20230716220644.22158-6-markuss.broks@gmail.com
State New
Headers show
Series Add various peripheral support for K3G | expand

Commit Message

Markuss Broks July 16, 2023, 10:05 p.m. UTC
This device has touch keys that are compatible with those
installed on Samsung TM2 dev board.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
---
 arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts
index 582faedd6aab..b3576a745054 100644
--- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts
+++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts
@@ -104,6 +104,33 @@  battery@36 {
 		};
 	};
 
+	i2c-touchkey {
+		compatible = "i2c-gpio";
+
+		sda-gpios = <&gpd1 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpd1 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		touchkey@20 {
+			compatible = "cypress,tm2-touchkey";
+			reg = <0x20>;
+
+			interrupt-parent = <&gpy7>;
+			interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&touchkey_irq>;
+
+			vcc-supply = <&ldo38_reg>;
+			vdd-supply = <&ldo30_reg>;
+
+			linux,keycodes = <KEY_APPSELECT KEY_BACK>;
+		};
+	};
+
 	tsp_vdd: regulator-tsp-vdd-en {
 		compatible = "regulator-fixed";
 		regulator-name = "tsp_vdd_en";
@@ -742,6 +769,11 @@  power_gpio: power-key-pins {
 		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
 	};
 
+	touchkey_irq: touchkey-irq-pins {
+		samsung,pins = "gpy7-1";
+		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
+	};
+
 	wlan_reset: wlan-reset {
 		samsung,pins = "gpy7-7";
 		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;