netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Move MT7530 phy muxing from DSA to PHY driver
@ 2022-09-14 22:07 Arınç ÜNAL
  2022-09-15  2:38 ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: Arınç ÜNAL @ 2022-09-14 22:07 UTC (permalink / raw)
  To: netdev, Linux ARM, moderated list:ARM/Mediatek SoC support, linux-kernel
  Cc: Thibaut, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Sean Wang, Landen Chao, DENG Qingfang, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, Matthias Brugger,
	Philipp Zabel, Sergio Paracuellos

Hello folks.

MediaTek MT7530 switch has got 5 phys and 7 gmacs. gmac5 and gmac6 are 
treated as CPU ports.

This switch has got a feature which phy0 or phy4 can be muxed to gmac5 
of the switch. This allows an ethernet mac connected to gmac5 to 
directly connect to the phy.

PHY muxing works by looking for the compatible string "mediatek,eth-mac" 
then the mac address to find the gmac1 node. Then, it checks the mdio 
address on the node which "phy-handle" on the gmac1 node points to. If 
the mdio address is 0, phy0 is muxed to gmac5 of the switch. If it's 4, 
phy4 is muxed.

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c?id=1f9a6abecf538cc73635f6082677a2f4dc9c89a4#n2238

Because that DSA probes the switch before muxing the phy, this won't 
work on devices which only use a single switch phy because probing will 
fail.

I'd like this operation to be done from the MediaTek Gigabit PHY driver 
instead. The motives for this change are that we solve the behaviour 
above, liberate the need to use DSA for this operation and get rid of 
the DSA overhead.

Would a change like this make sense and be accepted into netdev?

Arınç

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-27 21:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 22:07 Move MT7530 phy muxing from DSA to PHY driver Arınç ÜNAL
2022-09-15  2:38 ` Andrew Lunn
2022-09-16 15:25   ` Arınç ÜNAL
2022-09-17 15:07     ` Andrew Lunn
2022-09-18 11:28       ` Arınç ÜNAL
2022-09-18 22:58         ` Florian Fainelli
2023-03-26 16:52           ` Arınç ÜNAL
2023-03-27 18:38             ` Vladimir Oltean
2023-03-27 21:40               ` Arınç ÜNAL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).