blob: 268655e7cb0033c0d34eff1c6139cc0c4affa9d6 [file] [log] [blame]
Lee Leahy77ff0b12015-05-05 15:07:29 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 Google Inc.
Lee Leahy32471722015-04-20 15:20:28 -07005 * Copyright (C) 2015 Intel Corp.
Lee Leahy77ff0b12015-05-05 15:07:29 -07006 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Lee Leahy77ff0b12015-05-05 15:07:29 -070015 */
16
Lee Leahy32471722015-04-20 15:20:28 -070017#ifndef _SOC_DEVICE_NVS_H_
18#define _SOC_DEVICE_NVS_H_
Lee Leahy77ff0b12015-05-05 15:07:29 -070019
20#include <stdint.h>
Stefan Reinauer6a001132017-07-13 02:20:27 +020021#include <compiler.h>
Lee Leahy77ff0b12015-05-05 15:07:29 -070022
23/* Offset in Global NVS where this structure lives */
24#define DEVICE_NVS_OFFSET 0x1000
25
26#define LPSS_NVS_SIO_DMA1 0
27#define LPSS_NVS_I2C1 1
28#define LPSS_NVS_I2C2 2
29#define LPSS_NVS_I2C3 3
30#define LPSS_NVS_I2C4 4
31#define LPSS_NVS_I2C5 5
32#define LPSS_NVS_I2C6 6
33#define LPSS_NVS_I2C7 7
34#define LPSS_NVS_SIO_DMA2 8
35#define LPSS_NVS_SPI 9
36#define LPSS_NVS_PWM1 10
37#define LPSS_NVS_PWM2 11
38#define LPSS_NVS_HSUART1 12
39#define LPSS_NVS_HSUART2 13
40
41#define SCC_NVS_MMC 0
42#define SCC_NVS_SDIO 1
43#define SCC_NVS_SD 2
44
45typedef struct {
46 /* Device Enabled in ACPI Mode */
47 u8 lpss_en[14];
48 u8 scc_en[3];
49 u8 lpe_en;
50
51 /* BAR 0 */
52 u32 lpss_bar0[14];
53 u32 scc_bar0[3];
54 u32 lpe_bar0;
55
56 /* BAR 0 */
57 u32 lpss_bar1[14];
58 u32 scc_bar1[3];
59 u32 lpe_bar1;
60
61 /* Extra */
62 u32 lpe_fw; /* LPE Firmware */
Stefan Reinauer6a001132017-07-13 02:20:27 +020063} __packed device_nvs_t;
Lee Leahy77ff0b12015-05-05 15:07:29 -070064
Lee Leahy32471722015-04-20 15:20:28 -070065#endif /* _SOC_DEVICE_NVS_H_ */