From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: barebox@lists.infradead.org
Subject: [PATCH 01/13] net: phy: Support Marvell 88E1318S PHY
Date: Fri, 10 Apr 2015 03:03:38 +0200 [thread overview]
Message-ID: <1428627830-17281-2-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
In-Reply-To: <1428627830-17281-1-git-send-email-sebastian.hesselbarth@gmail.com>
This adds support for the Marvell 88E1318S Gigabit Ethernet PHY.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
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",
--
2.1.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-04-10 1:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 1:03 [PATCH 00/13] Add support for Lenovo ix4-300d NAS Sebastian Hesselbarth
2015-04-10 1:03 ` Sebastian Hesselbarth [this message]
2015-05-02 16:53 ` [PATCH 01/13] net: phy: Support Marvell 88E1318S PHY Ezequiel Garcia
2015-05-02 20:28 ` Ezequiel Garcia
2015-05-03 9:50 ` Sebastian Hesselbarth
2015-05-03 22:47 ` Sebastian Hesselbarth
2015-05-05 12:06 ` Ezequiel Garcia
2015-04-10 1:03 ` [PATCH 02/13] gpio: Add driver for 74x164 compatible shift-registers Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 03/13] spi: ath79: move spidelay from spi-bitbang-txrx Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 04/13] spi: Add SPI GPIO bitbang driver Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 05/13] bus: mvebu-mbus: Remove coherency attribute Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 06/13] bus: mvebu-mbus: Drop device reference Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 07/13] bus: mvebu-mbus: Convert mbus platform driver to direct driver Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 08/13] ARM: mvebu: Move PCIe register defines to socid.h Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 09/13] ARM: mvebu: armada-xp: Fixup broken MV78230-A0 SoC ID Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 10/13] ARM: mvebu: armada-xp: Limit PUP access to Armada XP Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 11/13] ARM: mvebu: armada-xp: Use MBUS_ERR_PROP_EN define Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 12/13] ARM: mvebu: armada-xp: Sort boards and images alphabetically Sebastian Hesselbarth
2015-04-10 1:03 ` [PATCH 13/13] ARM: mvebu: armada-xp: Add Lenovo Iomega ix4-300d Sebastian Hesselbarth
2015-04-14 8:43 ` [PATCH 00/13] Add support for Lenovo ix4-300d NAS Sascha Hauer
2015-04-14 9:42 ` Sebastian Hesselbarth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428627830-17281-2-git-send-email-sebastian.hesselbarth@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox