Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/14] regulator: dts: add full voltage range to LDO4 on the Lime2
Date: Wed, 28 Nov 2018 10:56:39 +0100	[thread overview]
Message-ID: <20181128095639.t4ogsk6ovyu2yaxu@flea> (raw)
In-Reply-To: <20181127093852.2iavgo4xipjnu25l@flea>

On Tue, Nov 27, 2018 at 10:38:52AM +0100, Maxime Ripard wrote:
> On Mon, Nov 26, 2018 at 05:27:50PM +0200, Priit Laes wrote:
> > From: Olliver Schinagl <oliver@schinagl.nl>
> > 
> > With commit b43776d65a33b46092 ("ARM: dts: sunxi: Use axp209.dtsi for
> > Olinuxino Lime2") we force them an arbitrary 2.8 volts. Granted, for
> > LDO3 this may be less arbitrary, but for LDO4 this is just wrong.
> > 
> > In the defense of LDO3, LDO3 is the regulator that feeds port bank E,
> > which has no other purpose then a CSI/TS interface, however the case
> > may still be, that the connected IO may be just as well be 3.3 volts.
> > The big misnomer is however, that the schematic names GPIO-2 pin4
> > LDO3_2.8V, rather then VDD-CSI0 or similar.
> > 
> > This is much worse for LDO4 however, which is not referenced on any
> > pin, is now set to 2.8 volts, but port bank G can also support various
> > other peripherals such as UARTS etc.
> > 
> > By having 2.8 volts however for LDO4, we thus now have peripherals that
> > no longer function properly all of the time.
> > 
> > Ideally, we want to set a supply voltage for each port bank, but the
> > monolithic nature of the sunxi pinctroller currently prevents this and
> > as such, the board should at least configure the LDO4 with the proper
> > ranges.
> > 
> > Until we can set the consumer at the port bank level, a child
> > device-tree has to do something like:
> > 
> > &reg_ldo4 {
> >     regulator-min-microvolt = <3300000>;
> >     regulator-max-microvolt = <3300000>;
> > };
> > 
> > While doing this the same way results in the same solution currently,
> > we force the hack into the final devicetree rather then having it wrong
> > at the board level.
> > 
> > Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
> > Signed-off-by: Priit Laes <plaes@plaes.org>
> > ---
> >  arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> > index ffafe97..1b9867f 100644
> > --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> > +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
> > @@ -250,9 +250,10 @@
> >  };
> >  
> >  &reg_ldo4 {
> > -	regulator-min-microvolt = <2800000>;
> > -	regulator-max-microvolt = <2800000>;
> > -	regulator-name = "vddio-csi1";
> > +	regulator-always-on;
> > +	regulator-min-microvolt = <1250000>;
> > +	regulator-max-microvolt = <3300000>;
> > +	regulator-name = "vdd-io-pg";
> 
> As we discussed on the U-Boot ML already, this shouldn't be made
> always-on but tied to the consumer device (the pinctrl one) instead.

Can you test that patch (not tested):
http://code.bulix.org/h02vha-514284?raw

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181128/229f9de5/attachment.sig>

  reply	other threads:[~2018-11-28  9:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26 15:27 [PATCH 00/14] regulator: axp20x: Stop AXP209 from crashing when enabling LDO3 Priit Laes
2018-11-26 15:27 ` [PATCH 01/14] regulator: axp20x: use defines for masks Priit Laes
2018-11-26 15:27 ` [PATCH 02/14] regulator: axp20x: name voltage ramping define properly Priit Laes
2018-11-28  9:26   ` Lee Jones
2018-11-26 15:27 ` [PATCH 03/14] regulator: core: enable power when setting up constraints Priit Laes
2018-11-26 15:27 ` [PATCH 04/14] regulator: axp20x: add support for set_ramp_delay for AXP209 Priit Laes
2018-11-26 15:27 ` [PATCH 05/14] dt-bindings: mfd: axp20x: add support for regulator-ramp-delay " Priit Laes
2018-11-28  9:28   ` Lee Jones
2018-11-26 15:27 ` [PATCH 06/14] regulator: axp20x: add software based soft_start for AXP209 LDO3 Priit Laes
2018-11-27  9:36   ` Maxime Ripard
2018-12-04 13:31     ` Priit Laes
2018-12-04 15:09       ` Mark Brown
2018-11-26 15:27 ` [PATCH 07/14] dt-bindings: mfd: axp20x: Add " Priit Laes
2018-11-26 16:58   ` Mark Brown
2018-11-28  9:31     ` Lee Jones
2018-11-26 15:27 ` [PATCH 08/14] regulator: dts: enable soft-start and ramp delay for the OLinuXino Lime2 Priit Laes
2018-11-26 15:27 ` [PATCH 09/14] regulator: dts: add full voltage range to LDO4 on the Lime2 Priit Laes
2018-11-26 16:57   ` Mark Brown
2018-11-27  9:38   ` Maxime Ripard
2018-11-28  9:56     ` Maxime Ripard [this message]
2018-12-04 14:47       ` Priit Laes
2018-11-26 15:27 ` [PATCH 10/14] regulator: dts: set proper lradc vref on OLinuXino Lime2 Priit Laes
2018-11-27  9:37   ` Maxime Ripard
2018-11-27  9:41     ` Chen-Yu Tsai
2018-11-27  9:47       ` Maxime Ripard
2018-11-26 15:27 ` [PATCH 11/14] mfd: axp20x: Clean up included headers Priit Laes
2018-11-28  9:33   ` Lee Jones
2018-11-26 15:27 ` [PATCH 12/14] mfd: axp20x: use explicit bit defines Priit Laes
2018-11-28  9:33   ` Lee Jones
2018-11-26 15:27 ` [PATCH 13/14] power: supply: axp20x: add missing include bitops.h Priit Laes
2018-12-05 17:43   ` Sebastian Reichel
2018-11-26 15:27 ` [PATCH 14/14] power: supply: axp288: use the BIT() macro Priit Laes
2018-12-05 17:43   ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181128095639.t4ogsk6ovyu2yaxu@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox