[openwrt/openwrt] ramips: support Genexis EX400 touch controller

LEDE Commits lede-commits at lists.infradead.org
Sun May 11 02:56:10 PDT 2025


blocktrron pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/49a1781d74590f0945973dac6d82faeb2f624b6f

commit 49a1781d74590f0945973dac6d82faeb2f624b6f
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Sun May 4 04:45:03 2025 +0200

    ramips: support Genexis EX400 touch controller
    
    Add the necessary package dependencies as well as device-tree properties
    to support the touch-inputs as well as missing LEDs on the Genexis Pulse
    EX400 range extender.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../ramips/dts/mt7621_genexis_pulse-ex400.dts      | 82 ++++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |  2 +-
 .../ramips/mt7621/base-files/etc/board.d/01_leds   |  1 +
 3 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7621_genexis_pulse-ex400.dts b/target/linux/ramips/dts/mt7621_genexis_pulse-ex400.dts
index 7256ea0cf2..61b3e869d7 100644
--- a/target/linux/ramips/dts/mt7621_genexis_pulse-ex400.dts
+++ b/target/linux/ramips/dts/mt7621_genexis_pulse-ex400.dts
@@ -21,3 +21,85 @@
 		gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 	};
 };
+
+&i2c {
+	clock-frequency = <1000>;
+
+	touch at 2b {
+		compatible = "semtech,sx9512";
+
+		reg = <0x2b>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		poll-interval = <150>;
+
+		/* Touch area 2.4 GHz */
+		channel at 1 {
+			reg = <1>;
+
+			semtech,cin-delta = <0x3>;
+			semtech,sense-threshold = <0x04>;
+
+			linux,keycodes = <KEY_A>;
+		};
+
+		/* Touch area 5 GHz */
+		channel at 2 {
+			reg = <2>;
+
+			semtech,cin-delta = <0x3>;
+			semtech,sense-threshold = <0x04>;
+
+			linux,keycodes = <KEY_B>;
+		};
+		/* Touch area WPS */
+		channel at 3 {
+			reg = <3>;
+
+			semtech,cin-delta = <0x3>;
+			semtech,sense-threshold = <0x04>;
+
+			linux,keycodes = <KEY_WPS_BUTTON>;
+		};
+
+		channel at 4 {
+			reg = <4>;
+
+			led {
+				color = <LED_COLOR_ID_RED>;
+				function = LED_FUNCTION_WAN;
+			};
+		};
+
+		channel at 5 {
+			reg = <5>;
+
+			led {
+				color = <LED_COLOR_ID_GREEN>;
+				function = LED_FUNCTION_WAN;
+			};
+		};
+
+		channel at 6 {
+			reg = <6>;
+
+			led {
+				color = <LED_COLOR_ID_GREEN>;
+				function = LED_FUNCTION_WLAN_5GHZ;
+				linux,default-trigger = "phy1tpt";
+			};
+		};
+
+		channel at 7 {
+			reg = <7>;
+
+			led {
+				color = <LED_COLOR_ID_GREEN>;
+				function = LED_FUNCTION_WLAN_2GHZ;
+				linux,default-trigger = "phy0tpt";
+			};
+		};
+	};
+};
\ No newline at end of file
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 69c91dd69c..5e1cec135c 100755
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -1411,7 +1411,7 @@ endif
   IMAGE/sysupgrade.bin := append-kernel | inteno-bootfs | \
     sysupgrade-tar kernel=$$$$@ | check-size | append-metadata
   DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)
-  DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3
+  DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 kmod-keyboard-sx951x kmod-button-hotplug
 endef
 
 define Device/genexis_pulse-ex400
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
index e268a089a5..ab00c671b3 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -59,6 +59,7 @@ belkin,rt1800)
 	ucidef_set_led_netdev "wan" "wan" "white:wan" "wan"
 	;;
 confiabits,mt7621-v1|\
+genexis,pulse-ex400|\
 netis,n6)
 	ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" "link tx rx"
 	;;




More information about the lede-commits mailing list