All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] Re: [PATCH 0/7] ARM: sunxi: Add basic support for Allwinner A31 (sun6i)
Date: Thu, 18 Sep 2014 10:31:26 +0200	[thread overview]
Message-ID: <541A985E.5040305@redhat.com> (raw)
In-Reply-To: <20140918072757.3a12f16c@i7>

Hi,

On 09/18/2014 06:27 AM, Siarhei Siamashka wrote:
> On Tue, 09 Sep 2014 09:00:57 +0200
> Hans de Goede <hdegoede@redhat.com> wrote:
> 
>> Hi,
>>
>> On 09/08/2014 03:28 PM, Chen-Yu Tsai wrote:
>>> Hi everyone,
>>>
>>> This series add basic support for Allwinner's A31 SoC. The patches,
>>> excluding the first one, were cherry-picked from u-boot-sunxi. Due to
>>> the difference between u-boot mainline and u-boot-sunxi, some patches
>>> were rearranged or squashed to better fit the current state of u-boot,
>>> and not introduce any build breaks. It follows Ian's initial merge
>>> method of sun7i support: introducing various components first, then
>>> enabling them in the last commit. I tried to keep the commits separate,
>>> thus retaining the original author and Signed-off-bys.
>>>
>>> Patch 1 adds a wrapper around "func(USB, usb, 0)" in BOOT_TARGET_DEVICES
>>> to deal with breakage when USB support is not enabled.
>>>
>>> Patch 2 adds memory addresses for some hardware blocks new in sun6i.
>>>
>>> Patch 3 adds support for the new PRCM (power reset and clock management)
>>> block, which also contains PLL bias voltage control.
>>>
>>> Patch 4 adds support for the clock module. This patch is a bunch of
>>> different sun6i related patches on the clock code, from when sun6i
>>> support was introduced to u-boot-sunxi, up to its current form.
>>> This is done to avoid various conflicts and needlessly introducing
>>> then removing macros.
>>>
>>> Patch 5 adds mmc support on sun6i.
>>>
>>> Patch 6 adds uart0 muxing on sun6i.
>>>
>>> Patch 7 enables sun6i support and adds defconfig for the Colombus board.
>>
>> Chen,
>>
>> Many thanks for working on this!
>>
>> Just a quick not for people celebrating too early, this is the *incomplete*
>> sun7i support from the linux-sunxi/u-boot-sunxi git repo. It is fine to
>> merge this upstream, but this does not include SPL support.
>>
>> This allows replacing u-boot.bin on allwinnner sd-card images, which is
>> very useful. But it does not get us all the way to booting sun7i devices
>> we still need boot0 and boot1 binaries from allwinner for that (for now).
> 
> If I understand it correctly, one of the things that needs to be done
> in SPL is the initialization of the DRAM controller. A few weeks ago
> Oliver has updated the http://linux-sunxi.org/DRAM_Controller page
> and added a link to the 'dram_sun6i.c' file from the rhombus-tech.net
> u-boot repository:
>     http://git.rhombus-tech.net/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/sunxi/dram_sun6i.c;hb=refs/heads/allwinner-sunxi-a31
> Does this repository look like exactly the missing part of code?

Yes it does, interesting. I had found that file before, but this one
was missing in the repo I found then:

http://git.rhombus-tech.net/?p=u-boot.git;a=blob;f=arch/arm/include/asm/arch-sunxi/dram.h;hb=refs/heads/allwinner-sunxi-a31

But with that one added, this is definitely interesting.

> Assuming that this code works, it provides a usable starting point
> for us.

Yep, assuming :) If no one beats me to it I'll take a look at this as
time permits.

> It looks like the Allwinner A31 DRAM controller registers are very
> similar to what is used in RK3288 (I have not checked the details,
> but if we are very lucky, it might be even a 100% perfect match):
>     https://chromium-review.googlesource.com/#/c/209419/
> And thanks to the Rockchip developers (who are contributing this
> DRAM controller support code to coreboot), now we have a lot of
> named defines for the individual bitfields in the hardware
> registers. So we can decode the magic constants used in the
> Allwinner code. And thanks to Texas Instruments, we also have
> some useful documentation, which also happens to be a reasonably
> good match:
>     http://www.ti.com/lit/ug/spruhn7a/spruhn7a.pdf

Sounds good / useful.

> In general, if we are on our own, then we just need to do all the
> boring work again (similar to what we did with the Allwinner
> A10/A13/A20 DRAM controller earlier). Starting with the creation of the
>     http://linux-sunxi.org/A31_DRAM_Controller_Register_Guide
> wiki page and populating it with the information gathered from the
> Allwinner and Rockchip source code and also from the TI Keystone2
> documentation. Naturally, every bit of this information needs to
> be verified on real Allwinner A31 hardware before we can make any
> assumptions.

