update dts and network/LED configuration for DSA driver.
sysupgrade from images prior to this commit with config preserved
will cause broken ethernet setup.
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Acked-by: Jo-Philipp Wich <jo@mein.io>
[split commit]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe00c>;
};
+&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 = <&factory 0xe00c>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "wdt";
bootargs = "console=ttyS0,57600";
};
- palmbus: palmbus@1E000000 {
- i2c@900 {
- status = "okay";
- };
- };
-
keys {
compatible = "gpio-keys";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2", "jtag", "mdio";
model = "ALFA Network Quad-E4G";
aliases {
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
&i2c {
status = "okay";
compatible = "asiarf,ap7621-001", "mediatek,mt7621-soc";
model = "AsiaRF AP7621-001";
};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
compatible = "asiarf,ap7621-nv1", "mediatek,mt7621-soc";
model = "AsiaRF AP7621-NV1";
};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
- mediatek,portmap = "llllw";
};
&state_default {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ 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 = "sdhci";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
- mediatek,portmap = "wllll";
- port@5 {
- status = "disabled";
- };
};
-&i2c {
- status = "disabled";
+&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";
+ };
+ };
};
&state_default {
};
};
+&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";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&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";
};
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "jtag", "uart2", "uart3";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2", "jtag", "mdio";
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
- label-mac-device = &wifi1;
+ label-mac-device = &gmac0;
};
chosen {
};
};
+&gmac0 {
+ mtd-mac-address = <&radio 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&pcie {
status = "okay";
};
/ {
aliases {
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
- mediatek,portmap = "wllll";
- port@5 {
- status = "disabled";
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
};
};
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&spi0 {
status = "okay";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&spi0 {
status = "okay";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "jtag", "wdt";
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "jtag", "rgmii2", "uart3", "wdt";
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "jtag", "rgmii2", "uart3", "wdt";
};
};
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart3", "jtag";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&iNIC_rf 0x4>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart2", "uart3", "jtag";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart2", "uart3", "jtag";
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = &wan;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ wan: port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&pcie {
status = "okay";
};
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
- mediatek,portmap = "wllll";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
};
&state_default {
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&uboot 0x1fc20>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&uboot 0x1fc40>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
&pcie {
status = "okay";
};
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&uboot 0x1fc20>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&uboot 0x1fc40>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
&pcie {
status = "okay";
};
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
+ label-mac-device = &wan;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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";
+ };
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart3", "jtag", "wdt";
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2", "jtag", "uart2", "uart3", "i2c";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x2e>;
};
+&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";
+ };
+ };
+};
+
&xhci {
status = "disabled";
};
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x5>;
};
+&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 = <&factory 0x5>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&pcie {
status = "okay";
};
status = "okay";
};
+&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";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <1>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&hard_config 0x0010>;
+ mtd-mac-address-increment = <2>;
+ };
+
+ 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 {
/* via gpio7 (uart3 group) the PoE status can be read */
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <1>;
};
+&switch0 {
+ ports {
+ /* FIXME: Is LAN port at switch port 0? */
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart2", "wdt", "rgmii2";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <1>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&hard_config 0x0010>;
+ mtd-mac-address-increment = <2>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart2", "wdt";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2", "jtag", "mdio";
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&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 = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&sdhci {
status = "okay";
};
};
};
-ðernet {
- mtd-mac-address = <&factory 0x00000004>;
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
};
&state_default {
led-failsafe = &led_power_orange;
led-running = &led_power_white;
led-upgrade = &led_power_orange;
- label-mac-device = ðernet;
};
leds {
led-failsafe = &led_power_orange;
led-running = &led_power_white;
led-upgrade = &led_power_orange;
- label-mac-device = ðernet;
};
leds {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart3", "uart2", "jtag", "wdt";
/ {
compatible = "mediatek,mt7621-soc";
+ aliases {
+ label-mac-device = &gmac0;
+ };
+
chosen {
bootargs = "console=ttyS0,57600";
};
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <2>;
+ };
+ };
+};
+
&i2c {
status = "okay";
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <2>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart3", "uart2", "jtag", "wdt";
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart3", "uart2";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "jtag";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe006>;
};
+&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 = <&factory 0xe006>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart3", "jtag";
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe006>;
- mediatek,portmap = "llllw";
+};
+
+&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 = <&factory 0xe006>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
};
&state_default {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@4 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart2", "jtag";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "wdt";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&config 0x10008>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "rgmii2", "wdt";
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&config 0x10008>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+
&state_default {
gpio {
groups = "rgmii2", "wdt";
/ {
aliases {
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x22>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x22>;
+ 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";
+ };
+ };
+};
+
&nand {
status = "okay";
led-failsafe = &led_white;
led-running = &led_blue;
led-upgrade = &led_blue;
-
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&eeprom 0x0>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
&state_default {
gpio {
groups = "i2c", "uart2";
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
- mediatek,portmap = "llllw";
+};
+
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
};
&state_default {
#include <dt-bindings/input/input.h>
/ {
+ aliases {
+ label-mac-device = &wan;
+ };
+
chosen {
bootargs = "console=ttyS0,57600";
};
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x2e>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2";
led-failsafe = &led_status_yellow;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
+ label-mac-device = &wan;
};
chosen {
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
- mediatek,portmap = "llllw";
+};
+
+&switch0 {
+ ports {
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
};
&state_default {
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
+ label-mac-device = &gmac0;
};
chosen {
wan_amber {
label = "mir3g:amber:wan";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:01:1Gbps";
};
lan1_amber {
label = "mir3g:amber:lan1";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:03:1Gbps";
};
lan2_amber {
label = "mir3g:amber:lan2";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:02:1Gbps";
};
};
};
};
-ðernet {
- mtd-mac-address = <&factory 0xe000>;
- mediatek,portmap = "lwlll";
+&gmac0 {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
};
&state_default {
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
+ label-mac-device = &gmac0;
};
chosen {
wan_amber {
label = "mir3p:amber:wan";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:04:1Gbps";
};
lan3_amber {
label = "mir3p:amber:lan3";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:01:1Gbps";
};
lan2_amber {
label = "mir3p:amber:lan2";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:02:1Gbps";
};
lan1_amber {
label = "mir3p:amber:lan1";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:03:1Gbps";
};
};
};
};
-ðernet {
- mtd-mac-address = <&factory 0xe000>;
- mediatek,portmap = "llllw";
+&gmac0 {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ };
+ };
};
&state_default {
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
- label-mac-device = ðernet;
+ label-mac-device = &gmac0;
};
chosen {
status = "okay";
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
+&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 = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "uart3", "wdt";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ 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", "wdt";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "jtag", "wdt";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&pcie {
status = "okay";
};
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe006>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2", "jtag", "mdio";
};
};
-ðernet {
+&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
+&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 = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
&state_default {
gpio {
groups = "wdt", "rgmii2", "jtag", "mdio";
case $board in
d-team,newifi-d2)
- ucidef_set_led_switch "internet" "internet" "$boardname:amber:internet" "switch0" "0x10"
+ ucidef_set_led_netdev "internet" "internet" "$boardname:amber:internet" "wan"
ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:blue:wlan2g" "wlan0"
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:blue:wlan5g" "wlan1"
;;
d-team,pbr-m1|\
gehua,ghl-r-001)
- ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
+ ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "wan"
;;
dlink,dir-860l-b1)
- ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
+ ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "wan"
;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
- ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x01"
- ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x10"
+ ucidef_set_led_netdev "lan1" "lan1" "$boardname:green:lan1" "lan1"
+ ucidef_set_led_netdev "lan2" "lan2" "$boardname:green:lan2" "lan2"
;;
mikrotik,rbm11g)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
;;
mtc,wr1201)
- ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x0f"
+ ucidef_set_led_netdev "eth_link" "LAN link" "$boardname:green:eth_link" "br-lan"
;;
netgear,r6220|\
netgear,r6260|\
netgear,r6350|\
netgear,r6850|\
netgear,wndr3700-v5)
- ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
+ ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" "wan"
;;
netgear,r6700-v2|\
netgear,r6800)
- ucidef_set_led_switch "wan" "WAN" "$boardname:white:wan" "switch0" "0x10"
- ucidef_set_led_switch "lan1" "LAN1" "$boardname:white:lan1" "switch0" "0x08"
- ucidef_set_led_switch "lan2" "LAN2" "$boardname:white:lan2" "switch0" "0x04"
- ucidef_set_led_switch "lan3" "LAN3" "$boardname:white:lan3" "switch0" "0x02"
- ucidef_set_led_switch "lan4" "LAN4" "$boardname:white:lan4" "switch0" "0x01"
+ ucidef_set_led_netdev "wan" "WAN" "$boardname:white:wan" "wan"
+ ucidef_set_led_netdev "lan1" "LAN1" "$boardname:white:lan1" "lan1"
+ ucidef_set_led_netdev "lan2" "LAN2" "$boardname:white:lan2" "lan2"
+ ucidef_set_led_netdev "lan3" "LAN3" "$boardname:white:lan3" "lan3"
+ ucidef_set_led_netdev "lan4" "LAN4" "$boardname:white:lan4" "lan4"
;;
tplink,re350-v1|\
tplink,re650-v1)
ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0"
ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1"
- ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "eth0" "tx rx"
- ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x01"
- ;;
-xiaomi,mir3g)
- ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08"
- ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08"
- ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
- ;;
-xiaomi,mir3p)
- ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x10" "0x08"
- ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x02" "0x08"
- ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
- ucidef_set_led_switch "lan3-amber" "LAN3 (amber)" "$boardname:amber:lan3" "switch0" "0x08" "0x08"
+ ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "lan" "tx rx"
+ ucidef_set_led_netdev "eth_link" "LAN link" "$boardname:green:eth_link" "lan" "link"
;;
xzwifi,creativebox-v1)
- ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10"
+ ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "wan"
;;
youhua,wr1200js)
- ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01"
+ ucidef_set_led_netdev "internet" "INTERNET" "$boardname:green:wan" "wan"
;;
esac
case $board in
adslr,g7|\
afoundry,ew1200|\
+ alfa-network,quad-e4g|\
+ asus,rt-ac57u|\
+ asus,rt-ac65p|\
+ asus,rt-ac85p|\
+ buffalo,wsr-1166dhp|\
+ buffalo,wsr-600dhp|\
+ dlink,dir-860l-b1|\
+ d-team,newifi-d2|\
d-team,pbr-m1|\
+ edimax,ra21s|\
+ edimax,rg21s|\
+ elecom,wrc-1167ghbk2-s|\
+ elecom,wrc-1900gst|\
+ elecom,wrc-2533gst|\
firefly,firewrt|\
+ iodata,wn-ax1167gr|\
+ iodata,wn-ax1167gr2|\
+ iodata,wn-dx1167r|\
+ iodata,wn-gx300gr|\
+ iodata,wnpr2600g|\
+ iptime,a6ns-m|\
+ iptime,a8004t|\
jcg,jhr-ac876m|\
mediatek,ap-mt7621a-v60|\
mediatek,mt7621-eval-board|\
+ mikrotik,rb750gr3|\
mqmaker,witi|\
mtc,wr1201|\
+ netgear,r6220|\
+ netgear,r6260|\
+ netgear,r6350|\
+ netgear,r6700-v2|\
+ netgear,r6800|\
+ netgear,r6850|\
+ netgear,wndr3700-v5|\
+ netis,wf2881|\
phicomm,k2p|\
planex,vr500|\
samknows,whitebox-v8|\
storylink,sap-g3200u3|\
telco-electronics,x1|\
totolink,a7000r|\
+ ubiquiti,edgerouterx|\
+ ubiquiti,edgerouterx-sfp|\
unielec,u7621-06-16m|\
unielec,u7621-06-64m|\
+ wevo,11acnas|\
+ wevo,w2914ns-v2|\
xiaoyu,xy-c5|\
xzwifi,creativebox-v1|\
+ youhua,wr1200js|\
youku,yk-l2|\
zbtlink,zbt-we1326|\
zbtlink,zbt-we3526|\
zbtlink,zbt-wg2626|\
zbtlink,zbt-wg3526-16m|\
- zbtlink,zbt-wg3526-32m)
- ucidef_add_switch "switch0" \
- "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
- ;;
- alfa-network,quad-e4g|\
- netgear,r6220|\
- netgear,r6260|\
- netgear,r6350|\
- netgear,r6700-v2|\
- netgear,r6800|\
- netgear,r6850|\
- netgear,wndr3700-v5|\
- netis,wf2881|\
- wevo,11acnas|\
- wevo,w2914ns-v2|\
+ zbtlink,zbt-wg3526-32m|\
zio,freezio)
- ucidef_add_switch "switch0" \
- "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
asiarf,ap7621-001)
- ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
- ;;
- asiarf,ap7621-nv1)
- ucidef_add_switch "switch0" "0:wan" "2:lan" "3:lan" "6@eth0"
+ ucidef_set_interfaces_lan_wan "lan" "wan"
;;
- asus,rt-ac65p|\
- asus,rt-ac57u|\
- asus,rt-ac85p|\
- iptime,a6ns-m|\
- mikrotik,rb750gr3|\
- ubiquiti,edgerouterx|\
- ubiquiti,edgerouterx-sfp|\
- youhua,wr1200js)
- ucidef_add_switch "switch0" \
- "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
- ;;
- dlink,dir-860l-b1|\
- elecom,wrc-1167ghbk2-s|\
- elecom,wrc-1900gst|\
- elecom,wrc-2533gst|\
- iodata,wn-ax1167gr|\
- iodata,wn-ax1167gr2|\
- iodata,wn-dx1167r|\
- iodata,wn-gx300gr|\
- iodata,wnpr2600g|\
- iptime,a8004t)
- ucidef_add_switch "switch0" \
- "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
- ;;
- buffalo,wsr-1166dhp|\
- buffalo,wsr-600dhp)
- ucidef_add_switch "switch0" \
- "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan:5" "6@eth0"
- ;;
- d-team,newifi-d2)
- ucidef_add_switch "switch0" \
- "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
- ;;
- edimax,ra21s|\
- edimax,rg21s)
- ucidef_add_switch "switch0" \
- "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
+ asiarf,ap7621-nv1|\
+ lenovo,newifi-d1|\
+ mikrotik,rbm33g|\
+ xiaomi,mir3g|\
+ xiaomi,mir3g-v2)
+ ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
;;
- gehua,ghl-r-001)
- ucidef_add_switch "switch0" \
- "0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
+ gehua,ghl-r-001|\
+ hiwifi,hc5962|\
+ xiaomi,mir3p)
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
- ucidef_add_switch "switch0" \
- "0:lan" "4:lan" "6@eth0"
- ;;
- hiwifi,hc5962)
- ucidef_add_switch "switch0" \
- "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
- ;;
- lenovo,newifi-d1)
- ucidef_add_switch "switch0" \
- "1:lan:2" "2:lan:1" "4:wan" "6@eth0"
+ ucidef_set_interface_lan "lan1 lan2"
;;
linksys,re6500)
- ucidef_add_switch "switch0" \
- "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0"
+ ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
;;
mikrotik,rbm11g|\
- thunder,timecloud)
- ucidef_add_switch "switch0"
- ucidef_add_switch_attr "switch0" "enable" "false"
- ucidef_set_interface_lan "eth0"
- ;;
- mikrotik,rbm33g)
- ucidef_add_switch "switch0" \
- "1:lan" "2:lan" "0:wan" "6@eth0"
- ;;
netgear,ex6150|\
+ thunder,timecloud|\
tplink,re350-v1|\
tplink,re650-v1|\
ubnt,unifi-nanohd)
- ucidef_add_switch "switch0" \
- "0:lan" "6@eth0"
- ;;
- xiaomi,mir3g)
- ucidef_add_switch "switch0" \
- "2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
- ;;
- xiaomi,mir3g-v2)
- ucidef_add_switch "switch0" \
- "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
- ;;
- xiaomi,mir3p)
- ucidef_add_switch "switch0" \
- "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
+ ucidef_set_interface_lan "lan"
;;
*)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
local label_mac=""
case $board in
- adslr,g7)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe00c)" 1)
- ;;
- afoundry,ew1200|\
- asiarf,ap7621-001|\
- asiarf,ap7621-nv1|\
- firefly,firewrt|\
- gehua,ghl-r-001|\
- mqmaker,witi|\
- totolink,a7000r|\
- unielec,u7621-06-16m|\
- unielec,u7621-06-64m|\
- xzwifi,creativebox-v1|\
- zbtlink,zbt-wg2626)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe000)" 1)
- ;;
- alfa-network,quad-e4g|\
- asus,rt-ac57u|\
- d-team,newifi-d2|\
- d-team,pbr-m1|\
- elecom,wrc-1167ghbk2-s|\
- elecom,wrc-1900gst|\
- elecom,wrc-2533gst|\
- lenovo,newifi-d1|\
- netis,wf2881|\
- phicomm,k2p|\
- planex,vr500|\
- samknows,whitebox-v8|\
- youhua,wr1200js|\
- youku,yk-l2|\
- zbtlink,zbt-we3526)
- wan_mac=$(mtd_get_mac_binary factory 0xe006)
- ;;
asus,rt-ac65p|\
asus,rt-ac85p)
wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr)
dlink,dir-860l-b1)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
wan_mac=$(mtd_get_mac_ascii factory wanmac)
- label_mac=$(mtd_get_mac_binary radio 0x4)
;;
edimax,ra21s|\
edimax,rg21s)
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
- iodata,wn-ax1167gr|\
- iodata,wn-gx300gr|\
- mtc,wr1201|\
- netgear,r6220|\
- netgear,wndr3700-v5|\
- xiaoyu,xy-c5)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
- ;;
- iodata,wn-ax1167gr2|\
- iodata,wn-dx1167r|\
- xiaomi,mir3g-v2)
- wan_mac=$(mtd_get_mac_binary factory 0xe006)
- label_mac=$wan_mac
- ;;
iodata,wnpr2600g)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
- iptime,a6ns-m|\
- iptime,a8004t)
- wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
- ;;
- jcg,jhr-ac876m)
- label_mac=$(mtd_get_mac_binary factory 0x4)
- wan_mac=$label_mac
- ;;
- mediatek,ap-mt7621a-v60)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x5)" 1)
- ;;
mikrotik,rb750gr3|\
mikrotik,rbm33g)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary hard_config 0x10)" 2)
label_mac=$(mtd_get_mac_binary hard_config 0x10)
;;
- netgear,r6260|\
- netgear,r6350|\
- netgear,r6700-v2|\
- netgear,r6800|\
- netgear,r6850)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 2)
- ;;
- storylink,sap-g3200u3|\
- telco-electronics,x1)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe006)" 1)
- ;;
- ubiquiti,edgerouterx|\
- ubiquiti,edgerouterx-sfp)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x22)" 1)
- ;;
- wevo,11acnas|\
- wevo,w2914ns-v2|\
- zio,freezio)
- wan_mac=$(mtd_get_mac_binary factory 0x2e)
- label_mac=$wan_mac
- ;;
- xiaomi,mir3g|\
- xiaomi,mir3p)
- lan_mac=$(mtd_get_mac_binary factory 0xe006)
- label_mac=$lan_mac
- ;;
- zbtlink,zbt-we1326)
- wan_mac=$(mtd_get_mac_binary factory 0xe006)
- label_mac=$(mtd_get_mac_binary factory 0x4)
- ;;
+ zbtlink,zbt-we1326|\
zbtlink,zbt-wg3526-16m|\
zbtlink,zbt-wg3526-32m)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe000)" 1)
label_mac=$(mtd_get_mac_binary factory 0x4)
;;
esac