public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] DaVinci Network Driver Updates
@ 2009-05-12 15:45 s-paulraj at ti.com
  2009-05-18 12:33 ` Paulraj, Sandeep
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: s-paulraj at ti.com @ 2009-05-12 15:45 UTC (permalink / raw)
  To: u-boot

Different flavours of DaVinci SOC's have differences in their EMAC IP
This patch does the following
1) Updates base addresses for DM365
2) Updates MDIO frequencies for DM365 and DM646x
3) Update EMAC wrapper registers for DM365 and DM646x

Patch applies to u-boot-net git. the EMAC driver itself 
will be updated shortly to add support for DM365 and DM646x

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
---
 include/asm-arm/arch-davinci/emac_defs.h |   32 +++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-davinci/emac_defs.h b/include/asm-arm/arch-davinci/emac_defs.h
index c11161f..ae75f84 100644
--- a/include/asm-arm/arch-davinci/emac_defs.h
+++ b/include/asm-arm/arch-davinci/emac_defs.h
@@ -38,15 +38,38 @@
 
 #include <asm/arch/hardware.h>
 
+#ifdef CONFIG_SOC_DM365
+#define EMAC_BASE_ADDR			(0x01d07000)
+#define EMAC_WRAPPER_BASE_ADDR		(0x01d0a000)
+#define EMAC_WRAPPER_RAM_ADDR		(0x01d08000)
+#define EMAC_MDIO_BASE_ADDR		(0x01d0b000)
+#else
 #define EMAC_BASE_ADDR			(0x01c80000)
 #define EMAC_WRAPPER_BASE_ADDR		(0x01c81000)
 #define EMAC_WRAPPER_RAM_ADDR		(0x01c82000)
 #define EMAC_MDIO_BASE_ADDR		(0x01c84000)
+#endif
 
+#ifdef CONFIG_SOC_DM646x
+/* MDIO module input frequency */
+#define EMAC_MDIO_BUS_FREQ		76500000
+/* MDIO clock output frequency */
+#define EMAC_MDIO_CLOCK_FREQ		2500000		/* 2.5 MHz */
+#elif defined(CONFIG_SOC_DM365)
+/* MDIO module input frequency */
+#define EMAC_MDIO_BUS_FREQ		121500000
+/* MDIO clock output frequency */
+#define EMAC_MDIO_CLOCK_FREQ		2200000		/* 2.2 MHz */
+#else
 /* MDIO module input frequency */
 #define EMAC_MDIO_BUS_FREQ		99000000	/* PLL/6 - 99 MHz */
 /* MDIO clock output frequency */
 #define EMAC_MDIO_CLOCK_FREQ		2000000		/* 2.0 MHz */
+#endif
+
+/* PHY mask - set only those phy number bits where phy is/can be connected */
+#define EMAC_MDIO_PHY_NUM           1
+#define EMAC_MDIO_PHY_MASK          (1 << EMAC_MDIO_PHY_NUM)
 
 /* Ethernet Min/Max packet size */
 #define EMAC_MIN_ETHERNET_PKT_SIZE	60
@@ -103,6 +126,8 @@ typedef volatile struct _emac_desc
 
 #define EMAC_MACCONTROL_MIIEN_ENABLE		(0x20)
 #define EMAC_MACCONTROL_FULLDUPLEX_ENABLE	(0x1)
+#define EMAC_MACCONTROL_GIGABIT_ENABLE		(1 << 7)
+#define EMAC_MACCONTROL_GIGFORCE		(1 << 17)
 
 #define EMAC_RXMBPENABLE_RXCAFEN_ENABLE	(0x200000)
 #define EMAC_RXMBPENABLE_RXBROADEN	(0x2000)
@@ -258,12 +283,17 @@ typedef struct  {
 
 /* EMAC Wrapper Registers Structure */
 typedef struct  {
+#if defined(CONFIG_SOC_DM646x) || defined(CONFIG_SOC_DM365)
+	dv_reg		IDVER;
+	dv_reg		SOFTRST;
+	dv_reg		EMCTRL;
+#else
 	u_int8_t	RSVD0[4100];
 	dv_reg		EWCTL;
 	dv_reg		EWINTTCNT;
+#endif
 } ewrap_regs;
 
-
 /* EMAC MDIO Registers Structure */
 typedef struct  {
 	dv_reg		VERSION;
-- 
1.6.0.4

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

* [U-Boot] [PATCH] DaVinci Network Driver Updates
  2009-05-12 15:45 [U-Boot] [PATCH] DaVinci Network Driver Updates s-paulraj at ti.com
@ 2009-05-18 12:33 ` Paulraj, Sandeep
  2009-05-24 15:54 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-06-12 21:25 ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 6+ messages in thread
From: Paulraj, Sandeep @ 2009-05-18 12:33 UTC (permalink / raw)
  To: u-boot

 Ben,
     Any comments on this patch?

Thanks,
Sandeep

