aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts150
-rw-r--r--target/linux/ramips/image/mt7621.mk12
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/etc/board.d/02_network4
3 files changed, 165 insertions, 1 deletions
diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
new file mode 100644
index 0000000000..2897f42f1d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
@@ -0,0 +1,150 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "winstars,ws-wn583a6", "mediatek,mt7621-soc";
+ model = "Winstars WS-WN583A6";
+
+ aliases {
+ led-boot = &led_status_red;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_red;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ night_light_white {
+ label = "ws-wn583a6:white:night_light";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_blue: status_blue {
+ label = "ws-wn583a6:blue:status";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ status_amber {
+ label = "ws-wn583a6:amber:status";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_red: status_red {
+ label = "ws-wn583a6:red:status";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <104000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 0315822c0b..6a9d49b32c 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -1020,6 +1020,18 @@ define Device/wevo_w2914ns-v2
endef
TARGET_DEVICES += wevo_w2914ns-v2
+define Device/winstars_ws-wn583a6
+ $(Device/uimage-lzma-loader)
+ IMAGE_SIZE := 7872k
+ DEVICE_VENDOR := Winstars
+ DEVICE_MODEL := WS-WN583A6
+ DEVICE_ALT0_VENDOR := Gemeita
+ DEVICE_ALT0_MODEL := AC2100
+ KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX)
+ DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware wpad-basic
+endef
+TARGET_DEVICES += winstars_ws-wn583a6
+
define Device/xiaomi-ac2100
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 2d3db99b3d..b9f2740a1b 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -9,7 +9,8 @@ ramips_setup_interfaces()
local board="$1"
case $board in
- asiarf,ap7621-001)
+ asiarf,ap7621-001|\
+ winstars,ws-wn583a6)
ucidef_set_interfaces_lan_wan "lan" "wan"
;;
asiarf,ap7621-nv1|\
@@ -113,6 +114,7 @@ ramips_setup_macs()
wan_mac=$label_mac
lan_mac=$(macaddr_add $label_mac 1)
;;
+ winstars,ws-wn583a6|\
zbtlink,zbt-we1326|\
zbtlink,zbt-wg3526-16m|\
zbtlink,zbt-wg3526-32m)