All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Olof Johansson <olof@lixom.net>, Tomasz Figa <tomasz.figa@gmail.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Arend van Spriel <arend@broadcom.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Chris Ball <chris@printf.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	devicetree <devicetree@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Fabio Estevam <festevam@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Jyri Sarha <jsarha@ti.com>
Subject: Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree
Date: Sat, 24 May 2014 12:09:01 +0200	[thread overview]
Message-ID: <53806FBD.8050706@redhat.com> (raw)
In-Reply-To: <20140523164701.GA26488@quad.lixom.net>

Hi,

On 05/23/2014 06:47 PM, Olof Johansson wrote:
> On Thu, May 22, 2014 at 07:20:55PM +0200, Tomasz Figa wrote:
>> Hi,
>>
>>
>> On 22.05.2014 13:38, Hans de Goede wrote:
>>> On 05/22/2014 12:23 PM, Chen-Yu Tsai wrote:
>>>> On Thu, May 22, 2014 at 5:49 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> snip
>>
>>>>> I've been thinking a bit about this, and it is a non trivial problem since
>>>>> sdio devices are normally instantiated when probed, unlike ie spi devices
>>>>> which are instantiated from devicetree.
>>>>>
>>>>> Adding device tree instantiation of sdio devices seems like a bad idea, as
>>>>> then we get 2 vastly different device instantiation paths. Still we need some
>>>>> way to get power and clks setup before the mmc host initializes.
>>
>> What about introducing some extra callbacks to mmc drivers to build
>> driver data and control power?
> 
> The MMC bus is probable, and there should be no need to put any information in
> the device tree to pair up the right driver with the right device. The only
> thing we should need is hardware description w.r.t. reset/power/clock lines.
> 
> It's pretty common during development to have a couple of different vendor
> modules. Reset sequences and requirements might not be identical between them,
> but in reality they all work well enough using the common settings.
> 
> 
> Besides, where it ends up in the kernel implementation is mostly irrelevant, in
> some ways. We can refactor and move things as needed at any time. The only
> thing that needs to be reasonably stable (and/or only be expanded on, not
> redefined) is the DT binding. So I'd rather see something KISS go in now,
> implementation-wise (with a sane and simple binding), then getting stuck in
> this infinite polishing of just how the kernel-side implementation should be.
> 
> This is one of the major missing pieces to make a lot of ARM systems usable
> with a mainline kernel, since everybody use some out-of-tree solution today
> (not necessarily hacks, but still not shared code). I'd really like to see it
> resolved soon.
> 
> I'm OK in principle with Hans' proposed solution, as long as it provides the
> properties I need on exynos5250-snow (and the new peach_pit/pi platforms).

It would help to know what properties exactly you need, then I can write a proposal
for the devicetree bindings documentation. I can also throw in an implementation
for bringing up clks before mmc probe, as that is something which I can test,
extending that with other properties (ie resets) should be easy (ish).

Regards,

Hans

WARNING: multiple messages have this Message-ID (diff)
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: RFC: representing sdio devices oob interrupt, clks, etc. in device tree
Date: Sat, 24 May 2014 12:09:01 +0200	[thread overview]
Message-ID: <53806FBD.8050706@redhat.com> (raw)
In-Reply-To: <20140523164701.GA26488@quad.lixom.net>

Hi,

