public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
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:13:24 +0300	[thread overview]
Message-ID: <20180720041324.0624148a@i7> (raw)
In-Reply-To: <018D2053-E70E-41C9-95E2-78E4AFDF7CF9@neophob.com>

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.

-- 
Best regards,
Siarhei Siamashka

  reply	other threads:[~2018-07-20  1:13 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 [this message]
2018-07-20  1:44   ` Siarhei Siamashka

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=20180720041324.0624148a@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