Evgeny Zinoviev has uploaded a new patch set (#27) to the change originally created by Alexey Derlaft. ( https://review.coreboot.org/c/coreboot/+/23178 )
Change subject: ec/lenovo/h8: Implement ACPI methods to set battery thresholds
......................................................................
ec/lenovo/h8: Implement ACPI methods to set battery thresholds
There are two known reverse-engineered ways to manage battery
thresholds.
This patch implements them and adds a way to enable them for
different mainboards.
Tested on W530 with 4.18.3-gentoo kernel and X220 with 4.20.11.
Works fine with new Linux userspace API for controlling battery
thresholds, available since 4.17.
(/sys/class/power_supply/BAT0/charge_(start|stop)_threshold).
The new API is supported by TLP (you might need to set NATACPI_ENABLE=1
in /etc/tlp.conf).
tpacpi-bat works fine too.
Signed-off-by: Alexey Kharlamov <der(a)2-47.ru>
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
---
M src/ec/lenovo/h8/Kconfig
M src/ec/lenovo/h8/acpi/thinkpad.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_24.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_b0.asl
M src/mainboard/lenovo/t400/Kconfig
M src/mainboard/lenovo/t400/acpi/ec.asl
M src/mainboard/lenovo/t420/Kconfig
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420s/Kconfig
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t430/Kconfig
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430s/Kconfig
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t520/Kconfig
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t530/Kconfig
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/x1_carbon_gen1/Kconfig
M src/mainboard/lenovo/x1_carbon_gen1/acpi/ec.asl
M src/mainboard/lenovo/x200/Kconfig
M src/mainboard/lenovo/x200/acpi/ec.asl
M src/mainboard/lenovo/x201/Kconfig
M src/mainboard/lenovo/x201/acpi/ec.asl
M src/mainboard/lenovo/x220/Kconfig
M src/mainboard/lenovo/x220/acpi/ec.asl
M src/mainboard/lenovo/x230/Kconfig
M src/mainboard/lenovo/x230/acpi/ec.asl
29 files changed, 461 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/23178/27
--
To view, visit https://review.coreboot.org/c/coreboot/+/23178
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Gerrit-Change-Number: 23178
Gerrit-PatchSet: 27
Gerrit-Owner: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Marcello Sylvester Bauer <sylvblck(a)sylv.io>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newpatchset
Evgeny Zinoviev has uploaded a new patch set (#26) to the change originally created by Alexey Derlaft. ( https://review.coreboot.org/c/coreboot/+/23178 )
Change subject: ec/lenovo/h8: Implement ACPI methods to set battery thresholds
......................................................................
ec/lenovo/h8: Implement ACPI methods to set battery thresholds
There are two known (yet) different ways to manage battery thresholds.
This patch implements them and adds a way to enable them for
different mainboards.
Tested on W530 with 4.18.3-gentoo kernel. Works fine with new
Linux userspace API for controlling battery thresholds, available since
4.17.
(/sys/class/power_supply/BAT0/charge_(start|stop)_threshold).
The new API is supported by TLP (you might need to set NATACPI_ENABLE=1
in /etc/tlp.conf).
tpacpi-bat works fine too.
Signed-off-by: Alexey Kharlamov <der(a)2-47.ru>
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
---
M src/ec/lenovo/h8/Kconfig
M src/ec/lenovo/h8/acpi/thinkpad.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_24.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_b0.asl
M src/mainboard/lenovo/t400/Kconfig
M src/mainboard/lenovo/t400/acpi/ec.asl
M src/mainboard/lenovo/t420/Kconfig
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420s/Kconfig
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t430/Kconfig
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430s/Kconfig
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t520/Kconfig
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t530/Kconfig
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/x1_carbon_gen1/Kconfig
M src/mainboard/lenovo/x1_carbon_gen1/acpi/ec.asl
M src/mainboard/lenovo/x200/Kconfig
M src/mainboard/lenovo/x200/acpi/ec.asl
M src/mainboard/lenovo/x201/Kconfig
M src/mainboard/lenovo/x201/acpi/ec.asl
M src/mainboard/lenovo/x220/Kconfig
M src/mainboard/lenovo/x220/acpi/ec.asl
M src/mainboard/lenovo/x230/Kconfig
M src/mainboard/lenovo/x230/acpi/ec.asl
29 files changed, 461 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/23178/26
--
To view, visit https://review.coreboot.org/c/coreboot/+/23178
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Gerrit-Change-Number: 23178
Gerrit-PatchSet: 26
Gerrit-Owner: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Alexey Derlaft <derlafff(a)ya.ru>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Marcello Sylvester Bauer <sylvblck(a)sylv.io>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newpatchset
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31659
Change subject: mb/google/sarien: Remove DRIVERS_PS2_KEYBOARD
......................................................................
mb/google/sarien: Remove DRIVERS_PS2_KEYBOARD
In order to prevent keyboard keys pressed at boot from causing issues
in the payload remove the PS2 keyboard driver so it does not get
initialized until it is needed in libpayload.
BUG=b:126633269
TEST=boot on sarien while pressing keys and ensure libpayload and/or
the kernel does not have any issues initializing the keyboard.
Change-Id: I765e808f0d2589cf23c0349798a07e2706a2a7a4
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M src/mainboard/google/sarien/Kconfig
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/31659/1
diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig
index a976d36..ce6b810 100644
--- a/src/mainboard/google/sarien/Kconfig
+++ b/src/mainboard/google/sarien/Kconfig
@@ -5,7 +5,6 @@
select DRIVERS_I2C_GENERIC
select DRIVERS_I2C_HID
select DRIVERS_SPI_ACPI
- select DRIVERS_PS2_KEYBOARD
select DRIVERS_USB_ACPI
select EC_GOOGLE_WILCO
select GENERIC_SPD_BIN
--
To view, visit https://review.coreboot.org/c/coreboot/+/31659
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I765e808f0d2589cf23c0349798a07e2706a2a7a4
Gerrit-Change-Number: 31659
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-MessageType: newchange
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31658
Change subject: libpayload: i8042: Only test PS/2 AUX port when enabled
......................................................................
libpayload: i8042: Only test PS/2 AUX port when enabled
If a PS/2 AUX device is not present then the AUX test command
during i8042_probe() will time out and add ~500ms to the boot time.
In order to avoid this only test the PS/2 AUX port if
CONFIG_LP_PC_MOUSE is enabled.
BUG=b:126633269
TEST=boot on device without AUX port and check that this command
does not get executed, saving ~500ms at boot.
Change-Id: I2ebdecc66933bd33d320b17aa4608caf4aaf54aa
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M payloads/libpayload/drivers/i8042/i8042.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/31658/1
diff --git a/payloads/libpayload/drivers/i8042/i8042.c b/payloads/libpayload/drivers/i8042/i8042.c
index 69740d9..4cdd0be 100644
--- a/payloads/libpayload/drivers/i8042/i8042.c
+++ b/payloads/libpayload/drivers/i8042/i8042.c
@@ -229,8 +229,10 @@
}
/* Test secondary port */
- if (i8042_cmd_with_response(I8042_CMD_AUX_TEST) == 0)
- aux_fifo = fifo_init(4 * 32);
+ if (IS_ENABLED(CONFIG_LP_PC_MOUSE)) {
+ if (i8042_cmd_with_response(I8042_CMD_AUX_TEST) == 0)
+ aux_fifo = fifo_init(4 * 32);
+ }
/* Test first PS/2 port */
if (i8042_cmd_with_response(I8042_CMD_KB_TEST) == 0)
--
To view, visit https://review.coreboot.org/c/coreboot/+/31658
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2ebdecc66933bd33d320b17aa4608caf4aaf54aa
Gerrit-Change-Number: 31658
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-MessageType: newchange
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31657
Change subject: libpayload: keyboard: Add option to ignore failures during init
......................................................................
libpayload: keyboard: Add option to ignore failures during init
If keys are pressed at boot some keyboard controllers will not
properly respond with an ACK to commands, which results in the
keyboard_init function aborting before it adds the keyboard to the
input device list.
This same keyboard controller will manage to properly return keyboard
data when keys are pressed later, so it is possible for it to be
functional in the payload even if it does not respond properly to
every command during initialization.
In order to allow payloads to use the keyboard when this happens a
new Kconfig option is added to ignore the keyboard ACK response and
always add the keyboard to the input device list. This option is
disabled by default and must be enabled by the specific boards that
need it.
BUG=b:126633269
TEST=boot on device with this controller and press keys during boot
and see that the keyboard is still functional in the payload.
Change-Id: Icc6053f99804f1b57d785cb04235b5c4b8d5426f
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M payloads/libpayload/Kconfig
M payloads/libpayload/drivers/i8042/keyboard.c
2 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/31657/1
diff --git a/payloads/libpayload/Kconfig b/payloads/libpayload/Kconfig
index a79269f..6aa5b61 100644
--- a/payloads/libpayload/Kconfig
+++ b/payloads/libpayload/Kconfig
@@ -344,6 +344,10 @@
default y if ARCH_X86 # uses IO
default n
+config PC_KEYBOARD_IGNORE_FAILURE
+ bool "Ignore keyboard failures during init and always add input device"
+ default n
+
config PC_KEYBOARD_LAYOUT_US
bool "English (US) keyboard layout"
depends on PC_KEYBOARD
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index 062aec2..918cafa 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -309,16 +309,16 @@
/* Set scancode set 1 */
ret = keyboard_cmd(I8042_KBCMD_SET_SCANCODE);
- if (!ret)
+ if (!ret && !IS_ENABLED(CONFIG_LP_PC_KEYBOARD_IGNORE_FAILURE))
return;
ret = keyboard_cmd(I8042_SCANCODE_SET_1);
- if (!ret)
+ if (!ret && !IS_ENABLED(CONFIG_LP_PC_KEYBOARD_IGNORE_FAILURE))
return;
/* Enable scanning */
ret = keyboard_cmd(I8042_KBCMD_EN);
- if (!ret)
+ if (!ret && !IS_ENABLED(CONFIG_LP_PC_KEYBOARD_IGNORE_FAILURE))
return;
console_add_input_driver(&cons);
--
To view, visit https://review.coreboot.org/c/coreboot/+/31657
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icc6053f99804f1b57d785cb04235b5c4b8d5426f
Gerrit-Change-Number: 31657
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-MessageType: newchange
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/29423 )
Change subject: soc/intel/braswell: Configure IO APIC
......................................................................
Patch Set 7:
Are we sure FSP doesn't do this already? It seems unlikely
that all the in tree Braswell devices don't use the APIC.
Maybe we only have to reserve the resources?
--
To view, visit https://review.coreboot.org/c/coreboot/+/29423
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I917c30892b46ac1d964e7bab339082d17a1e706d
Gerrit-Change-Number: 29423
Gerrit-PatchSet: 7
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Fri, 01 Mar 2019 20:56:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31680 )
Change subject: device/pci: Organize Makefile
......................................................................
Patch Set 2: Code-Review+1
haven't verified that the other options also depend on CONFIG_PCI, but I assume that they do, so I only +1 this patch from me
--
To view, visit https://review.coreboot.org/c/coreboot/+/31680
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I426f4398c01dfbf03b9dd2db8c7a964512c86d5e
Gerrit-Change-Number: 31680
Gerrit-PatchSet: 2
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 01 Mar 2019 19:53:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment