public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Add Marvell 88E1118 support for TSEC
@ 2008-05-23 22:37 Ron Madrid
  2008-05-24  3:33 ` Ben Warren
  0 siblings, 1 reply; 2+ messages in thread
From: Ron Madrid @ 2008-05-23 22:37 UTC (permalink / raw)
  To: u-boot

Add Marvell 88E1118 support for TSEC

Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net>
---
 drivers/net/tsec.c |   31
+++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index c7af930..397ae71 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -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,
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot-Users] [PATCH] Add Marvell 88E1118 support for TSEC
  2008-05-23 22:37 [U-Boot-Users] [PATCH] Add Marvell 88E1118 support for TSEC Ron Madrid
@ 2008-05-24  3:33 ` Ben Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Warren @ 2008-05-24  3:33 UTC (permalink / raw)
  To: u-boot

Ron Madrid wrote:
> Add Marvell 88E1118 support for TSEC
>
> Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net>
> ---
>  drivers/net/tsec.c |   31
> +++++++++++++++++++++++++++++++
>  1 files changed, 31 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
> index c7af930..397ae71 100644
> --- a/drivers/net/tsec.c
> +++ b/drivers/net/tsec.c
> @@ -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,
>   
Applied to net repo.

Thanks,
Ben

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-24  3:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-23 22:37 [U-Boot-Users] [PATCH] Add Marvell 88E1118 support for TSEC Ron Madrid
2008-05-24  3:33 ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox