All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Tomasz Figa <t.figa@samsung.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Chris Ball <chris@printf.net>,
	robh+dt@kernel.org, Kumar Gala <galak@codeaurora.org>,
	Olof Johansson <olof@lixom.net>,
	Fabio Estevam <festevam@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 1/3] mmc: add support for power-on sequencing through DT
Date: Thu, 13 Feb 2014 14:41:06 +0000	[thread overview]
Message-ID: <20140213144106.GW26684@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <2874395.Ul86gYA57i@wuerfel>

On Thu, Feb 13, 2014 at 01:48:55PM +0100, Arnd Bergmann wrote:
> On Thursday 13 February 2014 10:42:48 Russell King - ARM Linux wrote:
> > 
> > What if we have a platform where things subtly change, like for instance,
> > the wiring on the SD slot to fix a problem with UHS-1 cards, which means
> > you don't have UHS-1 support for some platforms but do for others.
> > 
> > What if you have a platform which uses a brcm4329 chip for Wifi, but then
> > later in the production run switch to using a different Wifi chipset?
> 
> As far as I can tell, the power sequencing is normally really
> dependent on the device. If someone has an on-board brcm4329
> that requires a specific set of clocks, resets, voltages etc
> to be routed to the chip and enabled in the correct order to
> allow probing, it seems unlikely that changing the wifi chipset
> to something else would keep the exact same requirements.

That's your assertion - however, do we /know/ whether there's a situation
where Olof's solution doesn't work because the sequencing is wrong?

I see nothing unreasonable about the sequence:

1. hold reset at low level
2. apply power
3. turn clock on
4. apply reset
5. release reset

The points being:
* never set a signal to a high level before power is applied, otherwise
  we can end up supplying power through that signal (which may cause
  damage.)  That goes for the reset and clock.
* devices normally want clocks running to complete their reset sequencing.

This is actually the sequence which MMC/SD cards do (except without the
reset) anyway - it's spec'd that on the MMC/SD bus, power will be applied
and will be stable before the clock signal is applied, and then the clock
signal runs for a certain number of cycles before you even start talking
to the card.

That all said, we do have the problem that once we decide, we need to
support it because it becomes part of DT - this is one of the things I
hate about DT, it requires over-design.  Your point is "Olof's solution
may break if we have a device which requires a different sequence" which
is a valid point which has to be considered from the DT perspective and
addressed whether or not we actually have a device which meets that
criteria.  I don't see an easy solution to this.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] mmc: add support for power-on sequencing through DT
Date: Thu, 13 Feb 2014 14:41:06 +0000	[thread overview]
Message-ID: <20140213144106.GW26684@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <2874395.Ul86gYA57i@wuerfel>

On Thu, Feb 13, 2014 at 01:48:55PM +0100, Arnd Bergmann wrote:
> On Thursday 13 February 2014 10:42:48 Russell King - ARM Linux wrote:
> > 
> > What if we have a platform where things subtly change, like for instance,
> > the wiring on the SD slot to fix a problem with UHS-1 cards, which means
> > you don't have UHS-1 support for some platforms but do for others.
> > 
> > What if you have a platform which uses a brcm4329 chip for Wifi, but then
> > later in the production run switch to using a different Wifi chipset?
> 
> As far as I can tell, the power sequencing is normally really
> dependent on the device. If someone has an on-board brcm4329
> that requires a specific set of clocks, resets, voltages etc
> to be routed to the chip and enabled in the correct order to
> allow probing, it seems unlikely that changing the wifi chipset
> to something else would keep the exact same requirements.

That's your assertion - however, do we /know/ whether there's a situation
where Olof's solution doesn't work because the sequencing is wrong?

I see nothing unreasonable about the sequence:

1. hold reset at low level
2. apply power
3. turn clock on
4. apply reset
5. release reset

The points being:
* never set a signal to a high level before power is applied, otherwise
  we can end up supplying power through that signal (which may cause
  damage.)  That goes for the reset and clock.
* devices normally want clocks running to complete their reset sequencing.

This is actually the sequence which MMC/SD cards do (except without the
reset) anyway - it's spec'd that on the MMC/SD bus, power will be applied
and will be stable before the clock signal is applied, and then the clock
signal runs for a certain number of cycles before you even start talking
to the card.

That all said, we do have the problem that once we decide, we need to
support it because it becomes part of DT - this is one of the things I
hate about DT, it requires over-design.  Your point is "Olof's solution
may break if we have a device which requires a different sequence" which
is a valid point which has to be considered from the DT perspective and
addressed whether or not we actually have a device which meets that
criteria.  I don't see an easy solution to this.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

  reply	other threads:[~2014-02-13 14:41 UTC|newest]

