[RFC PATCH net-next 6/8] net: dsa: mt7530: simplify mt7530_setup_port6() and change to void

Vladimir Oltean olteanv at gmail.com
Tue Jan 16 05:47:05 PST 2024


On Tue, Jan 16, 2024 at 04:09:18PM +0300, Arınç ÜNAL wrote:
> Do you mean by internal port that the port does not have MII pinout? Port 6
> of the MT7530 switch do. It is possible to have an external PHY wired to it.

Yes, this is what I meant by internal port. It seems I was wrong to
assume it is always connected to GMAC0.

How is the selection done between internal and external wiring?

If external wiring to a PHY is possible, shouldn't the driver accept all
4 RGMII variants with phy_interface_mode_is_rgmii(), because the delays
specified in "rgmii-txid", "rgmii-rxid", "rgmii-id" always pertain to
the PHY, and thus it doesn't make sense for the MAC to not allow the use
of the full spectrum?

> So it would make sense to design mt7530_setup_port6() in the sense that
> dynamic reconfiguration is possible.

Ok, you mean to keep the dynamic reconfiguration possible rather than
redesign to disallow it.

> I've tested to see that the core operations for TRGMII does not interfere
> so no need to undo them when the interface changes from TRGMII to RGMII.
> 
> I'll do below on this patch:
> 
> 	if (interface == PHY_INTERFACE_MODE_RGMII) {
> 		mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
> 			   P6_INTF_MODE(0));
> 		return;
> 	}

Ok.



More information about the linux-arm-kernel mailing list