From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wg0-f43.google.com ([74.125.82.43]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YoaiY-0008Fq-CB for barebox@lists.infradead.org; Sat, 02 May 2015 16:56:43 +0000 Received: by wgen6 with SMTP id n6so114904713wge.3 for ; Sat, 02 May 2015 09:56:20 -0700 (PDT) Message-ID: <554500FC.2050607@vanguardiasur.com.ar> Date: Sat, 02 May 2015 13:53:16 -0300 From: Ezequiel Garcia MIME-Version: 1.0 References: <1428627830-17281-1-git-send-email-sebastian.hesselbarth@gmail.com> <1428627830-17281-2-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1428627830-17281-2-git-send-email-sebastian.hesselbarth@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 01/13] net: phy: Support Marvell 88E1318S PHY To: Sebastian Hesselbarth Cc: barebox@lists.infradead.org Hi Sebastian, On 04/09/2015 10:03 PM, Sebastian Hesselbarth wrote: > This adds support for the Marvell 88E1318S Gigabit Ethernet PHY. > > Signed-off-by: Sebastian Hesselbarth > --- > Cc: barebox@lists.infradead.org > --- > drivers/net/phy/marvell.c | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c > index aaf9f53451f4..6409f14ae2e2 100644 > --- a/drivers/net/phy/marvell.c > +++ b/drivers/net/phy/marvell.c > @@ -35,6 +35,9 @@ > #define MII_88E1121_PHY_MSCR_DELAY_MASK \ > (MII_88E1121_PHY_MSCR_RX_DELAY | MII_88E1121_PHY_MSCR_TX_DELAY) > > +#define MII_88E1318S_PHY_MSCR1_REG 16 > +#define MII_88E1318S_PHY_MSCR1_PAD_ODD BIT(6) > + > #define MII_88E1540_LED_PAGE 0x3 > #define MII_88E1540_LED_CONTROL 0x10 > > @@ -214,6 +217,25 @@ static int m88e1121_config_init(struct phy_device *phydev) > return 0; > } > > +static int m88e1318s_config_init(struct phy_device *phydev) > +{ > + u16 reg; > + int ret; > + > + ret = phy_write(phydev, MII_MARVELL_PHY_PAGE, > + MII_88E1121_PHY_MSCR_PAGE); > + if (ret < 0) > + return ret; > + > + reg = phy_read(phydev, MII_88E1318S_PHY_MSCR1_REG); > + reg |= MII_88E1318S_PHY_MSCR1_PAD_ODD; > + ret = phy_write(phydev, MII_88E1318S_PHY_MSCR1_REG, reg); > + if (ret < 0) > + return ret; > + > + return m88e1121_config_init(phydev); > +} > + > static struct phy_driver marvell_phys[] = { > { > .phy_id = MARVELL_PHY_ID_88E1121R, > @@ -225,6 +247,15 @@ static struct phy_driver marvell_phys[] = { > .read_status = marvell_read_status, > }, > { > + .phy_id = MARVELL_PHY_ID_88E1318S, > + .phy_id_mask = MARVELL_PHY_ID_MASK, > + .drv.name = "Marvell 88E1318S", > + .features = PHY_GBIT_FEATURES, > + .config_init = m88e1318s_config_init, > + .config_aneg = genphy_config_aneg, > + .read_status = marvell_read_status, > + }, > + { > .phy_id = MARVELL_PHY_ID_88E1543, > .phy_id_mask = MARVELL_PHY_ID_MASK, > .drv.name = "Marvell 88E1543", > With this commit, the Openblocks A6 PHY is not brought up, and so network is broken. I'll look into it (unless you have an idea), -- Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox