am335x_evm: Fix Ethernet LED issue on BeagleBone
PATCH 1/1 am335x_evm: Fix Ethernet LED issue on BeagleBone
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.
--- arch/arm/include/asm/arch-am33xx/cpu.h | 1 + board/ti/am335x/board.c | 8 ++++++++ 2 files changed, 9 insertions(+)
arch/arm/include/asm/arch-am33xx/cpu.h +1 -0
@@ -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
board/ti/am335x/board.c +8 -0
@@ -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 }
Signature · 1 line
1.7.10.4
Andrew Bradford
NAKPATCH 1/1 am335x_evm: Fix Ethernet LED issue on BeagleBone
Dear Tom,
Quoted 46 lines · On Tue, 6 Nov 2012 16:37:18 -0500 Andrew Bradford…
The default value for
PRM_RSTTIME1on am335x is0x06leading to a very short assertion ofSYS_RESETnon BeagleBones. ForPRM_RSTTIME1values less than0x80, 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_RSTTIME1to0x80to provide a longer assertion ofSYS_RESETnallowing the SMSC PHY more time to sample the strapping resistors which set the LED orientation.Signed-off-by Andrew Bradford <[email protected]>--- arch/arm/include/asm/arch-am33xx/cpu.h | 1 + board/ti/am335x/board.c | 8 ++++++++ 2 files changed, 9 insertions(+)(quoted diff) +0
-0
b/arch/arm/include/asm/arch-am33xx/cpu.hindex 819fd2f..bcd2fb0 100644arch/arm/include/asm/arch-am33xx/cpu.h +1
-0@@ -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 0x01board/ti/am335x/board.c +4
-0@@ -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
board/ti/am335x/board.c +1
-0+* strapping resistors are properly read on warm software reset
board/ti/am335x/board.c +1
-0+* to reduce the chance of Ethernet LEDs being inverted.
board/ti/am335x/board.c void s_init(void) · line 316
Quoted 4 lines
board/ti/am335x/board.c +2
-0+*/ +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