> -----Original Message-----
> From: Paulraj, Sandeep 
> Sent: Tuesday, May 12, 2009 11:46 AM
> To: u-boot at lists.denx.de
> Cc: Paulraj, Sandeep
> Subject: [PATCH] DaVinci Network Driver Updates
> 
> Different flavours of DaVinci SOC's have differences in their EMAC IP
> This patch does the following
> 1) Updates base addresses for DM365
> 2) Updates MDIO frequencies for DM365 and DM646x
> 3) Update EMAC wrapper registers for DM365 and DM646x
> 
> Patch applies to u-boot-net git. the EMAC driver itself 
> will be updated shortly to add support for DM365 and DM646x
> 
> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> ---
>  include/asm-arm/arch-davinci/emac_defs.h |   32 
> +++++++++++++++++++++++++++++-
>  1 files changed, 31 insertions(+), 1 deletions(-)
> 
> diff --git a/include/asm-arm/arch-davinci/emac_defs.h 
> b/include/asm-arm/arch-davinci/emac_defs.h
> index c11161f..ae75f84 100644
> --- a/include/asm-arm/arch-davinci/emac_defs.h
> +++ b/include/asm-arm/arch-davinci/emac_defs.h
> @@ -38,15 +38,38 @@
>  
>  #include <asm/arch/hardware.h>
>  
> +#ifdef CONFIG_SOC_DM365
> +#define EMAC_BASE_ADDR			(0x01d07000)
> +#define EMAC_WRAPPER_BASE_ADDR		(0x01d0a000)
> +#define EMAC_WRAPPER_RAM_ADDR		(0x01d08000)
> +#define EMAC_MDIO_BASE_ADDR		(0x01d0b000)
> +#else
>  #define EMAC_BASE_ADDR			(0x01c80000)
>  #define EMAC_WRAPPER_BASE_ADDR		(0x01c81000)
>  #define EMAC_WRAPPER_RAM_ADDR		(0x01c82000)
>  #define EMAC_MDIO_BASE_ADDR		(0x01c84000)
> +#endif
>  
> +#ifdef CONFIG_SOC_DM646x
> +/* MDIO module input frequency */
> +#define EMAC_MDIO_BUS_FREQ		76500000
> +/* MDIO clock output frequency */
> +#define EMAC_MDIO_CLOCK_FREQ		2500000		/* 2.5 MHz */
> +#elif defined(CONFIG_SOC_DM365)
> +/* MDIO module input frequency */
> +#define EMAC_MDIO_BUS_FREQ		121500000
> +/* MDIO clock output frequency */
> +#define EMAC_MDIO_CLOCK_FREQ		2200000		/* 2.2 MHz */
> +#else
>  /* MDIO module input frequency */
>  #define EMAC_MDIO_BUS_FREQ		99000000	/* 
> PLL/6 - 99 MHz */
>  /* MDIO clock output frequency */
>  #define EMAC_MDIO_CLOCK_FREQ		2000000		/* 2.0 MHz */
> +#endif
> +
> +/* PHY mask - set only those phy number bits where phy 
> is/can be connected */
> +#define EMAC_MDIO_PHY_NUM           1
> +#define EMAC_MDIO_PHY_MASK          (1 << EMAC_MDIO_PHY_NUM)
>  
>  /* Ethernet Min/Max packet size */
>  #define EMAC_MIN_ETHERNET_PKT_SIZE	60
> @@ -103,6 +126,8 @@ typedef volatile struct _emac_desc
>  
>  #define EMAC_MACCONTROL_MIIEN_ENABLE		(0x20)
>  #define EMAC_MACCONTROL_FULLDUPLEX_ENABLE	(0x1)
> +#define EMAC_MACCONTROL_GIGABIT_ENABLE		(1 << 7)
> +#define EMAC_MACCONTROL_GIGFORCE		(1 << 17)
>  
>  #define EMAC_RXMBPENABLE_RXCAFEN_ENABLE	(0x200000)
>  #define EMAC_RXMBPENABLE_RXBROADEN	(0x2000)
> @@ -258,12 +283,17 @@ typedef struct  {
>  
>  /* EMAC Wrapper Registers Structure */
>  typedef struct  {
> +#if defined(CONFIG_SOC_DM646x) || defined(CONFIG_SOC_DM365)
> +	dv_reg		IDVER;
> +	dv_reg		SOFTRST;
> +	dv_reg		EMCTRL;
> +#else
>  	u_int8_t	RSVD0[4100];
>  	dv_reg		EWCTL;
>  	dv_reg		EWINTTCNT;
> +#endif
>  } ewrap_regs;
>  
> -
>  /* EMAC MDIO Registers Structure */
>  typedef struct  {
>  	dv_reg		VERSION;
> -- 
> 1.6.0.4
> 
> 

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

* [U-Boot] [PATCH] DaVinci Network Driver Updates
  2009-05-12 15:45 [U-Boot] [PATCH] DaVinci Network Driver Updates s-paulraj at ti.com
  2009-05-18 12:33 ` Paulraj, Sandeep
@ 2009-05-24 15:54 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-05-24 20:26   ` Ben Warren
  2009-06-12 21:25 ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 1 reply; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-24 15:54 UTC (permalink / raw)
  To: u-boot

On 11:45 Tue 12 May     , s-paulraj at ti.com wrote:
> Different flavours of DaVinci SOC's have differences in their EMAC IP
> This patch does the following
> 1) Updates base addresses for DM365
> 2) Updates MDIO frequencies for DM365 and DM646x
> 3) Update EMAC wrapper registers for DM365 and DM646x
> 
> Patch applies to u-boot-net git. the EMAC driver itself 
> will be updated shortly to add support for DM365 and DM646x
> 
> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> ---
Ben if you are ok I'll apply it

