[U-Boot] [linux-sunxi] Re: [PATCH 0/7] ARM: sunxi: Add basic support for Allwinner A31 (sun6i)

Hans de Goede hdegoede at redhat.com
Sun Sep 28 17:25:31 CEST 2014


Hi,

On 09/18/2014 05:31 PM, Chen-Yu Tsai wrote:
> Hi,
> 
> On Thu, Sep 18, 2014 at 4:31 PM, Hans de Goede <hdegoede at redhat.com> wrote:
>> Hi,
>>
>> On 09/18/2014 06:27 AM, Siarhei Siamashka wrote:
>>> On Tue, 09 Sep 2014 09:00:57 +0200
>>> Hans de Goede <hdegoede at 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.
> 
> The A31 Hummingbird's SDK has provided us with full boot0/boot1,
> which also includes the dram code:
> 
> http://dl.linux-sunxi.org/SDK/A31/unpacked-stripped/a31_v4.5_hummingbird_kfb_ok/lichee/boot-v1.0/boot/source/init_dram/
> 
> It is more complex than what we found in u-boot.
> This code also shows what is encoded into the dram parameters
> found in the fex files.

Interesting, if I ever find the time I may look into adding what ever
is missing from the u-boot dram init code by looking at the algorithm
used in the boot0 code. But as said, that depends on me finding the
time ...  So if others want to work on this, please do.

Regards,

Hans


More information about the U-Boot mailing list