Re: [linux-sunxi] [PATCH 10/10] ARM: dts: sun8i: Add SY8106A regulator to Orange Pi PC

Ondřej Jirman
2017-07-26T12:54:45Z

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

Maxime Ripard píše v St 26. 07. 2017 v 13:44 +0200:
> Hi,
>
> On Wed, Jul 26, 2017 at 12:23:48PM +0200, Ondřej Jirman wrote:
> > Hi,
> >
> > icenowy@aosc.io píše v St 26. 07. 2017 v 15:36 +0800:
> > >
> > > > > >
> > > > > > Otherwse
> > > > > >
> > > > > > > + regulator-max-microvolt = <1400000>;
> > > > > > > + regulator-ramp-delay = <200>;
> > > > > >
> > > > > > Is this an actual constraint of the SoC? Or is it a characteristic
> > > > > > of the regulator? If it is the latter, it belongs in the driver.
> > > > > > AFAIK the regulator supports varying the ramp delay (slew rate).
> > >
> > > I don't know...
> > >
> > > Maybe I should ask Ondrej?
> >
> > It is probably neither.
> >
> > It is used to calculate a delay inserted by the kernel between setting
> > a new target voltage over I2C and changing the frequency of the CPU.
> > The actual delay is calculated by the difference between previous and
> > the new voltage.
> >
> > I don't remember seeing anything in the datasheet of the regulator.
> > This is just some low value that works.
> >
> > It would probably be dependent on the capacitance on the output of the
> > regulator, actual load (which varies), etc. So it is a board specific
> > value. One could measure it with an oscilloscope if there's a need to
> > optimize this.
>
> If this is a reasonable default, then this should be in the
> driver. You can't expect anyone to properly calculate a ramp delay and
> have access to both a scope and the CPU power lines.

It translates to 1ms per 0.2V which is highly conservative. The real
times will be in 1-10us range. So I guess this could be a default in
the driver.

regards,
o.

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]