u-boot-brain/arch/arm/cpu
Siarhei Siamashka bf4ca384ad sunxi: dram: Autodetect DDR3 bus width and density
In the case if the 'dram_para' struct does not specify the exact bus
width or chip density, just use a trial and error method to find a
usable configuration.

Because all the major bugs in the DRAM initialization sequence are
now hopefully fixed, it should be safe to re-initialize the DRAM
controller multiple times until we get it configured right. The
original Allwinner's boot0 bootloader also used a similar
autodetection trick.

The DDR3 spec contains the package pinout and addressing table for
different possible chip densities. It appears to be impossible to
distinguish between a single chip with 16 I/O data lines and a pair
of chips with 8 I/O data lines in the case if they provide the same
storage capacity. Because a single 16-bit chip has a higher density
than a pair of equivalent 8-bit chips, it has stricter refresh timings.
So in the case of doubt, we assume that 16-bit chips are used.
Additionally, only Allwinner A20 has all A0-A15 address lines and
can support densities up to 8192. The older Allwinner A10 and
Allwinner A13 can only support densities up to 4096.

We deliberately leave out DDR2, dual-rank configurations and the
special case of a 8-bit chip with density 8192. None of these
configurations seem to have been ever used in real devices. And no
new devices are likely to use these exotic configurations (because
only up to 2GB of RAM can be populated in any case).

This DRAM autodetection feature potentially allows to have a single
low performance fail-safe DDR3 initialiazation for a universal single
bootloader binary, which can be compatible with all Allwinner
A10/A13/A20 based devices (if the ifdefs are replaced with a runtime
SoC type detection).

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-08-12 08:42:34 +02:00
..
arm720t spl: consolidate arch/arm/include/asm/arch-*/spl.h 2014-06-06 10:05:34 +02:00
arm920t arm: ep9315: Return back Cirrus Logic EDB9315A board support 2014-07-04 23:45:48 +02:00
arm926ejs ARM: kirkwood: add mvsdio driver 2014-08-01 18:44:56 +03:00
arm946es arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
arm1136 arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
arm1176 arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
arm_intcm arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
armv7 sunxi: dram: Autodetect DDR3 bus width and density 2014-08-12 08:42:34 +02:00
armv8 ARMv8/ls2085a_emu: Add LS2085A emulator and simulator board support 2014-07-04 19:48:41 +02:00
at91-common ARM: atmel: switch to main crystal osc for SPL boot 2014-05-27 00:10:40 +02:00
pxa arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
sa1100 arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
tegra20-common Merge branch 'u-boot/master' 2014-05-09 11:50:14 +02:00
tegra30-common ARM: tegra: Tegra30 pinmux cleanup 2014-04-17 08:41:05 -07:00
tegra114-common ARM: tegra: Tegra114 pinmux cleanup 2014-04-17 08:41:06 -07:00
tegra124-common ARM: tegra: Tegra124 pinmux cleanup 2014-04-17 08:41:06 -07:00
tegra-common ARM: tegra: add function to enable input clamping on tristate 2014-05-13 10:41:31 -07:00
Makefile kbuild: use boolean macros to select tegra*-common directory 2014-04-17 17:44:35 -04:00
u-boot-spl.lds arm: move exception handling out of start.S files 2014-05-15 16:24:53 +02:00
u-boot.lds ARM: HYP/non-sec: add separate section for secure code 2014-07-28 17:07:23 +02:00