Skip to content

RFC net: dsa: MT7530, MT7531, and MT7988 improvements

[email protected] linux-arm-kernel linux-mediatek lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest22 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22net: dsa: mt7530: add missing @p5_interface to mt7530_priv descriptiondrivers/net/dsa/mt7530.h+2 -11 reply
2/22net: dsa: mt7530: use p5_interface_select as data type for p5_intf_seldrivers/net/dsa/mt7530.h+4 -42 replies
3/22net: dsa: mt7530: properly support MT7531AE and MT7531BEdrivers/net/dsa/mt7530-mdio.c drivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+27 -352 replies
4/22net: dsa: mt7530: improve comments regarding port 5 and 6drivers/net/dsa/mt7530.c+13 -61 reply
5/22net: dsa: mt7530: read XTAL value from correct registerdrivers/net/dsa/mt7530.c+1 -10 replies
6/22net: dsa: mt7530: improve code path for setting up port 5drivers/net/dsa/mt7530.c+8 -110 replies
7/22net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disableddrivers/net/dsa/mt7530.c+3 -60 replies
8/22net: dsa: mt7530: change p{5,6}_interface to p{5,6}_configureddrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+10 -195 replies
9/22net: dsa: mt7530: empty default case on mt7530_setup_port5()drivers/net/dsa/mt7530.c+1 -40 replies
10/22net: dsa: mt7530: call port 6 setup from mt7530_mac_config()drivers/net/dsa/mt7530.c+15 -60 replies
11/22net: dsa: mt7530: remove pad_setup function pointerdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+2 -370 replies
12/22net: dsa: mt7530: move XTAL check to mt7530_setup()drivers/net/dsa/mt7530.c+10 -80 replies
13/22net: dsa: mt7530: move enabling port 6 to mt7530_setup_port6()drivers/net/dsa/mt7530.c+7 -30 replies
14/22net: dsa: mt7530: switch to if/else statements on mt7530_setup_port6()drivers/net/dsa/mt7530.c+11 -240 replies
15/22net: dsa: mt7530: set TRGMII RD TAP if trgmii is being useddrivers/net/dsa/mt7530.c+6 -50 replies
16/22net: dsa: mt7530: move lowering port 5 RGMII driving to mt7530_setup()drivers/net/dsa/mt7530.c+4 -40 replies
17/22net: dsa: mt7530: fix port capabilities for MT7988drivers/net/dsa/mt7530.c+1 -30 replies
18/22net: dsa: mt7530: remove .mac_port_config for MT7988 and make it optionaldrivers/net/dsa/mt7530.c+4 -140 replies
19/22net: dsa: mt7530: set interrupt register only for MT7530drivers/net/dsa/mt7530.c+1 -11 reply
20/22net: dsa: mt7530: force link-down on MACs before reset on MT7530drivers/net/dsa/mt7530.c+4 -04 replies
21/22net: dsa: mt7530: get rid of useless error returns on phylink code pathdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+17 -661 reply
22/22net: dsa: mt7530: rename p5_intf_sel and use only for MT7530 switchdrivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.h+32 -440 replies

Reviews trailers per patch

7 of 22 patches have a Reviewed-by or Acked-by.

PatchArınç ÜNALDaniel Golle
1/22A-b
2/22
3/22
4/22A-b
5/22T-b
6/22T-b
7/22T-b
8/22T-b A-b
9/22T-b
10/22T-b
11/22T-b A-b
12/22T-b
13/22T-b
14/22T-b
15/22T-b
16/22T-b
17/22A-b
18/22Co-authored-by
19/22A-b T-b
20/22T-b
21/22T-b A-b T-b
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH net-next 00/22] net: dsa: MT7530, MT7531, and MT7988 improvements

Hello!

This patch series is focused on simplifying the code, and improving the logic of the support for MT7530, MT7531, and MT7988 SoC switches.

There's also a fix for the switch on the MT7988 SoC.

Daniel, can you test this series on the MT7531 and MT7988 SoC switch?

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

I've got questions regarding patch 13 and 19.

For patch 19:

Daniel, does the switch on the MT7988 SoC require the register to fire interrupts properly? The code uses an inclusive check which was untouched when the MT7988 SoC switch support was added.

For patch 13:

Do I need to protect the register from being accessed by processes while this operation is being done? I don't see this on mt7530_setup() but it's being done on mt7530_setup_port5().

I have very thoroughly tested the patch series with every possible configuration on the MCM and standalone MT7530 switch. 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

[0] https://lore.kernel.org/netdev/[email protected]/
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/

Arınç