On 05/23/2014 06:47 PM, Olof Johansson wrote:
> On Thu, May 22, 2014 at 07:20:55PM +0200, Tomasz Figa wrote:
>> Hi,
>>
>>
>> On 22.05.2014 13:38, Hans de Goede wrote:
>>> On 05/22/2014 12:23 PM, Chen-Yu Tsai wrote:
>>>> On Thu, May 22, 2014 at 5:49 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> snip
>>
>>>>> I've been thinking a bit about this, and it is a non trivial problem since
>>>>> sdio devices are normally instantiated when probed, unlike ie spi devices
>>>>> which are instantiated from devicetree.
>>>>>
>>>>> Adding device tree instantiation of sdio devices seems like a bad idea, as
>>>>> then we get 2 vastly different device instantiation paths. Still we need some
>>>>> way to get power and clks setup before the mmc host initializes.
>>
>> What about introducing some extra callbacks to mmc drivers to build
>> driver data and control power?
> 
> The MMC bus is probable, and there should be no need to put any information in
> the device tree to pair up the right driver with the right device. The only
> thing we should need is hardware description w.r.t. reset/power/clock lines.
> 
> It's pretty common during development to have a couple of different vendor
> modules. Reset sequences and requirements might not be identical between them,
> but in reality they all work well enough using the common settings.
> 
> 
> Besides, where it ends up in the kernel implementation is mostly irrelevant, in
> some ways. We can refactor and move things as needed at any time. The only
> thing that needs to be reasonably stable (and/or only be expanded on, not
> redefined) is the DT binding. So I'd rather see something KISS go in now,
> implementation-wise (with a sane and simple binding), then getting stuck in
> this infinite polishing of just how the kernel-side implementation should be.
> 
> This is one of the major missing pieces to make a lot of ARM systems usable
> with a mainline kernel, since everybody use some out-of-tree solution today
> (not necessarily hacks, but still not shared code). I'd really like to see it
> resolved soon.
> 
> I'm OK in principle with Hans' proposed solution, as long as it provides the
> properties I need on exynos5250-snow (and the new peach_pit/pi platforms).

It would help to know what properties exactly you need, then I can write a proposal
for the devicetree bindings documentation. I can also throw in an implementation
for bringing up clks before mmc probe, as that is something which I can test,
extending that with other properties (ie resets) should be easy (ish).

Regards,

