From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 22 May 2012 08:39:30 -0700 Subject: [U-Boot] [PATCH 5/7] OMAP5: EMIF: Add support for DDR3 device In-Reply-To: References: <1337681007-22709-1-git-send-email-lokeshvutla@ti.com> <1337681007-22709-6-git-send-email-lokeshvutla@ti.com> <20120522144151.GA21740@bill-the-cat> <20120522151813.GB21740@bill-the-cat> Message-ID: <4FBBB332.2040409@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/22/2012 08:27 AM, R, Sricharan wrote: >>>>> - ? ? if (!in_sdram) >>>>> - ? ? ? ? ? ? lpddr2_init(base, regs); >>>>> + ? ? if (!in_sdram) { >>>>> + ? ? ? ? ? ? if (omap_revision() != OMAP5432_ES1_0) >>>>> + ? ? ? ? ? ? ? ? ? ? lpddr2_init(base, regs); >>>>> + ? ? ? ? ? ? else >>>>> + ? ? ? ? ? ? ? ? ? ? ddr3_init(base, regs); >>>>> + ? ? } >>>> >>>> In omap4+ land do we have any other way of telling which family we're >>>> on? ?I ask since I'm preparing to add DDR3 support to am33xx and I'd >>>> like to switch it over to the common emif framework as well. >>>> >>> I think the SDRAM_TYPE[31:29] EMIF_SDRAM_CONFIG >>> register should tell the connected device at reset. >>> I will cross confirm this on the board and tell. >> >> OK. I can't find the omap5430 TRM quickly but on the am335x one, >> SDRAM_TYPE is 3 for DDR3, 2 for DDR2 and 1 for LPDDR1 and 0 for DDR1. > > ah, this is what is there on OMAP5. > 3 for DDR3 > 4 for LPDDR2-S4, > 5 for LPDDR2-S2 4/5 are listed as reserved here :( http://www.ti.com/lit/pdf/spruh73 > Atleast DDR3 encoding is same. So we can differentiate bw DDR3 and 2 > in same way. > Is the reset value set correctly on am335x according to the device connected? I'll have to do some checking as the code doesn't check that today. -- Tom