aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network10
-rw-r--r--target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts148
-rw-r--r--target/linux/ramips/image/mt7621.mk9
3 files changed, 163 insertions, 4 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 688ce55570..c3b7cd4390 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -186,6 +186,7 @@ ramips_setup_interfaces()
argus,atp-52b|\
asiarf,awm002-evb-4m|\
asiarf,awm002-evb-8m|\
+ asus,rt-ac57u|\
asus,rt-n14u|\
bdcom,wap2100-sk|\
dlink,dir-645|\
@@ -521,6 +522,11 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
+ asus,rt-ac57u|\
+ planex,vr500)
+ lan_mac=$(mtd_get_mac_binary factory 57344)
+ wan_mac=$(mtd_get_mac_binary factory 57350)
+ ;;
asus,rt-n56u)
lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$lan_mac")
@@ -641,10 +647,6 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_binary factory 4)
lan_mac=$(mtd_get_mac_binary factory 46)
;;
- planex,vr500)
- lan_mac=$(mtd_get_mac_binary factory 57344)
- wan_mac=$(mtd_get_mac_binary factory 57350)
- ;;
poray,m3|\
poray,m4-4m|\
poray,m4-8m|\
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
new file mode 100644
index 0000000000..8060fd9eaa
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
@@ -0,0 +1,148 @@
+// 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 = "asus,rt-ac57u", "mediatek,mt7621-soc";
+ model = "ASUS RT-AC57U";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "rt-ac57u:blue:power";
+ gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "rt-ac57u:blue:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+ };
+
+ led-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "LED-Power";
+ gpio = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ 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 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4e000>;
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "sdhci";
+ ralink,function = "gpio";
+ };
+ };
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 1cd9092b14..e2928c80ce 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -106,6 +106,15 @@ define Device/asiarf_ap7621-001
endef
TARGET_DEVICES += asiarf_ap7621-001
+define Device/asus_rt-ac57u
+ MTK_SOC := mt7621
+ DEVICE_VENDOR := ASUS
+ DEVICE_MODEL := RT-AC57U
+ IMAGE_SIZE := 16064k
+ DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
+endef
+TARGET_DEVICES += asus_rt-ac57u
+
define Device/buffalo_wsr-1166dhp
MTK_SOC := mt7621
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata