linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/8] mmc: core: Add mmc_regulator_set_vqmmc()
Date: Thu, 01 Oct 2015 12:21:19 +0200	[thread overview]
Message-ID: <2695161.Z1IhqPE0bd@diego> (raw)
In-Reply-To: <CAPDyKFpis8XnvrppHq7q_7DQeN2UiEpykNTJ=1iJJ9AGOHTW6Q@mail.gmail.com>

Am Donnerstag, 1. Oktober 2015, 11:54:24 schrieb Ulf Hansson:
> On 30 September 2015 at 16:55, Heiko St?bner <heiko@sntech.de> wrote:
> > Am Mittwoch, 30. September 2015, 16:42:05 schrieb Ulf Hansson:
> >> On 30 September 2015 at 16:07, Heiko Stuebner <heiko@sntech.de> wrote:
> >> > From: Douglas Anderson <dianders@chromium.org>
> >> > 
> >> > This adds logic to the MMC core to set VQMMC.  This is expected to be
> >> > called by MMC drivers like dw_mmc as part of (or instead of) their
> >> > start_signal_voltage_switch() callback.
> >> > 
> >> > A few notes:
> >> > 
> >> > * When setting the signal voltage to 3.3V we do our best to make VQMMC
> >> > 
> >> >   and VMMC match.  It's been reported that this makes some old cards
> >> >   happy since they were tested back in the day before UHS when VQMMC
> >> >   and VMMC were provided by the same regulator.  A nice side effect of
> >> >   this is that we don't end up on the hairy edge of VQMMC (2.7V),
> >> >   which some EEs claim is a little too close to the minimum for
> >> >   comfort.
> >> >   This is done in two steps. At first we try to find a VQMMC within
> >> >   a 0.3V tolerance of VMMC and if this is not supported by the
> >> >   supplying regulator we try to find a suitable voltage within the
> >> >   whole 2.7V-3.6V area of the spec.
> >> > 
> >> > * The two step approach is currently necessary, as the used
> >> > 
> >> >   regulator_set_voltage_triplet(min, target, max) uses a simple
> >> >   
> >> >   implementation that just tries two basic steps:
> >> >         regulator_set_voltage(target, max);
> >> >         regulator_set_voltage(min, target);
> >> >   
> >> >   So with only one step with 2.7-3.6V borders, if a suitable voltage
> >> >   is a bit below VMMC, we would directly get the lowest 2.7V
> >> >   which some boards (like Rockchips) don't like at all.
> >> > 
> >> > * When setting the signal voltage to 1.8V or 1.2V we aim for that
> >> > 
> >> >   specific voltage instead of picking the lowest one in the range.
> >> > 
> >> > * We very purposely don't print errors in mmc_regulator_set_vqmmc().
> >> > 
> >> >   There are cases where the MMC core will try several different
> >> >   voltages and we don't want to pollute the logs.
> >> > 
> >> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> >> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> >> 
> >> This looks good to me!
> > 
> > very cool :-)
> > 
> >> Once all are happy with the patches, can we take the mmc patches via
> >> my mmc tree or does it all have to go together?
> > 
> > The clock changes of course only touch internals of the phase-clocks, so
> > should have no problem going through another tree.
> 
> What happens if I take mmc and dt changes, wouldn't I need the clock
> patches as well?

The API stays of course the same, only the degree to settings translation gets 
optimized, so I guess in the worst case you would get no good phase and thus 
fall back to non-highspeed modes - but the system would stay running.

But of course, if the clock maintainers could Ack the two clock patches and 
everything would stay together that would work even better :-)


Heiko

> 
> > For the devicetree part I'm unsure. If the boards enable the
> > tuning-related
> > settings without the new voltage handling, 2.7V gets set on all Rockchip
> > boards which doesn't work on those at all.
> > 
> > So either the dts patches would need to go into your tree, I would need a
> > stable branch or we could simply postpone dts changes for the next cycle.
> 
> Kind regards
> Uffe

  reply	other threads:[~2015-10-01 10:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 14:07 [PATCH v2 0/8] mmc: dw_mmc-rockchip: allow tuning using the clk-phase api Heiko Stuebner
2015-09-30 14:07 ` [PATCH v2 1/8] clk: rockchip: Allow more precision for some mmc clock phases Heiko Stuebner
2015-10-22 12:03   ` Michael Turquette
2015-10-22 13:47     ` Heiko Stübner
2015-09-30 14:07 ` [PATCH v2 2/8] clk: rockchip: Make calculations use rounding Heiko Stuebner
2015-10-22 12:04   ` Michael Turquette
2015-09-30 14:07 ` [PATCH v2 3/8] mmc: core: Add mmc_regulator_set_vqmmc() Heiko Stuebner
2015-09-30 14:42   ` Ulf Hansson
2015-09-30 14:55     ` Heiko Stübner
2015-10-01  9:54       ` Ulf Hansson
2015-10-01 10:21         ` Heiko Stübner [this message]
2015-10-01 17:35           ` Stephen Boyd
2015-10-01 21:05             ` Ulf Hansson
2015-10-02  2:52               ` Jaehoon Chung
2015-10-02  7:06                 ` Heiko Stübner
2015-10-02  7:53                   ` Jaehoon Chung
2015-10-02  8:43                     ` Ulf Hansson
2015-10-02  8:48                       ` Jaehoon Chung
2015-10-02  8:57                         ` Ulf Hansson
2015-09-30 14:07 ` [PATCH v2 4/8] mmc: dw_mmc: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch Heiko Stuebner
2015-10-08  1:15   ` Jaehoon Chung
2015-10-09 19:06   ` Kevin Hilman
2015-10-09 20:12     ` Doug Anderson
2015-10-09 20:17       ` Kevin Hilman
2015-09-30 14:07 ` [PATCH v2 5/8] mmc: dw_mmc-rockchip: dt-binding: Add tuning related things Heiko Stuebner
2015-10-08  1:15   ` Jaehoon Chung
2015-09-30 14:07 ` [PATCH v2 6/8] mmc: dw_mmc-rockchip: MMC tuning with the clock phase framework Heiko Stuebner
2015-10-08  1:16   ` Jaehoon Chung
2015-09-30 14:07 ` [PATCH v2 7/8] ARM: dts: rockchip: Add drive/sample clocks for rk3288 dw_mmc devices Heiko Stuebner
2015-09-30 14:07 ` [PATCH v2 8/8] ARM: dts: rockchip: add tuning related settings to veyron devices Heiko Stuebner
2015-10-08 17:36 ` [PATCH v2 0/8] mmc: dw_mmc-rockchip: allow tuning using the clk-phase api Ulf Hansson
2015-10-09  8:10   ` Ulf Hansson
2015-10-09 17:19     ` Doug Anderson
2015-10-09 20:11       ` Doug Anderson
2015-10-09 22:31         ` Heiko Stuebner

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=2695161.Z1IhqPE0bd@diego \
    --to=heiko@sntech.de \
    --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).