Skip to content

Commit 825a0bb

Browse files
committed
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 <lech.perczak@gmail.com>
1 parent a957882 commit 825a0bb

4 files changed

Lines changed: 81 additions & 2 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
#include "ar9330_dragino_dragino2.dtsi"
4+
5+
/ {
6+
model = "Dragino LPS8";
7+
compatible = "dragino,lps8", "qca,ar9330";
8+
9+
spi-gpio {
10+
compatible = "spi-gpio";
11+
mosi-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
12+
miso-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
13+
sck-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
14+
cs-gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
15+
num-chipselects = <1>;
16+
#address-cells = <1>;
17+
#size-cells = <0>;
18+
19+
lora@0 {
20+
compatible = "semtech,sx1301";
21+
reg = <0>;
22+
spi-max-frequency = <8000000>;
23+
};
24+
};
25+
};
26+
27+
&eth1 {
28+
compatible = "syscon", "simple-mfd";
29+
};
30+
31+
&gpio_keys {
32+
reset {
33+
label = "reset";
34+
linux,code = <KEY_RESTART>;
35+
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
36+
};
37+
38+
};
39+
40+
&gpio_leds {
41+
lan {
42+
function = LED_FUNCTION_LAN;
43+
color = <LED_COLOR_ID_RED>;
44+
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
45+
};
46+
47+
wan {
48+
function = LED_FUNCTION_WAN;
49+
color = <LED_COLOR_ID_RED>;
50+
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
51+
};
52+
53+
wlan {
54+
/* Attaching this via led-sources causes oopses for some reason */
55+
function = LED_FUNCTION_WLAN;
56+
color = <LED_COLOR_ID_GREEN>;
57+
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
58+
linux,default-trigger = "phy0tpt";
59+
};
60+
};
61+
62+
&led_system {
63+
color = <LED_COLOR_ID_BLUE>;
64+
};

target/linux/ath79/generic/base-files/etc/board.d/01_leds

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ dlink,dap-1365-a1)
252252
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
253253
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
254254
;;
255+
dragino,lps8)
256+
ucidef_set_led_netdev "lan" "LAN" "red:lan" "eth0"
257+
;;
255258
dragino,ms14)
256259
ucidef_set_led_netdev "lan" "LAN" "red:lan" "eth0"
257260
ucidef_set_led_netdev "wan" "WAN" "red:wan" "eth1"

target/linux/ath79/generic/base-files/etc/board.d/02_network

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ath79_setup_interfaces()
4040
dlink,dap-2680-a1|\
4141
dlink,dap-3320-a1|\
4242
dlink,dir-505|\
43+
dragino,lps8|\
4344
engenius,eap1200h|\
4445
engenius,eap1750h|\
4546
engenius,eap600|\

target/linux/ath79/image/generic.mk

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,16 +1315,27 @@ define Device/dlink_dir-842-c3
13151315
endef
13161316
TARGET_DEVICES += dlink_dir-842-c3
13171317

1318-
define Device/dragino_ms14
1318+
define Device/dragino2_common
13191319
SOC := ar9330
13201320
DEVICE_VENDOR := Dragino
1321-
DEVICE_MODEL := Dragino2 (MS14)
13221321
DEVICE_PACKAGES := kmod-usb-chipidea2
13231322
IMAGE_SIZE := 16000k
13241323
SUPPORTED_DEVICES += dragino2
13251324
endef
1325+
1326+
define Device/dragino_ms14
1327+
$(Device/dragino2_common)
1328+
DEVICE_MODEL := Dragino2 (MS14)
1329+
endef
13261330
TARGET_DEVICES += dragino_ms14
13271331

1332+
define Device/dragino_lps8
1333+
$(Device/dragino2_common)
1334+
DEVICE_MODEL := Dragino2 (LPS8)
1335+
DEVICE_PACKAGES += kmod-spi-gpio kmod-spi-dev
1336+
endef
1337+
TARGET_DEVICES += dragino_lps8
1338+
13281339
define Device/elecom_wab
13291340
DEVICE_VENDOR := ELECOM
13301341
IMAGE_SIZE := 14336k

0 commit comments

Comments
 (0)