2020-04-05 13:21:00 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2015-05-12 02:24:31 +02:00
|
|
|
|
2020-06-17 22:37:49 +02:00
|
|
|
#include <acpi/acpi_gnvs.h>
|
2020-12-23 04:07:17 +01:00
|
|
|
#include <boardid.h>
|
2015-05-12 02:24:31 +02:00
|
|
|
#include <soc/nvs.h>
|
2021-01-12 16:46:30 +01:00
|
|
|
#include <soc/device_nvs.h>
|
2015-05-12 02:24:31 +02:00
|
|
|
|
2020-06-29 01:56:49 +02:00
|
|
|
void mainboard_fill_gnvs(struct global_nvs *gnvs)
|
2015-05-12 02:24:31 +02:00
|
|
|
{
|
|
|
|
/* Enable USB ports in S3 */
|
|
|
|
gnvs->s3u0 = 1;
|
|
|
|
gnvs->s3u1 = 1;
|
|
|
|
|
|
|
|
/* Disable USB ports in S5 */
|
|
|
|
gnvs->s5u0 = 0;
|
|
|
|
gnvs->s5u1 = 0;
|
|
|
|
|
|
|
|
/* Enable DPTF */
|
|
|
|
gnvs->dpte = 1;
|
2017-08-21 00:56:48 +02:00
|
|
|
|
|
|
|
/* Disable PMIC I2C port for ACPI for all boards except cyan */
|
2021-01-12 16:46:30 +01:00
|
|
|
struct device_nvs *dev_nvs = acpi_get_device_nvs();
|
2019-03-06 01:53:33 +01:00
|
|
|
if (!CONFIG(BOARD_GOOGLE_CYAN))
|
2021-01-12 16:46:30 +01:00
|
|
|
dev_nvs->lpss_en[LPSS_NVS_I2C2] = 0;
|
2020-12-23 04:07:17 +01:00
|
|
|
|
|
|
|
gnvs->bdid = board_id();
|
2015-05-12 02:24:31 +02:00
|
|
|
}
|