[Gta04-owner] Modem USB suspend (possible ~80mA reduction on active system?)

Dr. H. Nikolaus Schaller hns at goldelico.com
Sun Jun 1 12:56:10 CEST 2014


Am 01.06.2014 um 12:37 schrieb Benjamin Deering:

> On 05/31/2014 08:19 PM, Sebastian Krzyszkowiak wrote:
>> Hello!
>> 
>> I spent last days playing a lot with Cinterion PHS8 modem connected to
>> PC and operated by fsogsmd. And... one thing caught my attention.
>> 
>> PHS8 has a LCI - Low Current Indicator - which on my Neo900 prototype
>> board is connected to a LED. It shines when the modem is in SLEEP mode
>> with lowest power consumption rate.
>> 
>> Initially I thought that this LED is broken (and knowing that there
>> was some mistake in LEDs design of that proto it was easy to believe)
>> as I haven't seen it shining, but once, after playing with modem
>> settings that enable this indicator (without any results), I unplugged
>> the USB cable while leaving the modem on... and tada, LED shined
>> brightly!
>> 
>> This meant that with USB cable attached, modem didn't go into SLEEP
>> state at all. However, quick look at modem spec told me that modem
>> should go into SLEEP state when either USB is disconnected or...
>> suspended.
>> 
>> I recalled that PowerTOP had some options for auto-suspending USB, so
>> I launched it, went to "Tunables" and switched "Autosuspend for USB
>> device PH8 [Cinterion]" from "Bad" to "Good".
>> 
>> Tada! LED shined brighly (with some occasional blinks).
>> 
>> So it looks like Linux doesn't automatically enable power saving of
>> USB devices! I started to wonder if maybe something similar could have
>> place on GTA04 with its Option GTM601 modem. I've checked on SHR.
>> 
>> root at om-gta04:~# cat
>> /sys/devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/power/control
>> on
>> 
>> "on" means "constantly on", so no suspend. Power consumption: about
>> 250-260mA, stable
>> 
>> echo auto>  /sys/devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/power/control
>> 
>> Power consumption: about 170-180mA, jumping back from time to time to
>> 250-260mA and returning again to former ones. Jumps are probably
>> caused by modem resuming due to _QSIGQ reports (network signal
>> strength) which are sent pretty often - I guess configuring the modem
>> properly could reduce it and make the modem sleep more.
>> 
>> Communication with the modem appears to still work (or at least in no
>> worse way than before - modem support in SHR isn't perfect yet :P).
>> 
>> I have added following udev rule:
>> 
>> ACTION=="add", SUBSYSTEMS=="*", TEST=="power/control",
>> ATTR{power/control}="auto"
>> 
>> ...and power saving mode is now enabled automatically on boot.
>> 
>> Is this something that was already known or a new finding? (it's for
>> sure something new for SHR it seems ;))
>> 
>> Cheers,
> Nice!
> 
> I've added that rule on my very hacked SHR and am seeing the results you describe.  With omap3-isp removed as well (to allow CPU into c2 and c3 states) I see idle current ~140-160 ma.
> 
> Great find,

Some more information. I have checked on the 3.15-rc7 I am currently working on.
There is only a single power/control node NOT switched to auto:

root at gta04:~# find /sys -path "*/power/control"|while read FILE; do echo "$FILE" $(cat "$FILE"); done|fgrep -v auto
/sys/devices/68000000.ocp/48064000.usbhshost/48064800.ehci/usb2/2-2/power/control on
root at gta04:~# 

So I suggest to check that on other kernels as well and we should find a more
specific udev rule (so that it does not trigger for all power/control nodes. Or find
why the kernel does not initialize it as "auto" right after boot.

BR,
Nikolaus





More information about the Gta04-owner mailing list