Commit 65d4d00abc9166c0f837e9ca08b2d4453241e68c

Authored by Chris Packham
Committed by Joe Hershberger
1 parent f411b5cca4

net: Add support for mv88e609x switches

The Marvell Link Street mv88e60xx is a series of FastEthernet switch
chips, some of which also support Gigabit ports. It is similar to the
mv88e61xx series which support Gigabit on all ports.

The main difference is the number of ports. Which affects the
PORT_COUNT define and the size of the mask passed to
mv88e61xx_port_set_vlan().

Other than that it's just a matter of adding the appropriate chip
IDs.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Cc: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Showing 1 changed file with 16 additions and 2 deletions Side-by-side Diff

drivers/net/phy/mv88e61xx.c
... ... @@ -40,7 +40,7 @@
40 40  
41 41 #define PHY_AUTONEGOTIATE_TIMEOUT 5000
42 42  
43   -#define PORT_COUNT 7
  43 +#define PORT_COUNT 11
44 44 #define PORT_MASK ((1 << PORT_COUNT) - 1)
45 45  
46 46 /* Device addresses */
... ... @@ -167,6 +167,8 @@
167 167 #endif
168 168  
169 169 /* ID register values for different switch models */
  170 +#define PORT_SWITCH_ID_6096 0x0980
  171 +#define PORT_SWITCH_ID_6097 0x0990
170 172 #define PORT_SWITCH_ID_6172 0x1720
171 173 #define PORT_SWITCH_ID_6176 0x1760
172 174 #define PORT_SWITCH_ID_6240 0x2400
... ... @@ -580,7 +582,7 @@
580 582 }
581 583  
582 584 static int mv88e61xx_port_set_vlan(struct phy_device *phydev, u8 port,
583   - u8 mask)
  585 + u16 mask)
584 586 {
585 587 int val;
586 588  
587 589  
... ... @@ -974,9 +976,21 @@
974 976 .shutdown = &genphy_shutdown,
975 977 };
976 978  
  979 +static struct phy_driver mv88e609x_driver = {
  980 + .name = "Marvell MV88E609x",
  981 + .uid = 0x1410c89,
  982 + .mask = 0xfffffff0,
  983 + .features = PHY_GBIT_FEATURES,
  984 + .probe = mv88e61xx_probe,
  985 + .config = mv88e61xx_phy_config,
  986 + .startup = mv88e61xx_phy_startup,
  987 + .shutdown = &genphy_shutdown,
  988 +};
  989 +
977 990 int phy_mv88e61xx_init(void)
978 991 {
979 992 phy_register(&mv88e61xx_driver);
  993 + phy_register(&mv88e609x_driver);
980 994  
981 995 return 0;
982 996 }