From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] sunxi: support multiple memory banks
Date: Fri, 20 Jul 2018 04:44:49 +0300 [thread overview]
Message-ID: <20180720044449.129406af@i7> (raw)
In-Reply-To: <20180720041324.0624148a@i7>
On Fri, 20 Jul 2018 04:13:24 +0300
Siarhei Siamashka <siarhei.siamashka@gmail.com> wrote:
> On Wed, 18 Jul 2018 23:42:07 +0200
> michael vogt <michu@neophob.com> wrote:
>
> > Hi
> >
> > I would like to support 4 memory chips for a sunxi board (a20).
> >
> > the current configuration in the sunxi-common.h looks like this:
> >
> > #define CONFIG_NR_DRAM_BANKS 1
> > #define PHYS_SDRAM_0 CONFIG_SYS_SDRAM_BASE
> > #define PHYS_SDRAM_0_SIZE 0x80000000 /* 2 GiB */
> >
> > which seems to match the memory map for the a20.
> >
> > Question:
> > While addressing 2gb ram works using one dram bank - will it work if there are two dram banks needed?
>
> These defines in U-Boot are not directly related to the DRAM
> controller setup. They just allow to have multiple disconnected
> DRAM areas in the physical address space, but on Allwinner
> hardware the DRAM is typically (or even always?) represented
> as a single contiguous chunk of memory in the address space.
>
> Did you actually mean support for multiple ranks?
> https://en.wikipedia.org/wiki/Memory_rank
>
> To the best of my knowledge the A20 SoC has one chip select
> pin (SCS), so it might support more than one rank. That said,
> I'm not aware of any existing A10 or A20 board with a
> double rank DRAM configuration. And the DRAM init code in
> U-Boot for the A10/A13/A20 SoCs does not support multiple
> ranks at the moment (since it was not possible to test
> such configuration on real hardware).
>
> If somebody wants to use 2GB on an A20 board in a two ranks
> configuration, then it's probably best to design such board
> using the boot0 bootloader from the Allwinner's BSP for the
> initial testing. And then after everything works correctly,
> add the necessary changes to the DRAM init code in U-boot.
> I could provide some help with getting this done.
Hmm, actually with just a single chip select pin, A20 probably
only supports one rank. There was a blog post from Olimex about
the differences between A10 and A20:
https://olimex.wordpress.com/2013/04/05/allwinners-a10-and-a20-are-they-really-pin-to-pin-compatible-and-drop-in-replacement/
Basically, the second chip select pin (SCS1) had been replaced
by an extra address line (A15) in A20, which allowed to have
2GB RAM using four x8 DRAM chips in a single rank configuration.
A good example of such board is Cubietruck.
It is A10 SoC that theoretically supports multiple ranks. But
again, I'm not aware of any real A10 device with 2GB of RAM and
using the double rank configuration.
--
Best regards,
Siarhei Siamashka
prev parent reply other threads:[~2018-07-20 1:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 21:42 [U-Boot] sunxi: support multiple memory banks michael vogt
2018-07-20 1:13 ` Siarhei Siamashka
2018-07-20 1:44 ` Siarhei Siamashka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180720044449.129406af@i7 \
--to=siarhei.siamashka@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox