| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This sets the PMIC_PWRON_L signal to correspond with the keyboard
power button state.
BUG=chrome-os-partner:9821
TEST=Tested on Lucas (see notes below)
Signed-off-by: David Hendricks <dhendrix@chromium.org>
1. AC power plugged in, AP off, EC booted
> gpioget PMIC_PWRON_L
1* PMIC_PWRON_L
2. AP running, press and release power button (should see screen zoom
out and then back in, but I don't have a monitor...)
2a. AP running, power button not pressed
> gpioget PMIC_PWRON_L
1 PMIC_PWRON_L
2b. Press power button
> Waiting for long power press 280507864
> gpioget PMIC_PWRON_L
0* PMIC_PWRON_L
2c. release power button before 8s
> Cancel power off
> gpioget PMIC_PWRON_L
1* PMIC_PWRON_L
3. From AP off state, press and hold keyboard power button
> gpioget PMIC_PWRON_L
0* PMIC_PWRON_L
After 8s, we see:
Timeout waiting for GPIO 0/KB_PWR_ON_L
Power button was not released in time
Shutdown complete.
4. AP on, press and hold keyboard power button
> gpioget PMIC_PWRON_L
1 PMIC_PWRON_L
> Waiting for long power press 654024769
> gpioget PMIC_PWRON_L
0* PMIC_PWRON_L
> Power off after long press now=654025073, 0
ending loop 2
Shutdown complete. <-- Note: This message comes from power_off() which
also de-asserts PMIC_PWRON_L
> gpioget PMIC_PWRON_L
1* PMIC_PWRON_L
Change-Id: I6955771707ecea2926570be0e8bd77ebddbca4d4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additional help messages and usage are gated by
CONFIG_CONSOLE_CMDHELP, so we can turn it on if there's space (adds
about 3KB to image size) and turn it off when there isn't.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=manual
1) help
2) help list
3) help gpioset
4) gpioset -> wrong number of params
5) gpioset fred 0 -> param1 bad
6) gpioset cpu_prochot fred -> param2 bad
Change-Id: Ibe99f37212020f763ebe65a068e6aa83a809a370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure we can jump between EC images without powering down the GAIA AP :
- preserve GPIO state
- go back to "power-on" state if needed in GAIA state machine.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=On Daisy, boot Linux, then type "sysjump B" and observed we can
still interact with Linux without any AP reboot.
Change-Id: Ia2bd0f65ea348813b120bcc3a3f3bdfa96a9877a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a set of functions to deal with power on/power off, and checking
the power button. Then use these functions in a new top-level power
control loop.
This implements the following features:
- Cold reset powers off the AP
When powered off:
- Press pwron turns on the AP
- Hold pwron turns on the AP, and then 16s later turns it off and leaves
it off until pwron is released and pressed again
When powered on:
- The PMIC PWRON signal is released one second after the power button is
released (we expect that U-Boot as asserted XPSHOLD by then)
- Holding pwron for 8s powers off the AP
- Pressing and releasing pwron within that 8s is ignored
- If XPSHOLD is dropped by the AP, then we power the AP off
BUG=chrome-os-partner:9424
TEST=very ad-hoc:
1. build and boot on daisy, flash U-Boot with USB using
'cros_bundle_firmware -w usb', inserting daisy
USB cable when it says 'Reseting board via servo...'
2. Press cold reset, then power on, see that it powers on
3. Then hold power-on for 8 seconds and see that it power off
4. XPSHOLD function not tested yet (this should work in Daisy 2)
Change-Id: Ie471af0b4e690de7d6340e47e148c8ce3cda94f3
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function accepts a timeout value of -1, so add a comment to that
effect. Also make it deal with this explicitly since the current function
seems to return prematurely in that case.
BUG=chrome-os-partner:9424
TEST=very ad-hoc:
1. build and boot on daisy, flash U-Boot with USB using
'cros_bundle_firmware -w usb', inserting daisy
USB cable when it says 'Reseting board via servo...'
2. Press cold reset, then power on, see that it powers on
3. Then hold power-on for 8 seconds and see that it power off
4. XPSHOLD function not tested yet
Change-Id: I01bd81997836333ca33e61d48823e8ff41034d5f
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This saves ~70mw of power.
To make this work, I also had to stretch the power button signal to
give the system a chance to come back up when the user taps the power
button.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9574
TEST=manual
For each of the following tests, wait ~15 sec after the system is
powered off to give it a chance to drop DPWROK.
1) tap power button -> system turns on
2) hold power button 1 sec -> system turns on
3) open lid -> system turns on
4) silego reset (power+refresh, or power+esc on proto1) -> system stays off
5) silego recovery (power+esc+refresh) -> system turns on
6) hold down power button and type 'reboot' on EC console -> system turns on
7) type 'powerbtn' on EC console -> system turns on
Change-Id: I781cf3e665104192521b7fb9ff75a3c3e7f43464
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GPIO_KB_PWR_ON and GPIO_PMIC_PWRON are active low, so add _L to each
name to make this clearer.
BUG=chrome-os-partner:9424
TEST=very ad-hoc:
1. build and boot on daisy, flash U-Boot with USB using
'cros_bundle_firmware -w usb', inserting daisy
USB cable when it says 'Reseting board via servo...'
2. Press cold reset, then power on, see that it powers on
3. Then hold power-on for 8 seconds and see that it power off
4. XPSHOLD function not tested yet
Change-Id: Ibdc0064477c36e8658ef5605cdd5811c2283aff9
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: This will not work on older (0.94 boards).
- Use power button (KB_PWR_ON) to drive power sequencing events and
disable EC_PWRON. This is because EC_PWRON and KB_PWR_ON shared an
external interrupt line. Daisy v2.x will fix this so that both can
be enabled. Note: KB_PWR_ON is active low, wihle EC_PWRON is active
high.
- Relay power button state to PMIC. Also, since we are driving
PMIC_PWRON instead of PMIC_ACOK now, so updated the naming.
- Add a keyboard power button debounce period to avoid accidentally powering
the system back on after keyboard power-off.
Signed-off-by: David Hendricks <dhendrix@chromium.org>
BUG=None
TEST=tested on daisy (frh@ verified behavior using a scope)
Change-Id: I5338eebe42c9b43a07af371a450db23276b2a574
|
|
|
|
|
|
|
|
|
|
|
|
| |
This completes console output cleanup. The remaining calls to
uart_puts() and uart_printf() actually need to be that way.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:7464
TEST=manual
Change-Id: Ib1d6d370d30429017b3d11994894fece75fab6ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This situation occurs during USB download - the EC resets itself which
causes USB programming to generally fail.
Is this the correct fix?
BUG=none
TEST=build on daisy and discovery; run on daisy
$ cros_bundle_firmware -b daisy -w usb
See that it now succeeds
Change-Id: I293e85d08d3c488d5b6bebe3379deb949f211986
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:7461
TEST=manual
make BOARD={bds,link,daisy}
make tests
flash link system and make sure it boots
Change-Id: I1241a1895c083e387e38ddab01ac346ca4474eb9
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...since x86_power_in_S0() is a terrible function to have implemented
for gaia chipsets, and I need to add more detectable states for lid
switch handling anyway.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=none
Change-Id: I0c90c6875b27d1bf23f093e88e34eabf2a8c86e4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the timeouts during the power on sequence as recommended by
Frank.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=run EC firmware on ADV board and let Frank control he likes the
signals.
Change-Id: I7391a1cdd5ad74e0c22e15eb996955c5b7719154
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PMIC_ACOK signal is active-low.
Let's drive it correctly.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=On ADV board, check that a short key press on the power button is
now able to start the board
Change-Id: Iea71939aeb532618019a9e7774721703c632976f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Either a 8-second press on the power button or the XPSHOLD signal going
down (triggered the AP/PMIC shutdown sequence) will trigger a shutdown
of the system and switch off all power rails.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=on Discovery, test manually various power key press duration and
see power on/power off traces.
Change-Id: Ic37e4a51fe6b131034e24c55f05dae8119ce9992
|
|
This should be enough to switch on the board from either the power
button or the EC console.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=run Daisy firmware on Discovery board with logic analyzer attached
to GPIO pins. With an added task to simulate PMIC startup and AP
startup, check the timing chart looks good.
Change-Id: I5dfeab05d0481d121ddacb36b69a542cc1bd428c
|