battery charging

22
Battery Charging

Upload: ping-chin-huang

Post on 10-Feb-2017

257 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Battery Charging

Battery Charging

Page 2: Battery Charging

Agenda

● Autonomous Charging with PM8058● Charging Control● Known Issues● Q & A

Page 3: Battery Charging

Autonomous Charging with PM8058

Page 4: Battery Charging

Autonomous Charging

● This is a new feature supported by PM8058.● With autonomous charging, the PMIC is able to control

charging without software intervention.● The autonomous charging algorithm is implemented in a

state machine; once it begins, it executes a sequence of predetermined states until charging is completed.

Page 5: Battery Charging
Page 6: Battery Charging

Select Appropriate Power Source for VDD

● Battery Power – A charger is not present.– or an invalid charger is present. (VCHG is below 3.3V or above 7V)– or valid charger is present but it is an intelligent USB device and

the battery is not severely depleted.● External Charger Power

– A regular charger (not an intelligent USB device) is present and valid.

– or an intelligent USB charger is present and valid, but battery is severely depleted and the LOW_CURR_BOOT register bit is set to 1. (meaning that the PMIC can perform a low current boot)

● Auto-trickle Charging– An intelligent USB charging device is present.– and the battery is severely depleted.– and the LOW_CURR_BOOT register bit is set to 0.

Page 7: Battery Charging

Charging Control

Page 8: Battery Charging

Register Battery Client to Modem

BATTERY_VOLTAGE_UPBATTERY_VOLTAGE_DOWNBATTERY_VOLTAGE_ABOVE_THIS_LEVELBATTERY_VOLTAGE_BELOW_THIS_LEVELBATTERY_VOLTAGE_LEVELBATTERY_ALL_ACTIVITYVBATT_CHG_EVENTSBATTERY_VOLTAGE_UNKNOWN

Get Battery and Charger status

Page 9: Battery Charging

Charging Control

Page 10: Battery Charging

Light Up Charging LED

Page 11: Battery Charging

Charging LED Behavior

● Framework has its charging LED behavior.● Charger Presence

– Battery Capacity < 10%: Red Solid LED– 90% > Battery Capacity > 10 %: Red + Green Solid

LED– Battery Capacity > 90%: Green Solid LED

● No Charger Presence– Battery Capacity < 10%: Red Blink LED

Page 12: Battery Charging

Known Issues

Page 13: Battery Charging

Charging Notification Delay

● QA expectation: DUT should show charging notification , charging LED, charging icon or charging splash images, immediately when insert AC/USB cable into DUT.

● Root Cause:- Different HW Design

- Before FB0: An external charging IC is adopted.- Charging LED can be lit up immediately once the USB/AC

cable insert into DUT.- FB0: Use PM8058 autonomous charging.

- Different SW Architecture- Before FB0: Host can control charging IC directly.

- RPC calls are not necessary. - UEvent can be sent as early as possible once the charging

configuration is finished.- FB0: Host have to notify Modem to turn on charging by RPC calls.

Page 14: Battery Charging

Charging Notification Delay(cont.)

• Possible Solutions– Charging LED Improvement:

1. Modify HW layout to let charging LED be lit up by HW first.

2. Light up charging LED by Modem tasks first.3. Light up charging LED once the USB/AC cable

insertion event has been received by USB driver.– Charging Icon Improvement:

• Trigger UEvent once the USB/AC cable insertion event has been received by USB driver.

Page 15: Battery Charging

Removed Battery Intentionally

● DUT will not shutdown when removing battery with AC/USB cable plugged

● Root Cause:– Modem should notify Host immediately when battery is

removed.● Solutions:

– in OS Mode● Modem notify Host by RPC callback.

– in Power-Off Charging Mode● Modem have to provide a shared memory command

for Host to check battery status in LK.

Page 16: Battery Charging

Modem BATT/CHG Events

● As mentioned in Page 9, Modem will send BATT/CHG event once battery voltage changes or charger status changes if our battery registers a battery client to Modem.– The battery event is sent when battery voltage has a

100mV variation.● This event is very difficult to observe.● FB0 has gauge IC. ● The battery status updates by polling in current battery

driver.– The charger event is sent when the charger is inserted or

removed.– And so on……

Page 17: Battery Charging

Unconfigured Current (USBIF)

● USB device cannot draw 500mA current before it is configured.

● Unconfigured current is 100mA● Solution: Set charging current to 100mA when USB device

is in SET_ADDRESS_STATE.

Page 18: Battery Charging

Q & A

Page 19: Battery Charging

CHG/BATT Software Arch.

Page 20: Battery Charging

Gauge FW Upgrading Wizard

Dialer

Page 21: Battery Charging
Page 22: Battery Charging