Neo 1973 GTA01 Power Management

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Approximate power draw of various subsystems: Added more data)
m (spam removed)
 
(88 intermediate revisions by 27 users not shown)
Line 1: Line 1:
{|align=right
+
{{InProgress}}
  |__TOC__
+
This page details the power management of the Phase 1 Neo1973. Much of it is inapplicable to earlier models.
  |}
+
  
Power management is of utmost concern to any mobile device.  Battery power is quite limited, so we need to make sure we try our best to conserve it.
 
  
This page tries to describe the various power management features of the [[Neo1973 Hardware]], their states, transitions, etc.
+
Power management is of utmost concern to any mobile device. 
 +
Battery power is quite limited, so we need to make sure we try our best to conserve it. (See also [[Power management requirements]].)
  
First, we start by describing the power states of the individual hardware components.  Then we look at it from a System Integration point of view.
+
This is very much unimplemented at the moment.  
  
== S3C2410 SoC ==
+
''Update'': The standby mode works most of the time, and the wake-up-from-call functionality works, too. Some settings need to be changed. For details, have a look [[GTA01Standby|here]].
  
This is an overview about the S3C2410 power states / modes and their capabilities
+
Current projects:
  
The S3C2410 has the following modes:
+
{|border="1"
 +
|+Projects
 +
!User||Project||details||URL
 +
|-
 +
|[[User:CesarB|cesarb]]||Cpufreq||Varying clock speed, including making peripherals work over during transitions||
 +
[[User:CesarB/cpufreq]]
 +
|}
  
=== Normal Mode ===
 
  
This is the most power-consuming mode.  Regular operation at full clock speed (266MHz).
 
The typical power consumption is 335mW in this mode.
 
  
We can dynamically reduce the CPU core clock speed to lower frequencies, if required.
+
{|border="3"
 +
|+Required kernel mode power saving, and relative saving of battery life.
 +
!Option ||Note||Average saving over next lowest<br> power state the description<br> is the total effect on battery life ||Status
 +
|-
 +
|External peripheral control || Ability to dim backlight, turn on and off GSM, GPS, and other devices outside the CPU || Huge (700mW) ||Implemented
 +
|-
 +
|Slow Mode || The CPU clock is 12MHz, this is the lowest power mode with the CPU awake ||Huge(300mW)|| Not implemented
 +
|-
 +
|Variable CPU core voltage || Dynamically alter CPU core voltage according to frequency ||Moderate(50mW)|| Not implemented, limited by PMU to .3V steps
 +
|-
 +
|CPU Idle mode|| Turn off CPU clock while rest of SoC remains awake||Large(150mW)||Not implemented
 +
|-
 +
|Variable CPU frequency ~20Mhz to 266Mhz||Vary CPU frequency to lower power consumption.||Huge(250mW)||Not implemented
 +
|-
 +
|Tickless Kernel||Remove periodic timer interrupts in kernel||Modest(10mW?)||Not implemented
 +
|-
 +
|Rapid Suspend-RAM||Suspend CPU totally and resume when required in under 1s.||Moderate (50mW)||Not implemented
  
=== Idle Mode ===
+
|}
  
In this mode, FCLK to the CPU core is switched off.  This reduces the power consumption to about half the typical 'Normal mode' consumption: 177mW
 
  
==== Wake-up sources ====
+
{|border="3"
 +
|+Required user-mode power saving
 +
!Option||Note||Saving||Status
 +
|-
 +
|General speed optimization of all software||With variable CPU clock, the less CPU needed, the less power.||Moderate (Large with backlight off)||In Progress
 +
|-
 +
|Smart turning off unused peripherals||Interacting with kernel mode drivers to turn off bits the user isn't using||Large
 +
|-
 +
|Seamlessly switching to 256 colour||The LCD controller supports pallete mode. This would reduce memory bus traffic by a third.||Small||Of debatable value - only for P1 (?)
 +
|}
  
any interrupt.
 
  
=== Slow Mode ===
 
  
In slow mode, FCLK is tied to the external crystal, i.e. 12MHz in our caseThe CPU core, SDRAM and bus clocks are also running at 12MHz.
+
This page tries to describe the various power management features of the [[:Category:Neo1973 Hardware | Neo1973 Hardware]], their states, transitions, etcFirst, we start by describing the power states of the individual hardware components.  Then we look at it from a System Integration point of view.
  
This reduces the power consumption to typically 33mW.
 
  
==== Wake-up sources ====
+
== S3C2410 SoC ==
  