Thread overview: 114+ 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 ` Olof Johansson
2014-01-20  3:56 ` [PATCH 1/3] mmc: add support for power-on sequencing through DT Olof Johansson
2014-01-20  3:56   ` Olof Johansson
2014-01-20  8:44   ` Ulf Hansson
2014-01-20  8:44     ` Ulf Hansson
2014-01-20 19:13     ` Olof Johansson
2014-01-20 19:13       ` Olof Johansson
2014-01-21  8:55       ` Ulf Hansson
2014-01-21  8:55         ` Ulf Hansson
2014-01-21 18:14         ` Olof Johansson
2014-01-21 18:14           ` Olof Johansson
2014-01-22 11:30           ` Mark Brown
2014-01-22 11:30             ` Mark Brown
2014-01-20 16:36   ` Mark Brown
2014-01-20 16:36     ` Mark Brown
2014-01-20 16:48   ` Russell King - ARM Linux
2014-01-20 16:48     ` Russell King - ARM Linux
2014-01-20 17:03     ` Fabio Estevam
2014-01-20 17:03       ` Fabio Estevam
2014-01-20 17:16       ` Russell King - ARM Linux
2014-01-20 17:16         ` Russell King - ARM Linux
2014-01-20 18:47         ` Fabio Estevam
2014-01-20 18:47           ` Fabio Estevam
2014-01-21 19:19           ` Russell King - ARM Linux
2014-01-21 19:19             ` Russell King - ARM Linux
2014-01-24 17:35     ` Fabio Estevam
2014-01-24 17:35       ` Fabio Estevam
2014-01-27  8:43       ` Jyri Sarha
2014-01-27  8:43         ` Jyri Sarha
2014-01-27  8:54         ` Chen-Yu Tsai
2014-01-27  8:54           ` Chen-Yu Tsai
2014-01-27  9:48           ` Jyri Sarha
2014-01-27  9:48             ` Jyri Sarha
2014-01-20 18:58   ` Arnd Bergmann
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:04         ` Olof Johansson
2014-01-20 19:12         ` Arnd Bergmann
2014-01-20 19:12           ` Arnd Bergmann
2014-01-20 19:14   ` Fabio Estevam
2014-01-20 19:14     ` Fabio Estevam
2014-01-20 19:14     ` Olof Johansson
2014-01-20 19:14       ` Olof Johansson
2014-01-21  7:24   ` Sascha Hauer
2014-01-21  7:24     ` Sascha Hauer
2014-01-21  7:25     ` Sascha Hauer
2014-01-21  7:25       ` Sascha Hauer
2014-01-21 18:34   ` Tomasz Figa
2014-01-21 18:34     ` Tomasz Figa
2014-01-21 21:30     ` Olof Johansson
2014-01-21 21:30       ` Olof Johansson
2014-01-21 21:39       ` Tomasz Figa
2014-01-21 21:39         ` Tomasz Figa
2014-01-26 17:26     ` Tomasz Figa
2014-01-26 17:26       ` Tomasz Figa
2014-01-27 10:19       ` Ulf Hansson
2014-01-27 10:19         ` Ulf Hansson
2014-01-28  0:59         ` Tomasz Figa
2014-01-28  0:59           ` Tomasz Figa
2014-01-28  1:08           ` Chris Ball
2014-01-28  1:08             ` Chris Ball
2014-01-28 10:06           ` Ulf Hansson
2014-01-28 10:06             ` Ulf Hansson
2014-01-28 10:48             ` Arnd Bergmann
2014-01-28 10:48               ` Arnd Bergmann
2014-02-12 18:33               ` Mark Brown
2014-02-12 18:33                 ` Mark Brown
2014-02-13  8:56               ` Ulf Hansson
2014-02-13  8:56                 ` Ulf Hansson
2014-02-13  9:01                 ` Tomasz Figa
2014-02-13  9:01                   ` Tomasz Figa
2014-02-13 10:42               ` Russell King - ARM Linux
2014-02-13 10:42                 ` Russell King - ARM Linux
2014-02-13 12:48                 ` Arnd Bergmann
2014-02-13 12:48                   ` Arnd Bergmann
2014-02-13 14:41                   ` Russell King - ARM Linux [this message]
2014-02-13 14:41                     ` Russell King - ARM Linux
2014-02-13 16:13                     ` Arnd Bergmann
2014-02-13 16:13                       ` Arnd Bergmann
2014-02-13 17:31                       ` Olof Johansson
2014-02-13 17:31                         ` Olof Johansson
2014-02-15 12:18                       ` Arnd Bergmann
2014-02-15 12:18                         ` Arnd Bergmann
2014-02-15 12:27                         ` Russell King - ARM Linux
2014-02-15 12:27                           ` Russell King - ARM Linux
2014-02-15 13:09                           ` Arnd Bergmann
2014-02-15 13:09                             ` Arnd Bergmann
2014-02-15 13:22                             ` Tomasz Figa
2014-02-15 13:22                               ` Tomasz Figa
2014-02-15 16:21                               ` Arnd Bergmann
2014-02-15 16:21                                 ` Arnd Bergmann
2014-02-15 20:52                                 ` Russell King - ARM Linux
2014-02-15 20:52                                   ` Russell King - ARM Linux
2014-02-15 21:35                                   ` Tomasz Figa
2014-02-15 21:35                                     ` Tomasz Figa
2014-02-15 22:03                                     ` Russell King - ARM Linux
2014-02-15 22:03                                       ` Russell King - ARM Linux
2014-02-17 13:00                                   ` Arnd Bergmann
2014-02-17 13:00                                     ` Arnd Bergmann
2014-02-17 23:25                                 ` Mark Brown
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  3:56   ` Olof Johansson
2014-01-20  4:53   ` Jaehoon Chung
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-20  3:56   ` 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-01-30 21:49   ` Russell King - ARM Linux
2014-02-01 16:14   ` Russell King - ARM Linux
2014-02-01 16:14     ` Russell King - ARM Linux
2014-02-13 10:36     ` 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=20140213144106.GW26684@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=t.figa@samsung.com \
    --cc=tomasz.figa@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.