sun6i SPL support status update

142 views
Skip to first unread message

Hans de Goede

unread,
Mar 30, 2014, 8:04:15 AM3/30/14
to linux-sunxi, Albert ARIBAUD
Hi,

After wens pointed me to:
http://git.rhombus-tech.net/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/sunxi/dram_sun6i.c;h=9275ca21ac99592c7d520a41c0914b359c27b913;hb=refs/heads/lichee/jb-4.2.2-a31

I've tried to get a full SPL going on sun6i. No luck sofar,
dropping in dram_sun6i.[c,h] +pll5 config seems to get the dram
going, at least get_ram_size() likes it. But I cannot get the
mmc to work in the SPL. I've narrowed this down to 2 problems,
which I believe are related:

1) The mmc controller will simply not work with pll6 as source,
after adding a test for the pll6 lock bit I believe this is caused
by pll6 never locking.

2) When switching the mmc controller clocksource to OSC24M, then
it does work, but gets stuck reading the first sector from the card.
I believe this happens because the card is only being supplied 3.0V'
rather then 3.3V.

Note that the same code works fine in the no SPL u-boot when loaded
through boot0 + boot1.

Likely wrong power supply voltages are the culprit in both cases
(the A31 also has a vdd-pll power pin.

So it looks like the next step is to first get the pmic going in
u-boot (which will be useful even if booted through boot0 + 1, to
enable the nic-phy if nothing else).

And then see from there. Maybe I'll take a shot at this tonight,
for now I'm going to spend some time with my family.

Regards,


Hans

Chen-Yu Tsai

unread,
Mar 31, 2014, 2:27:54 AM3/31/14
to linux-sunxi, Albert ARIBAUD
Hi Hans,

On Sun, Mar 30, 2014 at 8:04 PM, Hans de Goede <hdeg...@redhat.com> wrote:
> Hi,
>
> After wens pointed me to:
> http://git.rhombus-tech.net/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/sunxi/dram_sun6i.c;h=9275ca21ac99592c7d520a41c0914b359c27b913;hb=refs/heads/lichee/jb-4.2.2-a31
>
> I've tried to get a full SPL going on sun6i. No luck sofar,
> dropping in dram_sun6i.[c,h] +pll5 config seems to get the dram
> going, at least get_ram_size() likes it. But I cannot get the
> mmc to work in the SPL. I've narrowed this down to 2 problems,
> which I believe are related:
>
> 1) The mmc controller will simply not work with pll6 as source,
> after adding a test for the pll6 lock bit I believe this is caused
> by pll6 never locking.
>
> 2) When switching the mmc controller clocksource to OSC24M, then
> it does work, but gets stuck reading the first sector from the card.
> I believe this happens because the card is only being supplied 3.0V'
> rather then 3.3V.
>
> Note that the same code works fine in the no SPL u-boot when loaded
> through boot0 + boot1.
>
> Likely wrong power supply voltages are the culprit in both cases
> (the A31 also has a vdd-pll power pin.
>
> So it looks like the next step is to first get the pmic going in
> u-boot (which will be useful even if booted through boot0 + 1, to
> enable the nic-phy if nothing else).

The A23 lichee u-boot has drivers for P2WI (used in sun6i) and RSB
(reduced serial bus, used on A23):

https://github.com/wens/u-boot-sunxi/tree/lichee-dev-a23/drivers/p2wi
https://github.com/wens/u-boot-sunxi/tree/lichee-dev-a23/drivers/rsb

And also PMIC drivers:

https://github.com/wens/u-boot-sunxi/tree/lichee-dev-a23/drivers/power

Judging from the code, my guess is AXP221 and AXP223 or differ in
the type of interface supported.

Hope this helps. :)

> And then see from there. Maybe I'll take a shot at this tonight,
> for now I'm going to spend some time with my family.


Cheers,
ChenYu

Stefan Monnier

unread,
Mar 31, 2014, 8:48:59 AM3/31/14
to linux...@googlegroups.com
> for now I'm going to spend some time with my family.

Huh? How's this going to help boot the damn thing?


Stefan

Olliver Schinagl

unread,
Apr 1, 2014, 3:55:44 PM4/1/14
to linux...@googlegroups.com
Are they not the same? I haven't looked I admit, I just figured they
changed the name a little to make it sound distinctive.

Are they similar at all? If so, I guess that the i2c vs p2wi discussion
held a few days ago is moot then :)

Olliver

Koen Kooi

unread,
Apr 2, 2014, 2:38:54 AM4/2/14
to linux...@googlegroups.com
"2 wire interface" is a way of avoiding paying NXP royalties for I2C while still producing the same hardware :)

regards,

Koen


>
> Olliver
>>
>> https://github.com/wens/u-boot-sunxi/tree/lichee-dev-a23/drivers/p2wi
>> https://github.com/wens/u-boot-sunxi/tree/lichee-dev-a23/drivers/rsb
>>
>> And also PMIC drivers:
>>
>> https://github.com/wens/u-boot-sunxi/tree/lichee-dev-a23/drivers/power
>>
>> Judging from the code, my guess is AXP221 and AXP223 or differ in
>> the type of interface supported.
>>
>> Hope this helps. :)
>>
>>> And then see from there. Maybe I'll take a shot at this tonight,
>>> for now I'm going to spend some time with my family.
>>
>>
>> Cheers,
>> ChenYu
>>
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Maxime Ripard

unread,
Apr 3, 2014, 4:31:44 AM4/3/14
to linux...@googlegroups.com
We don't have much details, but the bus itself looks different, since
it supports many devices, which is impossible with the p2wi.

> Are they similar at all? If so, I guess that the i2c vs p2wi
> discussion held a few days ago is moot then :)

Why so?

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
signature.asc

Maksim Lin

unread,
Jun 12, 2014, 8:47:57 PM6/12/14
to linux...@googlegroups.com
Came across this thread in my attempts to get u-boot booting off a sdcard on a A31 based tablet.

Would there have been in more work on this since April?

Maks.
Reply all
Reply to author
Forward
0 new messages