From 55a972236ee93d36bd3df4e8e5680ba447242bd7 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Tue, 30 Oct 2018 15:05:18 -0700 Subject: chromeec: Disable battery remaining capacity workaround If remaining charge is more than x% of the full capacity, the remaining charge is raised to the full capacity before it's reported to the rest of the system. Some batteries don't update full capacity timely or don't update it at all. On such systems, compensation is required to guarantee the remaining charge will be equal to the full capacity eventually. On some systems, Rohm charger generates audio noise when the battery is fully charged and AC is plugged. A workaround is to do charge- discharge cycles between 93 and 100%. On such systems, compensation was also applied to mask this cycle from users. This used to be done in ACPI, thus, all software components except EC was able to see the compensated charge. This patch is part of the effort of moving the logic to EC. With this and the EC changes, EC can see what the rest of the system sees, thus, can control LEDs synchronously (to the display percentage). Another rationale of this move is EC can perform more granular and precise compensation than ACPI since it has more knowledge about the battery and the charger. CQ-DEPEND=CL:1312204 BUG=b:109954565,b:80270446,chromium:899120 BRANCH=none TEST=Verify charge LED changes to white (full) on Sona synchronously to the display percentage. TEST=Verify charge LED changes to blinking white (low) on Sona within 30 seconds synchronously to the display percentage. Change-Id: I0b51911b90dc2e7fcf5c730c54d9fda1fea76aa9 Signed-off-by: Daisuke Nojiri Reviewed-on: https://review.coreboot.org/29441 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie --- src/ec/google/chromeec/acpi/battery.asl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index 0a0caec279..1ff50991c0 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -294,8 +294,8 @@ Device (BAT0) }) Name (BSTP, Zero) - // Workaround for full battery status, enabled by default - Name (BFWK, One) + // Workaround for full battery status, disabled by default + Name (BFWK, Zero) // Method to enable full battery workaround Method (BFWE) @@ -384,8 +384,8 @@ Device (BAT1) }) Name (BSTP, Zero) - // Workaround for full battery status, enabled by default - Name (BFWK, One) + // Workaround for full battery status, disabled by default + Name (BFWK, Zero) // Method to enable full battery workaround Method (BFWE) -- cgit v1.2.3