Angel Pons | 60ec365 | 2020-04-03 01:22:13 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 2 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Kyösti Mälkki | 0c1dd9c | 2020-06-17 23:37:49 +0300 | [diff] [blame] | 4 | #include <acpi/acpi_gnvs.h> |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 5 | #include <device/device.h> |
Kyösti Mälkki | 661ad46 | 2020-12-29 06:26:21 +0200 | [diff] [blame] | 6 | #include <soc/nvs.h> |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 7 | |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 8 | #include "thermal.h" |
| 9 | |
Kyösti Mälkki | a9766c7 | 2020-06-29 02:56:49 +0300 | [diff] [blame] | 10 | void mainboard_fill_gnvs(struct global_nvs *gnvs) |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 11 | { |
Peter Lemenkov | 6c2c018 | 2019-10-21 21:42:17 +0200 | [diff] [blame] | 12 | /* Enable USB ports in S3 */ |
| 13 | gnvs->s3u0 = 1; |
| 14 | gnvs->s3u1 = 1; |
| 15 | |
| 16 | /* |
| 17 | * Enable Front USB ports in S5 by default |
| 18 | * to be consistent with back port behavior |
| 19 | */ |
| 20 | gnvs->s5u0 = 1; |
| 21 | gnvs->s5u1 = 1; |
| 22 | |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 23 | gnvs->f4of = FAN4_THRESHOLD_OFF; |
| 24 | gnvs->f4on = FAN4_THRESHOLD_ON; |
| 25 | gnvs->f4pw = FAN4_PWM; |
| 26 | |
| 27 | gnvs->f3of = FAN3_THRESHOLD_OFF; |
| 28 | gnvs->f3on = FAN3_THRESHOLD_ON; |
| 29 | gnvs->f3pw = FAN3_PWM; |
| 30 | |
| 31 | gnvs->f2of = FAN2_THRESHOLD_OFF; |
| 32 | gnvs->f2on = FAN2_THRESHOLD_ON; |
| 33 | gnvs->f2pw = FAN2_PWM; |
| 34 | |
| 35 | gnvs->f1of = FAN1_THRESHOLD_OFF; |
| 36 | gnvs->f1on = FAN1_THRESHOLD_ON; |
| 37 | gnvs->f1pw = FAN1_PWM; |
| 38 | |
| 39 | gnvs->f0of = FAN0_THRESHOLD_OFF; |
| 40 | gnvs->f0on = FAN0_THRESHOLD_ON; |
| 41 | gnvs->f0pw = FAN0_PWM; |
| 42 | |
| 43 | gnvs->tcrt = CRITICAL_TEMPERATURE; |
| 44 | gnvs->tpsv = PASSIVE_TEMPERATURE; |
| 45 | gnvs->tmax = MAX_TEMPERATURE; |
Stefan Reinauer | 6651da3 | 2012-04-27 23:16:30 +0200 | [diff] [blame] | 46 | } |