[U-Boot] [PATCH v3 0/3] net: phy: Add Marvell M88E1512

These patches add support for the Marvell M88E1512 PHY.
It turns out that it behaves exactly the same as 88E1518, so it's just a matter of fixing up the uid/mask.
Phil Edworthy (3): net: phy: Fix mask so that we can identify Marvell 88E1518 net: phy: Add support for Marvell M88E1512 net: phy: Marvell: Use phy_interface_is_rgmii helper function
drivers/net/phy/marvell.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)

The mask for the 88E1510 meant that the 88E1518 code would never be used.
Signed-off-by: Phil Edworthy phil.edworthy@renesas.com Reviewed-by: Stefan Roese sr@denx.de Acked-by: Joe Hershberger joe.hershberger@ni.com --- Note: This has only been tested on a board that uses a Marvell 88E1512 PHY, see subsequent patches.
v3: No changes v2: No changes --- drivers/net/phy/marvell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 4eeb0f6..06029c0 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -553,7 +553,7 @@ static struct phy_driver M88E1149S_driver = { static struct phy_driver M88E1510_driver = { .name = "Marvell 88E1510", .uid = 0x1410dd0, - .mask = 0xffffff0, + .mask = 0xfffffff, .features = PHY_GBIT_FEATURES, .config = &m88e1510_config, .startup = &m88e1011s_startup, @@ -563,7 +563,7 @@ static struct phy_driver M88E1510_driver = { static struct phy_driver M88E1518_driver = { .name = "Marvell 88E1518", .uid = 0x1410dd1, - .mask = 0xffffff0, + .mask = 0xfffffff, .features = PHY_GBIT_FEATURES, .config = &m88e1518_config, .startup = &m88e1011s_startup,


This device also works with the 88E1518 code, so we just adjust the UID mask accordingly.
Signed-off-by: Phil Edworthy phil.edworthy@renesas.com --- v3: Correct the mask. v2: Don't add a new entry, just adjust the UID mask. --- drivers/net/phy/marvell.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 06029c0..4ddb85d 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -560,10 +560,15 @@ static struct phy_driver M88E1510_driver = { .shutdown = &genphy_shutdown, };
+/* + * This supports: + * 88E1518, uid 0x1410dd1 + * 88E1512, uid 0x1410dd4 + */ static struct phy_driver M88E1518_driver = { .name = "Marvell 88E1518", - .uid = 0x1410dd1, - .mask = 0xfffffff, + .uid = 0x1410dd0, + .mask = 0xffffffa, .features = PHY_GBIT_FEATURES, .config = &m88e1518_config, .startup = &m88e1011s_startup,

On Mon, Dec 12, 2016 at 6:54 AM, Phil Edworthy phil.edworthy@renesas.com wrote:
This device also works with the 88E1518 code, so we just adjust the UID mask accordingly.
Signed-off-by: Phil Edworthy phil.edworthy@renesas.com
Acked-by: Joe Hershberger joe.hershberger@ni.com


Signed-off-by: Phil Edworthy phil.edworthy@renesas.com Reviewed-by: Stefan Roese sr@denx.de Acked-by: Joe Hershberger joe.hershberger@ni.com --- v3: No changes v2: No changes --- drivers/net/phy/marvell.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 4ddb85d..00d0719 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -177,10 +177,7 @@ static int m88e1111s_config(struct phy_device *phydev) { int reg;
- if ((phydev->interface == PHY_INTERFACE_MODE_RGMII) || - (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) || - (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) || - (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)) { + if (phy_interface_is_rgmii(phydev)) { reg = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_88E1111_PHY_EXT_CR); if ((phydev->interface == PHY_INTERFACE_MODE_RGMII) ||

participants (3)
-
Joe Hershberger
-
Joe Hershberger
-
Phil Edworthy