Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38835 )
Change subject: ec/purism/librem: Add ACPI temp reporting ......................................................................
ec/purism/librem: Add ACPI temp reporting
Add EC ACPI reporting of current temp and platform critical temp. Adapted from ACPI dump of ODM AMI firmware.
TEST: check reporting of current/critical temps via lm-sensors from ACPI on Librem 13v1 and 13v4 boards.
Change-Id: I92641fbbdda46e0c388607a37f7a7cc2dcd6c26d Signed-off-by: Matt DeVillier matt.devillier@puri.sm --- M src/ec/purism/librem/acpi/ec.asl M src/mainboard/purism/librem_bdw/acpi/ec.asl M src/mainboard/purism/librem_skl/acpi/ec.asl 3 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/38835/1
diff --git a/src/ec/purism/librem/acpi/ec.asl b/src/ec/purism/librem/acpi/ec.asl index ff325aa..6f6ced1 100644 --- a/src/ec/purism/librem/acpi/ec.asl +++ b/src/ec/purism/librem/acpi/ec.asl @@ -52,7 +52,9 @@ OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF) Field (ERAM, ByteAcc, Lock, Preserve) { - Offset (0x15), + Offset (0x13), + RTMP, 8, + , 8, BSTS, 2, /* Battery Status */ , 3, BTEX, 1, /* Battery Present */ @@ -231,3 +233,23 @@ #include "ac.asl" #include "battery.asl" } + +Scope (_TZ) +{ + ThermalZone (TZ0) + { + /* _TMP: Temperature */ + Method (_TMP, 0, Serialized) + { + Local0 = (0x0AAC + (_SB.PCI0.LPCB.EC.RTMP * 0x0A)) + Return (Local0) + } + + /* _CRT: Critical Temperature */ + Method (_CRT, 0, Serialized) + { + /* defined in board ec.asl */ + Return (CRIT_TEMP) + } + } +} diff --git a/src/mainboard/purism/librem_bdw/acpi/ec.asl b/src/mainboard/purism/librem_bdw/acpi/ec.asl index b2fa5b9..a660a52 100644 --- a/src/mainboard/purism/librem_bdw/acpi/ec.asl +++ b/src/mainboard/purism/librem_bdw/acpi/ec.asl @@ -16,5 +16,6 @@ #define EC_SCI_GPI 10 #define PPCM_TURBO Zero #define PPCM_NOTURBO One +#define CRIT_TEMP 105
#include <ec/purism/librem/acpi/ec.asl> diff --git a/src/mainboard/purism/librem_skl/acpi/ec.asl b/src/mainboard/purism/librem_skl/acpi/ec.asl index c667b6c..c440ff8 100644 --- a/src/mainboard/purism/librem_skl/acpi/ec.asl +++ b/src/mainboard/purism/librem_skl/acpi/ec.asl @@ -16,5 +16,6 @@ #define EC_SCI_GPI 0x50 #define PPCM_TURBO One #define PPCM_NOTURBO 0x02 +#define CRIT_TEMP 100
#include <ec/purism/librem/acpi/ec.asl>