linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* ARM: dts: sunxi: Regulators at common board layouts
@ 2015-07-30  9:45 Mikhail Yakshin
  2015-08-08  5:28 ` Chen-Yu Tsai
  0 siblings, 1 reply; 2+ messages in thread
From: Mikhail Yakshin @ 2015-07-30  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I've been analyzing various boards based on Allwinner A20 CPU and
X-Powers AXP209 PMU (to make a proper configuration for our board,
Whitebox Labs Watermelon).

There are some things very common and some things pretty different on
various boards.

Namely, there's agreement on that DCDC2 and DCDC3 and used for CPU
voltages (VDD-CPU and (VDD-SYS=VDD-INT)+VDD-DLL respectively) on all
boards I've analyzed (Olimex boards, Cubieboard / Cubietruck, BananaPi,
PCDuino, Watermelon, etc) and probably it should be kept this way.

However, what puzzles me the most so far is LDO1 regulator. According to
[AXP209 datasheet, p. 13, p. 23][1] and all the boards I've
investigated, it's used exclusively for powering VDD-RTC input of A20
CPU that supports internal CPU's RTC. LDO1 gets very special status in
AXP209 - basically, it's as close to "always on" (even on backup
battery) as possible the purpose of timekeeping.

According to the same spec, LDO1 allows 2 distinct voltage choices: 1.3V
and 3.3V. However, according to the [A20 datasheet][2], VDD-RTC (pin K8)
has absolute minimum and maximum voltage ratings of 3.0V. I'm not sure
how is it supposed to work together, given that X-Powers AXP209 and
Allwinner A20 is basically produced by different branches the same
company and are meant to be totally compatible.

What's even more weird, is that all configurations I've encountered so
far (i.e. FEX configurations for 3.4 sunxi kernel and DTS for modern
mainline kernels) use hard locked 1.3V setting for LDO1. For example,
kernel 3.4:

/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-regulator.21/regulator/regulator.1/
name    axp20_ldo1
microvolts      1300000
min_microvolts  1300000
max_microvolts  1300000

and similar construction in mainline DTSes:

    vdd_rtc: ldo1 {
            regulator-min-microvolt = <1300000>;
            regulator-max-microvolt = <1300000>;
            regulator-always-on;
    };

or in axp209.dtsi:

    reg_ldo1: ldo1 {
            /* LDO1 is a fixed output regulator */
            regulator-always-on;
            regulator-min-microvolt = <1300000>;
            regulator-max-microvolt = <1300000>;
            regulator-name = "ldo1";
    };

If we'll take a look at default power-on setup for AXP209 in the
datasheet (page 24), we'll see that it's determined by LDO1SET pin. If
it's connected to GND, then LDO1 will start with 1.3V, if it's connected
to VINT, then it would be 3.3V.

I've analyzed all the schematics I found in public:

* Older Olimex schematics (Lime rev C, Lime rev D, Lime2 rev B) state
that LDO1 line is "3V3/30mA". LDO1SET is grounded.
* Newer Olimex schematics (Lime2 rev C) call that "1V3/30mA". LDO1SET is
grounded.
* All Bananapi and Cubieboard schematics look very similar and seem to
be originating from the same source (reference Allwinner design?) and do
not hint any voltages. LDO1SET is grounded.

Can someone explain to me how does it work / supposed to work?

[1]: http://linux-sunxi.org/images/8/89/AXP209_Datasheet_v1.0en.pdf
[2]:
https://github.com/OLIMEX/OLINUXINO/raw/master/HARDWARE/A20-PDFs/A20%20Datasheet%20v1.0%2020130227.pdf

-- 
WBR, Mikhail Yakshin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150730/ee55ae82/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* ARM: dts: sunxi: Regulators at common board layouts
  2015-07-30  9:45 ARM: dts: sunxi: Regulators at common board layouts Mikhail Yakshin
@ 2015-08-08  5:28 ` Chen-Yu Tsai
  0 siblings, 0 replies; 2+ messages in thread
