In first commit I successfully bring WAN port into ethernet switch,
without realizing that I was using custom bootloader. But if using
original bootloader it do not works. WAN port in original bootloader
is tied to using its own GMAC.
This fix is made so this firmware will be compatible with orignal
bootloader, so the user can directly flash from stock firmware without
changing anything.
Signed-off-by: Roy H <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20039
Signed-off-by: Hauke Mehrtens <[email protected]>
};
-&builtin_switch {
- /delete-property/ qca,phy4-mii-enable; /* need to delete this to make all 5 FE ports work */
-};
-
&usb_phy {
status = "okay";
};
gmac-config {
device = <&gmac>;
switch-phy-swap = <0>;
- switch-only-mode = <1>;
+ switch-only-mode = <0>;
};
};
+ð0 {
+ status = "okay";
+
+ phy-handle = <&swphy4>;
+
+ nvmem-cells = <&macaddr_art_1002 1>;
+ nvmem-cell-names = "mac-address";
+};
+
ucidef_set_led_switch "lan2" "LAN2" "white:lan2" "switch0" "0x02"
;;
longdata,aps256)
- ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x20"
+ ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "blue:lan-1" "switch0" "0x04"
ucidef_set_led_switch "lan2" "LAN2" "blue:lan-2" "switch0" "0x02"
;;
"0@eth0" "5:wan" "6@eth1" "4:lan"
;;
longdata,aps256)
+ ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
- "0@eth0" "1:lan:2" "2:lan:1" "5:wan"
+ "0@eth0" "1:lan:2" "2:lan:1"
;;
meraki,mr12)
ucidef_set_interface_lan "eth0"