Marvell 8385 datasheet
Cyril HAENEL
chaenel at free.fr
Wed Apr 7 04:56:16 EDT 2010
Dan Williams a écrit :
> On Tue, 2010-04-06 at 18:45 +0200, Cyril HAENEL wrote:
>
>> Cyril HAENEL a écrit :
>>
>>> Cyril HAENEL a écrit :
>>>
>>>> Hi,
>>>>
>>>> Anyone know where I can found the marvell 8385 chip datasheet ? I
>>>> know it exists a command to enter the chip in standby mode, to have a
>>>> very low current consumption.
>>>> I want to modify the libertas driver to send this command to the chip
>>>> during the driver unloading.
>>>>
>>>> The goal is to save power on my board. Actually I power off the
>>>> pcmcia socket but on my board I have not implemented buffers between
>>>> the bus and the wifi card, and not implemented the ability to
>>>> physically cut the power line of the wifi card.
>>>> Actually after I powered off the pcmcia socket (to properly unload
>>>> the cs libertas driver), I force the wifi card reset line and it
>>>> enters a relatively low consumption : 40mA.
>>>>
>>>> But now I want to do more and send the standby command during
>>>> libertas driver unloading. Whis this command, I know that the wifi
>>>> card should consume 5mA only...
>>>>
>>>> Regards,
>>>> Cyril HAENEL
>>>>
>>>>
>>>>
>>> I answer to myself : I found again the file I was looking for....
>>> It's the marvell firmware version 5.1 specification...
>>> Full power down seem's to be activated by sending the
>>> CMD_802_11_DEEP_SLEEP command (0x3E)
>>> The firmware doesn't answer to this command, thus I think it can be
>>> pretty easy to send this command juste before the drivers exits.
>>>
>>>
>> I answer to myself again :
>>
>> It works ! Now I send the CMD_802_11_DEEP_SLEEP command in the
>> if_cs_detach() function (in if_cs.c).
>> The current consumption fall below 5mA, really good !
>>
>
> The best thing to do here would be to implement the:
>
> int (*enter_deep_sleep) (struct lbs_private *priv);
> int (*exit_deep_sleep) (struct lbs_private *priv);
> int (*reset_deep_sleep_wakeup) (struct lbs_private *priv);
>
> handlers for if_cs.c. enter_deep_sleep() should be pretty much the same
> for everything, but exit_deep_sleep and reset_deep_sleep_wakeup depend
> on the bus type (in your case CF) and possibly the firmware as well.
> Any idea how your device exits deep sleep? It's usually by writing to a
> register on the device or by changing the state of some line going to
> the device.
>
> Dan
Actually in my case, to shut down my wifi card and enter deep sleep, I do :
echo 1 > /sys/class/pcmcia_socket/pcmcia_socket0/card_eject
So the libertas driver is properlly unloaded, and I send the deep sleep
command in the if_cs_detach() function. This command is easy to manage
because the module doesn't answer and directly enters in deep sleep mode.
To exit deep sleep mode, I just send a pulse on the wifi card reset
line, and after I do
echo 1 > /sys/class/pcmcia_socket/pcmcia_socket0/card_insert
The pcmcia layer detects the card, and reload the libertas driver (from
zero, thus resend firmware and so on).
Actually it's the only solution I have because I cannot enter my
blackfin processor in sleep mode with the libertas driver loaded :
root:/> echo standby > /sys/power/state
Stopping tasks ...
Stopping kernel threads timed out after 20 seconds (1 tasks refusing to
freeze):
lbs_main
Restarting tasks ... done.
Stopping tasks ...
Stopping kernel threads timed out after 20 seconds (1 tasks refusing to
freeze):
lbs_main
Restarting tasks ... done.
root:/>
To wake up the wifi card we nedd to change the state of a GPIO. To do
that on the CF interface we juste need to write or read a register (to
change the state on the bus I think). I attached to this mail the
firmware documentation related to the deep sleep command.
It would be great if it can be possible to enter and exit deep sleep
mode without unload the libertas driver, but it there a callback
dedicated to this to enter deep sleep by using iwconfig ?
Regards,
Cyril
--
Cyril Haenel
Registered Linux User #332632
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: deep_sleep.txt
URL: <http://lists.infradead.org/pipermail/libertas-dev/attachments/20100407/c03f4c33/attachment.txt>
More information about the libertas-dev
mailing list