Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 551f40c4 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-add-Microchip-KSZ9477-DSA-driver'



Woojung Huh says:

====================
dsa: add Microchip KSZ9477 DSA driver

This series of patches is for Microchip KSZ9477 DSA driver.
KSZ9477 is 7 ports GigE switch with numerous advanced features.
5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have
Interfaces to SGMII, RGMII, MII or RMII.

This patch supports VLAN, MDB, FDB and port mirroring offloads.

Welcome reviews and comments from community.

Note: Tests are performed on internal development board.

V5
- add missing MODULE_LICENSE

V4
- update per review comments
- cosmetic changes
- net/dsa/tag_ksz.c
  * skb_put() & memset() are changed to skb_put_padto()
- drivers/net/dsa/microchip/ksz_common.
   * vlan access mutex is updated
   * mib_names[] is changed to static const

V3
- update per review comments
- cosmetic changes
- drivers/net/dsa/microchip/ksz_common.c
  * clean up ksz_switch_chips[]
  * consolidate checking loops into functions
  * update mutex for better locking
  * replace devm_kmalloc_array() to devm_kcalloc()
- MAINTAINERS
  * add missing net/dsa/tag_ksz.c

V2
- update per review comments
- several cosmetic changes
- net/dsa/tag_ksz.c
  * constants are changed to defines
  * remove skb_linearize() in ksz_rcv()
  * ksz_xmit()checks skb tailroom before allocate new skb
- drivers/net/phy/micrel.c
  * remove PHY_HAS_MAGICANEG from ksphy_driver[]
- drivers/net/dsa/microchip/ksz_common.c
  * add timeout to avoid endless loop
  * port initialization is move to ksz_port_enable() instead of  ksz_setup_ports()
- Documentation/devicetree/bindings/net/dsa/ksz.txt
  * fix typo and indentations
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6c21a2a6 419585a9
Loading
Loading
Loading
Loading
+72 −0
Original line number Diff line number Diff line
Microchip KSZ Series Ethernet switches
==================================

Required properties:

- compatible: For external switch chips, compatible string must be exactly one
  of: "microchip,ksz9477"

See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
required and optional properties.

Examples:

Ethernet switch connected via SPI to the host, CPU port wired to eth0:

                             eth0: ethernet@10001000 {
                                             fixed-link {
                                                             speed = <1000>;
                                                             full-duplex;
                                             };
                             };

                             spi1: spi@f8008000 {
                                             pinctrl-0 = <&pinctrl_spi_ksz>;
                                             cs-gpios = <&pioC 25 0>;
                                             id = <1>;
                                             status = "okay";

                                             ksz9477: ksz9477@0 {
                                                             compatible = "microchip,ksz9477";
                                                             reg = <0>;

                                                             spi-max-frequency = <44000000>;
                                                             spi-cpha;
                                                             spi-cpol;

                                                             status = "okay";
                                                             ports {
                                                                             #address-cells = <1>;
                                                                             #size-cells = <0>;
                                                                             port@0 {
                                                                                             reg = <0>;
                                                                                             label = "lan1";
                                                                             };
                                                                             port@1 {
                                                                                             reg = <1>;
                                                                                             label = "lan2";
                                                                             };
                                                                             port@2 {
                                                                                             reg = <2>;
                                                                                             label = "lan3";
                                                                             };
                                                                             port@3 {
                                                                                             reg = <3>;
                                                                                             label = "lan4";
                                                                             };
                                                                             port@4 {
                                                                                             reg = <4>;
                                                                                             label = "lan5";
                                                                             };
                                                                             port@5 {
                                                                                             reg = <5>;
                                                                                             label = "cpu";
                                                                                             ethernet = <&eth0>;
                                                                                             fixed-link {
                                                                                                             speed = <1000>;
                                                                                                             full-duplex;
                                                                                             };
                                                                             };
                                                             };
                                             };
                             };
+10 −0
Original line number Diff line number Diff line
@@ -8479,6 +8479,16 @@ F: drivers/media/platform/atmel/atmel-isc.c
F:	drivers/media/platform/atmel/atmel-isc-regs.h
F:	devicetree/bindings/media/atmel-isc.txt

MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
M:	Woojung Huh <Woojung.Huh@microchip.com>
M:	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	net/dsa/tag_ksz.c
F:	drivers/net/dsa/microchip/*
F:	include/linux/platform_data/microchip-ksz.h
F:	Documentation/devicetree/bindings/net/dsa/ksz.txt

MICROCHIP USB251XB DRIVER
M:	Richard Leitner <richard.leitner@skidata.com>
L:	linux-usb@vger.kernel.org
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ config NET_DSA_MV88E6060
	  This enables support for the Marvell 88E6060 ethernet switch
	  chip.

source "drivers/net/dsa/microchip/Kconfig"

source "drivers/net/dsa/mv88e6xxx/Kconfig"

config NET_DSA_QCA8K
+1 −0
Original line number Diff line number Diff line
@@ -8,4 +8,5 @@ obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o
obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o
obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o
obj-y				+= b53/
obj-y				+= microchip/
obj-y				+= mv88e6xxx/
+12 −0
Original line number Diff line number Diff line
menuconfig MICROCHIP_KSZ
	tristate "Microchip KSZ series switch support"
	depends on NET_DSA
	select NET_DSA_TAG_KSZ
	help
	  This driver adds support for Microchip KSZ switch chips.

config MICROCHIP_KSZ_SPI_DRIVER
	tristate "KSZ series SPI connected switch driver"
	depends on MICROCHIP_KSZ && SPI
	help
	  Select to enable support for registering switches configured through SPI.
Loading