From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: How to support SDIO wifi/bt in DT
Date: Thu, 16 Jan 2014 15:02:11 +0100 [thread overview]
Message-ID: <3215037.8HVCjAeS8g@wuerfel> (raw)
In-Reply-To: <20140116133649.GV15937@n2100.arm.linux.org.uk>
On Thursday 16 January 2014 13:36:49 Russell King - ARM Linux wrote:
>
> The Wifi/BT chip can only be detected via probing the SDIO connection, and
> only when the device has been powered up and released from reset - so we
> have to power up and reset the bcrm device before we probe via the SDIO
> bus.
This is indeed a common problem, and while we've talked about solving
it in the past, nothing has happened code-wise. It indeed needs an
implementation in the sdio framework.
> While it's possible to attach the power supply for the Wifi/BT chip to the
> vmmc-supply property of the host, it's not possible to do that with the
> oscillator supply. Neither is there any provision for manipulating the
> GPIOs to deal with the resets.
>
> I can't find any examples of anything similar in our existing set of DT
> files, so I suspect either this is a device which no one supports on any
> DT platform, or there's some clever way to handle this.
The former.
> How do other people support this in DT? Do they hack up some platform
> specific code (which isn't nice)? What other solutions are there to get
> around this problem? How does this kind of thing get represented in DT?
>
> (Don't suggest adding DT support to the bcrmfmac driver - this is a
> chicken-and-egg problem. The driver isn't being probed at the moment
> because the device is powered down and/or held in reset, so is
> undetectable. The kernel needs to power it up and release the reset
> so it becomes detectable.)
The problem is two-fold:
a) we need to add a generic mechanism to the SDIO probe code to
allow specifying clocks, regulators and resets (possibly more)
for an SDIO endpoint that get enabled before the probe starts.
This parts needs a DT binding for SDIO slots as well as code.
b) We need to add a way to attach a device_node to an sdio_func,
so that a function driver can find additional DT properties.
This part should be relatively simple once (a) is done and
should only need a little code but no new binding. The code
would be similar to what we do for amba, i2c or spi devices.
Note that the same problem exists for a number of other discoverable
buses that get used in nondiscoverable ways, e.g. USB, PCI,
or even SCSI. It's normally a spec violation if those devices
are wired up like this, but of course we still want to support
the hardware.
Arnd
next prev parent reply other threads:[~2014-01-16 14:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 13:36 How to support SDIO wifi/bt in DT Russell King - ARM Linux
2014-01-16 13:51 ` Chen-Yu Tsai
2014-01-16 14:02 ` Arnd Bergmann [this message]
2014-01-16 17:15 ` Olof Johansson
2014-01-16 19:58 ` Russell King - ARM Linux
2014-01-16 20:00 ` Olof Johansson
2014-01-16 20:03 ` Russell King - ARM Linux
2014-01-17 9:39 ` Alexandre Belloni
2014-01-17 10:06 ` Chen-Yu Tsai
2014-01-17 10:14 ` Alexandre Belloni
2014-01-17 10:44 ` Andrew Lunn
2014-02-05 17:11 ` Mark Brown
2014-01-16 21:46 ` Arnd Bergmann
2014-01-16 21:52 ` Olof Johansson
2014-01-16 22:14 ` Marcel Holtmann
2014-01-17 3:08 ` Nicolas Pitre
2014-01-17 14:47 ` Arnd Bergmann
2014-01-17 15:14 ` Rob Herring
2014-01-17 16:58 ` Nicolas Pitre
2014-01-19 19:29 ` Olof Johansson
2014-01-19 20:28 ` Arnd Bergmann
2014-01-19 23:26 ` Olof Johansson
2014-01-19 23:09 ` Alexandre Belloni
2014-01-19 23:30 ` Olof Johansson
2014-01-20 3:57 ` Olof Johansson
2014-01-17 9:02 ` Alexandre Belloni
2014-01-17 9:38 ` Nicolas Ferre
2014-01-16 14:08 ` Alexandre Belloni
2014-01-16 14:34 ` 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=3215037.8HVCjAeS8g@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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).