public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Jaehoon Chung <jh80.chung@samsung.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: shawn.lin@rock-chips.com, Rob Herring <robh+dt@kernel.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Heiko Stuebner <heiko@sntech.de>,
	linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 0/6] Add support of inverting power control and some minor cleanup
Date: Tue, 9 Aug 2016 10:12:15 +0800	[thread overview]
Message-ID: <8da29b3d-20f1-6529-c985-c462dbdd7fb1@rock-chips.com> (raw)
In-Reply-To: <cc785e09-6b33-d451-3d11-728bee3668a5@rock-chips.com>

On 2016/8/9 9:49, Shawn Lin wrote:
> Hi,
>
> On 2016/8/8 18:24, Jaehoon Chung wrote:
>> Hi Shawn,
>>
>> On 08/07/2016 10:33 AM, Shawn Lin wrote:
>>> By default, dw_mmc outputs high level voltage to indicate powering
>>> up the card and outputs low level vcltage to indicate powering
>>> off the card. But that is not always correct. The power io should
>>> be able to control different kind of hw components to supply or
>>> cutoff power to the card. We have boards that need this patchset
>>> to make the power control correct. Meanwhile let's expose it to
>>> DT for board-specific usage.
>>
>> I have a question for this patch-set. Does DWMMC IP support to invert
>> ON/OFF at Power Enable register?
>
> No.
>
>> Hmm..Well, if use the DW_MMC_CARD_PWR_INVERT, it should also be the
>> similar behavior with Quirks.
>
> yup, it makes the power control more complicated than before. :(
>
>>
>> Other flags are related with dwmmc IP. But this flag
>> (DW_MMC_CARD_PWR_INVERT) is not related with IP side.
>> I understood why you needs to add this flag..Is rockchip designed to
>> invert the power controlling?
>
> We don't invert the power controlling but our customers do.
> The HW componet looks like some discrete LDOs which enable the related
> power supply when outputing low voltage from pwren..
>
>>
>> But it's not general case. We can discuss about this.
>
> I have a solution which is to add gpio power control for slot-gpio of
> mmc core. once finished, we could add pwr_cap_invert just like what we
> did for cd/wp invert control..
>
> Then we could remove PWREN from the default state of
> pinctrl inside the sdmmc dt node, and let dwmmc request gpio power
> control stuff after paring the property for pwr_cap_invert..
>
> More over, it well fit for all mmc host's requirement of gpio
> power control and inverted control if they want it. :)
>
>
> That should be legit for us?
> If it sounds ok to you and Ulf, I will come up with a RFC one for
> community to comment it.:)

one more, maybe pwrseq is also a choice for us.
But I'm not sure if it deserves a pwerseq_sd.c ?

>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>>
>>> Changes in v2:
>>> - fix copy-paste err and typo
>>>
>>> Shawn Lin (6):
>>>   dt-bindings: rockchip-dw-mshc: add description of
>>>     rockchip,power-invert
>>>   mmc: dw_mmc: cleanup power setting of set_ios callback
>>>   mmc: dw_mmc: split out dw_mci_set_power
>>>   mmc: dw_mmc: split out dw_mci_set_power_reg
>>>   mmc: dw_mmc: support inverted power control
>>>   mmc: dw_mmc-rockchip: add parsing of power control from DT
>>>
>>>  .../devicetree/bindings/mmc/rockchip-dw-mshc.txt   |   6 +
>>>  drivers/mmc/host/dw_mmc-rockchip.c                 |   8 ++
>>>  drivers/mmc/host/dw_mmc.c                          | 134
>>> ++++++++++++---------
>>>  drivers/mmc/host/dw_mmc.h                          |   1 +
>>>  4 files changed, 90 insertions(+), 59 deletions(-)
>>>
>>
>>
>>
>>
>
>


-- 
Best Regards
Shawn Lin


  reply	other threads:[~2016-08-09  2:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20160807013720epcas1p235628058a90efa6f0062b03a4b2e4284@epcas1p2.samsung.com>
2016-08-07  1:33 ` [PATCH v2 0/6] Add support of inverting power control and some minor cleanup Shawn Lin
     [not found]   ` <1470533618-16312-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-08-07  1:34     ` [PATCH v2 1/6] dt-bindings: rockchip-dw-mshc: add description of rockchip,power-invert Shawn Lin
     [not found]       ` <1470533644-16357-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-08-10 18:46         ` Rob Herring
2016-08-07  1:34     ` [PATCH v2 3/6] mmc: dw_mmc: split out dw_mci_set_power Shawn Lin
2016-08-07  1:34   ` [PATCH v2 2/6] mmc: dw_mmc: cleanup power setting of set_ios callback Shawn Lin
2016-08-07  1:34   ` [PATCH v2 4/6] mmc: dw_mmc: split out dw_mci_set_power_reg Shawn Lin
2016-08-07  1:34   ` [PATCH v2 5/6] mmc: dw_mmc: support inverted power control Shawn Lin
2016-08-07  1:35   ` [PATCH v2 6/6] mmc: dw_mmc-rockchip: add parsing of power control from DT Shawn Lin
2016-08-08 10:24   ` [PATCH v2 0/6] Add support of inverting power control and some minor cleanup Jaehoon Chung
2016-08-09  1:49     ` Shawn Lin
2016-08-09  2:12       ` Shawn Lin [this message]
2016-08-11 10:08       ` Jaehoon Chung
2016-08-12  2:57         ` Shawn Lin

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=8da29b3d-20f1-6529-c985-c462dbdd7fb1@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.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