linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuvaraj Cd <yuvaraj.lkml@gmail.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Mark Brown <broonie@kernel.org>, Olof Johansson <olof@lixom.net>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Abhilash Kesavan <a.kesavan@samsung.com>,
	Prashanth G <prashanth.g@samsung.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	sunil joshi <joshi@samsung.com>
Subject: Re: [PATCH v9 1/2] regulator: Add driver for max77802 PMIC PMIC regulators
Date: Mon, 25 Aug 2014 13:52:04 +0530	[thread overview]
Message-ID: <CA+NduCCT-KQ=gh7QWkBE4qkA2YOJ8KCVqbkC6Tkmb1aPvCsGFQ@mail.gmail.com> (raw)
In-Reply-To: <CAD=FV=WC0h7fYm2QFqu3Zka7CsU4BtG-oyPpJav+ygC+gmCR+A@mail.gmail.com>

On Sat, Aug 23, 2014 at 3:45 AM, Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> On Fri, Aug 22, 2014 at 3:02 PM, Javier Martinez Canillas
> <javier.martinez@collabora.co.uk> wrote:
>> Hello Mark,
>>
>> On 08/22/2014 08:30 PM, Mark Brown wrote:
>>>
>>>> The problem is that one of these regulators is used as the vqmmc-supply
>>>> (VCCQ/VDD_IO) so the mmc host controller driver disables it on
>>>> MMC_POWER_OFF. Now AFAIK (Yuvaraj can correct me what I got wrong) this
>>>> shouldn't be an issue since on card detection, the vqmmc supply should be
>>>> enabled again but on Exynos the built-in card detect line is on the same
>>>> power rail as vqmmc. That means that disabling the regulator prevents card
>>>> insertions to be detected.
>>>
>>> If the MMC host controller needs a supply enabling in order to do card
>>> detection and it's supposed to be doing card detection I'd expect it to
>>> be enabling that supply.  Why is it not doing that?
>>>
>>
>> Good question. I'm not that familiar with the dw_mmc host controller nor
>> its driver implementation so I'll let Yuvaraj or Doug to answer that.
Well,here it goes!
1. Power ON the board LDO4CTRL1[7:6] 11b
2. dw_mmc driver enable the vqmmc.
3. checks for UHS support, complete the voltage switching t0 1.8V
4. Does warm reset by reboot command.
5. mmc core calls mmc_set_ios() with MMC_POWER_OFF.
6. dw_mmc driver cut-off the regulator with LDO4CTRL1[7:6] is 00b
7.dw_mmc driver enable the vqmmc.
 But after step 7 also, LD4CTRL[7:6] is 00b.
>
> I haven't seen the issue that Yuvaraj is reporting (but I also haven't
> picked up all of the relevant patches and tried to reproduce), so I'm
> going to have to leave it to Yuvaraj to answer.
    static int max77802_enable(struct regulator_dev *rdev)
    {
      struct max77802_regulator_prv *max77802 = rdev_get_drvdata(rdev);
     int id = rdev_get_id(rdev);
     int shift = max77802_get_opmode_shift(id);
     return regmap_update_bits(rdev->regmap,
rdev->desc->enable_reg,rdev->desc->enable_mask,max77802->opmode[id] <<
shift);
  }
I think in the above code snippet, the "val" is what we got it during
the probe.We always write that value for enabling this regulator(which
is LDO4CTRL1[7:6] 00b after warm reset) which is not correct according
the MAX77802 manual.
>
> As far as I know the dw_mmc driver ought to be enabling vqmmc when it
> needs it.  Perhaps there's a bug in your patch series that adds vqmmc
> support to dw_mmc?
>
> -Doug

  reply	other threads:[~2014-08-25  8:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  8:32 [PATCH v9 0/2] Add Maxim 77802 regulator support Javier Martinez Canillas
2014-08-18  8:32 ` [PATCH v9 1/2] regulator: Add driver for max77802 PMIC PMIC regulators Javier Martinez Canillas
2014-08-18 15:23   ` Mark Brown
2014-08-22  6:01   ` Yuvaraj Cd
2014-08-22 12:15     ` Javier Martinez Canillas
2014-08-22 14:45       ` Mark Brown
2014-08-22 17:53         ` Javier Martinez Canillas
2014-08-22 18:30           ` Mark Brown
2014-08-22 22:02             ` Javier Martinez Canillas
2014-08-22 22:15               ` Doug Anderson
2014-08-25  8:22                 ` Yuvaraj Cd [this message]
2014-08-25  9:07                   ` Javier Martinez Canillas
2014-08-25 10:46                     ` Yuvaraj Cd
2014-08-25 15:40                     ` Doug Anderson
2014-08-25 17:20                       ` Javier Martinez Canillas
2014-08-26  7:17                       ` Mark Brown
2014-08-26  9:08                         ` Javier Martinez Canillas
2014-08-26  9:12                           ` Mark Brown
2014-08-18  8:32 ` [PATCH v9 2/2] regulator: Add DT bindings for max77802 " Javier Martinez Canillas
2014-08-18 15:23   ` Mark Brown

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='CA+NduCCT-KQ=gh7QWkBE4qkA2YOJ8KCVqbkC6Tkmb1aPvCsGFQ@mail.gmail.com' \
    --to=yuvaraj.lkml@gmail.com \
    --cc=a.kesavan@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=javier.martinez@collabora.co.uk \
    --cc=joshi@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=prashanth.g@samsung.com \
    /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).