]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: support Genexis EX400 touch controller
authorDavid Bauer <mail@david-bauer.net>
Sun, 4 May 2025 02:45:03 +0000 (04:45 +0200)
committerDavid Bauer <mail@david-bauer.net>
Sat, 10 May 2025 19:26:08 +0000 (21:26 +0200)
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@david-bauer.net>
target/linux/ramips/dts/mt7621_genexis_pulse-ex400.dts
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/01_leds

index 7256ea0cf29c7c49a22e2a9d313d2a618435fd6f..61b3e869d7e154daabeefd856b1b74c8dd2f3f64 100644 (file)
                gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
        };
 };
+
+&i2c {
+       clock-frequency = <1000>;
+
+       touch@2b {
+               compatible = "semtech,sx9512";
+
+               reg = <0x2b>;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               poll-interval = <150>;
+
+               /* Touch area 2.4 GHz */
+               channel@1 {
+                       reg = <1>;
+
+                       semtech,cin-delta = <0x3>;
+                       semtech,sense-threshold = <0x04>;
+
+                       linux,keycodes = <KEY_A>;
+               };
+
+               /* Touch area 5 GHz */
+               channel@2 {
+                       reg = <2>;
+
+                       semtech,cin-delta = <0x3>;
+                       semtech,sense-threshold = <0x04>;
+
+                       linux,keycodes = <KEY_B>;
+               };
+               /* Touch area WPS */
+               channel@3 {
+                       reg = <3>;
+
+                       semtech,cin-delta = <0x3>;
+                       semtech,sense-threshold = <0x04>;
+
+                       linux,keycodes = <KEY_WPS_BUTTON>;
+               };
+
+               channel@4 {
+                       reg = <4>;
+
+                       led {
+                               color = <LED_COLOR_ID_RED>;
+                               function = LED_FUNCTION_WAN;
+                       };
+               };
+
+               channel@5 {
+                       reg = <5>;
+
+                       led {
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_WAN;
+                       };
+               };
+
+               channel@6 {
+                       reg = <6>;
+
+                       led {
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_WLAN_5GHZ;
+                               linux,default-trigger = "phy1tpt";
+                       };
+               };
+
+               channel@7 {
+                       reg = <7>;
+
+                       led {
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_WLAN_2GHZ;
+                               linux,default-trigger = "phy0tpt";
+                       };
+               };
+       };
+};
\ No newline at end of file
index 69c91dd69cc6553f373324cc9ce24033759d433e..5e1cec135cbee23dc9494f7b32cff3c69cc9ba43 100755 (executable)
@@ -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
index e268a089a57de39be0ef578eee30f71239a926a0..ab00c671b333fb8287eba49dfec9eda66abbfcef 100644 (file)
@@ -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"
        ;;