From patchwork Tue Nov 6 21:37:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Bradford X-Patchwork-Id: 197551 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8AD292C0092 for ; Wed, 7 Nov 2012 08:37:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 23F074A5AE; Tue, 6 Nov 2012 22:37:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jKWdMvQ2f9Ys; Tue, 6 Nov 2012 22:37:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0EA2A4A5AF; Tue, 6 Nov 2012 22:37:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 357384A5AF for ; Tue, 6 Nov 2012 22:37:28 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C+y6uyJvH0HN for ; Tue, 6 Nov 2012 22:37:27 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by theia.denx.de (Postfix) with ESMTPS id 390764A5AE for ; Tue, 6 Nov 2012 22:37:25 +0100 (CET) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 7462B2080B; Tue, 6 Nov 2012 16:37:24 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 06 Nov 2012 16:37:24 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= bradfordembedded.com; h=from:to:cc:subject:date:message-id; s= mesmtp; bh=wOQkUpePXHUct1EpnOwu36QFgo0=; b=CSCIuCpBz/6XP29inJXPL ZHZPvpdmCPA+ZIDpWdztLlBntcv5WJu8UIAY7uuNF3Ms2Du7Hs6H+rN6oD7e6Mn7 6KUr7v060ljpv1GXaP4Ei1NL1xLSji2TCAkztD1G37/faKacWxUrBtVJ/Jf2FXbL rQLCKQxphN5IR5WkC1W+58= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:date:message-id; s= smtpout; bh=wOQkUpePXHUct1EpnOwu36QFgo0=; b=bluJAEhShu02v90DQ4Du eoOUwPOWEtv9cI0eWVrtK+TjHKNR0AcCcBZbSaBQkQBAR2dySBaq3NTpZhIdBk8q NzaLwbQ6zuIGEiaReO61/bxHTrzZggSdfA1X5WJ/CksJqGa0hd2/JbDGxEqGwvl4 qbd67LBHjLZKT2h+5Qqu+U8= X-Sasl-enc: UeVKdoULFF8s+8pcSZSXnWC/dm8GnocLENVKYRVbvCpV 1352237844 Received: from localhost.localdomain (unknown [173.225.52.244]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A8078E01F8; Tue, 6 Nov 2012 16:37:24 -0500 (EST) From: Andrew Bradford To: u-boot@lists.denx.de Date: Tue, 6 Nov 2012 16:37:18 -0500 Message-Id: <1352237838-22552-1-git-send-email-andrew@bradfordembedded.com> X-Mailer: git-send-email 1.7.10.4 Subject: [U-Boot] [PATCH] am335x_evm: Fix Ethernet LED issue on BeagleBone X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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 }