devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Olof Johansson <olof@lixom.net>
Cc: linux-mmc@vger.kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, linux@arm.linux.org.uk,
	pawel.moll@arm.com, chris@printf.net, robh+dt@kernel.org,
	ijc+devicetree@hellion.org.ok, galak@codeaurora.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] mmc: add support for power-on sequencing through DT
Date: Tue, 21 Jan 2014 08:24:47 +0100	[thread overview]
Message-ID: <20140121072447.GC19940@pengutronix.de> (raw)
In-Reply-To: <1390190215-22700-2-git-send-email-olof@lixom.net>

On Sun, Jan 19, 2014 at 07:56:53PM -0800, Olof Johansson wrote:
> This patch enables support for power-on sequencing of SDIO peripherals through DT.
> 
> In general, it's quite common that wifi modules and other similar
> peripherals have several signals in addition to the SDIO interface that
> needs wiggling before the module will power on. It's common to have a
> reference clock, one or several power rails and one or several lines
> for reset/enable type functions.
> 
> The binding as written today introduces a number of reset gpios,
> a regulator and a clock specifier. The code will handle up to 2 gpio
> reset lines, but it's trivial to increase to more than that if needed
> at some point.
> 
> Implementation-wise, the MMC core has been changed to handle this during
> host power up, before the host interface is powered on. I have not yet
> implemented the power-down side, I wanted people to have a chance for
> reporting back w.r.t. issues (or comments on the bindings) first.
> 
> I have not tested the regulator portion, since the system and module
> I'm working on doesn't need one (Samsung Chromebook with Marvell
> 8797-based wifi). Testing of those portions (and reporting back) would
> be appreciated.
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>  Documentation/devicetree/bindings/mmc/mmc.txt |   11 +++++++
>  drivers/mmc/core/core.c                       |   42 +++++++++++++++++++++++++
>  drivers/mmc/core/host.c                       |   30 +++++++++++++++++-
>  include/linux/mmc/host.h                      |    5 +++
>  4 files changed, 87 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
> index 458b57f..962e0ee 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt
> @@ -5,6 +5,8 @@ these definitions.
>  Interpreted by the OF core:
>  - reg: Registers location and length.
>  - interrupts: Interrupts used by the MMC controller.
> +- clocks: Clocks needed for the host controller, if any.
> +- clock-names: Goes with clocks above.
>  
>  Card detection:
>  If no property below is supplied, host native card detect is used.
> @@ -30,6 +32,15 @@ Optional properties:
>  - cap-sdio-irq: enable SDIO IRQ signalling on this interface
>  - full-pwr-cycle: full power cycle of the card is supported
>  
> +Card power and reset control:
> +The following properties can be specified for cases where the MMC
> +peripheral needs additional reset, regulator and clock lines. It is for
> +example common for WiFi/BT adapters to have these separate from the main
> +MMC bus:
> +  - card-reset-gpios: Specify GPIOs for card reset (reset active low)

We have GPIO_ACTIVE_LOW/HIGH. No need to hardcode this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2014-01-21  7:24 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 [this message]
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
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=20140121072447.GC19940@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.ok \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.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).