none, we can just use our slowly running code to switch back to Normal mode, if it's required.
+
The [[Neo1973 Power Management#S3C2410 SoC | S3C2410 SoC section]] is an overview of the S3C2410 power states or modes and their capabilities. The S3C2410 has the following modes:
  
=== Power_off Mode ===
 
  
In Power_off mode, only the SDRAM is held in refresh, and the SoC-internal wake-up logic and  RTC is powered. This means that the overall power consumption of the CPU goes down to max. 100uA, which translates to 200uW at 2.0V core voltage.
+
{| border="3"
 
+
|+ Power states for the [[Neo1973 Power Management#S3C2410 SoC | S3C2410 SoC(CPU)]] including approx memory bus current
==== Wake-up sources ====
+
! Mode || Frequency || Power consumption || Wakeup sources||Note
 
+
|-
The number of wake-up sources is more restricted in this mode:
+
! Normal Mode
 
+
| 33-266Mhz || (around 50-335mW depending on speed) || Awake
* EINT[0...15]
+
|-
* RTC Alarm Interrupt
+
! Idle Mode
* nBATT_FAULT pin
+
|33-266Mhz||around 50-170mW depending on speed || Any interrupt || FCLK disconnected
 +
|-
 +
! Slow Mode
 +
| 12Mhz||40mW || Awake, can vary clock speed as desired on interrupts. || CPU clock (FCLK), SDRAM, bus clocks set by 12Mhz crystal.  
 +
|-
 +
! Power_off Mode
 +
| off|| .2mW (@2V) || GSM, buttons, touchscreen, charger/USB connect, low battery|| EINT[0...15], RTC Alarm Interrupt, nBATT_FAULT pin. SDRAM self-refresh, RTC powered.
 +
|-
 +
!Peripheral||Power||Note||constraints
 +
|-
 +
!USB-H
 +
|1mW||The USB host driver
 +
|-
 +
!USB-D
 +
|6mW||The USB device driver||PCLK>20Mhz
 +
|-
 +
!LCD driver
 +
|20(qvga)-80mW||LCD driver||HCLK>VCLK*4 (p386) VCLK(vga)=19Mhz VCLK(qvga)=4.75Mhz = CPU clock 80Mhz min(seems to work at 50Mhz according to u-boot pll set) or 32Mhz (min variable CPU speed)
 +
|-
 +
!PLL
 +
|?mW||Phase locked loop, needed if not in slow mode.
 +
|-
 +
!Serial
 +
|7mW||2/3 integrated serial ports
 +
|}
  
 
==== System design considerations ====
 
==== System design considerations ====
 
 
In order to fully support Power_off mode, we need to
 
In order to fully support Power_off mode, we need to
* Be able to switch off VDDi/VDDiarm/VDDi_MPLL/VDDi_UPLL separately from VDDalive, using a switch based on the PWREN signal
+
* Be able to switch off VDDi/VDDiarm/VDDi_MPLL/VDDi_UPLL separately from VDDalive
  
 
== PCF50606 PMU ==
 
== PCF50606 PMU ==
Line 105: Line 150:
 
=== System Power states ===
 
=== System Power states ===
  
In order to do system-level power managment, we need to introduce state definitions with their according state names.  The state names are prefixed by SYS_POWER_.
+
In order to do system-level power management, we need to introduce state definitions with their according state names.  The state names are prefixed by SYS_POWER_.
  
==== SYS_POWER_NO ====
+
{|border="1"
 +
|+System power management states. Name prefixed with SYS_POWER_    <small>PMU off is turned off by switching off the requisite output of the PCF50606</small>
 +
!Name||Note||PCF50606<br>PSU chip||S3C2410<br>CPU||JBT6K74<br>LCD driver||GSM||GPS||Bluetooth||Backlight
 +
|-
 +
|NO||No main battery or USB charger. Backup battery operational||Save||Off||PMU off||Off - no Vbatt||PMU off||PMU off||off
 +
|-
  
In this state, there is no main battery and no USB charger voltage applied. However, the backup battery is supposed to be operational.
+
|OFF||"Switched Off" - no functionality||Standby||PMU off||PMU off||Off by MODEM_ON to LOW||PMU off||PMU off||off
 
+
|-
* PCF50606: SAVE
+
|SLEEP||Suspend-RAM (in pocket waiting for a call)||Active||Power_Off||PMU Off||On by MODEM_ON to HIGH||Optional||Deep Standby||Off
* S3C2410: unpowered
+
|-
* JBT6K74: unpowered by PMU
+
|SCRSAVE||Screen Saver||Active||SLOW, IDLE||SLEEP||On by MODEM_ON to HIGH||Optional||Optional||Off
* GSM: unpovered because no Vbatt
+
|-
* GPS: unpowered by PMU
+
|ON||Normal active state||Active||On||Normal||On by MODEM_ON to HIGH||Optional||On||On, PWM'd brightness
* Bluetooth: unpowered by PMU
+
|-
* Backlight: powered off
+
|}
 
+
==== SYS_POWER_OFF ====
+
 
+
This is the regular, "switched off" state of the device.  The device does not provide any functionality.
+
 
+
* PCF50606: STANDBY
+
* S3C2410: unpowered by PMU
+
* GSM: Powered down by driving MODEM_ON to LOW
+
* GPS: unpowererd by PMU
+
* JBT6K74: unpowered by PMU
+
* Bluetooth: unpowered by PMU
+
* Backlight: powered off
+
 
+
==== SYS_POWER_ON_FULL ====
+
 
+
This is the regular, "fully switched on" state of the device, during user interaction.
+
 
+
* PCF50606: ACTIVE
+
* S3C2410: NORMAL
+
* GSM: Powered up by driving MODEM_ON to HIGH
+
* GPS: Depending usage / configuration
+
* Bluetooth: Depending usage / configuration
+
* JBT6K74: NORMAL
+
* Backlight: on (brightness according to PWM)
+
 
+
==== SYS_POWER_ON_SCRSAVE ====
+
 
+
This is the screen saver mode, if user doesn't interact with LCM for some time (SCRSAVE_TIMEOUT), default 30sec.
+
 
+
* PCF50606: ACTIVE
+
* S3C2410: SLOW or IDLE
+
* GSM: Powered up by driving MODEM_ON to HIGH
+
* GPS: Depending usage / configuration
+
* Bluetooth : Depending usage / configuration
+
* JBT6K74: SLEEP
+
* Backlight: powered off
+
 
+
==== SYS_POWER_SLEEP ====
+
 
+
This is the power saving mode, if user doesn't interact with LCM within SLEEP_TIMEOUT after SYS_POWER_ON_SCRSAVE was entered, default 30sec.
+
 
+
* PCF50606: ACTIVE
+
* S3C2410: Power_off (this is the suspend-to-RAM state)
+
* GSM: Powered up by driving MODEM_ON to HIGH
+
* GPS: TBD
+
* Bluetooth: Powered down by PMU
+
* JBT6K74: Deep Standby
+
* Backlight: powered off
+
  
 
=== Wake-up reasons ===
 
=== Wake-up reasons ===
Line 179: Line 181:
 
===== Implementation =====
 
===== Implementation =====
  
The GSM daemon configures the GSM Modem in a way to only report the required unsolicited result codes to the UART. The CPU then needs to wake-up as soon as characters arrive at the UART.
+
The GSM daemon configures the GSM Modem so as to wake the CPU when events happen.
 +
 
 +
The S3C2410 has the EINT0 pin of the S3C2410 connected to the GSM modem, which wakes it on configured events.
 +
 
 +
==== GPIO from Bluetooth ====
  
{{note|The S3C2410 cannot resume from Power_off on UART input data. We need to connect either RTS/CTS to EINT, or send some other signals via GSM Modem GPIO to the EINT[0..15] pins of the S3C2410}}
+
PIO_2 of the DFBM-CS320 is connected to GPC7 of the s3c2410.<br>
 +
PIO_5 of the DFBM-CS320 is connected to GPC5 of the s3c2410.<br>
 +
BT_EN of the DFBM-CS320 is connected to GPB5 if the s3c2410. [http://svn.openmoko.org/trunk/doc/hardware/GTA01Bv4/gpio.txt]
  
 
==== Button Press ====
 
==== Button Press ====
  
If somebody pushes either the [[Neo1973 911 Button]] or the [[Neo1973 Power Button]], the system shall wake up
+
If somebody pushes either the [[Neo1973 Aux Button]] or the [[Neo1973 Power Button]], the system shall wake up.
 
+
 
===== Implementation =====
 
===== Implementation =====
  
 
====== Power Button ======
 
====== Power Button ======
 
During suspend, the PMU is configured to allow PWRONF events to generate interrupts to the CPU.
 
During suspend, the PMU is configured to allow PWRONF events to generate interrupts to the CPU.
 +
(This is if PWR_IRQ is the internal signal from the PMU, mentioned in gpio.txt)
  
{{note|Currently, the PMU IRQ is connected to EINT16, i.e. an interrupt source that cannot wake-up from Power_off mode!}}
+
====== Aux Button ======
 +
The Aux button is connected the EINT6 pin, which can wake-up the CPU from Power_off.
  
====== 911 Button ======
+
This means that resuming on Aux button will work out-of-the-box
The 911 button is connected to a EINT source that can wake-up the CPU from Poewer_off.
+
 
+
This means that resuming on 911 button will work out-of-the-box
+
  
 
==== Charger Events ====
 
==== Charger Events ====
Line 206: Line 212:
 
During suspend, the PMU is configured to allow EXTONR,CHGERR and related events to generate interrupts to the CPU.
 
During suspend, the PMU is configured to allow EXTONR,CHGERR and related events to generate interrupts to the CPU.
  
{{note|Currently, the PMU IRQ is connected to EINT16, i.e. an interrupt source that cannot wake-up from Power_off mode!}}
+
In GTA01Bv4, the PMU IRQ is connected to EINT9.
  
 +
{{note|Up to GTA01Bv3, the PMU IRQ is connected to EINT16, i.e. an interrupt source that cannot wake-up from Power_off mode!}}
  
 
== Voltages ==
 
== Voltages ==
 +
{{note | This section reflects the wiring of power rails in GTA01Bv04 }}
  
 
=== VB ===
 
=== VB ===
Line 215: Line 223:
 
* Battery terminal voltage
 
* Battery terminal voltage
 
* Used by
 
* Used by
** [[LM4857]] Amplifier
+
** [[LM4857]] Amplifier (vdd1-4)
 
** [[PCF50606]] PMU
 
** [[PCF50606]] PMU
** LCM Backlight
+
** LCM Backlight (via U6001)
** U7607 AVDD regulator
+
** U7602 AVDD/GL_3V3 regulator
** U7608 VTXCO_2V8 regulator
+
** GSM Modem
  
 
=== CORE_1V8 ===
 
=== CORE_1V8 ===
This is the S3C2410 Core Voltage
 
  
 +
* This is the S3C2410 Core Voltage
 
* Generated by PMU DCUD
 
* Generated by PMU DCUD
 +
* Used by
 +
** S3C2410 (vddiarm/vddi/vddi_mpll/vddi_upll)
 +
 +
=== STBY_1V8 ===
 +
 +
* Standby Voltage for S3C2410
 +
* Generated by PMU D3REG
 +
* Used by
 +
** S3C2410 (vddalive/rtc)
  
 
=== IO_3V3 ===
 
=== IO_3V3 ===
Line 230: Line 247:
 
* Generated by PMU DCDE
 
* Generated by PMU DCDE
 
* Used by
 
* Used by
** Vibrator
+
** lots of pullups
** FLASH_3V3 (see below)
+
** U1502 (latch for GSM UART)
** Touch panel transistors
+
** S3C2410 VDDA_ADC
+
** S3C2410 VDDOP
+
 
** S3C2410 VDDMOP
 
** S3C2410 VDDMOP
 +
** S3C2410 VDDOP
 +
** S3C2410 VDDA_ADC
 
** S3C2410 nBATT_FLT
 
** S3C2410 nBATT_FLT
** U1502 (latch for GSM UART)
+
** S3C2410 !EXTCLK
** S3C2410 EXTCLK ???
+
** SDRAM_VCC3
** SDRAM
+
** FLASH_3V3
 +
** [[LM4857]] Amplifier (i2cvdd)
 +
** Vibrator
 +
** Touch panel transistors
 +
** SD_3V3 via U7501
 +
** PMU (avdd)
  
=== GL_3V3 ===
+
=== GL_1V5 ===
  
 
* Generated by PMU DCDF
 
* Generated by PMU DCDF
 +
* Used by
 +
** AGPS (vdd_core)
  
 +
=== GL_2V5 ===
 +
 +
* Generated by PMU D2REG
 
* Used by
 
* Used by
** AGPS
+
** AGPS (vdd_pllreg)
  
* Controlled by
+
=== GL_3V3 ===
** PMU
+
  
==== PM Driver ====
+
* Generated by U7602
 +
* Used by
 +
** AGPS (vdd_io/vdd_lpreg)
 +
** AGPS (X7601 -> rtcclk)
  
* Switch on/off if GPS is used or not
+
* Controlled by
 +
** EN_AGPS3V3 GPIO
  
==== Initial state ====
+
=== AVDD ===
 +
3V
 +
* Generated by U7602
 +
* Used by
 +
** AGPS (lna power int/ext, antenna switch)
  
* disabled by u-boot PMU initialization
+
* Controlled by
 +
** EN_AGPS3V GPIO
  
 
=== CODEC_3V3 ===
 
=== CODEC_3V3 ===
  
 
* Generated by PMU IOVDD
 
* Generated by PMU IOVDD
 
 
* Used for
 
* Used for
 
** Audio Codec (digital and analog)
 
** Audio Codec (digital and analog)
  
* Controlled by
+
=== BT_3V15 ===
** PMU Driver
+
  
==== PM Driver ====
+
* Generated by PMU D1REG
 
+
* Used by
* mostly included in ASoC, right?
+
** Bluetooth Module
* switch on, only if Audio path is required.
+
 
+
==== Initial state ====
+
 
+
* disabled by PMU initialization in u-boot
+
  
 
=== LCM_3V3 ===
 
=== LCM_3V3 ===
  
 
* Generated by PMU LPVDDD
 
* Generated by PMU LPVDDD
 
 
* Used by
 
* Used by
 
** Headset/GSM Uart Latch
 
** Headset/GSM Uart Latch
 
** LCM
 
** LCM
 
==== PM Driver ====
 
 
* check whether we really need to switch this off, since LCM has sophisticated PM features
 
 
==== Initial state ====
 
 
* enabled by u-boot PMU initialization
 
 
=== BT_3V15 ===
 
 
* Generated by PMU D1REG
 
 
==== PM Driver ====
 
 
* has to be powered up before Bluetooth can be used
 
* Bluetooth device automatically enumerates at bus
 
 
==== Initial state ====
 
 
* disabled by u-boot PMU initialization
 
 
=== GL_2V5 ===
 
 
* Generated by PMU D2REG
 
 
* Used by
 
** AGPS
 
 
* Controlled by
 
** PMU Driver
 
 
==== PM Driver ====
 
 
* switch on only in case GPS is enabled
 
 
==== Initial state ====
 
 
* disable by u-boot GPIO initialization
 
 
=== USER1 ===
 
 
FIXME: no idea what this is for
 
 
* Generated by PMU D3REG
 
 
==== PMU Driver ====
 
 
* permanently disabled
 
 
==== Initial state ====
 
 
* disabled by PMU initialization in u-boot
 
  
 
=== FLASH_3V3 ===
 
=== FLASH_3V3 ===
  
 
* Derived from IO_3V3
 
* Derived from IO_3V3
 
 
* Used by
 
* Used by
** NAND Flash
+
** NAND Flash
  
* Controlled by
+
=== SDRAM_VCC3 ===
** SD_EN GPIO
+
 
+
==== PM Driver ====
+
 
+
* do we really want to switch it on/off before every flash access?
+
* if we go to standby, IO_3V3 will be switched off, thus FLASH_3V3 is off, too
+
 
+
==== Initial state ====
+
 
+
* on, enabled by u-boot GPIO initialization
+
 
+
=== AVDD ===
+
 
+
* Generated by U6707
+
  
 +
* Derived from IO_3V3
 
* Used by
 
* Used by
** AGPS
+
** SDRAM
 
+
* Controlled by
+
** EN_AGPS3V GPIO
+
 
+
==== PM Driver ====
+
 
+
* Switch on only if GPS enabled
+
 
+
=== VTCXO_2V8 ===
+
 
+
* Generated by U7608
+
 
+
* Used by
+
** AGPS
+
 
+
* Controlled by
+
** EN_GPS2V8 GPIO
+
 
+
==== PM Driver ====
+
 
+
* enable only if GPS is used.
+
 
+
==== Initial State ====
+
 
+
* disabled by u-boot GPIO initialization
+
  
 
=== SD_3V3 ===
 
=== SD_3V3 ===
  
* Derived from IO_3V3
+
* Generated by U7501
 
+
 
* Used by
 
* Used by
 
** microSD slot
 
** microSD slot
Line 399: Line 332:
 
* Controlled by
 
* Controlled by
 
** SD_ON GPIO
 
** SD_ON GPIO
 
==== PM Driver ====
 
 
* we don't want to switch this off while mounted, do we?
 
 
 
==== Initial state ====
 
 
* probably disabled, unless somebody uses 'mmcinit' from u-boot
 
* but we can't disable it without disabling NAND.
 
* result: enabled by u-boot GPIO initialization
 
  
 
== Kernel API ==
 
== Kernel API ==
Line 417: Line 339:
 
== Approximate power draw of various subsystems ==
 
== Approximate power draw of various subsystems ==
  
The battery has a total of 1200mAh, at 3.6V. This is approximately 3500mWh, once power supply losses are taken into account. The figues below are estimates from datasheets.
+
In P0 and P1 phones, the battery has a total of 1200mAh, at 3.6V. This is approximately 3500mWh, once power supply losses are taken into account. The figures below are estimates from datasheets.
 +
 
 +
These do not take into account the severe hardware bugs of phase 0 hardware, which severely affect power use.
  
 
* LCD  
 
* LCD  
**  200mW with backlight at full brightness
+
**  150mW with backlight at full brightness
**  40mW with backlight at 10%
+
**  15mW with backlight at 10%
***  Based on similar 2.8" LCDs.
+
 
* CPU
 
* CPU
 
**  320mW @ 200MHz
 
**  320mW @ 200MHz
Line 429: Line 352:
 
**  50mW @ 12MHz (slow mode)
 
**  50mW @ 12MHz (slow mode)
 
*** These include fudge factors for RAM and other systems, from the CPU datasheet.
 
*** These include fudge factors for RAM and other systems, from the CPU datasheet.
 +
*RAM 600mW at 600Mbytes/sec, power use broadly proportional to transfer rate.
 
* Bluetooth
 
* Bluetooth
 
**  63mW @ Tx Burst (file transfer, send)
 
**  63mW @ Tx Burst (file transfer, send)
Line 435: Line 359:
 
*** Based on the datasheets provided
 
*** Based on the datasheets provided
 
* GSM ?
 
* GSM ?
*** All GSM terminals have a 2W radio trasmitter so I believe Tx burst consumption will be under that while Rx burst and idle values should be in the 30mW range.
+
**Idle, but connected to network, 45mW
 +
**Active on a call - up to 600mW, closer to tower less.
 
* GPS
 
* GPS
 
** 45mW
 
** 45mW
*** Based on comparison with a broadly similar (though not as fully featured chip [http://www.maxim-ic.com/appnotes.cfm/an_pk/3447 from Maxim]
+
*** Rough measurement
  
USB seems unlikely to work in slow mode. The LCD controller is unknown - the product notes say that it has RAM, which may imply it can self-refresh.
+
{|border="1"
 +
|+CPU clock speed constraints
 +
!Frequency(Mhz)||Notes||QVGA LCD||VGA LCD||USB device
 +
|-
 +
|12||Slow mode||No||No||No
 +
|-
 +
|12-33.74||Impossible or violates PLL spec
 +
|-
 +
|33.75-67.5|| ||Yes||No||Yes (with proper setting of HCLK divider)
 +
|-
 +
|79-266||  ||Yes||Yes||Yes
 +
|-
 +
|268-300||Overclocking||?||?||?
 +
|}
 +
 
 +
Recommended clock speeds: 12 33.75 45 48 50.7 56.25 67.5 79 84.75 90 101.25 113.0 118.5 124.0 135.0 147.0 152 158 170 180 186 192 202.8 266 268 270
 +
 
 +
Other clock speeds are possible (in the 33.75-266Mhz range) by setting the PLL, however, the datasheet strongly recommends these, and recommends contacting samsung for speeds not listed above.
  
 
This would imply that with the CPU constantly on in low power mode, GPS and GSM blipping on and off, and display off, the worst case power consumption is probably around 70mW, leading to a battery life of 2 days.
 
This would imply that with the CPU constantly on in low power mode, GPS and GSM blipping on and off, and display off, the worst case power consumption is probably around 70mW, leading to a battery life of 2 days.
 
If the CPU is turned off, battery life rises significantly.
 
If the CPU is turned off, battery life rises significantly.
  
With everything on, playing video with sound, for example should get well over 4 hours.
+
With everything on, playing video with sound, for example should get well over 3 hours. (500mW LCD + 320mW CPU + 200mW audio + 50mW GPS.  4.5Wh at 1.1W draw)
 +
 
 +
Both voltage and clock speed to the CPU core can be altered.
 +
Exactly how this will work with the hardware is yet to be determined.
 +
It is possible that it may be capable of playing MP3s with the CPU clock at 60Mhz. This would considerably extend battery to well over 10 hours. Optimistically >24 hours of mp3.
 +
 
 +
The lowest power state I have gotten the Neo1973 phase-1 to run in is 90mA or so, for a life of some 12 hours.
 +
This is with backlight, GSM modem, bluetooth, GPS, off, the CPU clocked at 100Mhz, and undervolted to 1.8V, connected over usb-net (not powered via USB)
 +
 
 +
8 hours playing mp3 at moderate volume. (same caveats as above.)
 +
 
 +
== Measured power draw on phase 0 neo1973 ==
 +
 
 +
I played with old ampermeter, old nokia 3110 (as a power supply) and phase0 neo1973 a bit. It appears to eat 1.02 mW while powered off, 1.02W while booted (backlight on), ~0.51W while sleeping (with backlight on) and 1.4W while loading applications.
 +
 
 +
 
 +
== Discharge graph ==
 +
[[User:JoSch|JoSch]] did a graph of battery volt versus time that can be found [http://rabenfrost.net/openmoko/battvolt2.png here].
 +
 
 +
== Logging battery parameters to troubleshoot charging ==
 +
 
 +
'''WARNING'''
 +
 
 +
'''After installing and starting this script my Neo battery went flat in < 1 hour. Previously it was fine even overnight. If your battery is so flat that the Neo will not boot then leave it plugged in to a USB port for 15-20 minutes before powering up.'''
 +
 
 +
 
 +
Some neos have managed to discharge their battery down to empty while off, plugged in, and supposedly charging from a 500ma-capable usb device.  In order to help figure out how the state of charge changes while charging, running of battery, sleeping on battery, and sleeping while connected to usb, download two scripts in http://wile.org/stuff/power.tar  Put the power-watch script in /usr/local/bin/ and the powerlog script in /etc/init.d, then
 +
 
 +
# ln -s ../init.d/powerlog /etc/rc5.d/S15powerlog
 +
 
 +
so that it starts up with the neo.
 +
 
 +
The script logs the time, battery voltage, charging current, battery temperature, charging mode, bluetooth-on status, gps-on status, gsm-on status, and backlight brightness numbers.  The [[Kernel#Battery_charging_current|kernel page]] claims the charging current is in ma, but that does not appear to be the case for all builds? eg 2.6.21.6-moko10.  The battery temperature does not always appear to be in degrees C, either.
 +
 
 +
After a few runs we can calibrate volts-to-remaining power, and then estimate off or sleep current draw and charging rate by observing the power drop [or rise] vs time between successive os boots.
  
[[Category:Hardware]]
+
[[Category:Neo1973 Hardware]]
 +
[[Category:Battery]]

Latest revision as of 08:09, 12 September 2010

In progress: This article or section documents one or more features whose implementation are in progress.

This page details the power management of the Phase 1 Neo1973. Much of it is inapplicable to earlier models.


Power management is of utmost concern to any mobile device. Battery power is quite limited, so we need to make sure we try our best to conserve it. (See also Power management requirements.)

This is very much unimplemented at the moment.

Update: The standby mode works most of the time, and the wake-up-from-call functionality works, too. Some settings need to be changed. For details, have a look here.

Current projects:

Projects
User Project details URL
cesarb Cpufreq Varying clock speed, including making peripherals work over during transitions
User:CesarB/cpufreq


Required kernel mode power saving, and relative saving of battery life.
Option Note Average saving over next lowest
power state the description
is the total effect on battery life
Status
External peripheral control Ability to dim backlight, turn on and off GSM, GPS, and other devices outside the CPU Huge (700mW) Implemented
Slow Mode The CPU clock is 12MHz, this is the lowest power mode with the CPU awake Huge(300mW) Not implemented
Variable CPU core voltage Dynamically alter CPU core voltage according to frequency Moderate(50mW) Not implemented, limited by PMU to .3V steps
CPU Idle mode Turn off CPU clock while rest of SoC remains awake Large(150mW) Not implemented
Variable CPU frequency ~20Mhz to 266Mhz Vary CPU frequency to lower power consumption. Huge(250mW) Not implemented
Tickless Kernel Remove periodic timer interrupts in kernel Modest(10mW?) Not implemented
Rapid Suspend-RAM Suspend CPU totally and resume when required in under 1s. Moderate (50mW) Not implemented


Required user-mode power saving
Option Note Saving Status
General speed optimization of all software With variable CPU clock, the less CPU needed, the less power. Moderate (Large with backlight off) In Progress
Smart turning off unused peripherals Interacting with kernel mode drivers to turn off bits the user isn't using Large
Seamlessly switching to 256 colour The LCD controller supports pallete mode. This would reduce memory bus traffic by a third. Small Of debatable value - only for P1 (?)


This page tries to describe the various power management features of the Neo1973 Hardware, their states, transitions, etc. First, we start by describing the power states of the individual hardware components. Then we look at it from a System Integration point of view.


Contents

[edit] S3C2410 SoC

The S3C2410 SoC section is an overview of the S3C2410 power states or modes and their capabilities. The S3C2410 has the following modes:


Power states for the S3C2410 SoC(CPU) including approx memory bus current
Mode Frequency Power consumption Wakeup sources Note
Normal Mode 33-266Mhz (around 50-335mW depending on speed) Awake
Idle Mode 33-266Mhz around 50-170mW depending on speed Any interrupt FCLK disconnected
Slow Mode 12Mhz 40mW Awake, can vary clock speed as desired on interrupts. CPU clock (FCLK), SDRAM, bus clocks set by 12Mhz crystal.
Power_off Mode off .2mW (@2V) GSM, buttons, touchscreen, charger/USB connect, low battery EINT[0...15], RTC Alarm Interrupt, nBATT_FAULT pin. SDRAM self-refresh, RTC powered.
Peripheral Power Note constraints
USB-H 1mW The USB host driver
USB-D 6mW The USB device driver PCLK>20Mhz
LCD driver 20(qvga)-80mW LCD driver HCLK>VCLK*4 (p386) VCLK(vga)=19Mhz VCLK(qvga)=4.75Mhz = CPU clock 80Mhz min(seems to work at 50Mhz according to u-boot pll set) or 32Mhz (min variable CPU speed)
PLL ?mW Phase locked loop, needed if not in slow mode.
Serial 7mW 2/3 integrated serial ports

[edit] System design considerations

In order to fully support Power_off mode, we need to

  • Be able to switch off VDDi/VDDiarm/VDDi_MPLL/VDDi_UPLL separately from VDDalive

[edit] PCF50606 PMU

This is an overview of the PCF50606 power modes / state transitions

[edit] NOPOWER

Condition: Vbat < Vverylowbat && Vback < Vlowback && Vchgvin < Vlowchg

Human-Readable: If main battery voltage < 2.7V and backup battery voltage < 1.3V and charger voltage < 2.7V

[edit] SAVE

Condition: Vbat < Vverylowbat && (Vback > Vlowback || Vchgvin > Vlowchg)

Human-readable: If main battery voltage < 2.7V and at least backup battery voltage > 1.3V or charger voltage > 2.7V.

[edit] STANDBY

Condition: Vbat > Vverylowbat

Human-readable: If main battery voltage > 2.7V

[edit] ACTIVE

Condition: Vbat > Vlowbat Human-Readable: If main battery voltage > 2.8V (configurable up to 3.4V) Transition from STANDBY to ACTIVE: If ONKEY button is pressed, or RTC Alarm, or EXTON or charger insert or pen-down by touchscreen (we don't use the PMU TS controller)

[edit] JBT6K74 LCM

[edit] Deep Standby

In this mode, only the supply power is activated

[edit] Sleep

Holds register data with clock stopped

[edit] Normal

Fully powered up and operational

[edit] System Level

This is a description of the system-level power management.

[edit] System Power states

In order to do system-level power management, we need to introduce state definitions with their according state names. The state names are prefixed by SYS_POWER_.

System power management states. Name prefixed with SYS_POWER_ PMU off is turned off by switching off the requisite output of the PCF50606
Name Note PCF50606
PSU chip
S3C2410
CPU
JBT6K74
LCD driver
GSM GPS Bluetooth Backlight
NO No main battery or USB charger. Backup battery operational Save Off PMU off Off - no Vbatt PMU off PMU off off
OFF "Switched Off" - no functionality Standby PMU off PMU off Off by MODEM_ON to LOW PMU off PMU off off
SLEEP Suspend-RAM (in pocket waiting for a call) Active Power_Off PMU Off On by MODEM_ON to HIGH Optional Deep Standby Off
SCRSAVE Screen Saver Active SLOW, IDLE SLEEP On by MODEM_ON to HIGH Optional Optional Off
ON Normal active state Active On Normal On by MODEM_ON to HIGH Optional On On, PWM'd brightness

[edit] Wake-up reasons

In the following events, we want the main CPU to be able to be woken up from Power_off (SYS_POWER_SLEEP) state:

[edit] Events from GSM

  • Incoming phone call
  • Incoming SMS
  • Loss of network signal
[edit] Implementation

The GSM daemon configures the GSM Modem so as to wake the CPU when events happen.

The S3C2410 has the EINT0 pin of the S3C2410 connected to the GSM modem, which wakes it on configured events.

[edit] GPIO from Bluetooth

PIO_2 of the DFBM-CS320 is connected to GPC7 of the s3c2410.
PIO_5 of the DFBM-CS320 is connected to GPC5 of the s3c2410.
BT_EN of the DFBM-CS320 is connected to GPB5 if the s3c2410. [1]

[edit] Button Press

If somebody pushes either the Neo1973 Aux Button or the Neo1973 Power Button, the system shall wake up.

[edit] Implementation
[edit] Power Button

During suspend, the PMU is configured to allow PWRONF events to generate interrupts to the CPU. (This is if PWR_IRQ is the internal signal from the PMU, mentioned in gpio.txt)

[edit] Aux Button

The Aux button is connected the EINT6 pin, which can wake-up the CPU from Power_off.

This means that resuming on Aux button will work out-of-the-box

[edit] Charger Events

If a charger plug (or any other USB device) is connected, the device shall resume and update the battery [charger] status. Also, charger errors such as over/undervoltage, over/under-temperature shall be reported.

[edit] Implementation

During suspend, the PMU is configured to allow EXTONR,CHGERR and related events to generate interrupts to the CPU.

In GTA01Bv4, the PMU IRQ is connected to EINT9.

NOTE: Up to GTA01Bv3, the PMU IRQ is connected to EINT16, i.e. an interrupt source that cannot wake-up from Power_off mode!


[edit] Voltages

NOTE: This section reflects the wiring of power rails in GTA01Bv04


[edit] VB

  • Battery terminal voltage
  • Used by
    • LM4857 Amplifier (vdd1-4)
    • PCF50606 PMU
    • LCM Backlight (via U6001)
    • U7602 AVDD/GL_3V3 regulator
    • GSM Modem

[edit] CORE_1V8

  • This is the S3C2410 Core Voltage
  • Generated by PMU DCUD
  • Used by
    • S3C2410 (vddiarm/vddi/vddi_mpll/vddi_upll)

[edit] STBY_1V8

  • Standby Voltage for S3C2410
  • Generated by PMU D3REG
  • Used by
    • S3C2410 (vddalive/rtc)

[edit] IO_3V3

  • Generated by PMU DCDE
  • Used by
    • lots of pullups
    • U1502 (latch for GSM UART)
    • S3C2410 VDDMOP
    • S3C2410 VDDOP
    • S3C2410 VDDA_ADC
    • S3C2410 nBATT_FLT
    • S3C2410 !EXTCLK
    • SDRAM_VCC3
    • FLASH_3V3
    • LM4857 Amplifier (i2cvdd)
    • Vibrator
    • Touch panel transistors
    • SD_3V3 via U7501
    • PMU (avdd)

[edit] GL_1V5

  • Generated by PMU DCDF
  • Used by
    • AGPS (vdd_core)

[edit] GL_2V5

  • Generated by PMU D2REG
  • Used by
    • AGPS (vdd_pllreg)

[edit] GL_3V3

  • Generated by U7602
  • Used by
    • AGPS (vdd_io/vdd_lpreg)
    • AGPS (X7601 -> rtcclk)
  • Controlled by
    • EN_AGPS3V3 GPIO

[edit] AVDD

3V

  • Generated by U7602
  • Used by
    • AGPS (lna power int/ext, antenna switch)
  • Controlled by
    • EN_AGPS3V GPIO

[edit] CODEC_3V3

  • Generated by PMU IOVDD
  • Used for
    • Audio Codec (digital and analog)

[edit] BT_3V15

  • Generated by PMU D1REG
  • Used by
    • Bluetooth Module

[edit] LCM_3V3

  • Generated by PMU LPVDDD
  • Used by
    • Headset/GSM Uart Latch
    • LCM

[edit] FLASH_3V3

  • Derived from IO_3V3
  • Used by
    • NAND Flash

[edit] SDRAM_VCC3

  • Derived from IO_3V3
  • Used by
    • SDRAM

[edit] SD_3V3

  • Generated by U7501
  • Used by
    • microSD slot
  • Controlled by
    • SD_ON GPIO

[edit] Kernel API

[edit] Userspace API

[edit] Approximate power draw of various subsystems

In P0 and P1 phones, the battery has a total of 1200mAh, at 3.6V. This is approximately 3500mWh, once power supply losses are taken into account. The figures below are estimates from datasheets.

These do not take into account the severe hardware bugs of phase 0 hardware, which severely affect power use.

  • LCD
    • 150mW with backlight at full brightness
    • 15mW with backlight at 10%
  • CPU
    • 320mW @ 200MHz
    • 450mW @ 266MHz
    • 140mW @ 200MHz idle.
    • 50mW @ 12MHz (slow mode)
      • These include fudge factors for RAM and other systems, from the CPU datasheet.
  • RAM 600mW at 600Mbytes/sec, power use broadly proportional to transfer rate.
  • Bluetooth
    • 63mW @ Tx Burst (file transfer, send)
    • 36mW @ Rx Burst (file transfer, receive)
    • 3.6mW @ Idle, beacon only
      • Based on the datasheets provided
  • GSM ?
    • Idle, but connected to network, 45mW
    • Active on a call - up to 600mW, closer to tower less.
  • GPS
    • 45mW
      • Rough measurement
CPU clock speed constraints
Frequency(Mhz) Notes QVGA LCD VGA LCD USB device
12 Slow mode No No No
12-33.74 Impossible or violates PLL spec
33.75-67.5 Yes No Yes (with proper setting of HCLK divider)
79-266 Yes Yes Yes
268-300 Overclocking ? ? ?

Recommended clock speeds: 12 33.75 45 48 50.7 56.25 67.5 79 84.75 90 101.25 113.0 118.5 124.0 135.0 147.0 152 158 170 180 186 192 202.8 266 268 270

Other clock speeds are possible (in the 33.75-266Mhz range) by setting the PLL, however, the datasheet strongly recommends these, and recommends contacting samsung for speeds not listed above.

This would imply that with the CPU constantly on in low power mode, GPS and GSM blipping on and off, and display off, the worst case power consumption is probably around 70mW, leading to a battery life of 2 days. If the CPU is turned off, battery life rises significantly.

With everything on, playing video with sound, for example should get well over 3 hours. (500mW LCD + 320mW CPU + 200mW audio + 50mW GPS. 4.5Wh at 1.1W draw)

Both voltage and clock speed to the CPU core can be altered. Exactly how this will work with the hardware is yet to be determined. It is possible that it may be capable of playing MP3s with the CPU clock at 60Mhz. This would considerably extend battery to well over 10 hours. Optimistically >24 hours of mp3.

The lowest power state I have gotten the Neo1973 phase-1 to run in is 90mA or so, for a life of some 12 hours. This is with backlight, GSM modem, bluetooth, GPS, off, the CPU clocked at 100Mhz, and undervolted to 1.8V, connected over usb-net (not powered via USB)

8 hours playing mp3 at moderate volume. (same caveats as above.)

[edit] Measured power draw on phase 0 neo1973

I played with old ampermeter, old nokia 3110 (as a power supply) and phase0 neo1973 a bit. It appears to eat 1.02 mW while powered off, 1.02W while booted (backlight on), ~0.51W while sleeping (with backlight on) and 1.4W while loading applications.


[edit] Discharge graph

JoSch did a graph of battery volt versus time that can be found here.

[edit] Logging battery parameters to troubleshoot charging

WARNING

After installing and starting this script my Neo battery went flat in < 1 hour. Previously it was fine even overnight. If your battery is so flat that the Neo will not boot then leave it plugged in to a USB port for 15-20 minutes before powering up.


Some neos have managed to discharge their battery down to empty while off, plugged in, and supposedly charging from a 500ma-capable usb device. In order to help figure out how the state of charge changes while charging, running of battery, sleeping on battery, and sleeping while connected to usb, download two scripts in http://wile.org/stuff/power.tar Put the power-watch script in /usr/local/bin/ and the powerlog script in /etc/init.d, then

# ln -s ../init.d/powerlog /etc/rc5.d/S15powerlog

so that it starts up with the neo.

The script logs the time, battery voltage, charging current, battery temperature, charging mode, bluetooth-on status, gps-on status, gsm-on status, and backlight brightness numbers. The kernel page claims the charging current is in ma, but that does not appear to be the case for all builds? eg 2.6.21.6-moko10. The battery temperature does not always appear to be in degrees C, either.

After a few runs we can calibrate volts-to-remaining power, and then estimate off or sleep current draw and charging rate by observing the power drop [or rise] vs time between successive os boots.

Personal tools

Contents

Power management is of utmost concern to any mobile device. Battery power is quite limited, so we need to make sure we try our best to conserve it.

This page tries to describe the various power management features of the Neo1973 Hardware, their states, transitions, etc.

First, we start by describing the power states of the individual hardware components. Then we look at it from a System Integration point of view.

S3C2410 SoC

This is an overview about the S3C2410 power states / modes and their capabilities

The S3C2410 has the following modes:

Normal Mode

This is the most power-consuming mode. Regular operation at full clock speed (266MHz). The typical power consumption is 335mW in this mode.

We can dynamically reduce the CPU core clock speed to lower frequencies, if required.

Idle Mode

In this mode, FCLK to the CPU core is switched off. This reduces the power consumption to about half the typical 'Normal mode' consumption: 177mW

Wake-up sources

any interrupt.

Slow Mode

In slow mode, FCLK is tied to the external crystal, i.e. 12MHz in our case. The CPU core, SDRAM and bus clocks are also running at 12MHz.

This reduces the power consumption to typically 33mW.

Wake-up sources

none, we can just use our slowly running code to switch back to Normal mode, if it's required.

Power_off Mode

In Power_off mode, only the SDRAM is held in refresh, and the SoC-internal wake-up logic and RTC is powered. This means that the overall power consumption of the CPU goes down to max. 100uA, which translates to 200uW at 2.0V core voltage.

Wake-up sources

The number of wake-up sources is more restricted in this mode:

  • EINT[0...15]
  • RTC Alarm Interrupt
  • nBATT_FAULT pin

System design considerations

In order to fully support Power_off mode, we need to

  • Be able to switch off VDDi/VDDiarm/VDDi_MPLL/VDDi_UPLL separately from VDDalive, using a switch based on the PWREN signal

PCF50606 PMU

This is an overview of the PCF50606 power modes / state transitions

NOPOWER

Condition: Vbat < Vverylowbat && Vback < Vlowback && Vchgvin < Vlowchg

Human-Readable: If main battery voltage < 2.7V and backup battery voltage < 1.3V and charger voltage < 2.7V

SAVE

Condition: Vbat < Vverylowbat && (Vback > Vlowback || Vchgvin > Vlowchg)

Human-readable: If main battery voltage < 2.7V and at least backup battery voltage > 1.3V or charger voltage > 2.7V.

STANDBY

Condition: Vbat > Vverylowbat

Human-readable: If main battery voltage > 2.7V

ACTIVE

Condition: Vbat > Vlowbat Human-Readable: If main battery voltage > 2.8V (configurable up to 3.4V) Transition from STANDBY to ACTIVE: If ONKEY button is pressed, or RTC Alarm, or EXTON or charger insert or pen-down by touchscreen (we don't use the PMU TS controller)

JBT6K74 LCM

Deep Standby

In this mode, only the supply power is activated

Sleep

Holds register data with clock stopped

Normal

Fully powered up and operational

System Level

This is a description of the system-level power management.

System Power states

In order to do system-level power managment, we need to introduce state definitions with their according state names. The state names are prefixed by SYS_POWER_.

SYS_POWER_NO

In this state, there is no main battery and no USB charger voltage applied. However, the backup battery is supposed to be operational.

  • PCF50606: SAVE
  • S3C2410: unpowered
  • JBT6K74: unpowered by PMU
  • GSM: unpovered because no Vbatt
  • GPS: unpowered by PMU
  • Bluetooth: unpowered by PMU
  • Backlight: powered off

SYS_POWER_OFF

This is the regular, "switched off" state of the device. The device does not provide any functionality.

  • PCF50606: STANDBY
  • S3C2410: unpowered by PMU
  • GSM: Powered down by driving MODEM_ON to LOW
  • GPS: unpowererd by PMU
  • JBT6K74: unpowered by PMU
  • Bluetooth: unpowered by PMU
  • Backlight: powered off

SYS_POWER_ON_FULL

This is the regular, "fully switched on" state of the device, during user interaction.

  • PCF50606: ACTIVE
  • S3C2410: NORMAL
  • GSM: Powered up by driving MODEM_ON to HIGH
  • GPS: Depending usage / configuration
  • Bluetooth: Depending usage / configuration
  • JBT6K74: NORMAL
  • Backlight: on (brightness according to PWM)

SYS_POWER_ON_SCRSAVE

This is the screen saver mode, if user doesn't interact with LCM for some time (SCRSAVE_TIMEOUT), default 30sec.

  • PCF50606: ACTIVE
  • S3C2410: SLOW or IDLE
  • GSM: Powered up by driving MODEM_ON to HIGH
  • GPS: Depending usage / configuration
  • Bluetooth : Depending usage / configuration
  • JBT6K74: SLEEP
  • Backlight: powered off

SYS_POWER_SLEEP

This is the power saving mode, if user doesn't interact with LCM within SLEEP_TIMEOUT after SYS_POWER_ON_SCRSAVE was entered, default 30sec.

  • PCF50606: ACTIVE
  • S3C2410: Power_off (this is the suspend-to-RAM state)
  • GSM: Powered up by driving MODEM_ON to HIGH
  • GPS: TBD
  • Bluetooth: Powered down by PMU
  • JBT6K74: Deep Standby
  • Backlight: powered off

Wake-up reasons

In the following events, we want the main CPU to be able to be woken up from Power_off (SYS_POWER_SLEEP) state:

Events from GSM

  • Incoming phone call
  • Incoming SMS
  • Loss of network signal
Implementation

The GSM daemon configures the GSM Modem in a way to only report the required unsolicited result codes to the UART. The CPU then needs to wake-up as soon as characters arrive at the UART.

NOTE: The S3C2410 cannot resume from Power_off on UART input data. We need to connect either RTS/CTS to EINT, or send some other signals via GSM Modem GPIO to the EINT[0..15] pins of the S3C2410


Button Press

If somebody pushes either the Neo1973 911 Button or the Neo1973 Power Button, the system shall wake up

Implementation
Power Button

During suspend, the PMU is configured to allow PWRONF events to generate interrupts to the CPU.

NOTE: Currently, the PMU IRQ is connected to EINT16, i.e. an interrupt source that cannot wake-up from Power_off mode!


911 Button

The 911 button is connected to a EINT source that can wake-up the CPU from Poewer_off.

This means that resuming on 911 button will work out-of-the-box

Charger Events

If a charger plug (or any other USB device) is connected, the device shall resume and update the battery [charger] status. Also, charger errors such as over/undervoltage, over/under-temperature shall be reported.

Implementation

During suspend, the PMU is configured to allow EXTONR,CHGERR and related events to generate interrupts to the CPU.

NOTE: Currently, the PMU IRQ is connected to EINT16, i.e. an interrupt source that cannot wake-up from Power_off mode!



Voltages

VB

  • Battery terminal voltage
  • Used by
    • LM4857 Amplifier
    • PCF50606 PMU
    • LCM Backlight
    • U7607 AVDD regulator
    • U7608 VTXCO_2V8 regulator

CORE_1V8

This is the S3C2410 Core Voltage

  • Generated by PMU DCUD

IO_3V3

  • Generated by PMU DCDE
  • Used by
    • Vibrator
    • FLASH_3V3 (see below)
    • Touch panel transistors
    • S3C2410 VDDA_ADC
    • S3C2410 VDDOP
    • S3C2410 VDDMOP
    • S3C2410 nBATT_FLT
    • U1502 (latch for GSM UART)
    • S3C2410 EXTCLK ???
    • SDRAM

GL_3V3

  • Generated by PMU DCDF
  • Used by
    • AGPS
  • Controlled by
    • PMU

PM Driver

  • Switch on/off if GPS is used or not

Initial state

  • disabled by u-boot PMU initialization

CODEC_3V3

  • Generated by PMU IOVDD
  • Used for
    • Audio Codec (digital and analog)
  • Controlled by
    • PMU Driver

PM Driver

  • mostly included in ASoC, right?
  • switch on, only if Audio path is required.

Initial state

  • disabled by PMU initialization in u-boot

LCM_3V3

  • Generated by PMU LPVDDD
  • Used by
    • Headset/GSM Uart Latch
    • LCM

PM Driver

  • check whether we really need to switch this off, since LCM has sophisticated PM features

Initial state

  • enabled by u-boot PMU initialization

BT_3V15

  • Generated by PMU D1REG

PM Driver

  • has to be powered up before Bluetooth can be used
  • Bluetooth device automatically enumerates at bus

Initial state

  • disabled by u-boot PMU initialization

GL_2V5

  • Generated by PMU D2REG
  • Used by
    • AGPS
  • Controlled by
    • PMU Driver

PM Driver

  • switch on only in case GPS is enabled

Initial state

  • disable by u-boot GPIO initialization

USER1

FIXME: no idea what this is for

  • Generated by PMU D3REG

PMU Driver

  • permanently disabled

Initial state

  • disabled by PMU initialization in u-boot

FLASH_3V3

  • Derived from IO_3V3
  • Used by
    • NAND Flash
  • Controlled by
    • SD_EN GPIO

PM Driver

  • do we really want to switch it on/off before every flash access?
  • if we go to standby, IO_3V3 will be switched off, thus FLASH_3V3 is off, too

Initial state

  • on, enabled by u-boot GPIO initialization

AVDD

  • Generated by U6707
  • Used by
    • AGPS
  • Controlled by
    • EN_AGPS3V GPIO

PM Driver

  • Switch on only if GPS enabled

VTCXO_2V8

  • Generated by U7608
  • Used by
    • AGPS
  • Controlled by
    • EN_GPS2V8 GPIO

PM Driver

  • enable only if GPS is used.

Initial State

  • disabled by u-boot GPIO initialization

SD_3V3

  • Derived from IO_3V3
  • Used by
    • microSD slot
  • Controlled by
    • SD_ON GPIO

PM Driver

  • we don't want to switch this off while mounted, do we?


Initial state

  • probably disabled, unless somebody uses 'mmcinit' from u-boot
  • but we can't disable it without disabling NAND.
  • result: enabled by u-boot GPIO initialization

Kernel API

Userspace API

Approximate power draw of various subsystems

The battery has a total of 1200mAh, at 3.6V. This is approximately 3500mWh, once power supply losses are taken into account. The figues below are estimates from datasheets.

  • LCD
    • 200mW with backlight at full brightness
    • 40mW with backlight at 10%
      • Based on similar 2.8" LCDs.
  • CPU
    • 320mW @ 200MHz
    • 450mW @ 266MHz
    • 140mW @ 200MHz idle.
    • 50mW @ 12MHz (slow mode)
      • These include fudge factors for RAM and other systems, from the CPU datasheet.
  • Bluetooth
    • 63mW @ Tx Burst (file transfer, send)
    • 36mW @ Rx Burst (file transfer, receive)
    • 3.6mW @ Idle, beacon only
      • Based on the datasheets provided
  • GSM ?
      • All GSM terminals have a 2W radio trasmitter so I believe Tx burst consumption will be under that while Rx burst and idle values should be in the 30mW range.
  • GPS
    • 45mW
      • Based on comparison with a broadly similar (though not as fully featured chip from Maxim

USB seems unlikely to work in slow mode. The LCD controller is unknown - the product notes say that it has RAM, which may imply it can self-refresh.

This would imply that with the CPU constantly on in low power mode, GPS and GSM blipping on and off, and display off, the worst case power consumption is probably around 70mW, leading to a battery life of 2 days. If the CPU is turned off, battery life rises significantly.

With everything on, playing video with sound, for example should get well over 4 hours.