linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: dts: fix rk3066a based boards vdd_log voltage initialization
Date: Mon, 19 Sep 2016 19:48:44 +0200	[thread overview]
Message-ID: <20160919194844.0db7b307@bbrezillon> (raw)
In-Reply-To: <CAD=FV=Ufmvg1P8suOPQ53kpOD1pei4N2dOpKUCxZk001XKj_OA@mail.gmail.com>

On Mon, 19 Sep 2016 10:22:43 -0700
Doug Anderson <dianders@chromium.org> wrote:

> Hi,
> 
> On Mon, Sep 19, 2016 at 10:13 AM, Boris Brezillon
> <boris.brezillon@free-electrons.com> wrote:
> > Correct me if I'm wrong, but the main problem here is that, when we try
> > to detect the initial regulator state, we ran into a "missing entry in
> > the duty-cycle <-> voltage table" error, which then triggers an -EINVAL
> > error preventing the PWM regulator probe to succeed.
> >
> > Of course, adding an entry for the 0% dutycle case would solve the
> > issue, but I wonder if we should not allow "unknown value" at probe
> > time, and let the regulator user set the voltage output when it claims
> > it.
> >
> > Another option would be to fake a valid value in this case (choose the
> > closest entry in the voltage table?).  
> 
> If the goal is to avoid glitching the voltage at bootup, then the
> above doesn't really solve it.
> 
> For instance, you could have:
> 
> 0% - 1.5V
> 100% - 0.8V
> When configured as input: 1.1V
> Max useful value: 1.2V
> 
> So if firmware doesn't touch the PWM regulator then that means you're
> booting up at 1.1V.

Oh! I really didn't consider this case when developing the solution. I
was assuming that the firmware/bootloader would configure the PWM
correctly and leave it activating when booting the kernel.

> 
> If you read out the PWM itself, it will claim that it's running at 0%.
> While that's true, that doesn't mean that the voltage on the system is
> actually 1.5V because at boot the system had configured the pinmux as
> GPIO input.  ...so it's actually 1.1V because the PWM isn't actually
> controlling the pins.

The PWM chip has always claimed the pins and muxed them to the PWM IP.
So, this means it's broken from the beginning, and my patch is only
uncovering the problem (unless the pins stay configured as input until
the PWM is enabled, which I'm not sure is the case).

> 
> So if you want to avoid glitching the line then you want to make sure
> that you properly init to 1.1V, _not_ to 1.5V.
> 
> In the case above, it's possible that 1.5V isn't really so great for
> the hardware lifespan because 1.2V is the maximum useful value.  You
> could argue that the hardware is badly designed in this case, but I
> have certainly seen boards designed where the maximum achievable value
> is higher than the maximum "safe" value.

> 
> -Doug

  reply	other threads:[~2016-09-19 17:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19  8:43 [PATCH 0/1] fix rk3066a based boards boot issue on linux-4.8 Andy Yan
2016-09-19  8:44 ` [PATCH] arm: dts: fix rk3066a based boards vdd_log voltage initialization Andy Yan
2016-09-19  9:25   ` Boris Brezillon
2016-09-19  9:38     ` Andy Yan
2016-09-19  9:44       ` Boris Brezillon
2016-09-19 15:15   ` Doug Anderson
2016-09-19 16:15     ` Heiko Stuebner
2016-09-19 16:38       ` Doug Anderson
2016-09-19 17:13         ` Boris Brezillon
2016-09-19 17:22           ` Doug Anderson
2016-09-19 17:48             ` Boris Brezillon [this message]
2016-09-19 17:52               ` Doug Anderson
2016-09-19 18:06                 ` Boris Brezillon
2016-09-19 18:12                   ` Doug Anderson
2016-09-19 18:31                     ` Boris Brezillon
2016-09-19 20:43                     ` Boris Brezillon
2016-09-19 21:15                       ` Doug Anderson
2016-09-22 15:12                         ` Boris Brezillon
2016-09-22 16:47                           ` Mark Brown
2016-09-22 18:13                             ` Boris Brezillon
2016-09-22 19:26                               ` Mark Brown
2016-09-19 17:25           ` Heiko Stuebner
2016-09-19  9:21 ` [PATCH 0/1] fix rk3066a based boards boot issue on linux-4.8 Boris Brezillon

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=20160919194844.0db7b307@bbrezillon \
    --to=boris.brezillon@free-electrons.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;
as well as URLs for NNTP newsgroup(s).