All of lore.kernel.org
 help / color / mirror / Atom feed
* Where to power on the wifi device before loading the driver.
@ 2012-06-13 10:40 ` Wei Ni
  0 siblings, 0 replies; 83+ messages in thread
From: Wei Ni @ 2012-06-13 10:40 UTC (permalink / raw)
  To: Stephen Warren, 'linux-wireless@vger.kernel.org', linux-tegra
  Cc: 'linux-mmc@vger.kernel.org',
	devicetree-discuss, linux-arm-kernel, Mursalin Akon,
	Rakesh Kumar

Hi, all
I'm working on the tegra30 wifi upstream issue.

The tegra30 board (Cardhu) use Broadcom 4329 as wifi device, and use brcmfmac as the wifi driver.

In the brcmfmac init routine, it call sdio_register_driver() to register driver, if the wifi device is powered on, then the mmc driver will enumerate it, and call the probe callback routine.

On the Cardhu, the wifi's power is controlled by two gpios (power-gpio and reset-gpio), the default state is power-off. So we need to power on it before calling sdio_register_driver(), if not, the mmc driver can't enumerate it, and will not call the probe routine.
This power on sequence is: 
set power-gpio to 1 ;
mdelay(100) ;
set reset-gpio to 1 ;
mdelay(200);

My question is where to power on the wifi. We may have three places to power on it:
1. power on it in the brcmfmac driver before calling sdio_register_driver(). But I think this power sequence is special for tegra30 cardhu, it's not good to add it in the generic wifi driver, because different board may use the different way to power on the wifi.
2. power on it in the mmc driver. In our tegra SD driver, it has power-gpios property, which allow the slot to be powered. But this power is for mmc slot, could we add this wifi power sequence in the tegra SD driver?
3. hard-coded into DT. Set these gpios in the DT, something like pinmux settings, but in this way, it's not good to put the mdelay() value in the DT.

I have no good idea for it, does anyone has suggestion?

Thanks.
Wei.

---
nvpublic




^ permalink raw reply	[flat|nested] 83+ messages in thread

end of thread, other threads:[~2012-06-27  2:19 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 10:40 Where to power on the wifi device before loading the driver Wei Ni
2012-06-13 10:40 ` Wei Ni
2012-06-13 10:40 ` Wei Ni
2012-06-13 17:33 ` Franky Lin
2012-06-13 17:33   ` Franky Lin
2012-06-13 17:33   ` Franky Lin
2012-06-14  4:17   ` Wei Ni
2012-06-14  4:17     ` Wei Ni
2012-06-14 16:45     ` Franky Lin
2012-06-14 16:45       ` Franky Lin
2012-06-13 21:17 ` Stephen Warren
2012-06-13 21:17   ` Stephen Warren
2012-06-14  6:31   ` Thierry Reding
2012-06-14  6:31     ` Thierry Reding
2012-06-14 12:12     ` Mark Brown
2012-06-14 12:12       ` Mark Brown
2012-06-14 12:12       ` Mark Brown
2012-06-14 15:54       ` Stephen Warren
2012-06-14 15:54         ` Stephen Warren
2012-06-14 15:54         ` Stephen Warren
2012-06-15  6:09         ` Wei Ni
2012-06-15  6:09           ` Wei Ni
2012-06-15 15:49           ` Stephen Warren
2012-06-15 15:49             ` Stephen Warren
2012-06-18  6:20             ` Wei Ni
2012-06-18  6:20               ` Wei Ni
2012-06-18  6:20               ` Wei Ni
2012-06-18  7:40               ` Rakesh Kumar
2012-06-18  7:40                 ` Rakesh Kumar
2012-06-18  8:03                 ` Laxman Dewangan
2012-06-18  8:03                   ` Laxman Dewangan
2012-06-18  8:03                   ` Laxman Dewangan
2012-06-18 15:01                   ` Stephen Warren
2012-06-18 15:01                     ` Stephen Warren
2012-06-18 15:01                     ` Stephen Warren
2012-06-19  9:13                     ` Wei Ni
2012-06-19  9:13                       ` Wei Ni
2012-06-19  1:23               ` Philip Rakity
2012-06-19  1:23                 ` Philip Rakity
2012-06-19  1:23                 ` Philip Rakity
2012-06-19  4:25                 ` Wei Ni
2012-06-19  4:25                   ` Wei Ni
2012-06-19  9:17                   ` Mark Brown
2012-06-19  9:17                     ` Mark Brown
2012-06-19  9:17                     ` Mark Brown
2012-06-19  9:44                     ` Wei Ni
2012-06-19  9:44                       ` Wei Ni
2012-06-19  9:44                       ` Wei Ni
2012-06-20  0:01                       ` Stephen Warren
2012-06-20  0:01                         ` Stephen Warren
2012-06-20  0:01                         ` Stephen Warren
2012-06-20 10:47                         ` Mark Brown
2012-06-20 10:47                           ` Mark Brown
2012-06-20 10:47                           ` Mark Brown
2012-06-20 11:28                         ` Wei Ni
2012-06-20 11:28                           ` Wei Ni
2012-06-20 11:28                           ` Wei Ni
2012-06-20 16:51                           ` Stephen Warren
2012-06-20 16:51                             ` Stephen Warren
2012-06-20 16:51                             ` Stephen Warren
2012-06-26  8:56                         ` Dong Aisheng
2012-06-26  8:56                           ` Dong Aisheng
2012-06-26  8:56                           ` Dong Aisheng
     [not found]                           ` <20120626085605.GA6047-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-06-26 16:53                             ` Stephen Warren
2012-06-26 16:53                               ` Stephen Warren
     [not found]                               ` <4FE9E907.6050803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26 21:26                                 ` Rob Herring
2012-06-26 21:26                                   ` Rob Herring
     [not found]                                   ` <4FEA28EC.2080906-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-06-26 22:38                                     ` Stephen Warren
2012-06-26 22:38                                       ` Stephen Warren
2012-06-27  2:19                                     ` Dong Aisheng
2012-06-27  2:19                                       ` Dong Aisheng
2012-06-27  2:16                                 ` Dong Aisheng
2012-06-27  2:16                                   ` Dong Aisheng
2012-06-15 16:24           ` Franky Lin
2012-06-15 16:24             ` Franky Lin
2012-06-15 16:24             ` Franky Lin
2012-06-18  6:00             ` Wei Ni
2012-06-18  6:00               ` Wei Ni
2012-06-14 11:27   ` Wei Ni
2012-06-14 11:27     ` Wei Ni
2012-06-14 11:44     ` Wei Ni
2012-06-14 11:44       ` Wei Ni
2012-06-14 11:44       ` Wei Ni

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.