From: Lech Perczak Date: Wed, 20 May 2026 18:11:56 +0000 (+0200) Subject: ath79: support Dragino LPS8 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=4cd60fe167a3e06abd80bde100bbefe33f551455;p=thirdparty%2Fopenwrt.git ath79: support Dragino LPS8 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 Link: https://github.com/openwrt/openwrt/pull/23472 Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/ath79/dts/ar9330_dragino_lps8.dts b/target/linux/ath79/dts/ar9330_dragino_lps8.dts new file mode 100644 index 00000000000..790d40187b8 --- /dev/null +++ b/target/linux/ath79/dts/ar9330_dragino_lps8.dts @@ -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>; + }; + }; +}; + +ð1 { + compatible = "syscon", "simple-mfd"; +}; + +&gpio_keys { + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; +}; + +&gpio_leds { + lan { + function = LED_FUNCTION_LAN; + color = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + wan { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + }; + + wlan { + /* Attaching this via led-sources causes oopses for some reason */ + function = LED_FUNCTION_WLAN; + color = ; + gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; +}; + +&led_system { + color = ; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index ef999afd071..d12d429b862 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -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" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index aa6266785e0..8c5c0a0935d 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -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|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index be1658801f6..2e41c73388c 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -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