Stefan Ott has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the X200 can be controlled through the OS. The exact same change was done a while ago to the X201 in https://review.coreboot.org/c/coreboot/+/19644.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
I have tested it on an X200 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- M src/mainboard/lenovo/x200/acpi/platform.asl 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/1
diff --git a/src/mainboard/lenovo/x200/acpi/platform.asl b/src/mainboard/lenovo/x200/acpi/platform.asl index 2247461..4047a48 100644 --- a/src/mainboard/lenovo/x200/acpi/platform.asl +++ b/src/mainboard/lenovo/x200/acpi/platform.asl @@ -44,6 +44,21 @@ Return(Package(){0,0}) }
+Method(UCMS, 1, Serialized) +{ + Switch(ToInteger(Arg0)) + { + Case (0x0c) /* Turn on ThinkLight */ + { + _SB.PCI0.LPCB.EC.LGHT(1) + } + Case (0x0d) /* Turn off ThinkLight */ + { + _SB.PCI0.LPCB.EC.LGHT(0) + } + } +} + /* System Bus */
Scope(_SB)
Alexander Couzens has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 1: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 1: Code-Review+1
(4 comments)
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG@11 PS1, Line 11: https://review.coreboot.org/c/coreboot/+/19644. Please use the commit hash and summary.
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG@16 PS1, Line 16: echo off >/proc/acpi/ibm/light Please indent with four spaces (as in Markdown).
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG@18 PS1, Line 18: I have tested it on an X200 and it seems to work fine. With what Linux kernel?
https://review.coreboot.org/c/coreboot/+/40620/1/src/mainboard/lenovo/x200/a... File src/mainboard/lenovo/x200/acpi/platform.asl:
https://review.coreboot.org/c/coreboot/+/40620/1/src/mainboard/lenovo/x200/a... PS1, Line 60: } I guess some refactoring in common/shared code with all the Lenovo ThinkPads would be nice.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 1: Code-Review+2
Hello build bot (Jenkins), Paul Menzel, Angel Pons, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40620
to look at the new patch set (#2).
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the X200 can be controlled through the OS. The exact same change was done a while ago to the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
I have tested it on an X200 with Kernel 5.4 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- M src/mainboard/lenovo/x200/acpi/platform.asl 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/2
Stefan Ott has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 2:
(1 comment)
Patch Set 1: Code-Review+1
(4 comments)
https://review.coreboot.org/c/coreboot/+/40620/1/src/mainboard/lenovo/x200/a... File src/mainboard/lenovo/x200/acpi/platform.asl:
https://review.coreboot.org/c/coreboot/+/40620/1/src/mainboard/lenovo/x200/a... PS1, Line 60: }
I guess some refactoring in common/shared code with all the Lenovo ThinkPads would be nice.
I think I could move it to ec/lenovo/h8/acpi/ec.asl instead, that way all the ThinkPads would benefit, but I can't really test it on any non-X20x models.
Hello build bot (Jenkins), Paul Menzel, Angel Pons, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40620
to look at the new patch set (#3).
Change subject: mb/lenovo/*: Add support for ThinkLight ......................................................................
mb/lenovo/*: Add support for ThinkLight
With this patch, the ThinkLight LED on all ThinkPads (that have one) can be controlled through the OS. This was initially done for the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
Or through sysfs at /sys/class/leds/tpacpi::thinklight
I have tested it on an X200 with Kernel 5.4 and an X201 with Kernel 4.9. It seems to work fine on both machines.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- A src/ec/lenovo/h8/acpi/light.asl M src/mainboard/lenovo/t400/dsdt.asl M src/mainboard/lenovo/t410/acpi/platform.asl M src/mainboard/lenovo/t410/dsdt.asl M src/mainboard/lenovo/t420/dsdt.asl M src/mainboard/lenovo/t420s/dsdt.asl M src/mainboard/lenovo/t430/dsdt.asl M src/mainboard/lenovo/t430s/dsdt.asl M src/mainboard/lenovo/t520/dsdt.asl M src/mainboard/lenovo/t530/dsdt.asl M src/mainboard/lenovo/t60/dsdt.asl M src/mainboard/lenovo/x200/dsdt.asl M src/mainboard/lenovo/x201/acpi/platform.asl M src/mainboard/lenovo/x201/dsdt.asl M src/mainboard/lenovo/x220/dsdt.asl M src/mainboard/lenovo/x230/dsdt.asl 16 files changed, 56 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/3
Stefan Ott has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/*: Add support for ThinkLight ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40620/1/src/mainboard/lenovo/x200/a... File src/mainboard/lenovo/x200/acpi/platform.asl:
https://review.coreboot.org/c/coreboot/+/40620/1/src/mainboard/lenovo/x200/a... PS1, Line 60: }
That should work. Testers could be found on the list.
I updated the patch, it should now work on all ThinkPads.
Stefan Ott has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/*: Add support for ThinkLight ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG@11 PS1, Line 11: https://review.coreboot.org/c/coreboot/+/19644.
Please use the commit hash and summary.
Done
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG@16 PS1, Line 16: echo off >/proc/acpi/ibm/light
Please indent with four spaces (as in Markdown).
Done
https://review.coreboot.org/c/coreboot/+/40620/1//COMMIT_MSG@18 PS1, Line 18: I have tested it on an X200 and it seems to work fine.
With what Linux kernel?
Done
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/*: Add support for ThinkLight ......................................................................
Patch Set 3:
ThinkLight is that light in the display frame, replaced by the keyboard LED light on newer ThinkPads, right? Does that make any difference?
Are there ThinkPads without ThinkLight? Then we could add a Kconfig for that
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/*: Add support for ThinkLight ......................................................................
Patch Set 3: Code-Review+1
Stefan Ott has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/*: Add support for ThinkLight ......................................................................
Patch Set 3:
Patch Set 3:
ThinkLight is that light in the display frame, replaced by the keyboard LED light on newer ThinkPads, right? Does that make any difference?
Are there ThinkPads without ThinkLight? Then we could add a Kconfig for that
Yes, that's the light in the display frame. I don't know about newer ThinkPads, but it's possible that they don't have it anymore.
Anyway, I will be reorganizing this change a split it into various small changes for the different models.
Hello build bot (Jenkins), Paul Menzel, Angel Pons, Michael Niewöhner, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40620
to look at the new patch set (#4).
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the ThinkPad X200 can be controlled through the OS. This was initially done for the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
Or through sysfs at /sys/class/leds/tpacpi::thinklight
I have tested it on an X200 with Kernel 5.4 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- M src/mainboard/lenovo/x200/dsdt.asl 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/4
Hello build bot (Jenkins), Paul Menzel, Angel Pons, Michael Niewöhner, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40620
to look at the new patch set (#5).
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the ThinkPad X200 can be controlled through the OS. This was initially done for the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
Or through sysfs at /sys/class/leds/tpacpi::thinklight
I have tested it on an X200 with Kernel 5.4 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- M src/mainboard/lenovo/x200/dsdt.asl 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/5
Hello build bot (Jenkins), Paul Menzel, Angel Pons, Michael Niewöhner, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40620
to look at the new patch set (#7).
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the ThinkPad X200 can be controlled through the OS. This was initially done for the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
Or through sysfs at /sys/class/leds/tpacpi::thinklight
I have tested it on an X200 with Kernel 5.4 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- M src/mainboard/lenovo/x200/dsdt.asl 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/7
Hello build bot (Jenkins), Paul Menzel, Angel Pons, Michael Niewöhner, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40620
to look at the new patch set (#8).
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the ThinkPad X200 can be controlled through the OS. This was initially done for the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
Or through sysfs at /sys/class/leds/tpacpi::thinklight
I have tested it on an X200 with Kernel 5.4 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net --- M src/mainboard/lenovo/x200/dsdt.asl 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40620/8
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 8:
Patch Set 3:
Patch Set 3:
ThinkLight is that light in the display frame, replaced by the keyboard LED light on newer ThinkPads, right? Does that make any difference?
Are there ThinkPads without ThinkLight? Then we could add a Kconfig for that
Yes, that's the light in the display frame. I don't know about newer ThinkPads, but it's possible that they don't have it anymore.
Anyway, I will be reorganizing this change a split it into various small changes for the different models.
I checked now on my x260. /proc/acpi/ibm/light does nothing, while /proc/acpi/ibm/kbdlight is the keyboard background light.
Stefan Ott has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 8:
Patch Set 8:
Patch Set 3:
Patch Set 3:
ThinkLight is that light in the display frame, replaced by the keyboard LED light on newer ThinkPads, right? Does that make any difference?
Are there ThinkPads without ThinkLight? Then we could add a Kconfig for that
Yes, that's the light in the display frame. I don't know about newer ThinkPads, but it's possible that they don't have it anymore.
Anyway, I will be reorganizing this change a split it into various small changes for the different models.
I checked now on my x260. /proc/acpi/ibm/light does nothing, while /proc/acpi/ibm/kbdlight is the keyboard background light.
Thank you. That would be consistent with https://www.thinkwiki.org/wiki/ThinkLight which doesn't list the X260.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 8: Code-Review+1
Waiting for preceding patch
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 8: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
mb/lenovo/x200: Add support for ThinkLight
With this patch, the ThinkLight on the ThinkPad X200 can be controlled through the OS. This was initially done for the X201 in f63fbdb6: mb/lenovo/x201: Add support for ThinkLight.
After applying this patch, the light can be controlled like this:
echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light
Or through sysfs at /sys/class/leds/tpacpi::thinklight
I have tested it on an X200 with Kernel 5.4 and it seems to work fine.
Change-Id: I14752ab33484122248959517e73f96b6783b1f65 Signed-off-by: Stefan Ott stefan@ott.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/40620 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/lenovo/x200/dsdt.asl 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/mainboard/lenovo/x200/dsdt.asl b/src/mainboard/lenovo/x200/dsdt.asl index 1357a3a..abe1c27 100644 --- a/src/mainboard/lenovo/x200/dsdt.asl +++ b/src/mainboard/lenovo/x200/dsdt.asl @@ -41,4 +41,6 @@
/* Dock support code */ #include "acpi/dock.asl" + + #include <ec/lenovo/h8/acpi/thinklight.asl> }
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40620 )
Change subject: mb/lenovo/x200: Add support for ThinkLight ......................................................................
Patch Set 9:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2663 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2662 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2661 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/2660
Please note: This test is under development and might not be accurate at all!