I have verified this.  This has a huge impact, thanks.

Tyler

On Fri, Sep 24, 2010 at 12:30 PM, Peter Lawrence <majbthrd@gmail.com> wrote:
R. P. McMurphy, thanks for the settings.

As a nasty temporary hack (just to see the impact), I stuck writes to
CARKIT_ANA_CTRL and PHY_PWR_CTRL in the Linux kernel, and it had a
huge impact.

To update my numbers from the last email:

768 mW : defacto Sakoman mainline kernel linked to by the Gumstix site
750 mW : (saved 18 mW) removal of two LEDs on Pinto-TH board
624 mW : (saved 126 mW) switched to bleeding edge Linux OMAP3 PM kernel
264 mW : (saved 360 mW) enabled 'sleep while idle'
180 mW : (saved 84 mW) forced USB3326 chip into reset via GPIO183
174 mW : (saved 6 mW) turned off blue LED via "GPIO211" and kernel patch
168 mW : (saved 6 mW) enabled 'off mode'
54 mW : (saved 114 mW) PHY_PWR_CTRL disabled

Clearly, there should be a better way in the Linux kernel to allow the
user to optionally disable this as the application requires, but I
haven't found the documentation on what is the *proper* way.

If someone wanted to try the same nasty kernel hack, I added this two lines:

       twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /*
register (CARKIT_ANA_CTRL) */);
       twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*
register (PHY_PWR_CTRL) */);

in the function "twl_probe" in /drivers/mfd/twl-core.c just prior to
the comment "load power event scripts".

On Thu, Sep 23, 2010 at 6:03 PM, R. P. McMurphy <loginreg@gmail.com> wrote:
> Here are my settings for the PMIC. I turn off a few voltage rails and
> keep the USB PHY off.
>
> TPS_49.GPIO_CTRL        ,0x00
> TPS_49.GPBR1            ,0x00
> TPS_4A.KEYP_CTRL_REG    ,0x03
> TPS_4A.CTRL1            ,0x00
> TPS_4A.BCIMDKEY         ,0x2A
> TPS_4B.BOOT_BCI         ,0x30
> TPS_4A.LEDEN            ,0x00
> TPS_49.CODEC_MODE       ,0x00
> TPS_49.OPTION           ,0x00
> TPS_49.BT_IF            ,0x04
> TPS_49.VOICE_IF         ,0x04
> TPS_49.AUDIO_IF         ,0x04
> TPS_49.MICBIAS_CTL      ,0x00
> TPS_49.ANAMICL          ,0x00
> TPS_49.ANAMICR          ,0x00
> TPS_49.AVADC_CTL        ,0x00
> TPS_49.ALC_CTL          ,0x05
> TPS_49.AVDAC_CTL        ,0x00
> TPS_49.ARXL1_APGA_CTL   ,0x32
> TPS_49.ARXR1_APGA_CTL   ,0x32
> TPS_49.ARXL2_APGA_CTL   ,0x32
> TPS_49.ARXR2_APGA_CTL   ,0x32
> TPS_49.VDL_APGA_CTL     ,0x32
> TPS_49.EAR_CTL          ,0x00
> TPS_49.PREDL_CTL        ,0x00
> TPS_49.PREDR_CTL        ,0x00
> TPS_49.PRECKL_CTL       ,0x00
> TPS_49.PRECKR_CTL       ,0x00
> TPS_49.HFL_CTL          ,0x00
> TPS_49.HFR_CTL          ,0x00
> TPS_49.HS_GAIN_SET      ,0x00
> TPS_49.DTMF_CTL         ,0x00
> TPS_49.APLL_CTL         ,0x06
> TPS_48.OTG_CTRL         ,0x06
> TPS_48.IFC_CTRL         ,0x00
> TPS_48.CARKIT_PLS_CTRL  ,0x00
> TPS_48.PHY_CLK_CTRL     ,0x06
> TPS_48.OTHER_IFC_CTRL   ,0x84
> TPS_48.OTHER_FUNC_CTRL  ,0x00
> TPS_48.POWER_CTRL       ,0x00
> TPS_48.CARKIT_ANA_CTRL  ,0x08   ;enable analogue inputs (must be done
> before setting PHY_PWR_CTRL)
> TPS_48.CARKIT_CTRL      ,0x00
> TPS_48.PHY_PWR_CTRL     ,0x01   ;save 30mA
> TPS_48.FUNC_CTRL        ,0x09
> TPS_4B.VIBRATOR_CFG     ,0x00
> TPS_49.VIBRA_CTL        ,0x00
> TPS_4B.VAUX1_DEV_GRP    ,0x00
> TPS_4B.VAUX2_DEV_GRP    ,0x00
> TPS_4B.VAUX3_DEV_GRP    ,0x00
> TPS_4B.VAUX4_DEV_GRP    ,0x00
> TPS_4B.VMMC1_DEV_GRP    ,0x00
> TPS_4B.VMMC2_DEV_GRP    ,0x00
> TPS_4B.VPLL2_DEV_GRP    ,0x00
> TPS_4B.VSIM_DEV_GRP     ,0x00
> TPS_4B.VDAC_DEV_GRP     ,0x00
> TPS_4B.VUSB1V5_DEV_GRP  ,0x00
> TPS_4B.VUSB1V8_DEV_GRP  ,0x00
> TPS_4B.VUSBCP_DEV_GRP   ,0x00
> TPS_4B.REGEN_DEV_GRP    ,0x00
>
>
>
> If you are not using the analogue inputs then you can add this also:
>
> TPS_4B.VUSB3V1_DEV_GRP  ,0x00
>
>
> On 9/24/10, Peter Lawrence <majbthrd@gmail.com> wrote:
>> Like some other Gumstix users, I am struggling to reduce the Gumstix
>> power consumption to be more in line with other OMAP3 platforms.
>>
>> In the hope that it helps others with similar struggles, this
>> documents what power savings I achieved and how each incremental
>> improvement was done.
>>
>> Since test setup can make a significant difference, here is my test setup:
>>
>> gumstix Overo Earth
>> gumstix Pinto-TH (modified)
>> USB to TTL serial cable (FTDI TTL-232R-3V3)
>>
>> I chose the Pinto-TH because it has the least amount of claptrap.
>> (Things like Ethernet and low-power consumption tend to be mutually
>> exclusive.)  Alas, the Pinto-TH has perhaps too little claptrap, as
>> there is no built-in method to easily access the console.
>>
>> To remedy this, I white-wired the Pinto-TH PCB to use the onboard
>> 74x245 to translate the console signals (GPIO165_IR_RXD3 and
>> GPIO166_IR_TXD3) to 3.3V.  I then used a FTDI TTL-232R-3V3 cable to
>> provide a convenient USB serial port connection.
>>
>> I powered the Pinto-TH with a 6VDC bench supply and measured power
>> with a bench multimeter.
>>
>> All measurements of power consumption are with an idle shell prompt
>> and no extra software running.
>>
>> 768 mW : defacto Sakoman mainline kernel linked to by the Gumstix site
>> 750 mW : (saved 18 mW) removal of two LEDs on Pinto-TH board
>> 624 mW : (saved 126 mW) switched to bleeding edge Linux OMAP3 PM kernel
>> 264 mW : (saved 360 mW) enabled 'sleep while idle'
>> 180 mW : (saved 84 mW) forced USB3326 chip into reset via GPIO183
>> 174 mW : (saved 6 mW) turned off blue LED via "GPIO211" and kernel patch
>> 168 mW : (saved 6 mW) enabled 'off mode'
>>
>> It is unclear to me what actions are taken (if any) in the TPS65950 by
>> 'sleep_while_idle' and 'off_mode', and given that the Gumstix is a
>> black box (no schematic), it is hard to know how the supplies are used
>> and what can be safely turned off.  Neither of the kernels actually
>> ever turn off VDD1, VDD2, for example.  Both the Linux OMAP PM and the
>> latest mainline Sakoman kernels do something to alter power
>> consumption (but it only could be internal to the OMAP3).
>>
>> 'sleep_while_idle' was enabled with the following:
>>
>> mkdir /debug
>> mount -t debugfs debugfs /debug
>> echo 5 > /sys/devices/platform/serial8250.0/sleep_timeout
>> echo 5 > /sys/devices/platform/serial8250.1/sleep_timeout
>> echo 5 > /sys/devices/platform/serial8250.2/sleep_timeout
>> echo 1 > /debug/pm_debug/sleep_while_idle
>>
>> 'off_mode' was enabled with the following:
>>
>> mkdir /debug
>> mount -t debugfs debugfs /debug
>> echo 5 > /sys/devices/platform/serial8250.0/sleep_timeout
>> echo 5 > /sys/devices/platform/serial8250.1/sleep_timeout
>> echo 5 > /sys/devices/platform/serial8250.2/sleep_timeout
>> echo 1 > /debug/pm_debug/sleep_while_idle
>> echo 1 > /debug/pm_debug/enable_off_mode
>>
>> Holding the USB3326 in reset was achieved with the following:
>>
>> echo 183 > /sys/class/gpio/export
>> echo out > /sys/class/gpio/gpio183/direction
>> echo 0 > /sys/class/gpio/gpio183/value
>>
>> Disabling the blue LED (D3) was achieved by patching the kernel (See
>> Federico Belvisi's post to this mailing list on 2010-09-21.) and the
>> following:
>>
>> echo 211 > /sys/class/gpio/export
>> echo out > /sys/class/gpio/gpio211/direction
>> echo 1 > /sys/class/gpio/gpio211/value
>>
>> ------------------------------------------------------------------------------
>> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
>> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
>> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>> http://p.sf.net/sfu/nokia-dev2dev
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users



--
Tyler Gore
617-505-4865(work)
503-860-0743 (cell)
--
This email message, including any attachments, is intended solely for
the use of the designated recipient(s) and may contain confidential,
privileged, and or proprietary information. Any unauthorized review,
use, disclosure or distribution is strictly prohibited.