diff --git a/iopsys-ramips/dts/mt7621_ampedwireless_ally-00x19k.dts b/iopsys-ramips/dts/mt7621_ampedwireless_ally-00x19k.dts new file mode 100644 index 0000000000000000000000000000000000000000..51d41c7fb4081ae971f8a560eb3de1e6544504e1 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_ampedwireless_ally-00x19k.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_ampedwireless_ally.dtsi" + +/ { + compatible = "ampedwireless,ally-00x19k", "mediatek,mt7621-soc"; + model = "Amped Wireless ALLY-00X19K"; +}; + +&switch0 { + ports { + port@2 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/iopsys-ramips/dts/mt7621_ampedwireless_ally-r1900k.dts b/iopsys-ramips/dts/mt7621_ampedwireless_ally-r1900k.dts new file mode 100644 index 0000000000000000000000000000000000000000..cd2536e179069f951c267141e2388aa0b9ce935c --- /dev/null +++ b/iopsys-ramips/dts/mt7621_ampedwireless_ally-r1900k.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_ampedwireless_ally.dtsi" + +/ { + compatible = "ampedwireless,ally-r1900k", "mediatek,mt7621-soc"; + model = "Amped Wireless ALLY-R1900K"; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "wan"; + }; + + port@2 { + status = "okay"; + label = "lan1"; + }; + + port@3 { + status = "okay"; + label = "lan2"; + }; + + port@4 { + status = "okay"; + label = "lan3"; + }; + }; +}; diff --git a/iopsys-ramips/dts/mt7621_ampedwireless_ally.dtsi b/iopsys-ramips/dts/mt7621_ampedwireless_ally.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..7736b06e43875791870873b45044e149c6660495 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_ampedwireless_ally.dtsi @@ -0,0 +1,179 @@ +// 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> + +/ { + aliases { + led-boot = &led_status_amber; + led-failsafe = &led_status_amber; + led-running = &led_status_green; + led-upgrade = &led_status_red; + }; + + keys { + compatible = "gpio-keys"; + + led_switch { + label = "led_switch"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + linux,code = <KEY_LIGHTS_TOGGLE>; + linux,input-type = <EV_SW>; + }; + + reset { + label = "reset"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + }; + + led_status_red: status_red { + label = "red:status"; + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + + led_status_amber: status_amber { + label = "amber:status"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "pci14c3,7615"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "pci14c3,7615"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&state_default { + gpio { + groups = "uart2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "u-boot-env"; + reg = <0x80000 0x80000>; + }; + + factory: partition@100000 { + label = "factory"; + reg = <0x100000 0x40000>; + read-only; + }; + + /* + * uboot expects to find kernels at 0x140000 & 0x2140000, + * referred to as Uimage & Uimage1 in factory FW, respectively. + * U-boot variable 'bootImage' controls which is booted; + * 0 for the first, 1 for the 2nd. + * There's a 3rd partition, Uimage2 (0x4140000), which + * I expected to be a recovery image, but is actually blank. + * + * A kernel is considered suitable for handing control over + * if its linux magic number exists & uImage CRC are correct. + * If either of those conditions fail, 'bootImage' value + * is toggled in uboot env & a restart performed in the hope that the + * alternate kernel is okay. + * + * Note uboot's tftp flash install writes the transferred + * image to the active kernel partition. + */ + + partition@140000 { + label = "kernel"; + reg = <0x140000 0x400000>; + }; + + partition@540000 { + label = "ubi"; + reg = <0x540000 0x1c00000>; + }; + + partition@2140000 { + label = "oem"; + reg = <0x2140000 0x2000000>; + }; + + partition@4140000 { + label = "backup"; + reg = <0x4140000 0x2000000>; + }; + + partition@6140000 { + label = "chime"; + reg = <0x6140000 0xa00000>; + }; + + partition@6b40000 { + label = "data"; + reg = <0x6b40000 0xa00000>; + }; + + partition@7540000 { + label = "reserved"; + reg = <0x7540000 0x840000>; + read-only; + }; + + partition@7d80000 { + label = "nvram"; + reg = <0x7d80000 0x100000>; + read-only; + }; + + partition@7e80000 { + label = "hwconfig"; + reg = <0x7e80000 0x100000>; + read-only; + }; + }; +}; diff --git a/iopsys-ramips/dts/mt7621_cudy_wr2100.dts b/iopsys-ramips/dts/mt7621_cudy_wr2100.dts new file mode 100644 index 0000000000000000000000000000000000000000..692c94da555f5f0814de2213fbf7b61b473d1882 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_cudy_wr2100.dts @@ -0,0 +1,201 @@ +// 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> + +/ { + compatible = "cudy,wr2100", "mediatek,mt7621-soc"; + model = "Cudy WR2100"; + + aliases { + led-boot = &led_internet_blue; + led-failsafe = &led_internet_blue; + led-running = &led_internet_blue; + led-upgrade = &led_internet_blue; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wps { + label = "wps"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_internet_blue: internet_blue { + label = "blue:internet"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + internet_red { + label = "red:internet"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "green:wan"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "green:lan1"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "green:lan2"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "green:lan3"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "green:lan4"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac0 { + mtd-mac-address = <&bdinfo 0xde00>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@1,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "debug"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "backup"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + bdinfo: partition@ff0000 { + label = "bdinfo"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "jtag", "uart2", "uart3", "wdt"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + + port@4 { + status = "okay"; + label = "wan"; + + mtd-mac-address = <&bdinfo 0xde00>; + mtd-mac-address-increment = <1>; + }; + }; +}; diff --git a/iopsys-ramips/dts/mt7621_jcg_q20.dts b/iopsys-ramips/dts/mt7621_jcg_q20.dts new file mode 100644 index 0000000000000000000000000000000000000000..f0e829393ce182970934431ff11ac94e8a374150 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_jcg_q20.dts @@ -0,0 +1,175 @@ +// 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> + +/ { + compatible = "jcg,q20", "mediatek,mt7621-soc"; + model = "JCG Q20"; + + aliases { + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: status_red { + label = "red:status"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + led_status_blue: status_blue { + label = "blue:status"; + gpios = <&gpio 15 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 16 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; + + ubi-concat { + compatible = "mtd-concat"; + devices = <&ubiconcat0 &ubiconcat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi"; + reg = <0x0 0x5900000>; + }; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label = "kernel"; + reg = <0x180000 0x400000>; + }; + + ubiconcat0: partition@580000 { + label = "ubiconcat0"; + reg = <0x580000 0x1c00000>; + }; + + partition@2180000 { + label = "firmware_backup"; + reg = <0x2180000 0x2000000>; + }; + + partition@4180000 { + label = "rootfs_data_back"; + reg = <0x4180000 0x80000>; + read-only; + }; + + partition@4200000 { + label = "nvram_config"; + reg = <0x4200000 0x80000>; + read-only; + }; + + ubiconcat1: partition@4280000 { + label = "ubiconcat1"; + reg = <0x4280000 0x3d00000>; + }; + + /* + * last 512 KiB are for the bad block table + */ + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0x3fff4>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x3fffa>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@4 { + status = "okay"; + label = "lan2"; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/iopsys-ramips/dts/mt7621_linksys_e5600.dts b/iopsys-ramips/dts/mt7621_linksys_e5600.dts new file mode 100644 index 0000000000000000000000000000000000000000..91db315914e4988ed0b7ba344a41e3c97a821373 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_linksys_e5600.dts @@ -0,0 +1,182 @@ +// 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> + +/ { + compatible = "linksys,e5600", "mediatek,mt7621-soc"; + model = "Linksys E5600"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wps { + label = "wps"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; + + leds { + compatible = "gpio-leds"; + + wps { + label = "amber:wps"; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + }; + + led_power: power { + label = "blue:power"; + gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + wan_amber { + label = "amber:wan"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + wan_blue { + label = "blue:wan"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "u_env"; + reg = <0x80000 0x40000>; + read-only; + }; + + factory: partition@c0000 { + label = "factory"; + reg = <0xc0000 0x40000>; + read-only; + }; + + partition@100000 { + label = "s_env"; + reg = <0x100000 0x40000>; + }; + + partition@140000 { + label = "devinfo"; + reg = <0x140000 0x40000>; + read-only; + }; + + partition@180000 { + label = "kernel"; + reg = <0x180000 0x400000>; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x1a00000>; + }; + + partition@1f80000 { + label = "alt_firmware"; + reg = <0x1f80000 0x1e00000>; + }; + + partition@3d80000 { + label = "gdata"; + reg = <0x3d80000 0x4200000>; + }; + }; +}; + +&state_default { + gpio { + groups = "uart2", "uart3", "jtag"; + function = "gpio"; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + }; +}; + +&pcie1 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + + port@4 { + status = "okay"; + label = "wan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/iopsys-ramips/dts/mt7621_linksys_ea8100-v1.dts b/iopsys-ramips/dts/mt7621_linksys_ea8100-v1.dts new file mode 100644 index 0000000000000000000000000000000000000000..6cc2219aec92c6d9fb177ddccccb5b632c2968f6 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_linksys_ea8100-v1.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_linksys_ea7xxx.dtsi" + +/ { + compatible = "linksys,ea8100-v1", "mediatek,mt7621-soc"; + model = "Linksys EA8100"; +}; diff --git a/iopsys-ramips/dts/mt7621_sercomm_na502.dts b/iopsys-ramips/dts/mt7621_sercomm_na502.dts new file mode 100644 index 0000000000000000000000000000000000000000..af55d1058f6e0750b452b5d75c510e83f1b2ecd1 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_sercomm_na502.dts @@ -0,0 +1,212 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7621.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +/ { + compatible = "sercomm,na502", "mediatek,mt7621-soc"; + model = "SERCOMM NA502"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + internet { + label = "green:internet"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + }; + + wifi { + label = "green:wifi"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + zwave { + label = "green:zwave"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + service { + label = "green:service"; + gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + }; + + zigbee { + label = "green:zigbee"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + }; + + bluetooth { + label = "green:bluetooth"; + gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + select { + label = "select"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + linux,code = <BTN_0>; + }; + + sync { + label = "sync"; + gpios = <&gpio 32 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RFKILL>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + zwave_reset { + gpio-export,name = "zwave_reset"; + gpio-export,output = <1>; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + zigbee_reset { + gpio-export,name = "zigbee_reset"; + gpio-export,output = <1>; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "config"; + reg = <0x80000 0x80000>; + read-only; + }; + + factory: partition@100000 { + label = "factory"; + reg = <0x100000 0x40000>; + }; + + partition@140000 { + label = "kernel1"; + reg = <0x140000 0x1400000>; + }; + + partition@1540000 { + label = "kernel"; + reg = <0x1540000 0x400000>; + }; + + partition@1940000 { + label = "ubi"; + reg = <0x1940000 0x1000000>; + }; + + partition@2940000 { + label = "user_storage"; + reg = <0x2940000 0x100000>; + }; + + partition@2a40000 { + label = "data"; + reg = <0x2a40000 0x1000000>; + }; + + partition@3a40000 { + label = "storage"; + reg = <0x3a40000 0x3200000>; + }; + + partition@6c40000 { + label = "backup"; + reg = <0x6c40000 0x1340000>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <1>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <2>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&state_default { + gpio { + groups = "jtag", "rgmii2"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@4 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&uartlite2 { + status = "okay"; +}; + +&uartlite3 { + status = "okay"; +}; diff --git a/iopsys-ramips/dts/mt7621_tplink_archer-a6-v3.dts b/iopsys-ramips/dts/mt7621_tplink_archer-a6-v3.dts new file mode 100644 index 0000000000000000000000000000000000000000..46cb365da7de89bca83cc010232b068f1f4b3376 --- /dev/null +++ b/iopsys-ramips/dts/mt7621_tplink_archer-a6-v3.dts @@ -0,0 +1,188 @@ +// 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> + +/ { + compatible = "tplink,archer-a6-v3", "mediatek,mt7621-soc"; + model = "TP-Link Archer A6 v3"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = <KEY_WPS_BUTTON>; + }; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = <KEY_RESTART>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + wan_orange { + label = "orange:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + wifi5g { + label = "green:wifi5g"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wifi2g { + label = "green:wifi2g"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wan_green { + label = "green:wan"; + gpios = <&gpio 45 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "firmware"; + compatible = "denx,uimage"; + reg = <0x40000 0xf60000>; + }; + + config: partition@fa0000 { + label = "config"; + reg = <0xfa0000 0x50000>; + read-only; + }; + + radio: partition@ff0000 { + label = "radio"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x0>; + mtd-mac-address = <&config 0x8>; + mtd-mac-address-increment = <1>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x8000>; + mtd-mac-address = <&config 0x8>; + mtd-mac-address-increment = <2>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gmac0 { + mtd-mac-address = <&config 0x8>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; diff --git a/iopsys-ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/iopsys-ramips/dts/mt7621_tplink_archer-c6u-v1.dts new file mode 100644 index 0000000000000000000000000000000000000000..7d38b7b0968df4e56666ff662bbbb54beea8211c --- /dev/null +++ b/iopsys-ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -0,0 +1,213 @@ +// 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> + +/ { + compatible = "tplink,archer-c6u-v1", "mediatek,mt7621-soc"; + model = "TP-Link Archer C6U v1"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wps { + label = "wps"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + usb { + label = "green:usb"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + + wan-orange { + label = "orange:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + wifi5g { + label = "green:wifi5g"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wifi2g { + label = "green:wifi2g"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wan-green { + label = "green:wan"; + gpios = <&gpio 45 GPIO_ACTIVE_LOW>; + }; + }; + + reg_usb_vbus: regulator { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio 3 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <80000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xf60000>; + }; + + config: partition@fa0000 { + label = "config"; + reg = <0xfa0000 0x010000>; + read-only; + }; + + partition@fb0000 { + label = "tplink"; + reg = <0xfb0000 0x040000>; + read-only; + }; + + radio: partition@ff0000 { + label = "radio"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x0>; + mtd-mac-address = <&config 0x8>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x8000>; + mtd-mac-address = <&config 0x8>; + mtd-mac-address-increment = <(-1)>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; +}; + +&gmac0 { + mtd-mac-address = <&config 0x8>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&config 0x8>; + mtd-mac-address-increment = <1>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart2", "uart3", "jtag", "wdt", "sdhci"; + function = "gpio"; + }; +}; + +&xhci { + vbus-supply = <®_usb_vbus>; +}; diff --git a/iopsys-ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/iopsys-ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts index b9101b7ccbbf0314d852d463286657351251c43e..e8f3a50dbeccb0c73741d762c1046d7450f84326 100644 --- a/iopsys-ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts +++ b/iopsys-ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts @@ -48,7 +48,7 @@ lan3_amber { label = "amber:lan3"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - linux,default-trigger = "dsa-0.0:01:1Gbps"; + linux,default-trigger = "dsa-0.0:03:1Gbps"; }; lan2_amber { @@ -60,7 +60,7 @@ lan1_amber { label = "amber:lan1"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - linux,default-trigger = "dsa-0.0:03:1Gbps"; + linux,default-trigger = "dsa-0.0:01:1Gbps"; }; }; diff --git a/iopsys-ramips/dts/mt7621_zyxel_nr7101.dts b/iopsys-ramips/dts/mt7621_zyxel_nr7101.dts new file mode 100644 index 0000000000000000000000000000000000000000..f6a42286f10e568901a4cc01a91bfa6db2bf302f --- /dev/null +++ b/iopsys-ramips/dts/mt7621_zyxel_nr7101.dts @@ -0,0 +1,164 @@ +// 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> + +/ { + compatible = "zyxel,nr7101", "mediatek,mt7621-soc"; + model = "ZyXEL NR7101"; + + aliases { + led-boot = &power; + led-failsafe = &power; + led-running = &power; + led-upgrade = &power; + label-mac-device = &gmac0; + }; + + leds { + compatible = "gpio-leds"; + + led@13 { + label = "yellow:system"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + power: led@14 { + label = "green:system"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + led@15 { + label = "red:system"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wlan"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WLAN>; + }; + + reset { + label = "reset"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + }; +}; + +&gpio { + lte_pwrkey { + gpio-hog; + gpios = <4 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "lte-pwrkey"; + }; + + lte_power { + gpio-hog; + gpios = <18 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "lte-power"; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x40000>; + read-only; + }; + + partition@140000 { + label = "Kernel"; + reg = <0x140000 0x1ec0000>; + }; + + partition@540000 { + label = "ubi"; + reg = <0x540000 0x1ac0000>; + }; + + partition@2140000 { + label = "Kernel2"; + reg = <0x2140000 0x1ec0000>; + }; + + partition@4000000 { + label = "wwan"; + reg = <0x4000000 0x100000>; + }; + + partition@4100000 { + label = "data"; + reg = <0x4100000 0x1000000>; + }; + + partition@5100000 { + label = "rom-d"; + reg = <0x5100000 0x100000>; + read-only; + }; + + partition@5200000 { + label = "reserve"; + reg = <0x5200000 0x80000>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&switch0 { + ports { + port@2 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "rgmii2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; diff --git a/iopsys-ramips/dts/mt7628an_hilink_hlk-7628n.dts b/iopsys-ramips/dts/mt7628an_hilink_hlk-7628n.dts index 69987b3566e964e1f31736c81d7e8c7a2d1b4747..f5106a50800e8de96445e064111a314aaf24294a 100644 --- a/iopsys-ramips/dts/mt7628an_hilink_hlk-7628n.dts +++ b/iopsys-ramips/dts/mt7628an_hilink_hlk-7628n.dts @@ -80,6 +80,10 @@ }; }; +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + &wmac { status = "okay"; }; diff --git a/iopsys-ramips/dts/rt3352_zte_mf283plus.dts b/iopsys-ramips/dts/rt3352_zte_mf283plus.dts new file mode 100644 index 0000000000000000000000000000000000000000..a91d0e6ea9010374872e9344eefb345d4e8cff5b --- /dev/null +++ b/iopsys-ramips/dts/rt3352_zte_mf283plus.dts @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rt3352.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +/ { + compatible = "zte,mf283plus", "ralink,rt3352-soc"; + model = "ZTE MF283+"; + + aliases { + led-boot = &led_wwan_green; + led-failsafe = &led_wwan_red; + led-upgrade = &led_wwan_red; + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + led_wwan_blue: wwan_blue { + label = "blue:wwan"; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + }; + + led_wwan_green: wwan_green { + label = "green:wwan"; + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + }; + + led_wwan_red: wwan_red { + label = "red:wwan"; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + }; + + signal { + label = "blue:signal"; + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wps { + label = "wps"; + gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x60000>; + read-only; + }; + + partition@60000 { + label = "u-boot-env"; + reg = <0x60000 0x10000>; + read-only; + }; + + factory: partition@70000 { + label = "factory"; + reg = <0x70000 0x10000>; + read-only; + }; + + partition@80000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x80000 0xf80000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "jtag", "rgmii", "mdio", "uartf"; + function = "gpio"; + }; +}; + +&gpio1 { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/iopsys-ramips/image/mt7620.mk b/iopsys-ramips/image/mt7620.mk index 949c09662f00eec91f292c0e9ff8724497f56b8a..56941f2b9c73601555cbb90a06bb7e6897bd2dcb 100644 --- a/iopsys-ramips/image/mt7620.mk +++ b/iopsys-ramips/image/mt7620.mk @@ -62,6 +62,7 @@ TARGET_DEVICES += alfa-network_tube-e4g define Device/amit_jboot DLINK_IMAGE_OFFSET := 0x10000 KERNEL := $(KERNEL_DTB) + KERNEL_SIZE := 2048k IMAGES += factory.bin IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory @@ -445,7 +446,7 @@ define Device/head-weblink_hdrm200 DEVICE_VENDOR := Head Weblink DEVICE_MODEL := HDRM2000 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \ - uqmi kmod-usb-serial kmod-usb-serial-option + uqmi kmod-usb-serial-option endef TARGET_DEVICES += head-weblink_hdrm200 @@ -1034,7 +1035,7 @@ define Device/tplink_archer-mr200 TPLINK_HWREV := 0x4a IMAGES := sysupgrade.bin DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-net-rndis \ - kmod-usb-serial kmod-usb-serial-option adb-enablemodem + kmod-usb-serial-option adb-enablemodem DEVICE_MODEL := Archer MR200 SUPPORTED_DEVICES += mr200 endef @@ -1221,7 +1222,7 @@ define Device/zbtlink_zbt-we826-e DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE826-E DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 uqmi \ - kmod-usb-serial kmod-usb-serial-option + kmod-usb-serial-option endef TARGET_DEVICES += zbtlink_zbt-we826-e diff --git a/iopsys-ramips/image/mt7621.mk b/iopsys-ramips/image/mt7621.mk index 2eee3dc4d5da1939f6a99e2ef58d985da8a72630..512592ddb8c3402675c60bcc773b25d51e626858 100644 --- a/iopsys-ramips/image/mt7621.mk +++ b/iopsys-ramips/image/mt7621.mk @@ -22,6 +22,10 @@ define Build/elecom-wrc-gs-factory mv $@.new $@ endef +define Build/gemtek-trailer + printf "%s%08X" ".GEMTEK." "$$(cksum $@ | cut -d ' ' -f1)" >> $@ +endef + define Build/iodata-factory $(eval fw_size=$(word 1,$(1))) $(eval fw_type=$(word 2,$(1))) @@ -181,6 +185,13 @@ define Build/iopsys-v3-fw ln -sf $(BIN_DIR)/$(subst $\",,$(IHGSP_VERSION)).y3 $(BIN_DIR)/last.y3 endef +define Build/zytrx-header + $(eval board=$(word 1,$(1))) + $(eval version=$(word 2,$(1))) + $(STAGING_DIR_HOST)/bin/zytrx -B '$(board)' -v '$(version)' -i $@ -o $@.new + mv $@.new $@ +endef + define Device/dsa-migration DEVICE_COMPAT_VERSION := 1.1 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA @@ -217,6 +228,33 @@ define Device/alfa-network_quad-e4g endef TARGET_DEVICES += alfa-network_quad-e4g +define Device/ampedwireless_ally_common + $(Device/dsa-migration) + DEVICE_VENDOR := Amped Wireless + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware uboot-envtools + IMAGE_SIZE := 32768k + KERNEL_SIZE := 4096k + BLOCKSIZE := 128k + PAGESIZE := 2048 + UBINIZE_OPTS := -E 5 + KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'flashable-initramfs' |\ + edimax-header -s CSYS -m RN68 -f 0x001c0000 -S 0x01100000 + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef + +define Device/ampedwireless_ally-r1900k + $(Device/ampedwireless_ally_common) + DEVICE_MODEL := ALLY-R1900K + DEVICE_PACKAGES += kmod-usb3 +endef +TARGET_DEVICES += ampedwireless_ally-r1900k + +define Device/ampedwireless_ally-00x19k + $(Device/ampedwireless_ally_common) + DEVICE_MODEL := ALLY-00X19K +endef +TARGET_DEVICES += ampedwireless_ally-00x19k + define Device/asiarf_ap7621-001 $(Device/dsa-migration) IMAGE_SIZE := 16000k @@ -335,6 +373,16 @@ define Device/cudy_wr1300 endef TARGET_DEVICES += cudy_wr1300 +define Device/cudy_wr2100 + $(Device/dsa-migration) + DEVICE_VENDOR := Cudy + DEVICE_MODEL := WR2100 + IMAGE_SIZE := 15872k + UIMAGE_NAME := R11 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware +endef +TARGET_DEVICES += cudy_wr2100 + define Device/dlink_dir-8xx-a1 $(Device/dsa-migration) IMAGE_SIZE := 16000k @@ -805,6 +853,23 @@ define Device/jcg_jhr-ac876m endef TARGET_DEVICES += jcg_jhr-ac876m +define Device/jcg_q20 + $(Device/dsa-migration) + BLOCKSIZE := 128k + PAGESIZE := 2048 + UBINIZE_OPTS := -E 5 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 91136k + IMAGES += factory.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ + check-size + DEVICE_VENDOR := JCG + DEVICE_MODEL := Q20 + DEVICE_PACKAGES := kmod-mt7915e uboot-envtools +endef +TARGET_DEVICES += jcg_q20 + define Device/jcg_y2 $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -830,6 +895,25 @@ define Device/lenovo_newifi-d1 endef TARGET_DEVICES += lenovo_newifi-d1 +define Device/linksys_e5600 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 26624k + DEVICE_VENDOR := Linksys + DEVICE_MODEL := E5600 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + kmod-mt7663-firmware-sta uboot-envtools + UBINIZE_OPTS := -E 5 + IMAGES += factory.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata + IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ + append-ubi | check-size | gemtek-trailer +endef +TARGET_DEVICES += linksys_e5600 + define Device/linksys_ea7xxx $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -872,6 +956,14 @@ define Device/linksys_ea7500-v2 endef TARGET_DEVICES += linksys_ea7500-v2 +define Device/linksys_ea8100-v1 + $(Device/linksys_ea7xxx) + DEVICE_MODEL := EA8100 + DEVICE_VARIANT := v1 + LINKSYS_HWNAME := EA8100 +endef +TARGET_DEVICES += linksys_ea8100-v1 + define Device/linksys_re6500 $(Device/dsa-migration) IMAGE_SIZE := 7872k @@ -1177,6 +1269,20 @@ define Device/samknows_whitebox-v8 endef TARGET_DEVICES += samknows_whitebox-v8 +define Device/sercomm_na502 + $(Device/uimage-lzma-loader) + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 20480k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + UBINIZE_OPTS := -E 5 + KERNEL_SIZE := 4096k + DEVICE_VENDOR := SERCOMM + DEVICE_MODEL := NA502 + DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 +endef +TARGET_DEVICES += sercomm_na502 + define Device/storylink_sap-g3200u3 $(Device/dsa-migration) IMAGE_SIZE := 7872k @@ -1227,6 +1333,33 @@ define Device/totolink_x5000r endef TARGET_DEVICES += totolink_x5000r +define Device/tplink_archer-a6-v3 + $(Device/dsa-migration) + $(Device/tplink-safeloader) + DEVICE_MODEL := Archer A6 + DEVICE_VARIANT := V3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \ + kmod-mt7663-firmware-ap kmod-mt7663-firmware-sta + TPLINK_BOARD_ID := ARCHER-A6-V3 + KERNEL := $(KERNEL_DTB) | uImage lzma + IMAGE_SIZE := 15744k +endef +TARGET_DEVICES += tplink_archer-a6-v3 + +define Device/tplink_archer-c6u-v1 + $(Device/dsa-migration) + $(Device/tplink-safeloader) + DEVICE_MODEL := Archer C6U + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-mt7603 \ + kmod-mt7615e kmod-mt7663-firmware-ap \ + kmod-usb3 kmod-usb-ledtrig-usbport + KERNEL := $(KERNEL_DTB) | uImage lzma + TPLINK_BOARD_ID := ARCHER-C6U-V1 + IMAGE_SIZE := 15744k +endef +TARGET_DEVICES += tplink_archer-c6u-v1 + define Device/tplink_eap235-wall-v1 $(Device/dsa-migration) $(Device/tplink-safeloader) @@ -1606,6 +1739,21 @@ define Device/zio_freezio endef TARGET_DEVICES += zio_freezio +define Device/zyxel_nr7101 + $(Device/dsa-migration) + BLOCKSIZE := 128k + PAGESIZE := 2048 + UBINIZE_OPTS := -E 5 + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := NR7101 + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 uboot-envtools kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + KERNEL := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION) + KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) 9.99(ABUV.9)$$(VERSION_DIST)-recovery + KERNEL_INITRAMFS_SUFFIX := -recovery.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += zyxel_nr7101 + define Device/zyxel_wap6805 $(Device/dsa-migration) BLOCKSIZE := 128k diff --git a/iopsys-ramips/image/mt76x8.mk b/iopsys-ramips/image/mt76x8.mk index 315d4f8d74ec7b5def21b7f73375e719aa874ac8..c5a0baa1cb667632e6757f63499054cb2765dd40 100644 --- a/iopsys-ramips/image/mt76x8.mk +++ b/iopsys-ramips/image/mt76x8.mk @@ -528,7 +528,7 @@ define Device/tplink_tl-mr6400-v4 TPLINK_HWREV := 0x4 TPLINK_HWREVADD := 0x4 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ - kmod-usb-serial kmod-usb-serial-option kmod-usb-net-qmi-wwan uqmi + kmod-usb-serial-option kmod-usb-net-qmi-wwan uqmi IMAGES := sysupgrade.bin tftp-recovery.bin IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin) endef @@ -544,7 +544,7 @@ define Device/tplink_tl-mr6400-v5 TPLINK_HWREV := 0x5 TPLINK_HWREVADD := 0x5 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ - kmod-usb-serial kmod-usb-serial-option kmod-usb-net-qmi-wwan uqmi + kmod-usb-serial-option kmod-usb-net-qmi-wwan uqmi IMAGES := sysupgrade.bin tftp-recovery.bin IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin) endef diff --git a/iopsys-ramips/image/rt305x.mk b/iopsys-ramips/image/rt305x.mk index 210ae2f8b74e58b1746bdf0359ceb554e7218cac..4edc2eb3c4b7b5ade5f301467f8dbcdf569a3945 100644 --- a/iopsys-ramips/image/rt305x.mk +++ b/iopsys-ramips/image/rt305x.mk @@ -472,7 +472,7 @@ define Device/dlink_dwr-512-b DEVICE_VENDOR := D-Link DEVICE_MODEL := DWR-512 DEVICE_VARIANT := B - DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-spi-dev kmod-usb-serial \ + DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-spi-dev \ kmod-usb-serial-option kmod-usb-net-cdc-ether comgt-ncm DLINK_ROM_ID := DLK6E2412001 DLINK_FAMILY_MEMBER := 0x6E24 @@ -1183,6 +1183,17 @@ define Device/zorlik_zl5900v2 endef TARGET_DEVICES += zorlik_zl5900v2 +define Device/zte_mf283plus + $(Device/uimage-lzma-loader) + SOC := rt3352 + IMAGE_SIZE := 15872k + DEVICE_VENDOR := ZTE + DEVICE_MODEL := MF283+ + DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-net-qmi-wwan uqmi \ + kmod-usb-serial kmod-usb-serial-option +endef +TARGET_DEVICES += zte_mf283plus + define Device/zyxel_keenetic SOC := rt3052 BLOCKSIZE := 64k diff --git a/iopsys-ramips/mt7621/base-files/etc/board.d/01_leds b/iopsys-ramips/mt7621/base-files/etc/board.d/01_leds index 5fa9ad3fe81ad2bdaeb5179a52ec03359c7b4099..95cf120f2de9ade6467315479aa0114919440d73 100755 --- a/iopsys-ramips/mt7621/base-files/etc/board.d/01_leds +++ b/iopsys-ramips/mt7621/base-files/etc/board.d/01_leds @@ -12,6 +12,13 @@ asus,rt-n56u-b1) ucidef_set_led_netdev "lan" "LAN link" "blue:lan" "br-lan" ucidef_set_led_netdev "wan" "WAN link" "blue:wan" "wan" ;; +cudy,wr2100) + ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "lan1" + ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "lan2" + ucidef_set_led_netdev "lan3" "lan3" "green:lan3" "lan3" + ucidef_set_led_netdev "lan4" "lan4" "green:lan4" "lan4" + ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" + ;; d-team,newifi-d2) ucidef_set_led_netdev "internet" "internet" "amber:internet" "wan" ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "blue:wlan2g" "wlan0" @@ -40,9 +47,13 @@ gnubee,gb-pc2) ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "lan1" ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "lan2" ;; +linksys,e5600) + ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link" + ;; linksys,ea7300-v1|\ linksys,ea7300-v2|\ -linksys,ea7500-v2) +linksys,ea7500-v2|\ +linksys,ea8100-v1) ucidef_set_led_netdev "lan1" "lan1 link" "green:lan1" "lan1" "link" ucidef_set_led_netdev "lan2" "lan2 link" "green:lan2" "lan2" "link" ucidef_set_led_netdev "lan3" "lan3 link" "green:lan3" "lan3" "link" @@ -79,6 +90,11 @@ netgear,r6800) ucidef_set_led_netdev "lan3" "LAN3" "white:lan3" "lan3" ucidef_set_led_netdev "lan4" "LAN4" "white:lan4" "lan4" ;; +tplink,archer-a6-v3|\ +tplink,archer-c6u-v1) + ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" + ;; tplink,re350-v1) ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "blue:wifi2G" "wlan0" ucidef_set_led_netdev "wifi5g" "Wifi 5G" "blue:wifi5G" "wlan1" diff --git a/iopsys-ramips/mt7621/base-files/etc/board.d/02_network b/iopsys-ramips/mt7621/base-files/etc/board.d/02_network index 643502e82706178530e819076697c729c7bcebaa..18587782aac053e772b4425a86ed3487730151e3 100755 --- a/iopsys-ramips/mt7621/base-files/etc/board.d/02_network +++ b/iopsys-ramips/mt7621/base-files/etc/board.d/02_network @@ -9,24 +9,11 @@ ramips_setup_interfaces() local board="$1" case $board in - asiarf,ap7621-001|\ - ex400|\ - winstars,ws-wn583a6) - ucidef_set_interfaces_lan_wan "lan" "wan" - ;; - asiarf,ap7621-nv1|\ - glinet,gl-mt1300|\ - lenovo,newifi-d1|\ - mikrotik,routerboard-m33g|\ - xiaomi,mi-router-3g|\ - xiaomi,mi-router-3g-v2|\ - xiaomi,mi-router-4|\ - xiaomi,mi-router-4a-gigabit) - ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" - ;; + ampedwireless,ally-00x19k|\ edimax,re23s|\ mikrotik,routerboard-m11g|\ netgear,ex6150|\ + sercomm,na502|\ thunder,timecloud|\ tplink,re350-v1|\ tplink,re500-v1|\ @@ -35,6 +22,7 @@ ramips_setup_interfaces() ubnt,unifi-nanohd) ucidef_set_interface_lan "lan" ;; + ampedwireless,ally-r1900k|\ gehua,ghl-r-001|\ hiwifi,hc5962|\ xiaomi,mi-router-3-pro|\ @@ -42,6 +30,22 @@ ramips_setup_interfaces() xiaomi,redmi-router-ac2100) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; + asiarf,ap7621-001|\ + ex400|\ + winstars,ws-wn583a6) + ucidef_set_interfaces_lan_wan "lan" "wan" + ;; + asiarf,ap7621-nv1|\ + glinet,gl-mt1300|\ + jcg,q20|\ + lenovo,newifi-d1|\ + mikrotik,routerboard-m33g|\ + xiaomi,mi-router-3g|\ + xiaomi,mi-router-3g-v2|\ + xiaomi,mi-router-4|\ + xiaomi,mi-router-4a-gigabit) + ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" + ;; gnubee,gb-pc1|\ gnubee,gb-pc2) ucidef_set_interface_lan "lan1 lan2" @@ -65,6 +69,9 @@ ramips_setup_interfaces() ubnt,edgerouter-x-sfp) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" ;; + zyxel,nr7101) + ucidef_set_interfaces_lan_wan "lan" "wan" + ;; zyxel,wap6805) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ucidef_set_interface "qtn" ifname "eth1" protocol "static" ipaddr "1.1.1.1" netmask "255.255.255.0" @@ -83,6 +90,15 @@ ramips_setup_macs() local label_mac="" case $board in + ampedwireless,ally-00x19k) + lan_mac=$(mtd_get_mac_ascii hwconfig HW.LAN.MAC.Address) + label_mac=$lan_mac + ;; + ampedwireless,ally-r1900k) + lan_mac=$(mtd_get_mac_ascii hwconfig HW.LAN.MAC.Address) + wan_mac=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address) + label_mac=$lan_mac + ;; asus,rt-ac65p|\ asus,rt-ac85p) wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr) @@ -125,9 +141,11 @@ ramips_setup_macs() zbtlink,zbt-wg3526-32m) label_mac=$(mtd_get_mac_binary factory 0x4) ;; + linksys,e5600|\ linksys,ea7300-v1|\ linksys,ea7300-v2|\ - linksys,ea7500-v2) + linksys,ea7500-v2|\ + linksys,ea8100-v1) lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) wan_mac=$lan_mac label_mac=$lan_mac diff --git a/iopsys-ramips/mt7621/base-files/etc/board.d/03_gpio_switches b/iopsys-ramips/mt7621/base-files/etc/board.d/03_gpio_switches index 82bbdd24f674e7512e493d71495e40286e1fc14c..8ef815634f0824b3279e4fe13cea46158e16dd8c 100755 --- a/iopsys-ramips/mt7621/base-files/etc/board.d/03_gpio_switches +++ b/iopsys-ramips/mt7621/base-files/etc/board.d/03_gpio_switches @@ -23,6 +23,9 @@ ubnt,edgerouter-x-sfp) ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "403" ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "404" ;; +zyxel,nr7101) + ucidef_add_gpio_switch "lte_reset" "Reset LTE/5G modem" "483" + ;; zyxel,wap6805) ucidef_add_gpio_switch "qtn_power" "Quantenna Module Power" "496" "1" ;; diff --git a/iopsys-ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/iopsys-ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index e7f778aaf88a00913583adcf7336f9bd8f909414..bd0f0254c6c3fe22d4b6d8aa3d1d3d56730238f3 100644 --- a/iopsys-ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/iopsys-ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -14,9 +14,15 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress ;; + jcg,q20) + [ "$PHYNBR" = "1" ] && \ + macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress + ;; + linksys,e5600|\ linksys,ea7300-v1|\ linksys,ea7300-v2|\ - linksys,ea7500-v2) + linksys,ea7500-v2|\ + linksys,ea8100-v1) hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress diff --git a/iopsys-ramips/mt7621/base-files/lib/upgrade/platform.sh b/iopsys-ramips/mt7621/base-files/lib/upgrade/platform.sh index c9152c5cf4d663fb922d74c8081e982662b92461..c2ad4d3ed63ebee9207e3323c2df3247b7fbd615 100755 --- a/iopsys-ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/iopsys-ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -27,6 +27,12 @@ platform_do_upgrade() { fi } ;; + ampedwireless,ally-00x19k|\ + ampedwireless,ally-r1900k) + if [ "$(fw_printenv --lock / -n bootImage 2>/dev/null)" != "0" ]; then + fw_setenv --lock / bootImage 0 || exit 1 + fi + ;; mikrotik,routerboard-750gr3|\ mikrotik,routerboard-760igs|\ mikrotik,routerboard-m11g|\ @@ -43,15 +49,20 @@ platform_do_upgrade() { esac case "$board" in + ampedwireless,ally-00x19k|\ + ampedwireless,ally-r1900k|\ asus,rt-ac65p|\ asus,rt-ac85p|\ dlink,dir-1960-a1|\ dlink,dir-2640-a1|\ dlink,dir-2660-a1|\ hiwifi,hc5962|\ + jcg,q20|\ + linksys,e5600|\ linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2|\ + linksys,ea8100-v1|\ netgear,r6220|\ netgear,r6260|\ netgear,r6350|\ @@ -61,6 +72,7 @@ platform_do_upgrade() { netgear,wac104|\ netgear,wac124|\ netis,wf2881|\ + sercomm,na502|\ xiaomi,mi-router-3g|\ xiaomi,mi-router-3-pro|\ xiaomi,mi-router-4|\ @@ -82,6 +94,12 @@ platform_do_upgrade() { ubnt,edgerouter-x-sfp) platform_upgrade_ubnt_erx "$1" ;; + zyxel,nr7101) + fw_setenv CheckBypass 0 + fw_setenv Image1Stable 0 + CI_KERNPART="Kernel" + nand_do_upgrade "$1" + ;; zyxel,wap6805) local kernel2_mtd="$(find_mtd_part Kernel2)" [ "$(hexdump -n 4 -e '"%x"' $kernel2_mtd)" = "56190527" ] &&\ diff --git a/iopsys-ramips/mt76x8/base-files/etc/board.d/02_network b/iopsys-ramips/mt76x8/base-files/etc/board.d/02_network index b741b4f9b4dc6efaf4df66ce8ed744c4f925800a..c55733ad53cd8f3e5842919b1fb144a3074acef6 100755 --- a/iopsys-ramips/mt76x8/base-files/etc/board.d/02_network +++ b/iopsys-ramips/mt76x8/base-files/etc/board.d/02_network @@ -168,6 +168,7 @@ ramips_setup_macs() lan_mac=$wan_mac ;; cudy,wr1000|\ + hilink,hlk-7628n|\ hilink,hlk-7688a|\ wavlink,wl-wn577a2) wan_mac=$(mtd_get_mac_binary factory 0x2e) @@ -186,10 +187,6 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary factory 0x22) label_mac=$wan_mac ;; - hilink,hlk-7628n) - lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)") - wan_mac=$(macaddr_add "$lan_mac" 1) - ;; hiwifi,hc5661a|\ hiwifi,hc5761a|\ hiwifi,hc5861b) diff --git a/iopsys-ramips/patches-5.4/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch b/iopsys-ramips/patches-5.4/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch index 54af571d85d217fe76cee216dc6ec83b318cfe47..c05ee8018d313d1e1a40ddcdd4f375af573331a1 100644 --- a/iopsys-ramips/patches-5.4/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch +++ b/iopsys-ramips/patches-5.4/0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c -@@ -80,6 +80,8 @@ void __init plat_mem_setup(void) +@@ -82,6 +82,8 @@ void __init plat_mem_setup(void) __dt_setup_arch(dtb); diff --git a/iopsys-ramips/patches-5.4/0048-asoc-add-mt7620-support.patch b/iopsys-ramips/patches-5.4/0048-asoc-add-mt7620-support.patch index d0d4141a8d036b6cd919622a9d9936d795a5b490..cffdc4f4a1120a8e525b721ccf04ca4353e60810 100644 --- a/iopsys-ramips/patches-5.4/0048-asoc-add-mt7620-support.patch +++ b/iopsys-ramips/patches-5.4/0048-asoc-add-mt7620-support.patch @@ -18,24 +18,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org> create mode 100644 sound/soc/ralink/mt7620-i2s.c create mode 100644 sound/soc/ralink/mt7620-wm8960.c ---- a/arch/mips/ralink/of.c -+++ b/arch/mips/ralink/of.c -@@ -13,6 +13,7 @@ - #include <linux/of_fdt.h> - #include <linux/kernel.h> - #include <linux/memblock.h> -+#include <linux/module.h> - #include <linux/of_platform.h> - #include <linux/of_address.h> - -@@ -24,6 +25,7 @@ - #include "common.h" - - __iomem void *rt_sysc_membase; -+EXPORT_SYMBOL(rt_sysc_membase); - __iomem void *rt_memc_membase; - - __iomem void *plat_of_remap_node(const char *node) --- a/sound/soc/Kconfig +++ b/sound/soc/Kconfig @@ -60,6 +60,7 @@ source "sound/soc/mxs/Kconfig" diff --git a/iopsys-ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch b/iopsys-ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch index 6583fca60b189b3901c8c4f07c6eaf91c0af1021..b011b140c7666ceb49c44a9781a15f257fe4d7a4 100644 --- a/iopsys-ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch +++ b/iopsys-ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: RenĂ© van Dorst <opensource@vdorst.com> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2922,6 +2922,7 @@ static const struct net_device_ops mtk_n +@@ -2943,6 +2943,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: RenĂ© van Dorst <opensource@vdorst.com> const __be32 *_id = of_get_property(np, "reg", NULL); struct phylink *phylink; int phy_mode, id, err; -@@ -3014,6 +3015,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -3035,6 +3036,9 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN; diff --git a/iopsys-ramips/rt305x/base-files/etc/board.d/01_leds b/iopsys-ramips/rt305x/base-files/etc/board.d/01_leds index 1796ae50d85e07e429500797e3f110c8f3819c49..d29328e4b01bc09e770f9fdb7118c42f167707eb 100755 --- a/iopsys-ramips/rt305x/base-files/etc/board.d/01_leds +++ b/iopsys-ramips/rt305x/base-files/etc/board.d/01_leds @@ -94,6 +94,10 @@ vocore,vocore-16m) zorlik,zl5900v2) ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" ;; +zte,mf283plus) + ucidef_set_led_wlan "wifi" "wifi" "rt2800soc-phy0::radio" "phy0tpt" + ucidef_set_led_netdev "wwan" "wwan" "blue:wwan" "wwan0" + ;; esac board_config_flush diff --git a/iopsys-ramips/rt305x/base-files/etc/board.d/02_network b/iopsys-ramips/rt305x/base-files/etc/board.d/02_network index 56c786bc95bc9679f3550a182a16e93ca0a87ec7..c3e39e76d0786344a4d25ede7235ec1ffaae9786 100755 --- a/iopsys-ramips/rt305x/base-files/etc/board.d/02_network +++ b/iopsys-ramips/rt305x/base-files/etc/board.d/02_network @@ -164,6 +164,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:wan" "6@eth0" ;; + zte,mf283plus) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "6@eth0" + ;; zyxel,keenetic-lite-b|\ zyxel,keenetic-start) ucidef_add_switch "switch0" \