Yes, you are right. MAC 0 through 4 are all connected to the external PHYs and shouldn't be touched I think. Because bit 4&5 only work if bit 15 is set to 1, but setting bit 15 to 1 will make the MAC use all the bits with "FORCE_" prepended, and thus will force the link to a certain speed. The patch should probably be changed to:
/* (GE1, Force 1000M/FD, FC OFF, MAX_RX_LENGTH 1536) */
mtk_switch_w32(gsw, 0x2305e30b, GSW_REG_MAC_P0_MCR);
for (i = 5; i <= 6; i++) {
mt7530_mdio_w32(gsw, 0x3000 + (i * 0x100), 0x5e30b);
}
/* Disable Flow Control Globally */
val = mt7530_mdio_r32(gsw, 0x1FE0);
val &= ~BIT(31);
mt7530_mdio_w32(gsw, 0x1FE0, val);
/* turn off pause advertisement on all PHYs */
for (i = 0; i <= 4; i++) {
val = _mt7620_mii_read(gsw, i, 4);
val &= ~BIT(10);
_mt7620_mii_write(gsw, i, 4, val);
}