blob: 864f214008ea4a414d57004ac051776d0296faba [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/*
18 * The devicetree parser expects chip.h to reside directly in the path
19 * specified by the devicetree.
20 */
Lee Leahy77ff0b12015-05-05 15:07:29 -070021
Lee Leahy32471722015-04-20 15:20:28 -070022#ifndef _SOC_CHIP_H_
23#define _SOC_CHIP_H_
Lee Leahy77ff0b12015-05-05 15:07:29 -070024
25#include <stdint.h>
Aaron Durbin789f2b62015-09-09 17:05:06 -050026#include <fsp/util.h>
Lee Leahy32471722015-04-20 15:20:28 -070027#include <soc/pci_devs.h>
Lee Leahy77ff0b12015-05-05 15:07:29 -070028
Jenny TC153ae102015-06-18 14:55:10 +053029#define SVID_CONFIG1 1
30#define SVID_CONFIG3 3
31#define SVID_PMIC_CONFIG 8
Lee Leahy32471722015-04-20 15:20:28 -070032
Jenny TC5468e942015-06-18 14:02:00 +053033#define MEM_DDR3 0
34#define MEM_LPDDR3 1
35
fdurairxaff502e2015-08-21 15:36:53 -070036enum lpe_clk_src {
37 LPE_CLK_SRC_XTAL,
38 LPE_CLK_SRC_PLL,
39};
40
shkimcc728f02015-09-22 17:53:58 +090041enum usb_comp_bg_value {
42 USB_COMP_BG_575_MV = 7,
43 USB_COMP_BG_650_MV = 6,
44 USB_COMP_BG_550_MV = 5,
45 USB_COMP_BG_537_MV = 4,
46 USB_COMP_BG_625_MV = 3,
47 USB_COMP_BG_700_MV = 2,
48 USB_COMP_BG_600_MV = 1,
49 USB_COMP_BG_675_MV = 0,
50};
51
52
Lee Leahy32471722015-04-20 15:20:28 -070053struct soc_intel_braswell_config {
Lee Leahy77ff0b12015-05-05 15:07:29 -070054 uint8_t enable_xdp_tap;
Lee Leahy77ff0b12015-05-05 15:07:29 -070055 uint8_t clkreq_enable;
56
Lee Leahy77ff0b12015-05-05 15:07:29 -070057 /* Disable SLP_X stretching after SUS power well loss. */
58 int disable_slp_x_stretch_sus_fail;
59
Lee Leahy77ff0b12015-05-05 15:07:29 -070060 /* LPE Audio Clock configuration. */
fdurairxaff502e2015-08-21 15:36:53 -070061 enum lpe_clk_src lpe_codec_clk_src; /* 0=xtal 1=PLL, Both are 19.2Mhz. */
Lee Leahy77ff0b12015-05-05 15:07:29 -070062
63 /* Native SD Card controller - override controller capabilities. */
64 uint32_t sdcard_cap_low;
65 uint32_t sdcard_cap_high;
66
67 /* Enable devices in ACPI mode */
68 int lpss_acpi_mode;
Lee Leahy32471722015-04-20 15:20:28 -070069 int emmc_acpi_mode;
70 int sd_acpi_mode;
Lee Leahy77ff0b12015-05-05 15:07:29 -070071 int lpe_acpi_mode;
72
73 /* Allow PCIe devices to wake system from suspend. */
74 int pcie_wake_enable;
75
shkimcc728f02015-09-22 17:53:58 +090076 /* Program USB2_COMPBG register.
77 * [10:7] - select vref to AFE port
78 * x111 - 575mV, x110 - 650mV, x101 - 550mV, x100 - 537.5mV,
79 * x011 - 625mV, x010 - 700mV, x001 - 600mV, x000 - 675mV
80 */
81 enum usb_comp_bg_value usb_comp_bg;
82
83
Lee Leahy32471722015-04-20 15:20:28 -070084 /*
85 * The following fields come from fsp_vpd.h .aka. VpdHeader.h.
86 * These are configuration values that are passed to FSP during
87 * MemoryInit.
88 */
89 UINT16 PcdMrcInitTsegSize;
90 UINT16 PcdMrcInitMmioSize;
91 UINT8 PcdMrcInitSpdAddr1;
92 UINT8 PcdMrcInitSpdAddr2;
93 UINT8 PcdIgdDvmt50PreAlloc;
94 UINT8 PcdApertureSize;
95 UINT8 PcdGttSize;
96 UINT8 PcdLegacySegDecode;
Lee Leahyacb9c0b2015-07-02 11:55:18 -070097 UINT8 PcdDvfsEnable;
Shobhit Srivastavac4153c12015-10-09 17:05:16 +053098 UINT8 PcdCaMirrorEn; /* Command Address Mirroring Enabled */
Lee Leahy77ff0b12015-05-05 15:07:29 -070099
Lee Leahy32471722015-04-20 15:20:28 -0700100 /*
101 * The following fields come from fsp_vpd.h .aka. VpdHeader.h.
102 * These are configuration values that are passed to FSP during
103 * SiliconInit.
104 */
105 UINT8 PcdSdcardMode;
106 UINT8 PcdEnableHsuart0;
107 UINT8 PcdEnableHsuart1;
108 UINT8 PcdEnableAzalia;
Lee Leahy32471722015-04-20 15:20:28 -0700109 UINT8 PcdEnableSata;
110 UINT8 PcdEnableXhci;
111 UINT8 PcdEnableLpe;
112 UINT8 PcdEnableDma0;
113 UINT8 PcdEnableDma1;
114 UINT8 PcdEnableI2C0;
115 UINT8 PcdEnableI2C1;
116 UINT8 PcdEnableI2C2;
117 UINT8 PcdEnableI2C3;
118 UINT8 PcdEnableI2C4;
119 UINT8 PcdEnableI2C5;
120 UINT8 PcdEnableI2C6;
Lee Leahy32471722015-04-20 15:20:28 -0700121 UINT8 PunitPwrConfigDisable;
122 UINT8 ChvSvidConfig;
123 UINT8 DptfDisable;
124 UINT8 PcdEmmcMode;
125 UINT8 PcdUsb3ClkSsc;
126 UINT8 PcdDispClkSsc;
127 UINT8 PcdSataClkSsc;
128 UINT8 Usb2Port0PerPortPeTxiSet;
129 UINT8 Usb2Port0PerPortTxiSet;
130 UINT8 Usb2Port0IUsbTxEmphasisEn;
131 UINT8 Usb2Port0PerPortTxPeHalf;
132 UINT8 Usb2Port1PerPortPeTxiSet;
133 UINT8 Usb2Port1PerPortTxiSet;
134 UINT8 Usb2Port1IUsbTxEmphasisEn;
135 UINT8 Usb2Port1PerPortTxPeHalf;
136 UINT8 Usb2Port2PerPortPeTxiSet;
137 UINT8 Usb2Port2PerPortTxiSet;
138 UINT8 Usb2Port2IUsbTxEmphasisEn;
139 UINT8 Usb2Port2PerPortTxPeHalf;
140 UINT8 Usb2Port3PerPortPeTxiSet;
141 UINT8 Usb2Port3PerPortTxiSet;
142 UINT8 Usb2Port3IUsbTxEmphasisEn;
143 UINT8 Usb2Port3PerPortTxPeHalf;
144 UINT8 Usb2Port4PerPortPeTxiSet;
145 UINT8 Usb2Port4PerPortTxiSet;
146 UINT8 Usb2Port4IUsbTxEmphasisEn;
147 UINT8 Usb2Port4PerPortTxPeHalf;
148 UINT8 Usb3Lane0Ow2tapgen2deemph3p5;
149 UINT8 Usb3Lane1Ow2tapgen2deemph3p5;
150 UINT8 Usb3Lane2Ow2tapgen2deemph3p5;
151 UINT8 Usb3Lane3Ow2tapgen2deemph3p5;
152 UINT8 PcdSataInterfaceSpeed;
153 UINT8 PcdPchUsbSsicPort;
154 UINT8 PcdPchUsbHsicPort;
155 UINT8 PcdPcieRootPortSpeed;
156 UINT8 PcdPchSsicEnable;
157 UINT32 PcdLogoPtr;
158 UINT32 PcdLogoSize;
159 UINT8 PcdRtcLock;
160 UINT8 PMIC_I2CBus;
161 UINT8 ISPEnable;
162 UINT8 ISPPciDevConfig;
Divya Sasidharan89a66852015-10-28 15:02:35 -0700163 UINT8 PcdSdDetectChk; /*Enable\Disable SD Card Detect Simulation*/
Lee Leahy77ff0b12015-05-05 15:07:29 -0700164};
165
Lee Leahy32471722015-04-20 15:20:28 -0700166extern struct chip_operations soc_intel_braswell_ops;
167
168#endif /* _SOC_CHIP_H_ */