devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-mmc <linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Chris Ball <chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org>,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/3] mmc: add support for power-on sequencing through DT
Date: Tue, 18 Feb 2014 08:25:11 +0900	[thread overview]
Message-ID: <20140217232511.GA2669@sirena.org.uk> (raw)
In-Reply-To: <1528854.BAQRr94nzx@wuerfel>

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

On Sat, Feb 15, 2014 at 05:21:11PM +0100, Arnd Bergmann wrote:
> On Saturday 15 February 2014 14:22:30 Tomasz Figa wrote:

> > I'm not sure if we should assume that SPI = MMC over SPI. I believe 
> > there might be a custom protocol involved as well.

> In case of SD/MMC, you essentially have three separate command sets:
> SPI, MMC and SD, and each of them has multiple versions. MMC and SD
> compatible devices generally also support the SPI command set (IIRC

...

> If a device supports both SDIO and SPI, I think a straightforward
> implementation would be to use the exact same command set, but
> you are right that this isn't the only possibility, and the SD/MMC
> shows how they can be slightly different already.

I'm aware of existing devices that do in fact break this assumption.

> > Stepping aside from SPI, I already gave an example of a WLAN chip that 
> > supports multiple control busses [1]. In addition to the commonly used 
> > SDIO, it supports USB and HSIC as well:

> > [1] http://www.marvell.com/wireless/assets/marvell_avastar_88w8797.pdf

> > Moreover, some of Samsung boards use HSIC to communicate with modem 
> > chips, which have exactly the same problem as we're trying to solve here 
> > - they need to be powered on to be discovered.

> Thanks, this definitely makes a good example. I see that it also
> supports SPI mode for SDIO as mentioned in your link.

Slimbus has all these issues too with the added fun that for normal
operation some devices want to be in a low power mode where they're
disconnected from the Slimbus a lot of the time.

> * Olof's proposal (add properties or a child node to the host
>   controller node with just power-on sequencing information):
>   + We only need one implementation for each bus, possibly shared
>     across buses to some degree, and can handle lots of devices
>     without having to touch their individual drivers.
>   + A logical extension of things we already do on SD cards
>     (CD/WP GPIOs, external clocks and voltages supplied to
>     standard compliant devices as part of the normal probing)
>   - The shared code may get rather complex to deal with all
>     possible corner cases we run into over the years.
>   - Somewhat harder to do if you have to attach the power
>     information to a device node for a USB hub port, rather
>     than an SDIO controller that only has one slave device.

We would also need mechanisms to allow devices to take over the running
of their own resources for cases like the Slimbus ones I mentioned, and
some mechanism to cope with devices that hotplug themselves in normal
operation.

> * Arnd's proposal (change bus code to probe nonstandard devices
>   from DT if we can't easily detect them):

I've also proposed this in the past FWIW but never got far enough
through my list of things I want to do with my subsystems to actually
start coding.

>   - Has to be implemented in each driver that needs it, making
>     it harder to share code for drivers with the same need
>     (e.g. every device that just needs an external reset
>     trigger).

I think we can probably come up with some standard helpers that work
well for the common case here (see also some of the discussions about
power domains ensuring that core IP clocks are provided for IPs, it's
kind of circling back to the same issues).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-02-17 23:25 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20  3:56 [PATCH 0/3] RFC/RFT: Powering on MMC Wifi/BT modules in MMC core Olof Johansson
2014-01-20  3:56 ` [PATCH 1/3] mmc: add support for power-on sequencing through DT Olof Johansson
2014-01-20  8:44   ` Ulf Hansson
2014-01-20 19:13     ` Olof Johansson
2014-01-21  8:55       ` Ulf Hansson
2014-01-21 18:14         ` Olof Johansson
2014-01-22 11:30           ` Mark Brown
2014-01-20 16:36   ` Mark Brown
2014-01-20 16:48   ` Russell King - ARM Linux
2014-01-20 17:03     ` Fabio Estevam
2014-01-20 17:16       ` Russell King - ARM Linux
2014-01-20 18:47         ` Fabio Estevam
2014-01-21 19:19           ` Russell King - ARM Linux
2014-01-24 17:35     ` Fabio Estevam
2014-01-27  8:43       ` Jyri Sarha
2014-01-27  8:54         ` Chen-Yu Tsai
2014-01-27  9:48           ` Jyri Sarha
2014-01-20 18:58   ` Arnd Bergmann
     [not found]     ` <201401201958.57997.arnd-r2nGTMty4D4@public.gmane.org>
2014-01-20 19:04       ` Olof Johansson
2014-01-20 19:12         ` Arnd Bergmann
2014-01-20 19:14   ` Fabio Estevam
2014-01-20 19:14     ` Olof Johansson
2014-01-21  7:24   ` Sascha Hauer
2014-01-21  7:25     ` Sascha Hauer
2014-01-21 18:34   ` Tomasz Figa
2014-01-21 21:30     ` Olof Johansson
2014-01-21 21:39       ` Tomasz Figa
2014-01-26 17:26     ` Tomasz Figa
2014-01-27 10:19       ` Ulf Hansson
2014-01-28  0:59         ` Tomasz Figa
2014-01-28  1:08           ` Chris Ball
2014-01-28 10:06           ` Ulf Hansson
2014-01-28 10:48             ` Arnd Bergmann
2014-02-12 18:33               ` Mark Brown
2014-02-13  8:56               ` Ulf Hansson
2014-02-13  9:01                 ` Tomasz Figa
2014-02-13 10:42               ` Russell King - ARM Linux
2014-02-13 12:48                 ` Arnd Bergmann
2014-02-13 14:41                   ` Russell King - ARM Linux
2014-02-13 16:13                     ` Arnd Bergmann
2014-02-13 17:31                       ` Olof Johansson
2014-02-15 12:18                       ` Arnd Bergmann
2014-02-15 12:27                         ` Russell King - ARM Linux
2014-02-15 13:09                           ` Arnd Bergmann
2014-02-15 13:22                             ` Tomasz Figa
2014-02-15 16:21                               ` Arnd Bergmann
2014-02-15 20:52                                 ` Russell King - ARM Linux
2014-02-15 21:35                                   ` Tomasz Figa
2014-02-15 22:03                                     ` Russell King - ARM Linux
2014-02-17 13:00                                   ` Arnd Bergmann
2014-02-17 23:25                                 ` Mark Brown [this message]
2014-01-20  3:56 ` [PATCH 2/3] mmc: dw_mmc: call mmc_of_parse to fill in common options Olof Johansson
2014-01-20  4:53   ` Jaehoon Chung
2014-01-20  3:56 ` [PATCH 3/3] ARM: dts: exynos5250-snow: Enable wifi power-on Olof Johansson
2014-01-30 21:49 ` [PATCH 0/3] RFC/RFT: Powering on MMC Wifi/BT modules in MMC core Russell King - ARM Linux
2014-02-01 16:14   ` Russell King - ARM Linux
2014-02-13 10:36     ` Russell King - ARM Linux

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=20140217232511.GA2669@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).