[linux-sunxi] Re: Raise DCDC1 Voltage on sun6i?

2014-11-30 Thread Maxime Ripard
Hi,

On Fri, Nov 28, 2014 at 12:50:29PM +0100, Hans de Goede wrote:
 Hi ChenYu,
 
 On 11/28/2014 10:20 AM, wens Tsai wrote:
 Hi Hans,
 
 Thanks for completing SPL support on the A31.
 I've managed to boot mainline U-boot on my Hummingbird A31.
 
 One issue I ran into is that with DCDC1 set at 3.0V,
 mmc0 is very unstable in the kernel. All operations
 timeout and the kernel panics because the rootfs isn't
 available.
 
 Raising the voltage to 3.3V gets rid of the problem,
 but I'm not sure that is the correct solution.
 
 The fex file for the mele boards says dcdc1 should be 3.3V not
 3.0V and that makes sense really, since 3.3V is a standard
 voltage, while 3.0V is not.
 
 However the fex file for the Hummingbird says 3.0V and my
 Mele M9 works fine with the current u-boot setting of 3.0V.
 
 I've just booted my M9 into the original firmware and that is
 actually using 3.3V so changing things to 3.3V does seem to
 be the right thing.
 
 Maxime, I seem to remember you telling me that the Colombus
 is really using 3.0V.
 
 Maxime can you confirm this? Is that routed to the mmc power ?

I just checked on the schematics, and while the VCC line is called
VCC-3V0, it's indeed said later in this document that it should be set
to 3.3V...

I'll cross-check that with a multimeter on the board along with your
other tests.

 
 It could be that 3.0V is enough for the A31 itself, but that
 on boards which do not have a separate power-supply for the
 mmc 3.3V is used ?
 
 I'm fine with moving to 3.3V, I'm wondering if we should
 make it configurable like the DLDO# and ALDO# voltages,
 see drivers/power/Kconfig, with a 3.3V voltage and an
 override in the Colombus defconfig ?

I'm not sure what you're referring to here. All I see is battery
drivers.

Maxime

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

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: Raise DCDC1 Voltage on sun6i?

2014-11-30 Thread wens Tsai
Hi,

On Fri, Nov 28, 2014 at 7:50 PM, Hans de Goede hdego...@redhat.com wrote:
 Hi ChenYu,

 On 11/28/2014 10:20 AM, wens Tsai wrote:

 Hi Hans,

 Thanks for completing SPL support on the A31.
 I've managed to boot mainline U-boot on my Hummingbird A31.

 One issue I ran into is that with DCDC1 set at 3.0V,
 mmc0 is very unstable in the kernel. All operations
 timeout and the kernel panics because the rootfs isn't
 available.

 Raising the voltage to 3.3V gets rid of the problem,
 but I'm not sure that is the correct solution.


 The fex file for the mele boards says dcdc1 should be 3.3V not
 3.0V and that makes sense really, since 3.3V is a standard
 voltage, while 3.0V is not.

 However the fex file for the Hummingbird says 3.0V and my
 Mele M9 works fine with the current u-boot setting of 3.0V.

 I've just booted my M9 into the original firmware and that is
 actually using 3.3V so changing things to 3.3V does seem to
 be the right thing.

 Maxime, I seem to remember you telling me that the Colombus
 is really using 3.0V.

 Maxime can you confirm this? Is that routed to the mmc power ?

 It could be that 3.0V is enough for the A31 itself, but that
 on boards which do not have a separate power-supply for the
 mmc 3.3V is used ?

 I'm fine with moving to 3.3V, I'm wondering if we should
 make it configurable like the DLDO# and ALDO# voltages,
 see drivers/power/Kconfig, with a 3.3V voltage and an
 override in the Colombus defconfig ?

 ChenYu, can you check which voltage the original firmware
 is actually using ? You should see boot1 printing the
 voltage, and you can check it from a root shell by doing:

This is during boot:

U-Boot 2011.09-rc1 (Jun 17 2014 - 17:30:56) Allwinner Technology

[  0.213]version: 1.1.0
[  0.216]pmbus:   ready
[  0.218]PMU: AXP221
[  0.220]PMU: AXP22x found
[  0.223]PMU: bat ratio = 100
[  0.226]PMU: dcdc3 1260
[  0.229]PMU: pll1 1008 Mhz
dcdc1_vol = 3000
dcdc2_vol = 1200
dcdc3_vol = 1260
dcdc4_vol = 1200
dcdc5_vol = 1500
aldo1_vol = 3000
aldo2_vol = 1800
aldo3_vol = 3000
eldo3_vol = 1800

 cat /sys/class/regulator/regulator.13/name
 cat /sys/class/regulator/regulator.13/microvolts

 (The first one is just to check your regulators are numbered
 the same).

This is just a dump of all the regulators from the firmware:

axp22_DCDC1  300  enabled
axp22_DCDC2  120  enabled
axp22_DCDC3  126  enabled
axp22_DCDC4  120  enabled
axp22_DCDC5  150  enabled
axp22_ldoio0 280  disabled
axp22_ldoio1 180  enabled
axp22_ldo1   300  enabled
axp22_ldo2   330  enabled
axp22_ldo3   180  enabled
axp22_ldo4   300  enabled
axp22_ldo570  disabled
axp22_ldo670  disabled
axp22_ldo7   280  disabled
axp22_ldo8   280  enabled
axp22_ldo9   150  disabled
axp22_ldo10   70  disabled
axp22_ldo11  180  disabled
axp22_ldo12  110  enabled

As you can see it is indeed set to 3.0V. And it does work.
So I'm kind of confused. Plus 3.0V doesn't seem to be a valid
I/O voltage level for SD/MMC.

BTW, I see you're working on RSB support for U-boot. Thanks
in advance.

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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.