Alexander Couzens submitted this change.
lenovo/t440p: fix keyboard backlight
It is found that keyboard backlight in T440p is enabled by clearing
bit 3 of EC RAM 0x01. This patch sets has_keyboard_backlight in
devicetree.cb and also corrects the CMOS configuration.
Change-Id: Ib4c2b1591d26e2bb33f9549e3933efe9a6e0b043
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Dennis Witzig <dennis@wtzg.de>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
---
M src/mainboard/lenovo/t440p/cmos.default
M src/mainboard/lenovo/t440p/cmos.layout
M src/mainboard/lenovo/t440p/devicetree.cb
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/lenovo/t440p/cmos.default b/src/mainboard/lenovo/t440p/cmos.default
index b104ae1..0949e7b 100644
--- a/src/mainboard/lenovo/t440p/cmos.default
+++ b/src/mainboard/lenovo/t440p/cmos.default
@@ -9,5 +9,5 @@
f1_to_f12_as_primary=Enable
sticky_fn=Disable
trackpoint=Enable
-backlight=Both
+backlight=Keyboard
usb_always_on=Disable
diff --git a/src/mainboard/lenovo/t440p/cmos.layout b/src/mainboard/lenovo/t440p/cmos.layout
index 8c5fb0b..f65933a 100644
--- a/src/mainboard/lenovo/t440p/cmos.layout
+++ b/src/mainboard/lenovo/t440p/cmos.layout
@@ -103,9 +103,10 @@
8 1 Primary
9 0 AHCI
9 1 Compatible
-10 0 Both
-10 1 Keyboard only
-10 2 Thinklight only
+# Haswell ThinkPads have no Thinklight
+#10 0 Both
+10 1 Keyboard
+#10 2 Thinklight only
10 3 None
#12 0 Integrated Only
#12 1 Discrete Only
diff --git a/src/mainboard/lenovo/t440p/devicetree.cb b/src/mainboard/lenovo/t440p/devicetree.cb
index 7e5e616..b63767e 100644
--- a/src/mainboard/lenovo/t440p/devicetree.cb
+++ b/src/mainboard/lenovo/t440p/devicetree.cb
@@ -83,6 +83,7 @@
register "config1" = "0x0d"
register "config2" = "0xa8"
register "config3" = "0xc4"
+ register "has_keyboard_backlight" = "1"
register "event2_enable" = "0xff"
register "event3_enable" = "0xff"
register "event4_enable" = "0xd0"
To view, visit change 38650. To unsubscribe, or for help writing mail filters, visit settings.