ath79: teltonika-rut230: fully support digital output lines
authorLech Perczak <lech.perczak@gmail.com>
Sat, 7 Dec 2024 03:34:00 +0000 (04:34 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Jan 2025 20:36:04 +0000 (21:36 +0100)
Remove GPIO hog for modem power, as well as define userspace GPIO
switches for enabling and resetting the modem. While at that, define a
switch for the external GPIO available on the power connector.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17503
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches

index abac2797753dfc111462b9213ea98518e7988fd1..ee59cecabb3d9750e9d56a717316717b4b79de2f 100644 (file)
        status = "okay";
 };
 
-&gpio {
-       modem-power {
-               gpio-hog;
-               output-low;
-               gpios = <18 GPIO_ACTIVE_HIGH>;
-               line-name = "modem-power";
-       };
-};
-
 &usb_phy {
        status = "okay";
 };
index d5b41dc0b80c804de2cdf80b9c851c1eaa304b44..fe71b7b3c404fe4e921d5fb14e5e542bb512e23d 100644 (file)
@@ -48,6 +48,11 @@ dlink,dir-835-a1)
 librerouter,librerouter-v1)
        ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "513" "0"
        ;;
+teltonika,rut230-v1)
+       ucidef_add_gpio_switch "DOUT" "DOUT" "524" "0"
+       ucidef_add_gpio_switch "modem_pwr" "Modem power" "531" "1"
+       ucidef_add_gpio_switch "modem_rst" "Modem reset" "530" "0"
+       ;;
 teltonika,rut955)
        ucidef_add_gpio_switch "sim_sel" "SIM select" "542" "1"
        ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "543" "0"