Ticket #891 (closed enhancement: fixed)
Don't power anything up if battery is critical and charger is inserted
| Reported by: | cesarb@… | Owned by: | openmoko-kernel |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | kernel | Version: | |
| Severity: | minor | Keywords: | bootloader |
| Cc: | buglog@…, cw@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | no | PatchReviewResult: | |
| Reproducible: |
Description
If the battery charge is too low, doing things like powering up the backlight is
counterproductive (if things are really critical, it could make the voltage sag
enough that the CPU loses power, causing a reset cycle). This could be the cause
for reports of repeated backlight flashing when trying to recharge dead batteries.
If the powerup cause is reset or charger insert, AND the battery level is too
low (below some threshold voltage), u-boot should detect the situation at the
earliest possible time (perhaps even before powering up the SDRAM) and refrain
from powering up anything else (perhaps even powering down the CPU, or making it
use the least possible amount of power while slowly polling the battery status).
This would give the charger time to bring the battery voltage back to a
comfortable level.
Change History
comment:4 Changed 6 years ago by speedevil@…
To do this right:
U-boot should:
Boot to slow mode, not fast mode (lower power, higher chance of not immediately
crashing out)
Extremely low batt: - under 2.9V, USB power on.
Turn off immediately, charge at low-rate, set RTC to wakeup in 2 min.
Low bat - V under 3.1V, USB power on:
Connected to USB bus in suspend.
Attempt to wake host.
Wake fails: beep to indicate state, power off.
Wake succeeds: next state
Connected to USB bus not in suspend:
Attempt to negotiate for 500mA as a HID device
Negotiation succeeds - high speed mode, boot.
Negotiation fails: beep to indicate state, power off.
Connected to something that is not a USB host in operational or suspend mode:
Check we have not tried high power mode in last minute.
If this has failed, then beep to indicate low-rate charge, power off.
Record that we're trying high power mode at time now.
Turn on high power mode, verify power stays stable for 10s.
High speed, Boot.
All of this happens _before_ the u-boot bootsplash screen.
These thresholds should be set so that they will work with a year old battery,
with increased ESR and lower capacity than the
comment:8 Changed 5 years ago by john_lee
- Status changed from new to assigned
- HasPatchForReview unset
- Component changed from u-boot to System Software
- Priority changed from high to normal
- Version 2007.2 deleted
- Owner changed from michael to openmoko-kernel
seems not specific to u-boot but an enhancement to system software.
comment:10 Changed 4 years ago by andy
- Status changed from assigned to closed
- Resolution set to fixed
