Angel Pons | feedf23 | 2020-04-05 13:22:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 2 | |
Kyösti Mälkki | 0c1dd9c | 2020-06-17 23:37:49 +0300 | [diff] [blame] | 3 | #include <acpi/acpi_gnvs.h> |
Kyösti Mälkki | 661ad46 | 2020-12-29 06:26:21 +0200 | [diff] [blame] | 4 | #include <soc/nvs.h> |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 5 | #include "thermal.h" |
| 6 | |
Kyösti Mälkki | a9766c7 | 2020-06-29 02:56:49 +0300 | [diff] [blame] | 7 | void mainboard_fill_gnvs(struct global_nvs *gnvs) |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 8 | { |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 9 | /* Disable USB ports in S3 by default */ |
| 10 | gnvs->s3u0 = 0; |
| 11 | gnvs->s3u1 = 0; |
| 12 | |
| 13 | /* Disable USB ports in S5 by default */ |
| 14 | gnvs->s5u0 = 0; |
| 15 | gnvs->s5u1 = 0; |
| 16 | |
Peter Lemenkov | 6c2c018 | 2019-10-21 21:42:17 +0200 | [diff] [blame] | 17 | gnvs->tmps = CTDP_SENSOR_ID; |
| 18 | |
| 19 | gnvs->f1of = CTDP_NOMINAL_THRESHOLD_OFF; |
| 20 | gnvs->f1on = CTDP_NOMINAL_THRESHOLD_ON; |
| 21 | |
| 22 | gnvs->f0of = CTDP_DOWN_THRESHOLD_OFF; |
| 23 | gnvs->f0on = CTDP_DOWN_THRESHOLD_ON; |
| 24 | |
| 25 | gnvs->tcrt = CRITICAL_TEMPERATURE; |
| 26 | gnvs->tpsv = PASSIVE_TEMPERATURE; |
| 27 | gnvs->tmax = MAX_TEMPERATURE; |
| 28 | gnvs->flvl = 1; |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 29 | |
| 30 | // the lid is open by default. |
| 31 | gnvs->lids = 1; |
| 32 | } |