Hans

  reply	other threads:[~2014-05-24 10:09 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  9:49 RFC: representing sdio devices oob interrupt, clks, etc. in device tree Hans de Goede
2014-05-22  9:49 ` Hans de Goede
2014-05-22 10:23 ` Chen-Yu Tsai
2014-05-22 10:23   ` Chen-Yu Tsai
2014-05-22 11:38   ` Hans de Goede
2014-05-22 11:38     ` Hans de Goede
2014-05-22 17:20     ` Tomasz Figa
2014-05-22 17:20       ` Tomasz Figa
2014-05-23  9:13       ` Hans de Goede
2014-05-23  9:13         ` Hans de Goede
2014-05-23 11:22         ` Mark Brown
2014-05-23 11:22           ` Mark Brown
2014-05-23 11:50           ` Hans de Goede
2014-05-23 11:50             ` Hans de Goede
2014-05-23 13:21             ` Arend van Spriel
2014-05-23 13:21               ` Arend van Spriel
2014-05-23 13:28               ` Hans de Goede
2014-05-23 13:28                 ` Hans de Goede
2014-05-23 14:54                 ` Arend van Spriel
2014-05-23 14:54                   ` Arend van Spriel
2014-05-24 10:10                   ` Hans de Goede
2014-05-24 10:10                     ` Hans de Goede
2014-05-23 16:27             ` Mark Brown
2014-05-23 16:27               ` Mark Brown
2014-05-24 10:06               ` Hans de Goede
2014-05-24 10:06                 ` Hans de Goede
2014-05-25 12:34                 ` Mark Brown
2014-05-25 12:34                   ` Mark Brown
2014-05-25 19:20                   ` Hans de Goede
2014-05-25 19:20                     ` Hans de Goede
2014-05-26  7:51                     ` Arend van Spriel
2014-05-26  7:51                       ` Arend van Spriel
2014-05-26  7:59                       ` Chen-Yu Tsai
2014-05-26  7:59                         ` Chen-Yu Tsai
2014-05-26  8:07                         ` Hans de Goede
2014-05-26  8:07                           ` Hans de Goede
2014-05-26  9:08                           ` Arend van Spriel
2014-05-26  9:08                             ` Arend van Spriel
2014-05-26 10:38                     ` Mark Brown
2014-05-26 10:38                       ` Mark Brown
2014-05-26 11:12                       ` Hans de Goede
2014-05-26 11:12                         ` Hans de Goede
2014-05-26 14:22                         ` Mark Brown
2014-05-26 14:22                           ` Mark Brown
2014-05-26 14:59                           ` Hans de Goede
2014-05-26 14:59                             ` Hans de Goede
2014-05-26 16:07                             ` Ulf Hansson
2014-05-26 16:07                               ` Ulf Hansson
2014-05-26 16:14                               ` Mark Brown
2014-05-26 16:14                                 ` Mark Brown
2014-05-26 17:55                               ` Hans de Goede
2014-05-26 17:55                                 ` Hans de Goede
2014-05-27 13:50                                 ` Ulf Hansson
2014-05-27 13:50                                   ` Ulf Hansson
2014-05-27 17:53                                   ` Mark Brown
2014-05-27 17:53                                     ` Mark Brown
2014-05-27 18:55                                     ` Olof Johansson
2014-05-27 18:55                                       ` Olof Johansson
2014-05-27 20:27                                       ` Arend van Spriel
2014-05-27 20:27                                         ` Arend van Spriel
2014-05-28  8:43                                       ` Ulf Hansson
2014-05-28  8:43                                         ` Ulf Hansson
2014-05-28  8:19                                     ` Ulf Hansson
2014-05-28  8:19                                       ` Ulf Hansson
2014-05-28 11:03                                       ` Mark Brown
2014-05-28 11:03                                         ` Mark Brown
2014-06-03 10:57                                         ` Ulf Hansson
2014-06-03 10:57                                           ` Ulf Hansson
2014-06-04 15:55                                           ` Mark Brown
2014-06-04 15:55                                             ` Mark Brown
2014-06-09 14:07                                             ` Ulf Hansson
2014-06-09 14:07                                               ` Ulf Hansson
2014-05-28  9:42                                   ` Hans de Goede
2014-05-28  9:42                                     ` Hans de Goede
2014-05-28 10:12                                     ` Arend van Spriel
2014-05-28 10:12                                       ` Arend van Spriel
2014-05-28 10:27                                       ` Hans de Goede
2014-05-28 10:27                                         ` Hans de Goede
2014-05-28 11:47                                     ` Tomasz Figa
2014-05-28 11:47                                       ` Tomasz Figa
     [not found]                                       ` <5385CCE6.9070204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-28 16:43                                         ` Mark Brown
2014-05-28 16:43                                           ` Mark Brown
2014-05-30  8:17                                           ` Hans de Goede
2014-05-30  8:17                                             ` Hans de Goede
2014-06-03 10:14                                     ` Ulf Hansson
2014-06-03 10:14                                       ` Ulf Hansson
2014-06-03 11:07                                       ` Hans de Goede
2014-06-03 11:07                                         ` Hans de Goede
2014-06-03 12:58                                         ` Ulf Hansson
2014-06-03 12:58                                           ` Ulf Hansson
2014-06-03 13:06                                           ` Hans de Goede
2014-06-03 13:06                                             ` Hans de Goede
2014-06-03 13:28                                             ` Ulf Hansson
2014-06-03 13:28                                               ` Ulf Hansson
2014-05-27 15:47                                 ` Mark Brown
2014-05-27 15:47                                   ` Mark Brown
2014-05-23 13:34       ` Ulf Hansson
2014-05-23 13:34         ` Ulf Hansson
2014-05-23 16:47       ` Olof Johansson
2014-05-23 16:47         ` Olof Johansson
2014-05-24 10:09         ` Hans de Goede [this message]
2014-05-24 10:09           ` Hans de Goede

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=53806FBD.8050706@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=arend@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=jsarha@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=maxime.ripard@free-electrons.com \
    --cc=olof@lixom.net \
    --cc=s.hauer@pengutronix.de \
    --cc=tomasz.figa@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wens@csie.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.