From: Chen-Yu Tsai @ 2015-08-08  5:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, Jul 30, 2015 at 5:45 PM, Mikhail Yakshin <greycat@whiteboxes.ch> wrote:
> Hi,
>
> I've been analyzing various boards based on Allwinner A20 CPU and
> X-Powers AXP209 PMU (to make a proper configuration for our board,
> Whitebox Labs Watermelon).
>
> There are some things very common and some things pretty different on
> various boards.
>
> Namely, there's agreement on that DCDC2 and DCDC3 and used for CPU
> voltages (VDD-CPU and (VDD-SYS=VDD-INT)+VDD-DLL respectively) on all
> boards I've analyzed (Olimex boards, Cubieboard / Cubietruck, BananaPi,
> PCDuino, Watermelon, etc) and probably it should be kept this way.
>
> However, what puzzles me the most so far is LDO1 regulator. According to
> [AXP209 datasheet, p. 13, p. 23][1] and all the boards I've
> investigated, it's used exclusively for powering VDD-RTC input of A20
> CPU that supports internal CPU's RTC. LDO1 gets very special status in
> AXP209 - basically, it's as close to "always on" (even on backup
> battery) as possible the purpose of timekeeping.
>
> According to the same spec, LDO1 allows 2 distinct voltage choices: 1.3V
> and 3.3V. However, according to the [A20 datasheet][2], VDD-RTC (pin K8)
> has absolute minimum and maximum voltage ratings of 3.0V. I'm not sure
> how is it supposed to work together, given that X-Powers AXP209 and
> Allwinner A20 is basically produced by different branches the same
> company and are meant to be totally compatible.

Get an updated datasheet. Mine (v1.5 20150510) recommends VDD-RTC to
be 1.2 V ~ 1.4 V, and nominally at 1.3 V.

Also, my AXP209 datasheet (v1.0 Chinese) says LDO1SET grounded means
LDO1 is set to 1.3 V.

> What's even more weird, is that all configurations I've encountered so
> far (i.e. FEX configurations for 3.4 sunxi kernel and DTS for modern
> mainline kernels) use hard locked 1.3V setting for LDO1. For example,
> kernel 3.4:
>
> /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-regulator.21/regulator/regulator.1/
> name    axp20_ldo1
> microvolts      1300000
> min_microvolts  1300000
> max_microvolts  1300000
>
> and similar construction in mainline DTSes:
>
>     vdd_rtc: ldo1 {
>             regulator-min-microvolt = <1300000>;
>             regulator-max-microvolt = <1300000>;
>             regulator-always-on;
>     };
>
> or in axp209.dtsi:
>
>     reg_ldo1: ldo1 {
>             /* LDO1 is a fixed output regulator */
>             regulator-always-on;
>             regulator-min-microvolt = <1300000>;
>             regulator-max-microvolt = <1300000>;
>             regulator-name = "ldo1";
>     };
>
> If we'll take a look at default power-on setup for AXP209 in the
> datasheet (page 24), we'll see that it's determined by LDO1SET pin. If
> it's connected to GND, then LDO1 will start with 1.3V, if it's connected
> to VINT, then it would be 3.3V.
>
> I've analyzed all the schematics I found in public:
>
> * Older Olimex schematics (Lime rev C, Lime rev D, Lime2 rev B) state
> that LDO1 line is "3V3/30mA". LDO1SET is grounded.
> * Newer Olimex schematics (Lime2 rev C) call that "1V3/30mA". LDO1SET is
> grounded.
> * All Bananapi and Cubieboard schematics look very similar and seem to
> be originating from the same source (reference Allwinner design?) and do
> not hint any voltages. LDO1SET is grounded.
>
> Can someone explain to me how does it work / supposed to work?

See above.

ChenYu

> [1]: http://linux-sunxi.org/images/8/89/AXP209_Datasheet_v1.0en.pdf
> [2]:
> https://github.com/OLIMEX/OLINUXINO/raw/master/HARDWARE/A20-PDFs/A20%20Datasheet%20v1.0%2020130227.pdf
>
> --
> WBR, Mikhail Yakshin
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-08  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30  9:45 ARM: dts: sunxi: Regulators at common board layouts Mikhail Yakshin
2015-08-08  5:28 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).