aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts219
-rw-r--r--target/linux/ramips/image/mt7621.mk25
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/board.d/02_network8
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac9
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh1
5 files changed, 262 insertions, 0 deletions
diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
new file mode 100644
index 0000000000..99de770707
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "Arcadyan WE420223-99";
+ compatible = "arcadyan,we420223-99", "mediatek,mt7621-soc";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_red;
+ led-running = &led_power_green;
+ led-upgrade = &led_wps_green;
+ led-wifi = &led_wifi_green;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600 ubi.mtd=5 root=/dev/ubiblock0_0";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_POWER;
+ default-state = "on";
+ };
+
+ led_power_red: power_red {
+ label = "red:power";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_FAULT;
+ };
+
+ led_wifi_blue: wifi_blue {
+ label = "blue:wifi";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN;
+ };
+
+ led_wifi_green: wifi_green {
+ label = "green:wifi";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ };
+
+ led_wps_red: wps_red {
+ label = "red:wps";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_WPS;
+ };
+
+ led_wps_green: wps_green {
+ label = "green:wps";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WPS;
+ };
+
+ led_followme_r: followme_red {
+ label = "red:followme";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led_followme_g: followme_green {
+ label = "green:followme";
+ gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+
+ reg = <0>;
+ spi-max-frequency = <70000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "ALL";
+ reg = <0x0 0x2000000>;
+ read-only;
+ };
+
+ partition@1 {
+ label = "Bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "Factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "kernel";
+ reg = <0x50000 0x1f60000>;
+ };
+
+ partition@490000 {
+ label = "rootfs";
+ reg = <0x490000 0x1b20000>;
+ };
+
+ partition@1000000 {
+ label = "Kernel2";
+ reg = <0x1000000 0xfb0000>;
+ };
+
+ partition@1440000 {
+ label = "RootFS2";
+ reg = <0x1440000 0xb70000>;
+ };
+
+ partition@1fb0000 {
+ label = "glbcfg";
+ reg = <0x1fb0000 0x10000>;
+ read-only;
+ };
+
+ partition@1fc0000 {
+ label = "board_data";
+ reg = <0x1fc0000 0x10000>;
+ read-only;
+ };
+
+ partition@1fd0000 {
+ label = "glbcfg2";
+ reg = <0x1fd0000 0x10000>;
+ read-only;
+ };
+
+ partition@1fe0000 {
+ label = "board_data2";
+ reg = <0x1fe0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "swp1";
+ };
+ };
+};
+
+&gmac1 {
+ status = "okay";
+ label = "swp0";
+ phy-handle = <&ethphy0>;
+};
+
+&mdio {
+ ethphy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index ca3766365c..9d01399c5c 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -187,6 +187,31 @@ define Device/ampedwireless_ally-00x19k
endef
TARGET_DEVICES += ampedwireless_ally-00x19k
+define Device/arcadyan_we420223-99
+ $(Device/dsa-migration)
+ $(Device/uimage-lzma-loader)
+ DEVICE_VENDOR := Arcadyan
+ DEVICE_MODEL := WE420223-99
+ DEVICE_ALT0_VENDOR := KPN
+ DEVICE_ALT0_MODEL := Experia WiFi
+ IMAGE_SIZE := 32128k
+ KERNEL_SIZE := 4352k
+ UBINIZE_OPTS := -E 5
+ BLOCKSIZE := 64k
+ PAGESIZE := 1
+ SUBPAGESIZE := 1
+ VID_HDR_OFFSET := 64
+ KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | \
+ uImage none | arcadyan-trx 0x746f435d
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | \
+ uImage none
+ IMAGES += factory.trx
+ IMAGE/factory.trx := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+ DEVICE_PACKAGES := kmod-mt7615-firmware
+endef
+TARGET_DEVICES += arcadyan_we420223-99
+
define Device/asiarf_ap7621-001
$(Device/dsa-migration)
IMAGE_SIZE := 16000k
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 c5196c1448..ddbbf9891d 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -8,6 +8,9 @@ ramips_setup_interfaces()
local board="$1"
case $board in
+ arcadyan,we420223-99)
+ ucidef_set_interface_lan "swp0 swp1"
+ ;;
ampedwireless,ally-00x19k|\
asus,rp-ac56|\
asus,rp-ac87|\
@@ -150,6 +153,11 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address)
label_mac=$lan_mac
;;
+ arcadyan,we420223-99)
+ label_mac=$(mtd_get_mac_ascii board_data mac)
+ lan_mac=$label_mac
+ ucidef_set_network_device_mac eth0 $(macaddr_add "$label_mac" 3)
+ ;;
asus,rt-ac65p|\
asus,rt-ac85p)
wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr)
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 079f07956d..45bee29d24 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -10,6 +10,15 @@ PHYNBR=${DEVPATH##*/phy}
board=$(board_name)
case "$board" in
+ arcadyan,we420223-99)
+ if [ "$PHYNBR" = "0" ]; then
+ mac24=$(macaddr_add "$(get_mac_label)" "0xf00001")
+ echo -n "$mac24" > /sys${DEVPATH}/macaddress
+ elif [ "$PHYNBR" = "1" ]; then
+ mac5=$(macaddr_add "$(get_mac_label)" 1)
+ echo -n "$mac5" > /sys${DEVPATH}/macaddress
+ fi
+ ;;
beeline,smartbox-flash)
hw_mac_addr=$(macaddr_add $(mtd_get_mac_encrypted_arcadyan "board_data") 1)
[ "$PHYNBR" = "0" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 830061231d..07c6b80d7b 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -52,6 +52,7 @@ platform_do_upgrade() {
case "$board" in
ampedwireless,ally-00x19k|\
ampedwireless,ally-r1900k|\
+ arcadyan,we420223-99|\
asus,rt-ac65p|\
asus,rt-ac85p|\
asus,rt-ax53u|\