netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] net: dsa: mt7530: fix port 5 phylink, phy muxing, and port 6
@ 2023-03-26 14:08 arinc9.unal
  2023-03-26 14:08 ` [PATCH net 1/7] net: dsa: mt7530: fix comments regarding port 5 and 6 for both switches arinc9.unal
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: arinc9.unal @ 2023-03-26 14:08 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, DENG Qingfang, Andrew Lunn,
	Florian Fainelli, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Russell King, René van Dorst
  Cc: Russell King, Landen Chao, Ilya Lipnitskiy, Richard van Schagen,
	Richard van Schagen, Frank Wunderlich, Arınç ÜNAL,
	erkin.bozoglu, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek

Hello!

This patch series is mainly focused on fixing the support for port 5 and
setting up port 6.

The only missing piece to properly support port 5 as a CPU port is the
fixes [0] [1] [2] from Richard.

Russell, looking forward to your review regarding phylink.

I have very thoroughly tested the patch series with every possible mode to
use. I'll let the name of the dtb files speak for themselves.

MT7621 Unielec:

only-gmac0-mt7621-unielec-u7621-06-16m.dtb
rgmii-only-gmac0-mt7621-unielec-u7621-06-16m.dtb
only-gmac1-mt7621-unielec-u7621-06-16m.dtb
gmac0-and-gmac1-mt7621-unielec-u7621-06-16m.dtb
phy0-muxing-mt7621-unielec-u7621-06-16m.dtb
phy4-muxing-mt7621-unielec-u7621-06-16m.dtb
port5-as-user-mt7621-unielec-u7621-06-16m.dtb

tftpboot 0x80008000 mips-uzImage.bin; tftpboot 0x83000000 mips-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootm 0x80008000 0x83000000 0x83f00000

MT7623 Bananapi:

only-gmac0-mt7623n-bananapi-bpi-r2.dtb
rgmii-only-gmac0-mt7623n-bananapi-bpi-r2.dtb
only-gmac1-mt7623n-bananapi-bpi-r2.dtb
gmac0-and-gmac1-mt7623n-bananapi-bpi-r2.dtb
phy0-muxing-mt7623n-bananapi-bpi-r2.dtb
phy4-muxing-mt7623n-bananapi-bpi-r2.dtb
port5-as-user-mt7623n-bananapi-bpi-r2.dtb

tftpboot 0x80008000 arm-uImage; tftpboot 0x83000000 arm-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootm 0x80008000 0x83000000 0x83f00000

Current CPU ports setup of MT7530:

mt7530_setup()
-> mt7530_setup_port5()

mt753x_phylink_mac_config()
-> mt753x_mac_config()
   -> mt7530_mac_config()
      -> mt7530_setup_port5()
-> mt753x_pad_setup()
   -> mt7530_pad_clk_setup() sets up port 6, rename to mt7530_setup_port6()

How it will be with the patch series:

mt7530_setup()
-> mt7530_setup_port5() runs if the port is not used as a CPU or user port

mt753x_phylink_mac_config()
-> mt753x_mac_config()
   -> mt7530_mac_config()
      -> mt7530_setup_port5()
      -> mt7530_setup_port6()

CPU ports setup of MT7531 for reference:

mt7531_setup()
-> mt753x_cpu_port_enable()
   -> mt7531_cpu_port_config()
      -> mt7531_mac_config()
         -> mt7531_rgmii_setup()
         -> mt7531_sgmii_setup_mode_an()
         -> etc.

mt753x_phylink_mac_config()
-> mt753x_mac_config()
   -> mt7531_mac_config()
      -> mt7531_rgmii_setup()
      -> mt7531_sgmii_setup_mode_an()
      -> etc.

[0] https://lore.kernel.org/netdev/20230212213949.672443-1-richard@routerhints.com/
[1] https://lore.kernel.org/netdev/20230212215152.673221-1-richard@routerhints.com/
[2] https://lore.kernel.org/netdev/20230212214027.672501-1-richard@routerhints.com/

Arınç

Arınç ÜNAL (7):
  net: dsa: mt7530: fix comments regarding port 5 and 6 for both switches
  net: dsa: mt7530: fix phylink for port 5 and fix port 5 modes
  net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disabled
  net: dsa: mt7530: set both CPU port interfaces to PHY_INTERFACE_MODE_NA
  net: dsa: mt7530: set up port 5 before CPU ports are enabled
  net: dsa: mt7530: call port 6 setup from mt7530_mac_config()
  net: dsa: mt7530: remove pad_setup function pointer

 drivers/net/dsa/mt7530.c | 154 +++++++++++++++++++-----------------------
 drivers/net/dsa/mt7530.h |   3 -
 2 files changed, 70 insertions(+), 87 deletions(-)



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

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

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-26 14:08 [PATCH 0/7] net: dsa: mt7530: fix port 5 phylink, phy muxing, and port 6 arinc9.unal
2023-03-26 14:08 ` [PATCH net 1/7] net: dsa: mt7530: fix comments regarding port 5 and 6 for both switches arinc9.unal
2023-03-26 14:08 ` [PATCH net 2/7] net: dsa: mt7530: fix phylink for port 5 and fix port 5 modes arinc9.unal
2023-03-27 18:49   ` Vladimir Oltean
2023-03-27 21:44     ` Arınç ÜNAL
2023-03-26 14:08 ` [PATCH net 3/7] net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disabled arinc9.unal
2023-03-27 18:56   ` Vladimir Oltean
2023-03-27 21:46     ` Arınç ÜNAL
2023-03-26 14:08 ` [PATCH net 4/7] net: dsa: mt7530: set both CPU port interfaces to PHY_INTERFACE_MODE_NA arinc9.unal
2023-03-27 19:12   ` Vladimir Oltean
2023-03-27 21:57     ` Arınç ÜNAL
2023-03-28  2:03       ` Jakub Kicinski
2023-03-28 11:20       ` Vladimir Oltean
2023-03-28 21:26         ` Arınç ÜNAL
2023-03-26 14:08 ` [PATCH net 5/7] net: dsa: mt7530: set up port 5 before CPU ports are enabled arinc9.unal
2023-03-26 14:08 ` [PATCH net 6/7] net: dsa: mt7530: call port 6 setup from mt7530_mac_config() arinc9.unal
2023-03-26 14:08 ` [PATCH net 7/7] net: dsa: mt7530: remove pad_setup function pointer arinc9.unal
2023-03-28 11:21 ` [PATCH 0/7] net: dsa: mt7530: fix port 5 phylink, phy muxing, and port 6 Vladimir Oltean
2023-03-28 21:27   ` 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).