coreboot/src
Nicola Corna 417178463e UPSTREAM: ec/lenovo/h8: Add USB Always On
USB AO is the internal name for the dedicated charging port on
ThinkPads when in S3 or lower.

AOEN (bit 0) is internal name for enabling this feature while AOCF
(bits 2 and 3) is the configuration field. According to Peter Stuge,
AOCF can be configured in this way:

    00 => AC S3 S4 S4 USB on, battery S3 USB on, battery S4 S5 off
    11 => AC S3 S4 S4 USB on, battery S3 S4 S5 USB off
    10, 01 => equivalent to 00

This commit also adds a new configuration field in the CMOS of the
X220 and the X201 to activate this feature. It probably can be also
added to all the ThinkPads that support this functionality.

With this functionality USB devices are able to negotiate full power
from the dedicated port (usually the yellow one) even in S3.

Tested on a X201 and X220 with an Android smartphone: with this
feature enabled it shows "Charging" when connected during S3, without
it it shows "Charging slowly" (or it doesn't charge at all on the
X201).

For some reasons the "AC only" mode doesn't work, so it has been
disabled.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Nicola Corna <nicola@corna.info>
Reviewed-on: https://review.coreboot.org/17252
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: Ie1269a4357e2fbd608ad8b7b8262275914730f6e
Reviewed-on: https://chromium-review.googlesource.com/413055
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-21 11:53:10 -08:00
..
acpi UPSTREAM: src/acpi: Capitalize ACPI and SATA 2016-08-04 23:37:57 -07:00
arch UPSTREAM: arch/x86/acpigen: Implement acpigen functions to return integer & string 2016-11-19 03:17:56 -08:00
commonlib UPSTREAM: commonlib: Add new cbmem id for EC_HOSTEVENT 2016-11-14 19:59:41 -08:00
console UPSTREAM: Revert "[WIP] console/Kconfig: Calculate COM port base addresses only on x86" 2016-10-18 22:15:27 -07:00
cpu UPSTREAM: cpu/x86/mtrr: allow temporary MTRR range during coreboot 2016-11-14 19:58:59 -08:00
device UPSTREAM: Kconfig: Update default hex values to start with 0x 2016-10-04 00:32:40 -07:00
drivers UPSTREAM: rtc: Force negative edge on SET after battery replacement 2016-11-19 03:18:01 -08:00
ec UPSTREAM: ec/lenovo/h8: Add USB Always On 2016-11-21 11:53:10 -08:00
include UPSTREAM: rtc: Check update-in-progress bit 2016-11-19 03:17:58 -08:00
lib UPSTREAM: vboot: TPM2 - report attempts to re-create NVRAM spaces 2016-11-16 07:08:26 -08:00
mainboard UPSTREAM: ec/lenovo/h8: Add USB Always On 2016-11-21 11:53:10 -08:00
northbridge UPSTREAM: northbridge/via/vx800: transition away from device_t 2016-11-16 07:08:17 -08:00
soc UPSTREAM: soc/broadcom/cygnus: Update DDR Kconfig 2016-11-19 03:17:42 -08:00
southbridge UPSTREAM: southbridge/amd: Remove debug echo when building PI 2016-11-10 18:32:07 -08:00
superio UPSTREAM: sio/ite/common: Add generic environment-controller driver 2016-11-19 03:17:38 -08:00
vboot UPSTREAM: vboot: make TPM factory init sequence more robust. 2016-11-16 07:08:29 -08:00
vendorcode UPSTREAM: google/chromeec: Add common infrastructure for boot-mode switches 2016-11-19 03:18:03 -08:00
Kconfig UPSTREAM: ACPI S3: Remove HIGH_MEMORY_SAVE where possible 2016-11-10 18:31:17 -08:00