Yep.

> However Allwinner has promised to provide us with some better
> documentation later this month:
>     https://www.mail-archive.com/linux-sunxi at googlegroups.com/msg06840.html
> I don't know if they are going to include the documentation for the
> DRAM controller in the first new documentation delivery. It surely
> may be complicated, because Allwinner is obviously licensing the DRAM
> controller IP from a third party and not designing it from scratch
> (in a nice company with Rockchip and Texas Instruments). But Texas
> Instruments somehow can provide the DRAM controller documentation
> in free public access. So I would guess that it should be possible
> for Allwinner too.
> 
> We still need proper Power-Down and Self-Refresh mode support for
> Allwinner A10/A13/A20. And I had plans to do some investigation for
> this stuff. But now this activity is temporarily suspended until
> we see what kind of assistance Allwinner is going to provide to us
> (A usable DRAM controller documentation? A contribution of DRAM
> code for u-boot? Nothing?).

Regards,

Hans

  reply	other threads:[~2014-09-18  8:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 13:28 [U-Boot] [PATCH 0/7] ARM: sunxi: Add basic support for Allwinner A31 (sun6i) Chen-Yu Tsai
2014-09-08 13:28 ` [U-Boot] [PATCH 1/7] ARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined Chen-Yu Tsai
2014-09-11 17:07   ` Chen-Yu Tsai
2014-09-11 17:19     ` Hans de Goede
2014-09-11 18:57       ` Ian Campbell
2014-09-12 16:37         ` Chen-Yu Tsai
2014-09-21 14:13   ` Ian Campbell
2014-09-08 13:28 ` [U-Boot] [PATCH 2/7] ARM: sun6i: Add base address for the new controllers in A31 Chen-Yu Tsai
2014-09-21 14:14   ` Ian Campbell
2014-09-08 13:28 ` [U-Boot] [PATCH 3/7] ARM: sun6i: Add support for the new power control module found on the A31 Chen-Yu Tsai
2014-09-21 17:05   ` Ian Campbell
2014-09-22  2:07     ` Chen-Yu Tsai
2014-09-23  9:19       ` Hans de Goede
2014-09-08 13:28 ` [U-Boot] [PATCH 4/7] ARM: sun6i: Add clock support Chen-Yu Tsai
2014-09-21 18:35   ` Ian Campbell
2014-09-22 12:47     ` Chen-Yu Tsai
2014-09-22 13:15       ` Ian Campbell
2014-09-22 13:16         ` Chen-Yu Tsai
2014-09-28 15:23       ` Hans de Goede
2014-09-28 15:37         ` Ian Campbell
2014-09-28 15:42           ` Hans de Goede
2014-09-29  6:31             ` Olliver Schinagl
2014-09-08 13:28 ` [U-Boot] [PATCH 5/7] ARM: sunxi-mmc: Add mmc support for sun6i / A31 Chen-Yu Tsai
2014-09-21 18:44   ` Ian Campbell
2014-09-22  2:11     ` Chen-Yu Tsai
2014-09-23 11:50       ` Chen-Yu Tsai
2014-09-23 11:54         ` Ian Campbell
2014-09-23 12:07           ` Chen-Yu Tsai
2014-09-23 12:42             ` Ian Campbell
2014-09-08 13:28 ` [U-Boot] [PATCH 6/7] ARM: sun6i: Setup the A31 UART0 muxing Chen-Yu Tsai
2014-09-21 18:44   ` Ian Campbell
2014-09-22  6:10   ` Michael Trimarchi
2014-09-22 13:25     ` Chen-Yu Tsai
2014-09-08 13:28 ` [U-Boot] [PATCH 7/7] ARM: sunxi: Add basic A31 support Chen-Yu Tsai
2014-09-21 18:51   ` Ian Campbell
2014-09-21 19:01     ` Maxime Ripard
2014-09-22 13:30       ` Chen-Yu Tsai
2014-09-09  7:00 ` [U-Boot] [PATCH 0/7] ARM: sunxi: Add basic support for Allwinner A31 (sun6i) Hans de Goede
2014-09-18  4:27   ` [U-Boot] [linux-sunxi] " Siarhei Siamashka
2014-09-18  8:31     ` Hans de Goede [this message]
2014-09-18 15:31       ` Chen-Yu Tsai
2014-09-28 15:25         ` Hans de Goede

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=541A985E.5040305@redhat.com \
    --to=hdegoede@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.