[coreboot-gerrit] Patch set updated for coreboot: DPTF: Write TCHG state on AC connect.

Hannah Williams (hannah.williams@intel.com) gerrit at coreboot.org
Tue Jan 12 16:58:14 CET 2016


Hannah Williams (hannah.williams at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12729

-gerrit

commit a095b1c77646adc467f1e051d165c54f2ff30b8c
Author: Jenny TC <jenny.tc at intel.com>
Date:   Fri Jul 24 15:04:06 2015 +0530

    DPTF: Write TCHG state on AC connect.
    
    DPTF should update the charger cooling device state during
    boot time and every 3 seconds after boot. But 3 seconds polling
    doesn't seems to be working with current version of DPTF.
    This impacts charging since DPTF writes states 4 when charger
    is not connected at boot time. On connecting the charger,
    DPTF doesn't write 0 to enable charging. This issue is addressed
    by calling the PPPC function to read cooling device state  and passing
    the value to SPPC to set cooling device state. This doesn't
    compromise safety since DPTF can override this value
    later based on the platform thermal condition. Also this provides
    additional safety measure in the unlikely event that DPTF crashes
    and is not re-spawned by OS. With this patch even after DPTF crashes,
    if the power adapter is plugged it would still allow the system to
    charge correctly.
    
    Original-Reviewed-on: https://chromium-review.googlesource.com/288460
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Tested-by: Jenny Tc <jenny.tc at intel.com>
    
    Change-Id: I50c7666b86e45d5ab537a9d4149e6c71eba04e50
    Signed-off-by: Hannah Williams <hannah.williams at intel.com>
---
 src/ec/google/chromeec/acpi/ec.asl           | 1 +
 src/soc/intel/braswell/acpi/dptf/charger.asl | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index bcb26bf..68d5106 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -171,6 +171,7 @@ Device (EC0)
 		Store (ACEX, \PWRS)
 		Notify (AC, 0x80)
 		If (CondRefOf (\_SB.DPTF.TCHG)) {
+			\_SB.DPTF.TCHG.SPPC (\_SB.DPTF.TCHG.PPPC ())
 			Notify (\_SB.DPTF.TCHG, 0x80)
 		}
 		\PNOT ()
diff --git a/src/soc/intel/braswell/acpi/dptf/charger.asl b/src/soc/intel/braswell/acpi/dptf/charger.asl
index 7c7f62f..a808591 100644
--- a/src/soc/intel/braswell/acpi/dptf/charger.asl
+++ b/src/soc/intel/braswell/acpi/dptf/charger.asl
@@ -28,7 +28,7 @@ Device (TCHG)
 		Decrement (Local0)
 
 		/* Check if charging is disabled (AC removed) */
-		If (LEqual (\PWRS, Zero)) {
+		If (LEqual (\_SB.PCI0.LPCB.EC0.ACEX, Zero)) {
 			/* Return last power state */
 			Return (Local0)
 		} Else {



More information about the coreboot-gerrit mailing list