mbox series

[net-next,0/8] net: dsa: microchip: DSA driver support for LAN937x switch

Message ID 20210128064112.372883-1-prasanna.vengateshan@microchip.com (mailing list archive)
Headers show
Series net: dsa: microchip: DSA driver support for LAN937x switch | expand

Message

Prasanna Vengateshan Jan. 28, 2021, 6:41 a.m. UTC
LAN937x is a Multi-Port 100BASE-T1 Ethernet Physical Layer switch 
compliant with the IEEE 802.3bw-2015 specification. The device 
provides 100 Mbit/s transmit and receive capability over a single
Unshielded Twisted Pair (UTP) cable. LAN937x is successive revision
of KSZ series switch. This series of patches provide the DSA driver 
support for Microchip LAN937X switch and it configures through 
SPI interface.

This driver shares some of the functions from KSZ common
layer.

The LAN937x switch series family consists of following SKUs:
LAN9370:
  - 4 T1 Phys
  - 1 RGMII port
LAN9371:
  - 3 T1 Phys & 1 TX Phy
  - 2 RGMII ports
LAN9372:
  - 5 T1 Phys & 1 TX Phy
  - 2 RGMII ports
LAN9373:
  - 5 T1 Phys
  - 2 RGMII & 1 SGMII port
LAN9374:
  - 6 T1 Phys
  - 2 RGMII ports

More support will be added at a later stage.

Prasanna Vengateshan (8):
  dt-bindings: net: dsa: dt bindings for microchip lan937x
  net: dsa: microchip: add tag handling for Microchip LAN937x
  net: dsa: microchip: add DSA support for microchip lan937x
  net: dsa: microchip: add support for phylink management
  net: dsa: microchip: add support for ethtool port counters
  net: dsa: microchip: add support for port mirror operations
  net: dsa: microchip: add support for fdb and mdb management
  net: dsa: microchip: add support for vlan operations

 .../bindings/net/dsa/microchip,lan937x.yaml   |  115 ++
 MAINTAINERS                                   |    1 +
 drivers/net/dsa/microchip/Kconfig             |   12 +
 drivers/net/dsa/microchip/Makefile            |    5 +
 drivers/net/dsa/microchip/ksz_common.h        |    1 +
 drivers/net/dsa/microchip/lan937x_dev.c       |  895 ++++++++++++++
 drivers/net/dsa/microchip/lan937x_dev.h       |   79 ++
 drivers/net/dsa/microchip/lan937x_main.c      | 1037 +++++++++++++++++
 drivers/net/dsa/microchip/lan937x_reg.h       |  955 +++++++++++++++
 drivers/net/dsa/microchip/lan937x_spi.c       |  104 ++
 include/net/dsa.h                             |    2 +
 net/dsa/Kconfig                               |    4 +-
 net/dsa/tag_ksz.c                             |   74 ++
 13 files changed, 3282 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
 create mode 100644 drivers/net/dsa/microchip/lan937x_dev.c
 create mode 100644 drivers/net/dsa/microchip/lan937x_dev.h
 create mode 100644 drivers/net/dsa/microchip/lan937x_main.c
 create mode 100644 drivers/net/dsa/microchip/lan937x_reg.h
 create mode 100644 drivers/net/dsa/microchip/lan937x_spi.c

Comments

Florian Fainelli Jan. 28, 2021, 5:55 p.m. UTC | #1
On 1/27/2021 10:41 PM, Prasanna Vengateshan wrote:
> LAN937x is a Multi-Port 100BASE-T1 Ethernet Physical Layer switch 
> compliant with the IEEE 802.3bw-2015 specification. The device 
> provides 100 Mbit/s transmit and receive capability over a single
> Unshielded Twisted Pair (UTP) cable. LAN937x is successive revision
> of KSZ series switch. This series of patches provide the DSA driver 
> support for Microchip LAN937X switch and it configures through 
> SPI interface.
> 
> This driver shares some of the functions from KSZ common
> layer.
> 
> The LAN937x switch series family consists of following SKUs:
> LAN9370:
>   - 4 T1 Phys
>   - 1 RGMII port
> LAN9371:
>   - 3 T1 Phys & 1 TX Phy
>   - 2 RGMII ports
> LAN9372:
>   - 5 T1 Phys & 1 TX Phy
>   - 2 RGMII ports
> LAN9373:
>   - 5 T1 Phys
>   - 2 RGMII & 1 SGMII port
> LAN9374:
>   - 6 T1 Phys
>   - 2 RGMII ports
> 
> More support will be added at a later stage.

