From patchwork Tue Dec 13 13:04:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: clalancette@gmail.com X-Patchwork-Id: 131076 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 67F6B1007D3 for ; Wed, 14 Dec 2011 00:04:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 29C96283B8; Tue, 13 Dec 2011 14:04:37 +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 Ypm13o+Vjxj8; Tue, 13 Dec 2011 14:04:36 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0A407283B2; Tue, 13 Dec 2011 14:04:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98EC6283B2 for ; Tue, 13 Dec 2011 14:04:29 +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 3RyDqiPkywtA for ; Tue, 13 Dec 2011 14:04:28 +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 mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by theia.denx.de (Postfix) with ESMTPS id 7E792283B1 for ; Tue, 13 Dec 2011 14:04:25 +0100 (CET) Received: by qcsf15 with SMTP id f15so4347320qcs.3 for ; Tue, 13 Dec 2011 05:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=6+s3ZAnW1ly9anON+olLvvMSTO0KIeukWGkzv4Z9XCQ=; b=KdlzUt06ZqVkPE2fQoCXiVlc/dO+84Z0tSqIgVVz/QKpB3aXPPgqaFGBky190c6C2M eP3CnQNcuVhyWLtP9Du2rpJF5EjW4uU3edZWIu3nagrEkyJG+NoiWP6kCSlYu1++SLFx 23oEQw+N62MPrs03sMom55qxiwjfAXgggdRVY= Received: by 10.224.18.140 with SMTP id w12mr2420957qaa.60.1323781463886; Tue, 13 Dec 2011 05:04:23 -0800 (PST) Received: from IRBT-3092.wardrobe.irobot.com (206.83.81.178.ptr.us.xo.net. [206.83.81.178]) by mx.google.com with ESMTPS id du5sm43477456qab.14.2011.12.13.05.04.22 (version=SSLv3 cipher=OTHER); Tue, 13 Dec 2011 05:04:23 -0800 (PST) From: clalancette@gmail.com To: u-boot@lists.denx.de Date: Tue, 13 Dec 2011 08:04:19 -0500 Message-Id: <1323781459-9585-1-git-send-email-clalancette@gmail.com> X-Mailer: git-send-email 1.7.1 Subject: [U-Boot] [PATCH] omap4_panda: Initialize the USB phy 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 From: Chris Lalancette During misc_init_r, make sure to setup the clocks properly for the USB hub on the pandaboard. With this in place, the USB hub and the ethernet works on the pandaboard. Signed-off-by: Chris Lalancette --- arch/arm/include/asm/arch-omap4/omap.h | 42 ++++++++++++++++++++++++++++++++ board/ti/panda/panda.c | 16 ++++++++++++ 2 files changed, 58 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-omap4/omap.h b/arch/arm/include/asm/arch-omap4/omap.h index 4d8c89f..bdda199 100644 --- a/arch/arm/include/asm/arch-omap4/omap.h +++ b/arch/arm/include/asm/arch-omap4/omap.h @@ -165,6 +165,48 @@ struct control_lpddr2io_regs { unsigned int control_lpddr2io2_2; unsigned int control_lpddr2io2_3; }; + +struct omap4_scrm_regs { + u32 revision; /* 0x0000 */ + u32 pad00[63]; + u32 clksetuptime; /* 0x0100 */ + u32 pmicsetuptime; /* 0x0104 */ + u32 pad01[2]; + u32 altclksrc; /* 0x0110 */ + u32 pad02[2]; + u32 c2cclkm; /* 0x011c */ + u32 pad03[56]; + u32 extclkreq; /* 0x0200 */ + u32 accclkreq; /* 0x0204 */ + u32 pwrreq; /* 0x0208 */ + u32 pad04[1]; + u32 auxclkreq0; /* 0x0210 */ + u32 auxclkreq1; /* 0x0214 */ + u32 auxclkreq2; /* 0x0218 */ + u32 auxclkreq3; /* 0x021c */ + u32 auxclkreq4; /* 0x0220 */ + u32 auxclkreq5; /* 0x0224 */ + u32 pad05[3]; + u32 c2cclkreq; /* 0x0234 */ + u32 pad06[54]; + u32 auxclk0; /* 0x0310 */ + u32 auxclk1; /* 0x0314 */ + u32 auxclk2; /* 0x0318 */ + u32 auxclk3; /* 0x031c */ + u32 auxclk4; /* 0x0320 */ + u32 auxclk5; /* 0x0324 */ + u32 pad07[54]; + u32 rsttime_reg; /* 0x0400 */ + u32 pad08[6]; + u32 c2crstctrl; /* 0x041c */ + u32 extpwronrstctrl; /* 0x0420 */ + u32 pad09[59]; + u32 extwarmrstst_reg; /* 0x0510 */ + u32 apewarmrstst_reg; /* 0x0514 */ + u32 pad10[1]; + u32 c2cwarmrstst_reg; /* 0x051C */ +}; + #endif /* __ASSEMBLY__ */ /* diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index b4271fb..6f847c4 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -33,6 +33,8 @@ const struct omap_sysinfo sysinfo = { "Board: OMAP4 Panda\n" }; +struct omap4_scrm_regs *const scrm = (struct omap4_scrm_regs *)0x4a30a000; + /** * @brief board_init * @@ -62,6 +64,20 @@ int board_eth_init(bd_t *bis) */ int misc_init_r(void) { + if (omap_revision() != OMAP4430_ES1_0) { + /* Enable the USB phy */ + /* enable software ioreq */ + sr32(&scrm->auxclk3, 8, 1, 0x1); + /* set for sys_clk (38.4MHz) */ + sr32(&scrm->auxclk3, 1, 2, 0x0); + /* set divisor to 2 */ + sr32(&scrm->auxclk3, 16, 4, 0x1); + /* set the clock source to active */ + sr32(&scrm->altclksrc, 0, 1, 0x1); + /* enable clocks */ + sr32(&scrm->altclksrc, 2, 2, 0x3); + } + return 0; }