public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ron Madrid <ron_madrid@sbcglobal.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add support for Marvell 88E1118 phy to drivers/net/tsec.c
Date: Wed, 21 May 2008 12:52:35 -0700 (PDT)	[thread overview]
Message-ID: <50836.52519.qm@web83515.mail.sp1.yahoo.com> (raw)

Add support for Marvell 88E1118 phy to
drivers/net/tsec.c

Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net>

--- clean_u-boot-1.3.3/drivers/net/tsec.c	2008-05-19
03:47:11.000000000 -0700
+++ u-boot-1.3.3/drivers/net/tsec.c	2008-05-20
12:40:14.000000000 -0700
@@ -1128,6 +1128,36 @@ struct phy_info
phy_info_M88E1111S = {
 			   },
 };
 
+struct phy_info phy_info_M88E1118 = {
+	0x01410e1,
+	"Marvell 88E1118",
+	4,
+	(struct phy_cmd[]){	/* config */
+		/* Reset and configure the PHY */
+		{MIIM_CONTROL, MIIM_CONTROL_RESET, NULL},
+		{0x16, 0x0002, NULL}, /* Change Page Number */
+		{0x15, 0x1070, NULL}, /* Delay RGMII TX and RX */
+		{MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL},
+		{MIIM_ANAR, MIIM_ANAR_INIT, NULL},
+		{MIIM_CONTROL, MIIM_CONTROL_RESET, NULL},
+		{MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init},
+		{miim_end,}
+		},
+	(struct phy_cmd[]){	/* startup */
+		{0x16, 0x0000, NULL}, /* Change Page Number */
+		/* Status is read once to clear old link state */
+		{MIIM_STATUS, miim_read, NULL},
+		/* Auto-negotiate */
+		/* Read the status */
+		{MIIM_88E1011_PHY_STATUS, miim_read,
+		 &mii_parse_88E1011_psr},
+		{miim_end,}
+		},
+	(struct phy_cmd[]){	/* shutdown */
+		{miim_end,}
+		},
+};
+
 static unsigned int m88e1145_setmode(uint mii_reg,
struct tsec_private *priv)
 {
 	uint mii_data = read_phy_reg(priv, mii_reg);
@@ -1492,6 +1522,7 @@ struct phy_info *phy_info[] = {
 	&phy_info_BCM5464S,
 	&phy_info_M88E1011S,
 	&phy_info_M88E1111S,
+	&phy_info_M88E1118,
 	&phy_info_M88E1145,
 	&phy_info_M88E1149S,
 	&phy_info_dm9161,

             reply	other threads:[~2008-05-21 19:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 19:52 Ron Madrid [this message]
2008-05-22  5:36 ` [U-Boot-Users] [PATCH] Add support for Marvell 88E1118 phy to drivers/net/tsec.c Jean-Christophe PLAGNIOL-VILLARD
2008-05-22 15:01   ` Ron Madrid
2008-05-22 16:30   ` Ben Warren
2008-05-22 16:39     ` Ron Madrid
2008-05-22 20:20     ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-23  6:21 ` Ben Warren

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=50836.52519.qm@web83515.mail.sp1.yahoo.com \
    --to=ron_madrid@sbcglobal.net \
    --cc=u-boot@lists.denx.de \
    /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