It is great to see a new switch from Microchip being submitted for
review. One thing that has bothered me as a DSA maintainer before though
is that we have seen Microchip contribute new DSA drivers which are
always welcome, however the maintenance and bug fixing of these drivers
was spotty, thus leading to external contributors to take on the tasks
of fixing bugs. Do you have a stronger commitment now to stay involved
with reviewing/fixing bugs affecting Microchip DSA drivers and to a
larger extent the framework itself?

Could you also feed back to your hardware organization to settle on a
tag format that is not a snowflake? Almost *every* switch you have has a
different tagging format, this is absurd. All other vendors in tree have
been able to settle on at most 2 or 3 different tagging formats over
their switching product life span (for some vendors this dates back 20
years ago).

I will provide a more detailed review later on.

> 
> Prasanna Vengateshan (8):
>   dt-bindings: net: dsa: dt bindings for microchip lan937x
>   net: dsa: microchip: add tag handling for Microchip LAN937x
>   net: dsa: microchip: add DSA support for microchip lan937x
>   net: dsa: microchip: add support for phylink management
>   net: dsa: microchip: add support for ethtool port counters
>   net: dsa: microchip: add support for port mirror operations
>   net: dsa: microchip: add support for fdb and mdb management
>   net: dsa: microchip: add support for vlan operations
> 
>  .../bindings/net/dsa/microchip,lan937x.yaml   |  115 ++
>  MAINTAINERS                                   |    1 +
>  drivers/net/dsa/microchip/Kconfig             |   12 +
>  drivers/net/dsa/microchip/Makefile            |    5 +
>  drivers/net/dsa/microchip/ksz_common.h        |    1 +
>  drivers/net/dsa/microchip/lan937x_dev.c       |  895 ++++++++++++++
>  drivers/net/dsa/microchip/lan937x_dev.h       |   79 ++
>  drivers/net/dsa/microchip/lan937x_main.c      | 1037 +++++++++++++++++
>  drivers/net/dsa/microchip/lan937x_reg.h       |  955 +++++++++++++++
>  drivers/net/dsa/microchip/lan937x_spi.c       |  104 ++
>  include/net/dsa.h                             |    2 +
>  net/dsa/Kconfig                               |    4 +-
>  net/dsa/tag_ksz.c                             |   74 ++
>  13 files changed, 3282 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
>  create mode 100644 drivers/net/dsa/microchip/lan937x_dev.c
>  create mode 100644 drivers/net/dsa/microchip/lan937x_dev.h
>  create mode 100644 drivers/net/dsa/microchip/lan937x_main.c
>  create mode 100644 drivers/net/dsa/microchip/lan937x_reg.h
>  create mode 100644 drivers/net/dsa/microchip/lan937x_spi.c
>
Vladimir Oltean Jan. 30, 2021, 2:09 a.m. UTC | #2
On Thu, Jan 28, 2021 at 09:55:58AM -0800, Florian Fainelli wrote:
> Could you also feed back to your hardware organization to settle on a
> tag format that is not a snowflake? Almost *every* switch you have has a
> different tagging format, this is absurd. All other vendors in tree have
> been able to settle on at most 2 or 3 different tagging formats over
> their switching product life span (for some vendors this dates back 20
> years ago).

You can't stop them from innovating, Florian :(
Woojung Huh Feb. 2, 2021, 1:25 a.m. UTC | #3
Hi Florian,

Wish you a happy and safe new year.

Thanks for your time to review new patches.
 > It is great to see a new switch from Microchip being submitted for
> review. One thing that has bothered me as a DSA maintainer before though
> is that we have seen Microchip contribute new DSA drivers which are
> always welcome, however the maintenance and bug fixing of these drivers
> was spotty, thus leading to external contributors to take on the tasks
> of fixing bugs. Do you have a stronger commitment now to stay involved
> with reviewing/fixing bugs affecting Microchip DSA drivers and to a
> larger extent the framework itself?
Admit that Microchip's activities on community, especially on DSA drivers, 
was not active for a while.  We are going to do our best to get involved more
on community including reviewing and frameworks. You might already start
seeing review and comments on community from Microchip recently.
 
> Could you also feed back to your hardware organization to settle on a
> tag format that is not a snowflake? Almost *every* switch you have has a
> different tagging format, this is absurd. All other vendors in tree have
> been able to settle on at most 2 or 3 different tagging formats over
> their switching product life span (for some vendors this dates back 20
> years ago).
Understand this point too. Actually, those products are developed over time.
Sometime it is not avoidable to add new stuff.
But, Yes, it would be better to design ahead with reserved fields.

Thanks again on your reviews and comments, will gear up on DSA works.

Best Regards,
Woojung