--- /dev/null
+// 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 = <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>;
+};
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