Wisley Chen | ded3f90 | 2019-09-06 20:01:32 +0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 4 | * Copyright 2019 Google LLC |
Wisley Chen | ded3f90 | 2019-09-06 20:01:32 +0800 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 16 | #define DPTF_CPU_PASSIVE 90 |
| 17 | #define DPTF_CPU_CRITICAL 105 |
| 18 | #define DPTF_CPU_ACTIVE_AC0 91 |
| 19 | #define DPTF_CPU_ACTIVE_AC1 85 |
| 20 | #define DPTF_CPU_ACTIVE_AC2 78 |
| 21 | #define DPTF_CPU_ACTIVE_AC3 71 |
| 22 | #define DPTF_CPU_ACTIVE_AC4 64 |
| 23 | |
| 24 | #define DPTF_TSR0_SENSOR_ID 0 |
| 25 | #define DPTF_TSR0_SENSOR_NAME "Thermal Sensor - Charger" |
| 26 | #define DPTF_TSR0_PASSIVE 65 |
| 27 | #define DPTF_TSR0_CRITICAL 85 |
| 28 | |
| 29 | #define DPTF_TSR1_SENSOR_ID 1 |
| 30 | #define DPTF_TSR1_SENSOR_NAME "Thermal Sensor - 5V" |
| 31 | #define DPTF_TSR1_PASSIVE 45 |
| 32 | #define DPTF_TSR1_CRITICAL 75 |
| 33 | #define DPTF_TSR1_ACTIVE_AC0 51 |
| 34 | #define DPTF_TSR1_ACTIVE_AC1 48 |
| 35 | #define DPTF_TSR1_ACTIVE_AC2 45 |
| 36 | #define DPTF_TSR1_ACTIVE_AC3 42 |
| 37 | #define DPTF_TSR1_ACTIVE_AC4 39 |
| 38 | #define DPTF_TSR1_ACTIVE_AC5 36 |
| 39 | #define DPTF_TSR1_ACTIVE_AC6 33 |
| 40 | |
Wisley Chen | 6476e41 | 2019-12-31 13:26:04 +0800 | [diff] [blame^] | 41 | #define DPTF_TSR2_SENSOR_ID 2 |
| 42 | #define DPTF_TSR2_SENSOR_NAME "Thermal Sensor - CPU" |
| 43 | #define DPTF_TSR2_PASSIVE 105 |
| 44 | #define DPTF_TSR2_CRITICAL 105 |
| 45 | |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 46 | #define DPTF_ENABLE_CHARGER |
| 47 | #define DPTF_ENABLE_FAN_CONTROL |
| 48 | |
| 49 | /* Charger performance states, board-specific values from charger and EC */ |
| 50 | Name (CHPS, Package () { |
| 51 | Package () { 0, 0, 0, 0, 255, 0x6a4, "mA", 0 }, /* 1.7A (MAX) */ |
| 52 | Package () { 0, 0, 0, 0, 24, 0x600, "mA", 0 }, /* 1.5A */ |
| 53 | Package () { 0, 0, 0, 0, 16, 0x400, "mA", 0 }, /* 1.0A */ |
| 54 | Package () { 0, 0, 0, 0, 8, 0x200, "mA", 0 }, /* 0.5A */ |
| 55 | }) |
| 56 | |
| 57 | /* DFPS: Fan Performance States */ |
| 58 | Name (DFPS, Package () { |
| 59 | 0, // Revision |
| 60 | /* |
| 61 | * TODO : Need to update this Table after characterization. |
| 62 | * These are initial reference values. |
| 63 | */ |
| 64 | /* Control, Trip Point, Speed, NoiseLevel, Power */ |
Wisley Chen | 6476e41 | 2019-12-31 13:26:04 +0800 | [diff] [blame^] | 65 | Package () {100, 0xFFFFFFFF, 6700, 220, 2200}, |
| 66 | Package () {90, 0xFFFFFFFF, 5800, 180, 1800}, |
| 67 | Package () {80, 0xFFFFFFFF, 5000, 145, 1450}, |
| 68 | Package () {70, 0xFFFFFFFF, 4900, 115, 1150}, |
| 69 | Package () {63, 0xFFFFFFFF, 3838, 90, 900}, |
| 70 | Package () {58, 0xFFFFFFFF, 2904, 55, 550}, |
| 71 | Package () {54, 0xFFFFFFFF, 2337, 30, 300}, |
| 72 | Package () {50, 0xFFFFFFFF, 1608, 15, 150}, |
| 73 | Package () {45, 0xFFFFFFFF, 800, 10, 100}, |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 74 | Package () {0, 0xFFFFFFFF, 0, 0, 50} |
| 75 | }) |
| 76 | |
| 77 | Name (DART, Package () { |
| 78 | /* Fan effect on CPU */ |
| 79 | 0, // Revision |
| 80 | Package () { |
| 81 | /* |
| 82 | * Source, Target, Weight, AC0, AC1, AC2, AC3, AC4, AC5, AC6, |
| 83 | * AC7, AC8, AC9 |
| 84 | */ |
| 85 | \_SB.DPTF.TFN1, \_SB.PCI0.TCPU, 100, 90, 60, 50, 40, 30, 0, 0, |
| 86 | 0, 0, 0 |
| 87 | }, |
| 88 | Package () { |
| 89 | \_SB.DPTF.TFN1, \_SB.DPTF.TSR1, 100, 100, 80, 70, 60, 50, 40, 30, |
| 90 | 0, 0, 0 |
| 91 | }, |
Wisley Chen | 6476e41 | 2019-12-31 13:26:04 +0800 | [diff] [blame^] | 92 | Package () { |
| 93 | \_SB.DPTF.TFN1, \_SB.DPTF.TSR2, 100, 100, 80, 70, 60, 50, 40, 30, |
| 94 | 0, 0, 0 |
| 95 | }, |
| 96 | |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 97 | }) |
| 98 | |
| 99 | Name (DTRT, Package () { |
| 100 | /* CPU Throttle Effect on CPU */ |
| 101 | Package () { \_SB.PCI0.TCPU, \_SB.PCI0.TCPU, 100, 50, 0, 0, 0, 0 }, |
| 102 | |
| 103 | /* Charger Throttle Effect on Charger (TSR0) */ |
| 104 | Package () { \_SB.DPTF.TCHG, \_SB.DPTF.TSR0, 100, 60, 0, 0, 0, 0 }, |
| 105 | |
| 106 | /* CPU Throttle Effect on CPU (TSR1) */ |
| 107 | Package () { \_SB.PCI0.TCPU, \_SB.DPTF.TSR1, 100, 60, 0, 0, 0, 0 }, |
| 108 | |
Wisley Chen | 6476e41 | 2019-12-31 13:26:04 +0800 | [diff] [blame^] | 109 | /* CPU Throttle Effect on CPU (TSR2) */ |
| 110 | Package () { \_SB.PCI0.TCPU, \_SB.DPTF.TSR2, 100, 60, 0, 0, 0, 0 }, |
| 111 | |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 112 | }) |
| 113 | |
| 114 | Name (MPPC, Package () |
| 115 | { |
| 116 | 0x2, /* Revision */ |
| 117 | Package () { /* Power Limit 1 */ |
| 118 | 0, /* PowerLimitIndex, 0 for Power Limit 1 */ |
| 119 | 3000, /* PowerLimitMinimum */ |
| 120 | 15000, /* PowerLimitMaximum */ |
| 121 | 28000, /* TimeWindowMinimum */ |
| 122 | 32000, /* TimeWindowMaximum */ |
| 123 | 200 /* StepSize */ |
| 124 | }, |
| 125 | Package () { /* Power Limit 2 */ |
| 126 | 1, /* PowerLimitIndex, 1 for Power Limit 2 */ |
| 127 | 15000, /* PowerLimitMinimum */ |
Wisley Chen | 6476e41 | 2019-12-31 13:26:04 +0800 | [diff] [blame^] | 128 | 51000, /* PowerLimitMaximum */ |
| 129 | 51000, /* TimeWindowMinimum */ |
Wisley Chen | bac6946 | 2019-10-17 19:23:43 +0800 | [diff] [blame] | 130 | 32000, /* TimeWindowMaximum */ |
| 131 | 1000 /* StepSize */ |
| 132 | } |
| 133 | }) |