summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorClemens Gruber <clemens.gruber@pqgruber.com>2015-06-06 14:44:58 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2015-08-11 13:29:01 -0500
commit8396d0ab8b46907bd89e9f3a35fbb727f077d28a (patch)
tree76bbef80f0ae5314dcf97dcd8751bb5229834526 /drivers/net
parent90a94ef6521b0a512c594d8d1cbcd8093fdecfb5 (diff)
downloadu-boot-imx-8396d0ab8b46907bd89e9f3a35fbb727f077d28a.zip
u-boot-imx-8396d0ab8b46907bd89e9f3a35fbb727f077d28a.tar.gz
u-boot-imx-8396d0ab8b46907bd89e9f3a35fbb727f077d28a.tar.bz2
net: Add support for Marvell 88E1510 PHY
Support the 88E1510 PHY which is very similar to the 88E1518. I also set the INTn output and configured the LEDs. Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Hao Zhang <hzhang@ti.com> Cc: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/phy/marvell.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index cff5c87..eab1558 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -336,6 +336,25 @@ static int m88e1518_config(struct phy_device *phydev)
return m88e1111s_config(phydev);
}
+/* Marvell 88E1510 */
+static int m88e1510_config(struct phy_device *phydev)
+{
+ /* Select page 3 */
+ phy_write(phydev, MDIO_DEVAD_NONE, 22, 3);
+
+ /* Enable INTn output on LED[2] */
+ m88e1518_phy_writebits(phydev, 18, 7, 1, 1);
+
+ /* Configure LEDs */
+ m88e1518_phy_writebits(phydev, 16, 0, 4, 3); /* LED[0]:0011 (ACT) */
+ m88e1518_phy_writebits(phydev, 16, 4, 4, 6); /* LED[1]:0110 (LINK) */
+
+ /* Reset page selection */
+ phy_write(phydev, MDIO_DEVAD_NONE, 22, 0);
+
+ return m88e1518_config(phydev);
+}
+
/* Marvell 88E1118 */
static int m88e1118_config(struct phy_device *phydev)
{
@@ -548,6 +567,16 @@ static struct phy_driver M88E1149S_driver = {
.shutdown = &genphy_shutdown,
};
+static struct phy_driver M88E1510_driver = {
+ .name = "Marvell 88E1510",
+ .uid = 0x1410dd0,
+ .mask = 0xffffff0,
+ .features = PHY_GBIT_FEATURES,
+ .config = &m88e1510_config,
+ .startup = &m88e1011s_startup,
+ .shutdown = &genphy_shutdown,
+};
+
static struct phy_driver M88E1518_driver = {
.name = "Marvell 88E1518",
.uid = 0x1410dd1,
@@ -578,6 +607,7 @@ int phy_marvell_init(void)
phy_register(&M88E1118R_driver);
phy_register(&M88E1111S_driver);
phy_register(&M88E1011S_driver);
+ phy_register(&M88E1510_driver);
phy_register(&M88E1518_driver);
return 0;