summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-06-08 11:26:26 +0200
committerMartin Roth <martinroth@google.com>2017-07-07 17:20:09 +0000
commit7ffb329f278d6b027bb3b3660b69e87f1ddd69d8 (patch)
tree0bc7b1deb7b889882eb6e4997eda880042806077 /src
parentb21f5d708afe417cef8894a58c162ff50f987822 (diff)
downloadcoreboot-7ffb329f278d6b027bb3b3660b69e87f1ddd69d8.tar.xz
mb/lenovo/*/cmos: Port USB Always On
Port commit f1395d82: "ec/lenovo/h8: Add USB Always On" to other Thinkpad boards, as it seems to work fine on all generations. Change-Id: I6dcbfaae2a444d9a679ecb64a87dc2a59b8fd281 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20106 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/lenovo/l520/cmos.default1
-rw-r--r--src/mainboard/lenovo/l520/cmos.layout8
-rw-r--r--src/mainboard/lenovo/l520/smihandler.c2
-rw-r--r--src/mainboard/lenovo/t420/cmos.default1
-rw-r--r--src/mainboard/lenovo/t420/cmos.layout5
-rw-r--r--src/mainboard/lenovo/t420/smihandler.c2
-rw-r--r--src/mainboard/lenovo/t420s/cmos.default1
-rw-r--r--src/mainboard/lenovo/t420s/cmos.layout5
-rw-r--r--src/mainboard/lenovo/t420s/smihandler.c2
-rw-r--r--src/mainboard/lenovo/t430/cmos.layout6
-rw-r--r--src/mainboard/lenovo/t430s/cmos.default1
-rw-r--r--src/mainboard/lenovo/t430s/cmos.layout5
-rw-r--r--src/mainboard/lenovo/t430s/smihandler.c2
-rw-r--r--src/mainboard/lenovo/t520/cmos.default1
-rw-r--r--src/mainboard/lenovo/t520/cmos.layout8
-rw-r--r--src/mainboard/lenovo/t520/smihandler.c2
-rw-r--r--src/mainboard/lenovo/t530/cmos.default1
-rw-r--r--src/mainboard/lenovo/t530/cmos.layout7
-rw-r--r--src/mainboard/lenovo/t530/smihandler.c2
-rw-r--r--src/mainboard/lenovo/x230/cmos.default1
-rw-r--r--src/mainboard/lenovo/x230/cmos.layout7
-rw-r--r--src/mainboard/lenovo/x230/smihandler.c2
22 files changed, 59 insertions, 13 deletions
diff --git a/src/mainboard/lenovo/l520/cmos.default b/src/mainboard/lenovo/l520/cmos.default
index 92dc2e1555..f38beb4c79 100644
--- a/src/mainboard/lenovo/l520/cmos.default
+++ b/src/mainboard/lenovo/l520/cmos.default
@@ -15,3 +15,4 @@ sticky_fn=Disable
trackpoint=Enable
backlight=Both
hybrid_graphics_mode=Integrated Only
+usb_always_on=Disable \ No newline at end of file
diff --git a/src/mainboard/lenovo/l520/cmos.layout b/src/mainboard/lenovo/l520/cmos.layout
index 3c450c7e16..80759040a7 100644
--- a/src/mainboard/lenovo/l520/cmos.layout
+++ b/src/mainboard/lenovo/l520/cmos.layout
@@ -67,9 +67,9 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-#419 2 r 0 unused
+419 2 e 13 usb_always_on
421 1 e 9 sata_mode
-422 2 e 10 backlight
+422 2 e 10 backlight
# coreboot config options: cpu
#424 8 r 0 unused
@@ -136,6 +136,10 @@ enumerations
11 6 224M
12 0 Integrated Only
12 1 Discrete Only
+13 0 Disable
+13 1 AC and battery
+13 2 AC only
+
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/l520/smihandler.c b/src/mainboard/lenovo/l520/smihandler.c
index d2f7cb3e1d..f0c7a04f51 100644
--- a/src/mainboard/lenovo/l520/smihandler.c
+++ b/src/mainboard/lenovo/l520/smihandler.c
@@ -72,6 +72,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */
diff --git a/src/mainboard/lenovo/t420/cmos.default b/src/mainboard/lenovo/t420/cmos.default
index 0fc3e553f6..d1fbcf6b27 100644
--- a/src/mainboard/lenovo/t420/cmos.default
+++ b/src/mainboard/lenovo/t420/cmos.default
@@ -14,3 +14,4 @@ fn_ctrl_swap=Disable
sticky_fn=Disable
trackpoint=Enable
hybrid_graphics_mode=Integrated Only
+usb_always_on=Disable \ No newline at end of file
diff --git a/src/mainboard/lenovo/t420/cmos.layout b/src/mainboard/lenovo/t420/cmos.layout
index 924b0f11ab..96cba62599 100644
--- a/src/mainboard/lenovo/t420/cmos.layout
+++ b/src/mainboard/lenovo/t420/cmos.layout
@@ -69,7 +69,7 @@ entries
418 1 e 1 sticky_fn
419 1 e 1 power_management_beeps
421 1 e 9 sata_mode
-#422 2 r 1 unused
+422 2 e 13 usb_always_on
# coreboot config options: cpu
#424 8 r 0 unused
@@ -137,6 +137,9 @@ enumerations
11 6 224M
12 0 Integrated Only
12 1 Discrete Only
+13 0 Disable
+13 1 AC and battery
+13 2 AC only
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/t420/smihandler.c b/src/mainboard/lenovo/t420/smihandler.c
index eff0daffdc..825a20b7e9 100644
--- a/src/mainboard/lenovo/t420/smihandler.c
+++ b/src/mainboard/lenovo/t420/smihandler.c
@@ -71,6 +71,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */
diff --git a/src/mainboard/lenovo/t420s/cmos.default b/src/mainboard/lenovo/t420s/cmos.default
index 0fc3e553f6..d1fbcf6b27 100644
--- a/src/mainboard/lenovo/t420s/cmos.default
+++ b/src/mainboard/lenovo/t420s/cmos.default
@@ -14,3 +14,4 @@ fn_ctrl_swap=Disable
sticky_fn=Disable
trackpoint=Enable
hybrid_graphics_mode=Integrated Only
+usb_always_on=Disable \ No newline at end of file
diff --git a/src/mainboard/lenovo/t420s/cmos.layout b/src/mainboard/lenovo/t420s/cmos.layout
index e9e582db71..73a0b4bcba 100644
--- a/src/mainboard/lenovo/t420s/cmos.layout
+++ b/src/mainboard/lenovo/t420s/cmos.layout
@@ -69,7 +69,7 @@ entries
418 1 e 1 sticky_fn
419 1 e 1 power_management_beeps
421 1 e 9 sata_mode
-#422 2 r 1 unused
+422 2 e 13 usb_always_on
# coreboot config options: cpu
#424 8 r 0 unused
@@ -137,6 +137,9 @@ enumerations
11 6 224M
12 0 Integrated Only
12 1 Discrete Only
+13 0 Disable
+13 1 AC and battery
+13 2 AC only
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/t420s/smihandler.c b/src/mainboard/lenovo/t420s/smihandler.c
index 2b6e6cd3cb..471095e2b6 100644
--- a/src/mainboard/lenovo/t420s/smihandler.c
+++ b/src/mainboard/lenovo/t420s/smihandler.c
@@ -107,6 +107,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */
diff --git a/src/mainboard/lenovo/t430/cmos.layout b/src/mainboard/lenovo/t430/cmos.layout
index 99f815e2d6..5565d3bee2 100644
--- a/src/mainboard/lenovo/t430/cmos.layout
+++ b/src/mainboard/lenovo/t430/cmos.layout
@@ -67,8 +67,7 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-419 1 e 1 usb_always_on
-#420 1 r 0 unused
+419 2 e 13 usb_always_on
421 1 e 9 sata_mode
422 2 e 10 backlight
@@ -137,6 +136,9 @@ enumerations
11 6 224M
12 0 Integrated Only
12 1 Discrete Only
+13 0 Disable
+13 1 AC and battery
+13 2 AC only
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/t430s/cmos.default b/src/mainboard/lenovo/t430s/cmos.default
index f7e38d2ee7..a0abaedb8a 100644
--- a/src/mainboard/lenovo/t430s/cmos.default
+++ b/src/mainboard/lenovo/t430s/cmos.default
@@ -14,3 +14,4 @@ fn_ctrl_swap=Disable
sticky_fn=Disable
trackpoint=Enable
backlight=Both
+usb_always_on=Disable \ No newline at end of file
diff --git a/src/mainboard/lenovo/t430s/cmos.layout b/src/mainboard/lenovo/t430s/cmos.layout
index f116bab360..1f696505c8 100644
--- a/src/mainboard/lenovo/t430s/cmos.layout
+++ b/src/mainboard/lenovo/t430s/cmos.layout
@@ -67,7 +67,7 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-#419 2 r 0 unused
+419 2 e 12 usb_always_on
421 1 e 9 sata_mode
422 2 e 10 backlight
@@ -133,6 +133,9 @@ enumerations
11 4 160M
11 5 192M
11 6 224M
+12 0 Disable
+12 1 AC and battery
+12 2 AC only
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/t430s/smihandler.c b/src/mainboard/lenovo/t430s/smihandler.c
index 70ecab2cc9..512e6314cc 100644
--- a/src/mainboard/lenovo/t430s/smihandler.c
+++ b/src/mainboard/lenovo/t430s/smihandler.c
@@ -105,6 +105,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */
diff --git a/src/mainboard/lenovo/t520/cmos.default b/src/mainboard/lenovo/t520/cmos.default
index 92dc2e1555..5c21f9c7fa 100644
--- a/src/mainboard/lenovo/t520/cmos.default
+++ b/src/mainboard/lenovo/t520/cmos.default
@@ -15,3 +15,4 @@ sticky_fn=Disable
trackpoint=Enable
backlight=Both
hybrid_graphics_mode=Integrated Only
+usb_always_on=Disable
diff --git a/src/mainboard/lenovo/t520/cmos.layout b/src/mainboard/lenovo/t520/cmos.layout
index 3c450c7e16..80759040a7 100644
--- a/src/mainboard/lenovo/t520/cmos.layout
+++ b/src/mainboard/lenovo/t520/cmos.layout
@@ -67,9 +67,9 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-#419 2 r 0 unused
+419 2 e 13 usb_always_on
421 1 e 9 sata_mode
-422 2 e 10 backlight
+422 2 e 10 backlight
# coreboot config options: cpu
#424 8 r 0 unused
@@ -136,6 +136,10 @@ enumerations
11 6 224M
12 0 Integrated Only
12 1 Discrete Only
+13 0 Disable
+13 1 AC and battery
+13 2 AC only
+
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/t520/smihandler.c b/src/mainboard/lenovo/t520/smihandler.c
index c48cf3d765..3fa8e3032d 100644
--- a/src/mainboard/lenovo/t520/smihandler.c
+++ b/src/mainboard/lenovo/t520/smihandler.c
@@ -107,6 +107,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */
diff --git a/src/mainboard/lenovo/t530/cmos.default b/src/mainboard/lenovo/t530/cmos.default
index 92dc2e1555..f38beb4c79 100644
--- a/src/mainboard/lenovo/t530/cmos.default
+++ b/src/mainboard/lenovo/t530/cmos.default
@@ -15,3 +15,4 @@ sticky_fn=Disable
trackpoint=Enable
backlight=Both
hybrid_graphics_mode=Integrated Only
+usb_always_on=Disable \ No newline at end of file
diff --git a/src/mainboard/lenovo/t530/cmos.layout b/src/mainboard/lenovo/t530/cmos.layout
index cdcc896f12..ab67a53e0d 100644
--- a/src/mainboard/lenovo/t530/cmos.layout
+++ b/src/mainboard/lenovo/t530/cmos.layout
@@ -67,9 +67,9 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-#419 2 r 0 unused
+419 2 e 13 usb_always_on
421 1 e 9 sata_mode
-422 2 e 10 backlight
+422 2 e 10 backlight
# coreboot config options: cpu
#424 8 r 0 unused
@@ -137,6 +137,9 @@ enumerations
11 6 224M
12 0 Integrated Only
12 1 Discrete Only
+13 0 Disable
+13 1 AC and battery
+13 2 AC only
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/t530/smihandler.c b/src/mainboard/lenovo/t530/smihandler.c
index c7ca206059..1dfd87e7c5 100644
--- a/src/mainboard/lenovo/t530/smihandler.c
+++ b/src/mainboard/lenovo/t530/smihandler.c
@@ -107,6 +107,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */
diff --git a/src/mainboard/lenovo/x230/cmos.default b/src/mainboard/lenovo/x230/cmos.default
index f7e38d2ee7..a0abaedb8a 100644
--- a/src/mainboard/lenovo/x230/cmos.default
+++ b/src/mainboard/lenovo/x230/cmos.default
@@ -14,3 +14,4 @@ fn_ctrl_swap=Disable
sticky_fn=Disable
trackpoint=Enable
backlight=Both
+usb_always_on=Disable \ No newline at end of file
diff --git a/src/mainboard/lenovo/x230/cmos.layout b/src/mainboard/lenovo/x230/cmos.layout
index 3766453a8c..799145742c 100644
--- a/src/mainboard/lenovo/x230/cmos.layout
+++ b/src/mainboard/lenovo/x230/cmos.layout
@@ -67,9 +67,9 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-#419 2 r 0 unused
+419 2 e 12 usb_always_on
421 1 e 9 sata_mode
-422 2 e 10 backlight
+422 2 e 10 backlight
# coreboot config options: cpu
#424 8 r 0 unused
@@ -134,6 +134,9 @@ enumerations
11 4 160M
11 5 192M
11 6 224M
+12 0 Disable
+12 1 AC and battery
+12 2 AC only
# -----------------------------------------------------------------
checksums
diff --git a/src/mainboard/lenovo/x230/smihandler.c b/src/mainboard/lenovo/x230/smihandler.c
index 09dcbf29d4..4572caea39 100644
--- a/src/mainboard/lenovo/x230/smihandler.c
+++ b/src/mainboard/lenovo/x230/smihandler.c
@@ -71,6 +71,8 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
+ h8_usb_always_on();
+
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */