Angel Pons | 2de6bdf | 2020-04-05 13:21:00 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | 89b5fbd | 2015-05-11 17:24:31 -0700 | [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 | 388c16a | 2020-12-23 05:07:17 +0200 | [diff] [blame] | 4 | #include <boardid.h> |
Lee Leahy | 89b5fbd | 2015-05-11 17:24:31 -0700 | [diff] [blame] | 5 | #include <soc/nvs.h> |
Kyösti Mälkki | 4abc731 | 2021-01-12 17:46:30 +0200 | [diff] [blame] | 6 | #include <soc/device_nvs.h> |
Lee Leahy | 89b5fbd | 2015-05-11 17:24:31 -0700 | [diff] [blame] | 7 | |
Kyösti Mälkki | a9766c7 | 2020-06-29 02:56:49 +0300 | [diff] [blame] | 8 | void mainboard_fill_gnvs(struct global_nvs *gnvs) |
Lee Leahy | 89b5fbd | 2015-05-11 17:24:31 -0700 | [diff] [blame] | 9 | { |
Lee Leahy | 89b5fbd | 2015-05-11 17:24:31 -0700 | [diff] [blame] | 10 | /* Enable USB ports in S3 */ |
11 | gnvs->s3u0 = 1; | ||||
12 | gnvs->s3u1 = 1; | ||||
13 | |||||
Matt DeVillier | 4f20a4a | 2017-08-20 17:56:48 -0500 | [diff] [blame] | 14 | /* Disable PMIC I2C port for ACPI for all boards except cyan */ |
Kyösti Mälkki | 4abc731 | 2021-01-12 17:46:30 +0200 | [diff] [blame] | 15 | struct device_nvs *dev_nvs = acpi_get_device_nvs(); |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 16 | if (!CONFIG(BOARD_GOOGLE_CYAN)) |
Kyösti Mälkki | 4abc731 | 2021-01-12 17:46:30 +0200 | [diff] [blame] | 17 | dev_nvs->lpss_en[LPSS_NVS_I2C2] = 0; |
Kyösti Mälkki | 388c16a | 2020-12-23 05:07:17 +0200 | [diff] [blame] | 18 | |
19 | gnvs->bdid = board_id(); | ||||
Lee Leahy | 89b5fbd | 2015-05-11 17:24:31 -0700 | [diff] [blame] | 20 | } |