Skip to content

net: dsa: add QCA AR8xxx switch family support

Mathieu Olivari linux-devicetree lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net: dsa: add new driver for ar8xxx familydrivers/net/dsa/Kconfig drivers/net/dsa/Makefile drivers/net/dsa/ar8xxx.c +2 more+394 -02 replies
2/7net: dsa: ar8xxx: add ethtool hw statistics supportdrivers/net/dsa/ar8xxx.c drivers/net/dsa/ar8xxx.h+146 -70 replies
3/7net: dsa: ar8xxx: add regmap supportdrivers/net/dsa/Kconfig drivers/net/dsa/ar8xxx.c drivers/net/dsa/ar8xxx.h+66 -07 replies
4/7net: dsa: add QCA tag supportinclude/net/dsa.h net/dsa/Kconfig net/dsa/Makefile +4 more+175 -00 replies
5/7net: dsa: ar8xxx: enable QCA header support on AR8xxxdrivers/net/dsa/Kconfig drivers/net/dsa/ar8xxx.c drivers/net/dsa/ar8xxx.h+49 -20 replies
6/7net: dsa: ar8xxx: add support for second xMII interfaces through DTdrivers/net/dsa/ar8xxx.c+50 -00 replies
7/7Documentation: devicetree: add ar8xxx bindingDocumentation/devicetree/bindings/net/dsa/qca-ar8xxx.txt+70 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] net: dsa: add QCA AR8xxx switch family support

This patch set adds initial support for AR8xxx switches using the DSA subsystem. It currently supports QCA8337 switch, and can be extended to other hardware in the same family.

This switch was already discussed in the following thread:
https://www.marc.info/?t=142601417400004&r=1&w=2

Below is a typical picture of a QCA8337 used in a standard home gateway configuration:

	+-----------+       +-----------+
	|           | SGMII |           |
	|       eth0+-------+           +------ 1000baseT MDI ("WAN")
	|        wan|       |  7-port   +------ 1000baseT MDI ("LAN1")
	|   CPU     |       |  ethernet +------ 1000baseT MDI ("LAN2")
	|           | RGMII |  switch   +------ 1000baseT MDI ("LAN3")
	|       eth1+-------+  w/5 PHYs +------ 1000baseT MDI ("LAN4")
	|        lan|       |           |
	+-----------+       +-----------+
	          |   MDIO     |
	          \------------/

The switch is connected to the CPU using 2 xMII interfaces. As DSA only supports one logical interface to the switch, we split the switch using device-tree information into 2 parts:
*port 6 (one of the xMII switch port) will be dedicated to one
particular Ethernet port. From a system perspective, it will be seen as a regular PHY.
*port 0 (the other xMII port) will act as the switch master interface

When 2 xMII are used, the switch will therefore be seen as 2 devices: 1 PHY + 1 DSA switch. The configuration of this split is done using driver specific options in device-tree.

The exact properties are detailed in the Documentation patch below.

Mathieu Olivari (7):
net: dsa: add new driver for ar8xxx family
net: dsa: ar8xxx: add ethtool hw statistics support
net: dsa: ar8xxx: add regmap support
net: dsa: add QCA tag support
net: dsa: ar8xxx: enable QCA header support on AR8xxx
net: dsa: ar8xxx: add support for second xMII interfaces through DT
Documentation: devicetree: add ar8xxx binding

 .../devicetree/bindings/net/dsa/qca-ar8xxx.txt     |  70 +++
 drivers/net/dsa/Kconfig                            |   9 +
 drivers/net/dsa/Makefile                           |   1 +
 drivers/net/dsa/ar8xxx.c                           | 530 +++++++++++++++++++++
 drivers/net/dsa/ar8xxx.h                           | 157 ++++++
 include/net/dsa.h                                  |   1 +
 net/dsa/Kconfig                                    |   3 +
 net/dsa/Makefile                                   |   1 +
 net/dsa/dsa.c                                      |   6 +
 net/dsa/dsa_priv.h                                 |   2 +
 net/dsa/slave.c                                    |   5 +
 net/dsa/tag_qca.c                                  | 159 +++++++
 12 files changed, 944 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/qca-ar8xxx.txt
 create mode 100644 drivers/net/dsa/ar8xxx.c
 create mode 100644 drivers/net/dsa/ar8xxx.h
 create mode 100644 net/dsa/tag_qca.c
Signature · 1 line
2.1.4