public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Javier Martinez Canillas <javier@dowhile0.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Kukjin Kim <kgene@kernel.org>,
	Tobias Jakobi <liquid.acid@gmx.net>,
	Daniel Drake <drake@endlessm.com>,
	Sebastian Reichel <sre@kernel.org>,
	Seungwon Jeon <tgih.jun@samsung.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Chris Ball <chris@printf.net>,
	Joonyoung Shim <jy0922.shim@samsung.com>
Subject: Re: [PATCH 1/4] mmc: core: add support for hardware reset gpio line
Date: Fri, 30 Jan 2015 12:35:16 +0100	[thread overview]
Message-ID: <1422617716.9334.39.camel@collabora.co.uk> (raw)
In-Reply-To: <54CB5ECD.4090909@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 2449 bytes --]

On Fri, 2015-01-30 at 11:37 +0100, Marek Szyprowski wrote:
> Hello,
> 
> On 2015-01-29 11:56, Javier Martinez Canillas wrote:
> > On Thu, Jan 29, 2015 at 10:15 AM, Marek Szyprowski
> > <m.szyprowski@samsung.com> wrote:
> >>> Also, I wonder whether we could extend the mmc-pwrseq to cover your
> >>> case? Did you consider that as an option?
> >>
> >> I didn't consider mmc-pwrseq yet. For me it looked straightforward to
> > I agree with Ulf that using mmc-pwrseq would be a good solution and in
> > fact I think the pwrseq_simple [0] driver will fit your use case since
> > it supports a reset GPIO pin which is what many WLAN chips attached to
> > a SDIO interface use.
> 
> Ok, I've checked mmc-prwseq and mmc-pwrseq-simple. I also checked the
> hardware and it mmc-pwrseq-simple cannot be used directly.
> 
> Although the signal is called RSTN (on Odroid U3 schema), the eMMC card
> gets resetted not on low line level, but during the rising edge. This RSTN
> line is also pulled up by the external resistor. However, the strangest
> thing is the fact that the default SoC configuration (which is applied
> during hw reset) for this GPIO line is input, pulled-down. The SoC
> internal pull-down is stronger than the external pull up, so in the end,
> during the SoC reboot the RSTN signal is set to zero. Later bootloader
> disables the internal pull-down.
> 
> To sum up - to perform proper reboot on Odroid U3/XU3, one need to set
> RSTN to zero, wait a while and the set it back to 1.

> To achieve this with mmc-pwrseq-simple, I would need to modify the power_off
> callback to toggle reset line to zero and back to one. This however might
> not be desired to other sd/mmc cards used with mmc-pwrseq-simple.
> 
> I can also provide separate mmc-pwrsrq-odroid driver, which will be very
> similar to mmc-pwrseq-simple.

Apart from the initial odd setup of the SoC pins this is the standard
H/W reset operation specified by Jedec 4.4:

* pull the reset line down for at least 1us
* pull the line up again
* Wait at least 200us before sending commands

(sdhci_pci_int_hw_reset also implements this).

I'm not sure what the determining factor is for a pwrseq driver vs. it
being part of the mmc core would be. But if you do a pwrseq driver it
shouldn't be board specific e.g. call it mmc-pwrseq-emmc4.4 instead of
-odroid?


-- 
Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Collabora Ltd.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6170 bytes --]

      parent reply	other threads:[~2015-01-30 11:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1422453595-21160-1-git-send-email-m.szyprowski@samsung.com>
2015-01-28 13:59 ` [PATCH 4/4] ARM: dts: exynos5422-odroidxu3: add eMMC reset line Marek Szyprowski
     [not found] ` <1422453595-21160-2-git-send-email-m.szyprowski@samsung.com>
2015-01-28 14:24   ` [PATCH 1/4] mmc: core: add support for hardware reset gpio line Ulf Hansson
2015-01-28 14:41     ` Tobias Jakobi
     [not found]     ` <CAPDyKFpowidghwadJS+gYP0EVo6gRUhAG8s14CMEbwatFadP2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-29  9:15       ` Marek Szyprowski
     [not found]         ` <54C9FA48.5050705-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-29 10:56           ` Javier Martinez Canillas
2015-01-29 11:01             ` Marek Szyprowski
2015-01-30 10:37             ` Marek Szyprowski
2015-01-30 11:33               ` Ulf Hansson
2015-01-30 11:35               ` Sjoerd Simons [this message]

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=1422617716.9334.39.camel@collabora.co.uk \
    --to=sjoerd.simons@collabora.co.uk \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=drake@endlessm.com \
    --cc=javier@dowhile0.org \
    --cc=jh80.chung@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=liquid.acid@gmx.net \
    --cc=m.szyprowski@samsung.com \
    --cc=sre@kernel.org \
    --cc=tgih.jun@samsung.com \
    --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