diff mbox

[U-Boot,v1,1/2] net: Add support for mv88e609x switches

Message ID 20160826053026.29827-1-judge.packham@gmail.com
State Accepted
Commit 65d4d00abc9166c0f837e9ca08b2d4453241e68c
Delegated to: Joe Hershberger
Headers show

Commit Message

Chris Packham Aug. 26, 2016, 5:30 a.m. UTC
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>
---
This is a re-work of Joshua's patch
http://patchwork.ozlabs.org/patch/425556/

Thanks to the work from Kevin Smith the changes to support the 88E609x
are quite trivial. I've tested this on a board with a 88E6097. It should
also work for a 88E6096 based on the datasheet.

 drivers/net/phy/mv88e61xx.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

Comments

Joe Hershberger Sept. 2, 2016, 12:55 p.m. UTC | #1
On Fri, Aug 26, 2016 at 12:30 AM, Chris Packham <judge.packham@gmail.com> wrote:
> 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>
Joe Hershberger Oct. 13, 2016, 5:38 p.m. UTC | #2
Hi Chris,

https://patchwork.ozlabs.org/patch/662992/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
index 74d5609..7385848 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -40,7 +40,7 @@ 
 
 #define PHY_AUTONEGOTIATE_TIMEOUT	5000
 
-#define PORT_COUNT			7
+#define PORT_COUNT			11
 #define PORT_MASK			((1 << PORT_COUNT) - 1)
 
 /* Device addresses */
@@ -167,6 +167,8 @@ 
 #endif
 
 /* ID register values for different switch models */
+#define PORT_SWITCH_ID_6096		0x0980
+#define PORT_SWITCH_ID_6097		0x0990
 #define PORT_SWITCH_ID_6172		0x1720
 #define PORT_SWITCH_ID_6176		0x1760
 #define PORT_SWITCH_ID_6240		0x2400
@@ -580,7 +582,7 @@  static int mv88e61xx_port_enable(struct phy_device *phydev, u8 port)
 }
 
 static int mv88e61xx_port_set_vlan(struct phy_device *phydev, u8 port,
-							u8 mask)
+							u16 mask)
 {
 	int val;
 
@@ -974,9 +976,21 @@  static struct phy_driver mv88e61xx_driver = {
 	.shutdown = &genphy_shutdown,
 };
 
+static struct phy_driver mv88e609x_driver = {
+	.name = "Marvell MV88E609x",
+	.uid = 0x1410c89,
+	.mask = 0xfffffff0,
+	.features = PHY_GBIT_FEATURES,
+	.probe = mv88e61xx_probe,
+	.config = mv88e61xx_phy_config,
+	.startup = mv88e61xx_phy_startup,
+	.shutdown = &genphy_shutdown,
+};
+
 int phy_mv88e61xx_init(void)
 {
 	phy_register(&mv88e61xx_driver);
+	phy_register(&mv88e609x_driver);
 
 	return 0;
 }