From: Ziji Hu <huziji@marvell.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Gregory CLEMENT <gregory.clement@free-electrons.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Jimmy Xu <zmxu@marvell.com>, Jisheng Zhang <jszhang@marvell.com>,
Nadav Haklai <nadavh@marvell.com>, Ryan Gao <ygao@marvell.com>,
Doug Jones <dougj@marvell.com>, Victor Gu <xigu@marvell.com>,
"Wei(SOCP) Liu" <liuw@marvell.com>,
Wilson Ding <dingwei@marvell.com>,
Romain Perier <romain.perier@free-electrons.com>,
Yehuda Yitschak <yehuday@marvell.com>,
Marcin Wojtas <mw@semihalf.com>, Hanna Hawa <hannah@marvell.com>,
Kostya Porotchkin <kostap@marvell.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/10] mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality
Date: Fri, 25 Nov 2016 21:43:10 +0800 [thread overview]
Message-ID: <07d4a4e2-1fbe-6495-12be-d3977db13120@marvell.com> (raw)
In-Reply-To: <CAPDyKFoqyF5QkJy+PmGa-b8JhaUmVXeoqBfv+pdupFiJBgyiLg@mail.gmail.com>
Hi Ulf,
On 2016/11/25 21:06, Ulf Hansson wrote:
> [...]
>
>>>>>>> +
>>>>>>> + /*
>>>>>>> + * Xenon Specific property:
>>>>>>> + * emmc: explicitly indicate whether this slot is for eMMC
>>>>>>> + * slotno: the index of slot. Refer to SDHC_SYS_CFG_INFO register
>>>>>>> + * tun-count: the interval between re-tuning
>>>>>>> + * PHY type: "sdhc phy", "emmc phy 5.0" or "emmc phy 5.1"
>>>>>>> + */
>>>>>>> + if (of_property_read_bool(np, "marvell,xenon-emmc"))
>>>>>>> + priv->emmc_slot = true;
>>>>>>
>>>>>> So, you need this because of the eMMC voltage switch behaviour, right?
>>>>>>
>>>>>> Then I would rather like to describe this a generic DT bindings for
>>>>>> the eMMC voltage level support. There have acutally been some earlier
>>>>>> discussions for this, but we haven't yet made some changes.
>>>>>>
>>>>>> I think what is missing is a mmc-ddr-3_3v DT binding, which when set,
>>>>>> allows the host driver to accept I/O voltage switches to 3.3V. If not
>>>>>> supported the ->start_signal_voltage_switch() ops may return -EINVAL.
>>>>>> This would inform the mmc core to move on to the next supported
>>>>>> voltage level. There might be some minor additional changes to the mmc
>>>>>> card initialization sequence, but those should be simple.
>>>>>>
>>>>>> I can help out to look into this, unless you want to do it yourself of course!?
>>>>>>
>>>>> Yes. One of the reasons is to provide eMMC specific voltage setting.
>>>>> But in my very own opinion, it should be irrelevant to voltage level.
>>>>> The eMMC voltage setting on our SDHC is different from SD/SDIO voltage switch.
>>>>> It will become more complex with different SOC implementation details.
>>>>
>>>> Got it. Although I think we can cope with that fine just by using the
>>>> different SD/eMMC speed modes settings defined in DT (or from the
>>>> SDHCI caps register)
>>>>
>>> In my very opinion, I'm not sure if there is any corner case that driver cannot
>>> determine the eMMC card type from DT and SDHC caps.
>>>
>>>>> Unfortunately, MMC driver cannot determine the card type yet when eMMC voltage
>>>>> setting should be executed.
>>>>> Thus an flag is required here to tell driver to execute eMMC voltage setting.
>>>>>
>>>>> Besides, additional eMMC specific settings might be implemented in future, besides
>>>>> voltage setting. Most of them should be completed before MMC driver recognizes the
>>>>> card type. Thus I have to keep this flag to indicate current SDHC is for eMMC.
>>>>
>>>> I doubt you will need a generic "eMMC" flag, but let's see when we go forward.
>>>>
>>>> Currently it's clear you don't need such a flag, so I will submit a
>>>> change adding a DT binding for "mmc-ddr-3_3v" then we can take it from
>>>> there, to see if it suits your needs.
>>>>
>>
>> Another reason for a special "xenon-emmc" property is that our host IP usually can
>> support both eMMC and SD. Whether a host is used as eMMC or SD depends on the
>> final implementation of the actual product.
>> Thus our host driver needs to know whether current SDHC is fixed as eMMC or SD.
>> So far, It can only get the information from DT.
>
> As a matter of fact for mounted non-removable cards, such as eMMC, we
> already have the option to describe some of their characteristics in
> DT. Perhaps that's what you need?
>
> Please have a look at:
> Documentation/devicetree/bindings/mmc/mmc-card.txt
>
Great!
I will try this mmc-card sub-node.
Thank you very much.
Best regards,
Hu Ziji
>>
>> After out host driver get the card type information from DT, it can prepare eMMC
>> specific voltage, set eMMC specific mmc->caps/caps2 flags and do other
>> vendor specific init, before card init procedure.
>> Otherwise, our host driver has to wait until card type is determined in mmc_rescan().
>>
>> A generic "eMMC" flag is unnecessary. I just require a private property,
>> which is only used in our host driver and DT.
>>
>> Thank you.
>>
>> Best regards,
>> Hu Ziji
>>
>>>
>>> Actually, our eMMC is usually fixed as 1.8V.
>>>
>>> The pair "no-sd" + "no-sdio" can provide the similar information.
>>> But I'm not sure if it is proper to use those two property in such a way.
>>>
>>> Thank you.
>>>
>>> Best regards
>>> Hu Ziji
>>>
>>>> [...]
>>>>
>>>> Kind regards
>>>> Uffe
>>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>
> Kind regards
> Uffe
>
next prev parent reply other threads:[~2016-11-25 13:57 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 11:09 [PATCH 0/10] mmc: Add support to Marvell Xenon SD Host Controller Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 1/10] mmc: sdhci: Export sdhci_set_ios() from sdhci.c Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 2/10] mmc: sdhci: Export sdhci_start_signal_voltage_switch() in sdhci.c Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 3/10] mmc: sdhci: Export sdhci_execute_tuning() " Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 4/10] MAINTAINERS: add entry for Marvell Xenon MMC Host Controller drivers Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 5/10] dt: bindings: Add bindings for Marvell Xenon SD Host Controller Gregory CLEMENT
2016-11-09 18:24 ` Rob Herring
2016-11-10 11:44 ` Ziji Hu
2016-11-11 3:22 ` Jisheng Zhang
2016-11-11 3:33 ` Jisheng Zhang
2016-11-22 17:23 ` Gregory CLEMENT
2016-11-24 9:05 ` Ulf Hansson
2016-11-24 9:11 ` Arnd Bergmann
2016-11-24 9:22 ` Gregory CLEMENT
2016-11-24 9:34 ` Arnd Bergmann
[not found] ` <8737ihmctr.fsf@free-electrons.com>
2016-11-24 9:48 ` Thomas Petazzoni
2016-11-24 10:04 ` Arnd Bergmann
2016-11-24 9:49 ` Marcin Wojtas
2016-11-24 10:10 ` Thomas Petazzoni
2016-11-24 10:38 ` Ziji Hu
2016-10-31 11:09 ` [PATCH 6/10] mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality Gregory CLEMENT
2016-11-24 10:43 ` Ulf Hansson
2016-11-24 12:41 ` Ziji Hu
2016-11-24 13:34 ` Ulf Hansson
2016-11-24 15:00 ` Ziji Hu
2016-11-25 8:45 ` Ziji Hu
2016-11-25 13:06 ` Ulf Hansson
2016-11-25 13:43 ` Ziji Hu [this message]
2016-11-25 13:01 ` Ulf Hansson
2016-11-25 14:04 ` Adrian Hunter
2016-10-31 11:09 ` [PATCH 7/10] mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC Gregory CLEMENT
2016-11-24 9:56 ` Arnd Bergmann
2016-11-24 10:57 ` Ziji Hu
2016-11-24 11:09 ` Arnd Bergmann
2016-11-24 11:37 ` Ulf Hansson
2016-11-24 13:34 ` Ziji Hu
2016-11-24 14:33 ` Ulf Hansson
2016-11-24 15:37 ` Ziji Hu
2016-11-28 10:10 ` Ziji Hu
2016-11-28 11:13 ` Ulf Hansson
2016-11-28 11:38 ` Ziji Hu
2016-11-28 15:16 ` Ulf Hansson
2016-11-29 2:53 ` Ziji Hu
2016-11-29 7:49 ` Ulf Hansson
2016-11-29 10:33 ` Ziji Hu
2016-11-29 11:11 ` Ulf Hansson
2016-11-29 12:00 ` Ziji Hu
2016-11-28 11:09 ` Ulf Hansson
2016-10-31 11:09 ` [PATCH 8/10] arm64: dts: marvell: add eMMC support for Armada 37xx Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 9/10] arm64: dts: marvell: add sdhci support for Armada 7K/8K Gregory CLEMENT
2016-10-31 11:09 ` [PATCH 10/10] arm64: configs: enable SDHCI driver for Xenon Gregory CLEMENT
2016-11-04 11:20 ` [PATCH 0/10] mmc: Add support to Marvell Xenon SD Host Controller Gregory CLEMENT
2016-11-23 8:30 ` Gregory CLEMENT
-- strict thread matches above, loose matches on Subject: below --
2016-10-07 15:22 Gregory CLEMENT
2016-10-07 15:22 ` [PATCH 6/10] mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality Gregory CLEMENT
2016-10-11 12:37 ` Adrian Hunter
2016-10-12 11:58 ` Ziji Hu
2016-10-12 13:07 ` Adrian Hunter
2016-10-13 5:38 ` Ziji Hu
2016-10-17 8:14 ` Adrian Hunter
2016-10-18 12:09 ` Ziji Hu
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=07d4a4e2-1fbe-6495-12be-d3977db13120@marvell.com \
--to=huziji@marvell.com \
--cc=adrian.hunter@intel.com \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=dingwei@marvell.com \
--cc=dougj@marvell.com \
--cc=gregory.clement@free-electrons.com \
--cc=hannah@marvell.com \
--cc=jason@lakedaemon.net \
--cc=jszhang@marvell.com \
--cc=kostap@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=liuw@marvell.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=robh+dt@kernel.org \
--cc=romain.perier@free-electrons.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=ulf.hansson@linaro.org \
--cc=xigu@marvell.com \
--cc=yehuday@marvell.com \
--cc=ygao@marvell.com \
--cc=zmxu@marvell.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
Powered by JetHome