public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] am335x_evm: Fix Ethernet LED issue on BeagleBone
@ 2012-11-06 21:37 Andrew Bradford
  2012-11-20 21:26 ` Andrew Bradford
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Bradford @ 2012-11-06 21:37 UTC (permalink / raw)
  To: u-boot

The default value for PRM_RSTTIME1 on am335x is 0x06 leading to a very
short assertion of SYS_RESETn on BeagleBones.  For PRM_RSTTIME1 values
less than 0x80, some BeagleBones will end up with inverted Ethernet LEDs
upon warm software reset leading to incorrect display of the Ethernet
link status on the Ethernet jack.

Extend PRM_RSTTIME1 to 0x80 to provide a longer assertion of SYS_RESETn
allowing the SMSC PHY more time to sample the strapping resistors which
set the LED orientation.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
---
 arch/arm/include/asm/arch-am33xx/cpu.h |    1 +
 board/ti/am335x/board.c                |    8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h
index 819fd2f..bcd2fb0 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -53,6 +53,7 @@
 /* Reset control */
 #ifdef CONFIG_AM33XX
 #define PRM_RSTCTRL			0x44E00F00
+#define PRM_RSTTIME			0x44E00F04
 #define PRM_RSTST			0x44E00F08
 #endif
 #define PRM_RSTCTRL_RESET		0x01
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b56a801..7c23a6e 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -304,6 +304,14 @@ void s_init(void)
 	else
 		config_ddr(266, MT47H128M16RT25E_IOCTRL_VALUE, &ddr2_data,
 			   &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data);
+
+	if (board_is_bone())
+		/*
+		 * For BeagleBone, extend PRM_RSTTIME1 to ensure SMSC PHY
+		 * strapping resistors are properly read on warm software reset
+		 * to reduce the chance of Ethernet LEDs being inverted.
+		 */
+		writeb(0x80, PRM_RSTTIME);
 #endif
 }
 
-- 
1.7.10.4

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

* [U-Boot] [PATCH] am335x_evm: Fix Ethernet LED issue on BeagleBone
  2012-11-06 21:37 [U-Boot] [PATCH] am335x_evm: Fix Ethernet LED issue on BeagleBone Andrew Bradford
@ 2012-11-20 21:26 ` Andrew Bradford
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Bradford @ 2012-11-20 21:26 UTC (permalink / raw)
  To: u-boot

Dear Tom,

On Tue,  6 Nov 2012 16:37:18 -0500
Andrew Bradford <andrew@bradfordembedded.com> wrote:

> The default value for PRM_RSTTIME1 on am335x is 0x06 leading to a very
> short assertion of SYS_RESETn on BeagleBones.  For PRM_RSTTIME1 values
> less than 0x80, some BeagleBones will end up with inverted Ethernet
> LEDs upon warm software reset leading to incorrect display of the
> Ethernet link status on the Ethernet jack.
> 
> Extend PRM_RSTTIME1 to 0x80 to provide a longer assertion of
> SYS_RESETn allowing the SMSC PHY more time to sample the strapping
> resistors which set the LED orientation.
> 
> Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
> ---
>  arch/arm/include/asm/arch-am33xx/cpu.h |    1 +
>  board/ti/am335x/board.c                |    8 ++++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h
> b/arch/arm/include/asm/arch-am33xx/cpu.h index 819fd2f..bcd2fb0 100644
> --- a/arch/arm/include/asm/arch-am33xx/cpu.h
> +++ b/arch/arm/include/asm/arch-am33xx/cpu.h
> @@ -53,6 +53,7 @@
>  /* Reset control */
>  #ifdef CONFIG_AM33XX
>  #define PRM_RSTCTRL			0x44E00F00
> +#define PRM_RSTTIME			0x44E00F04
>  #define PRM_RSTST			0x44E00F08
>  #endif
>  #define PRM_RSTCTRL_RESET		0x01
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index b56a801..7c23a6e 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -304,6 +304,14 @@ void s_init(void)
>  	else
>  		config_ddr(266, MT47H128M16RT25E_IOCTRL_VALUE,
> &ddr2_data, &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data);
> +
> +	if (board_is_bone())
> +		/*
> +		 * For BeagleBone, extend PRM_RSTTIME1 to ensure
> SMSC PHY
> +		 * strapping resistors are properly read on warm
> software reset
> +		 * to reduce the chance of Ethernet LEDs being
> inverted.
> +		 */
> +		writeb(0x80, PRM_RSTTIME);
>  #endif
>  }
>  

NAK.

Please do not apply this patch.  It does not accomplish the desired
goal (fixing Ethernet LED inversion) when some capes are connected to
BeagleBone and is not be the proper way to resolve the issue.

Thanks,
Andrew

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

end of thread, other threads:[~2012-11-20 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 21:37 [U-Boot] [PATCH] am335x_evm: Fix Ethernet LED issue on BeagleBone Andrew Bradford
2012-11-20 21:26 ` Andrew Bradford

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