]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: support Dragino LPS8 23472/head
authorLech Perczak <lech.perczak@gmail.com>
Wed, 20 May 2026 18:11:56 +0000 (20:11 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 25 May 2026 22:01:39 +0000 (00:01 +0200)
Dragino LPS8 is a LoRa/LoRaWAN gateway with single Wi-Fi 4 radio and a
single Fast Ethernet port, based around Dragino HE module.

Specifications:
CPU: Atheros AR9330 SoC @400MHz,
RAM: 64MB DDR,
Flash: 16MB SPI-NOR,
Ethernet: One 100Mbps port.
Wireless: built-in 1x1 802.11 2.4GHz radio,
USB: single USB2.0 High speed host port,
LoRa: Semtech SX1301 or compatible module, dependent on LoRa band.
Power: USB-C 5V, with the usual 5,1k CC resistors missing - use type
A-to-C cable.

LEDs:
- LAN (red)
- WAN/Status (RGB, blue: status, green: WLAN, red: WAN)
- LoRa (bicolor, controlled by Semtech module)

UART: 3.3V 115200-8-N-1 at internal expansion header J2
RxD: pin 4
TxD: pin 6
GND: pin 8
Label MAC: Wi-Fi interface.

Installation:
Log in via SSH to the unit, default username and password are 'root' and
'dragino', respectively. SSH listens on port 2222.
Just 'sysupgrade -n' from vendor firmware, dropping old configuration.

Restore vendor firmware:
the same as installation, just 'sysupgrade -F -n', dropping configuration.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/ar9330_dragino_lps8.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/ar9330_dragino_lps8.dts b/target/linux/ath79/dts/ar9330_dragino_lps8.dts
new file mode 100644 (file)
index 0000000..790d401
--- /dev/null
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9330_dragino_dragino2.dtsi"
+
+/ {
+       model = "Dragino LPS8";
+       compatible = "dragino,lps8", "qca,ar9330";
+
+       spi-gpio {
+               compatible = "spi-gpio";
+               mosi-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+               miso-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
+               sck-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
+               cs-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+               num-chipselects = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               lora@0 {
+                       compatible = "semtech,sx1301";
+                       reg = <0>;
+                       spi-max-frequency = <8000000>;
+               };
+       };
+};
+
+&eth1 {
+       compatible = "syscon", "simple-mfd";
+};
+
+&gpio_keys {
+       reset {
+               label = "reset";
+               linux,code = <KEY_RESTART>;
+               gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&gpio_leds {
+       lan {
+               function = LED_FUNCTION_LAN;
+               color = <LED_COLOR_ID_RED>;
+               gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+       };
+
+       wan {
+               function = LED_FUNCTION_WAN;
+               color = <LED_COLOR_ID_RED>;
+               gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
+       };
+
+       wlan {
+               /* Attaching this via led-sources causes oopses for some reason */
+               function = LED_FUNCTION_WLAN;
+               color = <LED_COLOR_ID_GREEN>;
+               gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+               linux,default-trigger = "phy0tpt";
+       };
+};
+
+&led_system {
+       color = <LED_COLOR_ID_BLUE>;
+};
index ef999afd071c683a16971b657b2350a324bc76f5..d12d429b8628c6bc9df952afc252504ab8794f02 100644 (file)
@@ -252,6 +252,9 @@ dlink,dap-1365-a1)
        ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
        ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
        ;;
+dragino,lps8)
+       ucidef_set_led_netdev "lan" "LAN" "red:lan" "eth0"
+       ;;
 dragino,ms14)
        ucidef_set_led_netdev "lan" "LAN" "red:lan" "eth0"
        ucidef_set_led_netdev "wan" "WAN" "red:wan" "eth1"
index aa6266785e0478f50de39bcba3da314d01a2c3ee..8c5c0a0935d6d5b64ec1694fc81ec1ee4b5c15e7 100644 (file)
@@ -40,6 +40,7 @@ ath79_setup_interfaces()
        dlink,dap-2680-a1|\
        dlink,dap-3320-a1|\
        dlink,dir-505|\
+       dragino,lps8|\
        engenius,eap1200h|\
        engenius,eap1750h|\
        engenius,eap600|\
index be1658801f63696e5cbbd3dbb375bbe02dd0ed1b..2e41c73388cf8dc70b0f5e44baad897403cdd592 100644 (file)
@@ -1315,14 +1315,25 @@ define Device/dlink_dir-842-c3
 endef
 TARGET_DEVICES += dlink_dir-842-c3
 
-define Device/dragino_ms14
+define Device/dragino2_common
   SOC := ar9330
   DEVICE_VENDOR := Dragino
-  DEVICE_MODEL := MS14
   DEVICE_PACKAGES := kmod-usb-chipidea2
   IMAGE_SIZE := 16000k
   SUPPORTED_DEVICES += dragino2
 endef
+
+define Device/dragino_lps8
+  $(Device/dragino2_common)
+  DEVICE_MODEL := LPS8
+  DEVICE_PACKAGES += kmod-spi-gpio kmod-spi-dev
+endef
+TARGET_DEVICES += dragino_lps8
+
+define Device/dragino_ms14
+  $(Device/dragino2_common)
+  DEVICE_MODEL := MS14
+endef
 TARGET_DEVICES += dragino_ms14
 
 define Device/elecom_wab