Best Regards,
J.

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

* [U-Boot] [PATCH] DaVinci Network Driver Updates
  2009-05-24 15:54 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-05-24 20:26   ` Ben Warren
  2009-06-10 21:03     ` Paulraj, Sandeep
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2009-05-24 20:26 UTC (permalink / raw)
  To: u-boot

On Sun, May 24, 2009 at 8:54 AM, Jean-Christophe PLAGNIOL-VILLARD <
plagnioj@jcrosoft.com> wrote:

> On 11:45 Tue 12 May     , s-paulraj at ti.com wrote:
> > Different flavours of DaVinci SOC's have differences in their EMAC IP
> > This patch does the following
> > 1) Updates base addresses for DM365
> > 2) Updates MDIO frequencies for DM365 and DM646x
> > 3) Update EMAC wrapper registers for DM365 and DM646x
> >
> > Patch applies to u-boot-net git. the EMAC driver itself
> > will be updated shortly to add support for DM365 and DM646x
> >
> > Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> > ---
> Ben if you are ok I'll apply it
>
Acked-by Ben Warren <biggerbadderben@gmail.com>


>
> Best Regards,
> J.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

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

* [U-Boot] [PATCH] DaVinci Network Driver Updates
  2009-05-24 20:26   ` Ben Warren
@ 2009-06-10 21:03     ` Paulraj, Sandeep
  0 siblings, 0 replies; 6+ messages in thread
From: Paulraj, Sandeep @ 2009-06-10 21:03 UTC (permalink / raw)
  To: u-boot

Jean-Christophe,

Has this been applied?

It appears as if it has not been applied

Thanks,
Sandeep

________________________________
From: Ben Warren [mailto:biggerbadderben at gmail.com]
Sent: Sunday, May 24, 2009 4:27 PM
To: Jean-Christophe PLAGNIOL-VILLARD
Cc: Paulraj, Sandeep; u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] DaVinci Network Driver Updates


On Sun, May 24, 2009 at 8:54 AM, Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com<mailto:plagnioj@jcrosoft.com>> wrote:
On 11:45 Tue 12 May     , s-paulraj at ti.com<mailto:s-paulraj@ti.com> wrote:
> Different flavours of DaVinci SOC's have differences in their EMAC IP
> This patch does the following
> 1) Updates base addresses for DM365
> 2) Updates MDIO frequencies for DM365 and DM646x
> 3) Update EMAC wrapper registers for DM365 and DM646x
>
> Patch applies to u-boot-net git. the EMAC driver itself
> will be updated shortly to add support for DM365 and DM646x
>
> Signed-off-by: Sandeep Paulraj <s-paulraj at ti.com<mailto:s-paulraj@ti.com>>
> ---
Ben if you are ok I'll apply it
Acked-by Ben Warren <biggerbadderben at gmail.com<mailto:biggerbadderben@gmail.com>>


Best Regards,
J.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de<mailto:U-Boot@lists.denx.de>
http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH] DaVinci Network Driver Updates
  2009-05-12 15:45 [U-Boot] [PATCH] DaVinci Network Driver Updates s-paulraj at ti.com
  2009-05-18 12:33 ` Paulraj, Sandeep
  2009-05-24 15:54 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-06-12 21:25 ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-06-12 21:25 UTC (permalink / raw)
  To: u-boot

On 11:45 Tue 12 May     , s-paulraj at ti.com wrote:
> Different flavours of DaVinci SOC's have differences in their EMAC IP
> This patch does the following
> 1) Updates base addresses for DM365
> 2) Updates MDIO frequencies for DM365 and DM646x
> 3) Update EMAC wrapper registers for DM365 and DM646x
> 
> Patch applies to u-boot-net git. the EMAC driver itself 
> will be updated shortly to add support for DM365 and DM646x
> 
> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> ---
>  include/asm-arm/arch-davinci/emac_defs.h |   32 +++++++++++++++++++++++++++++-
>  1 files changed, 31 insertions(+), 1 deletions(-)
applied to u-boot-arm/next

Best Regards,
J.

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

end of thread, other threads:[~2009-06-12 21:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 15:45 [U-Boot] [PATCH] DaVinci Network Driver Updates s-paulraj at ti.com
2009-05-18 12:33 ` Paulraj, Sandeep
2009-05-24 15:54 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-24 20:26   ` Ben Warren
2009-06-10 21:03     ` Paulraj, Sandeep
2009-06-12 21:25 ` Jean-Christophe PLAGNIOL-VILLARD

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