]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mt7530: Add the support of MT7531 switch
authorLanden Chao <landen.chao@mediatek.com>
Fri, 11 Sep 2020 13:48:54 +0000 (21:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Sep 2020 23:30:39 +0000 (16:30 -0700)
commit311e10ceeec6880c7604d4a2f1f204be1d314366
tree2e87f6788157b9d49f13c89b040b3ec8077babf4
parente201784af5cd1e4f3b2c29aaa8e87226fdbca791
net: dsa: mt7530: Add the support of MT7531 switch

Add new support for MT7531:

MT7531 is the next generation of MT7530. It is also a 7-ports switch with
5 giga embedded phys, 2 cpu ports, and the same MAC logic of MT7530. Cpu
port 6 only supports SGMII interface. Cpu port 5 supports either RGMII
or SGMII in different HW sku, but cannot be muxed to PHY of port 0/4 like
mt7530. Due to SGMII interface support, pll, and pad setting are different
from MT7530. This patch adds different initial setting, and SGMII phylink
handlers of MT7531.

MT7531 SGMII interface can be configured in following mode:
- 'SGMII AN mode' with in-band negotiation capability
    which is compatible with PHY_INTERFACE_MODE_SGMII.
- 'SGMII force mode' without in-band negotiation
    which is compatible with 10B/8B encoding of
    PHY_INTERFACE_MODE_1000BASEX with fixed full-duplex and fixed pause.
- 2.5 times faster clocked 'SGMII force mode' without in-band negotiation
    which is compatible with 10B/8B encoding of
    PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause.

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/Kconfig
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h