Wim Vervoorn has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38427 )
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
mb/facebook/monolith: Add support to read cpu temperature
Read the CPU temperature from the EC.
For this board the EC support is limited to reading the CPU temperature sensor at this moment. Events are not supported.
BUG=N/A TEST=tested on facebook monolith using acpidbg
The TSR0._TMP method is returning the correct values.
Change-Id: I6793070602e253f1e15cfc641bb47d25d269b136 Signed-off-by: Wim Vervoorn wvervoorn@eltan.com --- M src/mainboard/facebook/monolith/acpi/dptf.asl M src/mainboard/facebook/monolith/acpi/ec.asl 2 files changed, 89 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/38427/1
diff --git a/src/mainboard/facebook/monolith/acpi/dptf.asl b/src/mainboard/facebook/monolith/acpi/dptf.asl index 5ea95b4..181f7bc 100644 --- a/src/mainboard/facebook/monolith/acpi/dptf.asl +++ b/src/mainboard/facebook/monolith/acpi/dptf.asl @@ -22,10 +22,14 @@ #define DPTF_CPU_ACTIVE_AC3 60 #define DPTF_CPU_ACTIVE_AC4 50
+#define DPTF_TSR0_SENSOR_ID 0 +#define DPTF_TSR0_SENSOR_NAME "ITE8528_CPU" +#define DPTF_TSR0_PASSIVE DPTF_CPU_PASSIVE +#define DPTF_TSR0_CRITICAL DPTF_CPU_CRITICAL + Name (DTRT, Package () { /* CPU Throttle Effect on CPU */ Package () { _SB.PCI0.B0D4, _SB.PCI0.B0D4, 100, 50, 0, 0, 0, 0 }, - })
Name (MPPC, Package () diff --git a/src/mainboard/facebook/monolith/acpi/ec.asl b/src/mainboard/facebook/monolith/acpi/ec.asl index e69de29..7fb04dc 100644 --- a/src/mainboard/facebook/monolith/acpi/ec.asl +++ b/src/mainboard/facebook/monolith/acpi/ec.asl @@ -0,0 +1,84 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2020 Eltan B.V. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * We only use the ERAM region to retrieve the CPU temperature. Otherwise the EC is not enabled + * The _GPE is pointing to the correct pin but the EC events are not enabled in coreboot or the + * EC. + */ + +Device (EC0) +{ + Name (_HID, EisaId ("PNP0C09")) + Name (_UID, 0) + Name (_GPE, GPE0_DW0_22) + + Name (_CRS, ResourceTemplate () { + IO (Decode16, 0x62, 0x62, 0, 1) + IO (Decode16, 0x66, 0x66, 0, 1) + }) + + Method (_STA, 0, NotSerialized) + { + Return (0x0F) + } + + Method (_REG, 2, NotSerialized) + { + } + + OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF) + Field (ERAM, ByteAcc, NoLock, Preserve) + { + Offset (0x00), + CPUT, 8, + } + + Method (TSRD, 1, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store( Arg0, Local0) + Store( Local0, Arg0) + Return (_SB.DPTF.CTOK (CPUT)) + } + + /* Set Aux Trip Point 0 */ + Method (PAT0, 2, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store( Arg0, Local0) + Store( Local0, Arg0) + Store( Arg1, Local0) + Store( Local0, Arg1) + } + + /* Set Aux Trip Point 1 */ + Method (PAT1, 2, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store( Arg0, Local0) + Store( Local0, Arg0) + Store( Arg1, Local0) + Store( Local0, Arg1) + } + + /* Disable Aux Trip Point */ + Method (PATD, 1, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store( Arg0, Local0) + Store( Local0, Arg0) + } +}
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38427 )
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
Patch Set 2: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38427 )
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38427/2/src/mainboard/facebook/mono... File src/mainboard/facebook/monolith/acpi/ec.asl:
https://review.coreboot.org/c/coreboot/+/38427/2/src/mainboard/facebook/mono... PS2, Line 52: Store( Arg0, Local0) Remove the space after (?
Hello Frans Hendriks, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38427
to look at the new patch set (#3).
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
mb/facebook/monolith: Add support to read cpu temperature
Read the CPU temperature from the EC.
For this board the EC support is limited to reading the CPU temperature sensor at this moment. Events are not supported.
BUG=N/A TEST=tested on facebook monolith using acpidbg
The TSR0._TMP method is returning the correct values.
Change-Id: I6793070602e253f1e15cfc641bb47d25d269b136 Signed-off-by: Wim Vervoorn wvervoorn@eltan.com --- M src/mainboard/facebook/monolith/acpi/dptf.asl M src/mainboard/facebook/monolith/acpi/ec.asl 2 files changed, 89 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/38427/3
Wim Vervoorn has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38427 )
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38427/2/src/mainboard/facebook/mono... File src/mainboard/facebook/monolith/acpi/ec.asl:
https://review.coreboot.org/c/coreboot/+/38427/2/src/mainboard/facebook/mono... PS2, Line 52: Store( Arg0, Local0)
Remove the space after (?
Done
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38427 )
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38427 )
Change subject: mb/facebook/monolith: Add support to read cpu temperature ......................................................................
mb/facebook/monolith: Add support to read cpu temperature
Read the CPU temperature from the EC.
For this board the EC support is limited to reading the CPU temperature sensor at this moment. Events are not supported.
BUG=N/A TEST=tested on facebook monolith using acpidbg
The TSR0._TMP method is returning the correct values.
Change-Id: I6793070602e253f1e15cfc641bb47d25d269b136 Signed-off-by: Wim Vervoorn wvervoorn@eltan.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/38427 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Frans Hendriks fhendriks@eltan.com --- M src/mainboard/facebook/monolith/acpi/dptf.asl M src/mainboard/facebook/monolith/acpi/ec.asl 2 files changed, 89 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Frans Hendriks: Looks good to me, approved
diff --git a/src/mainboard/facebook/monolith/acpi/dptf.asl b/src/mainboard/facebook/monolith/acpi/dptf.asl index 5ea95b4..181f7bc 100644 --- a/src/mainboard/facebook/monolith/acpi/dptf.asl +++ b/src/mainboard/facebook/monolith/acpi/dptf.asl @@ -22,10 +22,14 @@ #define DPTF_CPU_ACTIVE_AC3 60 #define DPTF_CPU_ACTIVE_AC4 50
+#define DPTF_TSR0_SENSOR_ID 0 +#define DPTF_TSR0_SENSOR_NAME "ITE8528_CPU" +#define DPTF_TSR0_PASSIVE DPTF_CPU_PASSIVE +#define DPTF_TSR0_CRITICAL DPTF_CPU_CRITICAL + Name (DTRT, Package () { /* CPU Throttle Effect on CPU */ Package () { _SB.PCI0.B0D4, _SB.PCI0.B0D4, 100, 50, 0, 0, 0, 0 }, - })
Name (MPPC, Package () diff --git a/src/mainboard/facebook/monolith/acpi/ec.asl b/src/mainboard/facebook/monolith/acpi/ec.asl index e69de29..dc7a4ea 100644 --- a/src/mainboard/facebook/monolith/acpi/ec.asl +++ b/src/mainboard/facebook/monolith/acpi/ec.asl @@ -0,0 +1,84 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2020 Eltan B.V. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * We only use the ERAM region to retrieve the CPU temperature. Otherwise the EC is not enabled + * The _GPE is pointing to the correct pin but the EC events are not enabled in coreboot or the + * EC. + */ + +Device (EC0) +{ + Name (_HID, EisaId ("PNP0C09")) + Name (_UID, 0) + Name (_GPE, GPE0_DW0_22) + + Name (_CRS, ResourceTemplate () { + IO (Decode16, 0x62, 0x62, 0, 1) + IO (Decode16, 0x66, 0x66, 0, 1) + }) + + Method (_STA, 0, NotSerialized) + { + Return (0x0F) + } + + Method (_REG, 2, NotSerialized) + { + } + + OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF) + Field (ERAM, ByteAcc, NoLock, Preserve) + { + Offset (0x00), + CPUT, 8, + } + + Method (TSRD, 1, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store(Arg0, Local0) + Store(Local0, Arg0) + Return (_SB.DPTF.CTOK (CPUT)) + } + + /* Set Aux Trip Point 0 */ + Method (PAT0, 2, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store(Arg0, Local0) + Store(Local0, Arg0) + Store(Arg1, Local0) + Store(Local0, Arg1) + } + + /* Set Aux Trip Point 1 */ + Method (PAT1, 2, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store(Arg0, Local0) + Store(Local0, Arg0) + Store(Arg1, Local0) + Store(Local0, Arg1) + } + + /* Disable Aux Trip Point */ + Method (PATD, 1, Serialized) + { + /* Prevent iasl remarks about unused parameters */ + Store(Arg0, Local0) + Store(Local0, Arg0) + } +}