Hi, I'm currently working on an ipq40xx device which has WAN port at port 1. (It seems most ipq40xx devices on OpenWrt use port 5 for WAN)
But I can't figure out how to set WAN on the port 1.
I've tried these things on RT-AC58U:
- change
switch_wan_bmp
andvlan_tag
: no luck, port 1 becomes dumb - apply this patch: did work, but I don't think this will be merged.
- apply patch "ipq40xx: include ipq40xx-ized qca8k version" in @chunkeey's staging tree, and change essportX accordingly: did work, but switch led stopped working.
Finally, I found an almost-close solution:
ess-switch@c000000 {
status = "okay";
switch_lan_bmp = <0x3c>;
switch_wan_bmp = <0x02>;
};
&gmac0 {
vlan_tag = <1 0x3c>;
};
&gmac1 {
qcom,phy_mdio_addr = <0>;
vlan_tag = <2 0x02>;
};
changing qcom,phy_mdio_addr
worked, except that it did not accept 0.
If I used value other than 0, it changed WAN port accordingly, and it worked well. Only value 0 seems to be a problem.
git grep "qcom,phy_mdio_addr"
shows that qcom,phy_mdio_addr = <0>;
is used for non-existing port. So the driver might be the cause.
How can we solve this? Is there another workaround for this?