public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] Add enhanced strobe support for emmc version 5.1 or later
@ 2016-03-03  2:35 Shawn Lin
  2016-03-03  2:36 ` [RFC PATCH 1/4] mmc: core: add cap-enhanced-strobe support Shawn Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Shawn Lin @ 2016-03-03  2:35 UTC (permalink / raw)
  To: Adrian Hunter, Ulf Hansson
  Cc: Michal Simek, soren.brinkmann, linux-mmc, linux-kernel, Shawn Lin


Hello Ulf and Adrian,

This RFC patch is going to support enhanced strobe function
for emmc version 5.1+ introduced by JEDEC recently.

Firstly,from the former discussion of sdhci, I write these code
inspired by Adrian's patch[0] for variant drivers to overwrite the
callback in order not to add new callback into sdhci. And enchanced
strobe is a optional function, so we add a new cap* for drivers to
decide whether to use it.

1. History
   When introduing hs400 mode, JEDEC asks controllers to use data strobe line
to latch the data from emmc devives. But for cmd-reponse, not mentioned yet.
Since emmc version 5.1 published, JEDEC adds enhanced strobe function to deal
with cmd-response the same way as dara-read. This feature is optional.

2. Current situation
   I can't find a upstreamed controller claimed to support it, as well as the
mmc stack. But my "arasan,sdhci-5.1" actially supports this function. So I decide
to work for this part.

3. About the code
   1)This patchset is taken from Yi Sun's patch[1], but after reviewing the details
and applying to test, I find some problems. We ask devices to switch to enhanced
strobe mode, but we don't notify drivers to enable enhanced strobe mode. And we can't
force controller to use enhanced strobe even if devices claims to support it. So I
rework most of the code and take over the ownership from Yi Sun(If any objections
here, please let know).
   2)By looking into the SDHCI spec, I find there isn't any registers to enable the
enhanced strobe function. But from my "arasan,sdhci-5.1" databook, it describes a
register called VENDOR_REGISTER(0x78) to trigger this mode. So I guess other sdhci
variant drivers may also need s vendor specific register to deal with it.

4. Howto
   If we are sure that our controller supports enhanced strobe mode, just add
cap-enhanced-strobe in DT. Once emmc devices claims to support this mode,
we enable it automatically. Of course, other sdhci*/non-sdhci drivers should
implement/overwrite the prepare_enhanced_strobe by themselves. I believe all of the
platforms which need to support this mode should do some basic preparation for their
controllers.

Reference:
[0]: https://patchwork.kernel.org/patch/8262231/
[1]: https://patchwork.kernel.org/patch/6545421/



Shawn Lin (4):
  mmc: core: add cap-enhanced-strobe support
  mmc: core: implement enhanced strobe support
  mmc: sdhci: implement enhanced strobe callback
  mmc: sdhci-of-arasan: overwrite enhanced strobe callback

 Documentation/devicetree/bindings/mmc/mmc.txt |  1 +
 drivers/mmc/core/host.c                       |  2 +
 drivers/mmc/core/mmc.c                        | 54 ++++++++++++++++++++++++++-
 drivers/mmc/host/sdhci-of-arasan.c            | 20 ++++++++++
 drivers/mmc/host/sdhci.c                      | 11 ++++++
 include/linux/mmc/card.h                      |  1 +
 include/linux/mmc/host.h                      |  8 ++++
 include/linux/mmc/mmc.h                       |  2 +
 8 files changed, 98 insertions(+), 1 deletion(-)

-- 
2.3.7

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-03-04  2:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03  2:35 [RFC PATCH 0/4] Add enhanced strobe support for emmc version 5.1 or later Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 1/4] mmc: core: add cap-enhanced-strobe support Shawn Lin
2016-03-03 12:08   ` Jaehoon Chung
2016-03-04  1:39     ` Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 2/4] mmc: core: implement enhanced strobe support Shawn Lin
2016-03-03 13:37   ` Adrian Hunter
2016-03-04  2:00     ` Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 3/4] mmc: sdhci: implement enhanced strobe callback Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 4/4] mmc: sdhci-of-arasan: overwrite " Shawn Lin
2016-03-03 11:02   ` Michal Simek
2016-03-03 11:37     ` Shawn Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox