diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-07-13 16:05:52 -0600 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-07-18 16:05:07 +0000 |
commit | 752c4713483d383e10092638c2eb62b8d939fedf (patch) | |
tree | 89816dc98fec88e0654f713bd92c275b5f7fc73f /src/mainboard | |
parent | c6a593bc3e7e7aa8c833bc9955ae6e637b493333 (diff) |
mb/google/dedede: Convert static DPTF ASL into devicetree entries
Since there is now a mechanism to generate DPTF ACPI tables and methods
at runtime, dedede should switch to using that instead of raw ASL files.
This patch converts the existing .asl files into devicetree entries.
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I6bb6e6e15f50a1e510080e16bbca09dfc5f16b1a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43422
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
10 files changed, 32 insertions, 76 deletions
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig index dcea3fabdd..e8b7cf5f88 100644 --- a/src/mainboard/google/dedede/Kconfig +++ b/src/mainboard/google/dedede/Kconfig @@ -1,8 +1,10 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE def_bool n select BOARD_ROMSIZE_KB_16384 if !BOARD_ROMSIZE_KB_32768 + select DPTF_USE_EISA_HID select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID + select DRIVERS_INTEL_DPTF select DRIVERS_SPI_ACPI select DRIVERS_USB_ACPI select EC_GOOGLE_CHROMEEC @@ -17,6 +19,7 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE select MAINBOARD_HAS_SPI_TPM_CR50 select MAINBOARD_HAS_TPM2 select SOC_INTEL_JASPERLAKE + select SOC_INTEL_COMMON_BLOCK_DTT if BOARD_GOOGLE_BASEBOARD_DEDEDE diff --git a/src/mainboard/google/dedede/dsdt.asl b/src/mainboard/google/dedede/dsdt.asl index e064d9b1c8..933ca1a503 100644 --- a/src/mainboard/google/dedede/dsdt.asl +++ b/src/mainboard/google/dedede/dsdt.asl @@ -55,13 +55,4 @@ DefinitionBlock( /* ACPI code for EC functions */ #include <ec/google/chromeec/acpi/ec.asl> } - - /* Dynamic Platform Thermal Framework */ - Scope (\_SB) - { - /* Per board variant specific definitions. */ - #include <variant/acpi/dptf.asl> - /* Include common dptf ASL files */ - #include <soc/intel/common/acpi/dptf/dptf.asl> - } } diff --git a/src/mainboard/google/dedede/variants/baseboard/devicetree.cb b/src/mainboard/google/dedede/variants/baseboard/devicetree.cb index 32f6690339..e126129f11 100644 --- a/src/mainboard/google/dedede/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/dedede/variants/baseboard/devicetree.cb @@ -166,7 +166,35 @@ chip soc/intel/jasperlake device domain 0 on device pci 00.0 on end # Host Bridge device pci 02.0 on end # Integrated Graphics Device - device pci 04.0 on end # SA Thermal device + device pci 04.0 on + chip drivers/intel/dptf + register "policies.passive[0]" = "DPTF_PASSIVE(CPU, CPU, 90, 10000)" + register "policies.passive[1]" = "DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 80, 60000)" + register "policies.passive[2]" = "DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 55, 15000)" + + register "policies.critical[0]" = "DPTF_CRITICAL(CPU, 99, SHUTDOWN)" + register "policies.critical[1]" = "DPTF_CRITICAL(TEMP_SENSOR_0, 90, SHUTDOWN)" + register "policies.critical[2]" = "DPTF_CRITICAL(TEMP_SENSOR_1, 80, SHUTDOWN)" + + register "controls.power_limits.pl1" = "{ + .min_power = 3000, + .max_power = 6000, + .time_window_min = 1 * MSECS_PER_SEC, + .time_window_max = 1 * MSECS_PER_SEC, + .granularity = 200,}" + register "controls.power_limits.pl2" = "{ + .min_power = 6000, + .max_power = 20000, + .time_window_min = 1 * MSECS_PER_SEC, + .time_window_max = 1 * MSECS_PER_SEC, + .granularity = 1000,}" + + register "options.tsr[0].desc" = ""Memory"" + register "options.tsr[1].desc" = ""Ambient"" + + device generic 0 on end + end + end # SA Thermal device device pci 05.0 off end # IPU device pci 09.0 off end # Intel Trace Hub device pci 12.6 off end # GSPI 2 diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/dptf.asl b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/dptf.asl deleted file mode 100644 index f6b16b456f..0000000000 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/dptf.asl +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -/* Below values might change after Thermal Tuning. */ -#define DPTF_CPU_PASSIVE 90 -#define DPTF_CPU_CRITICAL 99 - -#define DPTF_TSR0_SENSOR_ID 0 -#define DPTF_TSR0_SENSOR_NAME "Memory" -#define DPTF_TSR0_PASSIVE 80 -#define DPTF_TSR0_CRITICAL 90 - -#define DPTF_TSR1_SENSOR_ID 1 -#define DPTF_TSR1_SENSOR_NAME "Ambient" -#define DPTF_TSR1_PASSIVE 55 -#define DPTF_TSR1_CRITICAL 80 - -Name (DTRT, Package () { - /* CPU Throttle Effect on CPU */ - Package () { \_SB.PCI0.TCPU, \_SB.PCI0.TCPU, 100, 100, 0, 0, 0, 0 }, - - /* CPU Effect on Temp Sensor 0 */ - Package () { \_SB.PCI0.TCPU, \_SB.DPTF.TSR0, 100, 600, 0, 0, 0, 0 }, - - /* CPU Effect on Temp Sensor 1 */ - Package () { \_SB.PCI0.TCPU, \_SB.DPTF.TSR1, 100, 150, 0, 0, 0, 0 }, -}) - -Name (MPPC, Package () -{ - 0x2, /* Revision */ - Package () { /* Power Limit 1 */ - 0, /* PowerLimitIndex, 0 for Power Limit 1 */ - 3000, /* PowerLimitMinimum */ - 6000, /* PowerLimitMaximum */ - 1000, /* TimeWindowMinimum */ - 1000, /* TimeWindowMaximum */ - 200 /* StepSize */ - }, - - Package () { /* Power Limit 2 */ - 1, /* PowerLimitIndex, 1 for Power Limit 2 */ - 6000, /* PowerLimitMinimum */ - 20000, /* PowerLimitMaximum */ - 1000, /* TimeWindowMinimum */ - 1000, /* TimeWindowMaximum */ - 1000 /* StepSize */ - } -}) diff --git a/src/mainboard/google/dedede/variants/boten/include/variant/acpi/dptf.asl b/src/mainboard/google/dedede/variants/boten/include/variant/acpi/dptf.asl deleted file mode 100644 index 189cafea4c..0000000000 --- a/src/mainboard/google/dedede/variants/boten/include/variant/acpi/dptf.asl +++ /dev/null @@ -1,3 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <baseboard/acpi/dptf.asl> diff --git a/src/mainboard/google/dedede/variants/dedede/include/variant/acpi/dptf.asl b/src/mainboard/google/dedede/variants/dedede/include/variant/acpi/dptf.asl deleted file mode 100644 index 189cafea4c..0000000000 --- a/src/mainboard/google/dedede/variants/dedede/include/variant/acpi/dptf.asl +++ /dev/null @@ -1,3 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <baseboard/acpi/dptf.asl> diff --git a/src/mainboard/google/dedede/variants/drawcia/include/variant/acpi/dptf.asl b/src/mainboard/google/dedede/variants/drawcia/include/variant/acpi/dptf.asl deleted file mode 100644 index 189cafea4c..0000000000 --- a/src/mainboard/google/dedede/variants/drawcia/include/variant/acpi/dptf.asl +++ /dev/null @@ -1,3 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <baseboard/acpi/dptf.asl> diff --git a/src/mainboard/google/dedede/variants/waddledee/include/variant/acpi/dptf.asl b/src/mainboard/google/dedede/variants/waddledee/include/variant/acpi/dptf.asl deleted file mode 100644 index 189cafea4c..0000000000 --- a/src/mainboard/google/dedede/variants/waddledee/include/variant/acpi/dptf.asl +++ /dev/null @@ -1,3 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <baseboard/acpi/dptf.asl> diff --git a/src/mainboard/google/dedede/variants/waddledoo/include/variant/acpi/dptf.asl b/src/mainboard/google/dedede/variants/waddledoo/include/variant/acpi/dptf.asl deleted file mode 100644 index 189cafea4c..0000000000 --- a/src/mainboard/google/dedede/variants/waddledoo/include/variant/acpi/dptf.asl +++ /dev/null @@ -1,3 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <baseboard/acpi/dptf.asl> diff --git a/src/mainboard/google/dedede/variants/wheelie/include/variant/acpi/dptf.asl b/src/mainboard/google/dedede/variants/wheelie/include/variant/acpi/dptf.asl deleted file mode 100644 index 189cafea4c..0000000000 --- a/src/mainboard/google/dedede/variants/wheelie/include/variant/acpi/dptf.asl +++ /dev/null @@ -1,3 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <baseboard/acpi/dptf.asl> |