blob: 99a1f309ba324a02308a7c48a49d67cd61c671e9 [file] [log] [blame]
Angel Ponsba38f372020-04-05 15:46:45 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Lee Leahy77ff0b12015-05-05 15:07:29 -07002
Lee Leahy32471722015-04-20 15:20:28 -07003/*
4 * The devicetree parser expects chip.h to reside directly in the path
5 * specified by the devicetree.
6 */
Lee Leahy77ff0b12015-05-05 15:07:29 -07007
Lee Leahy32471722015-04-20 15:20:28 -07008#ifndef _SOC_CHIP_H_
9#define _SOC_CHIP_H_
Lee Leahy77ff0b12015-05-05 15:07:29 -070010
11#include <stdint.h>
Matt DeVillier8ff2ecd2020-03-29 16:58:48 -050012#include <drivers/intel/gma/i915.h>
Aaron Durbin789f2b62015-09-09 17:05:06 -050013#include <fsp/util.h>
Frans Hendriks2c630172019-04-02 15:06:29 +020014#include <intelblocks/lpc_lib.h>
Lee Leahy32471722015-04-20 15:20:28 -070015#include <soc/pci_devs.h>
Lee Leahy77ff0b12015-05-05 15:07:29 -070016
Jenny TC153ae102015-06-18 14:55:10 +053017#define SVID_CONFIG1 1
18#define SVID_CONFIG3 3
19#define SVID_PMIC_CONFIG 8
Lee Leahy32471722015-04-20 15:20:28 -070020
Frans Hendriksf26a1982019-10-02 10:16:26 +020021#define IGD_MEMSIZE_32MB 0x01
22#define IGD_MEMSIZE_64MB 0x02
23#define IGD_MEMSIZE_96MB 0x03
24#define IGD_MEMSIZE_128MB 0x04
25
fdurairxaff502e2015-08-21 15:36:53 -070026enum lpe_clk_src {
Lee Leahy6598b912017-03-16 17:30:09 -070027 LPE_CLK_SRC_XTAL,
28 LPE_CLK_SRC_PLL,
fdurairxaff502e2015-08-21 15:36:53 -070029};
30
shkimcc728f02015-09-22 17:53:58 +090031enum usb_comp_bg_value {
32 USB_COMP_BG_575_MV = 7,
33 USB_COMP_BG_650_MV = 6,
34 USB_COMP_BG_550_MV = 5,
35 USB_COMP_BG_537_MV = 4,
36 USB_COMP_BG_625_MV = 3,
37 USB_COMP_BG_700_MV = 2,
38 USB_COMP_BG_600_MV = 1,
39 USB_COMP_BG_675_MV = 0,
40};
41
Lee Leahy32471722015-04-20 15:20:28 -070042struct soc_intel_braswell_config {
Lee Leahy77ff0b12015-05-05 15:07:29 -070043 uint8_t enable_xdp_tap;
Lee Leahy77ff0b12015-05-05 15:07:29 -070044 uint8_t clkreq_enable;
45
Frans Hendriks2c630172019-04-02 15:06:29 +020046 enum serirq_mode serirq_mode;
47
Angel Ponsaee7ab22020-03-19 00:31:58 +010048 /* Disable SLP_X stretching after SUS power well loss */
Lee Leahy77ff0b12015-05-05 15:07:29 -070049 int disable_slp_x_stretch_sus_fail;
50
Angel Ponsaee7ab22020-03-19 00:31:58 +010051 /* LPE Audio Clock configuration */
52 enum lpe_clk_src lpe_codec_clk_src; /* Both are 19.2MHz */
Lee Leahy77ff0b12015-05-05 15:07:29 -070053
Angel Ponsaee7ab22020-03-19 00:31:58 +010054 /* Native SD Card controller - override controller capabilities */
Lee Leahy77ff0b12015-05-05 15:07:29 -070055 uint32_t sdcard_cap_low;
56 uint32_t sdcard_cap_high;
57
58 /* Enable devices in ACPI mode */
59 int lpss_acpi_mode;
Lee Leahy32471722015-04-20 15:20:28 -070060 int emmc_acpi_mode;
61 int sd_acpi_mode;
Lee Leahy77ff0b12015-05-05 15:07:29 -070062 int lpe_acpi_mode;
63
Angel Ponsaee7ab22020-03-19 00:31:58 +010064 /* Allow PCIe devices to wake system from suspend */
Lee Leahy77ff0b12015-05-05 15:07:29 -070065 int pcie_wake_enable;
66
shkimcc728f02015-09-22 17:53:58 +090067 /* Program USB2_COMPBG register.
Lee Leahy6598b912017-03-16 17:30:09 -070068 * [10:7] - select vref to AFE port
69 * x111 - 575mV, x110 - 650mV, x101 - 550mV, x100 - 537.5mV,
70 * x011 - 625mV, x010 - 700mV, x001 - 600mV, x000 - 675mV
71 */
shkimcc728f02015-09-22 17:53:58 +090072 enum usb_comp_bg_value usb_comp_bg;
73
Angel Ponsaee7ab22020-03-19 00:31:58 +010074 /*
75 * The following fields come from fsp_vpd.h .aka. VpdHeader.h.
76 * These are configuration values that are passed to FSP during MemoryInit.
77 */
78 uint16_t PcdMrcInitTsegSize;
79 uint16_t PcdMrcInitMmioSize;
80 uint8_t PcdMrcInitSpdAddr1;
81 uint8_t PcdMrcInitSpdAddr2;
82 uint8_t PcdIgdDvmt50PreAlloc;
83 uint8_t PcdApertureSize;
84 uint8_t PcdGttSize;
85 uint8_t PcdLegacySegDecode;
86 uint8_t PcdDvfsEnable;
87 uint8_t PcdCaMirrorEn; /* Command Address Mirroring Enabled */
shkimcc728f02015-09-22 17:53:58 +090088
Lee Leahy32471722015-04-20 15:20:28 -070089 /*
90 * The following fields come from fsp_vpd.h .aka. VpdHeader.h.
Angel Ponsaee7ab22020-03-19 00:31:58 +010091 * These are configuration values that are passed to FSP during SiliconInit.
Lee Leahy32471722015-04-20 15:20:28 -070092 */
Angel Ponsaee7ab22020-03-19 00:31:58 +010093 uint8_t PcdSdcardMode;
94 uint8_t PcdEnableHsuart0;
95 uint8_t PcdEnableHsuart1;
96 uint8_t PcdEnableAzalia;
97 uint8_t PcdEnableSata;
98 uint8_t PcdEnableXhci;
99 uint8_t PcdEnableLpe;
100 uint8_t PcdEnableDma0;
101 uint8_t PcdEnableDma1;
102 uint8_t PcdEnableI2C0;
103 uint8_t PcdEnableI2C1;
104 uint8_t PcdEnableI2C2;
105 uint8_t PcdEnableI2C3;
106 uint8_t PcdEnableI2C4;
107 uint8_t PcdEnableI2C5;
108 uint8_t PcdEnableI2C6;
109 uint8_t PunitPwrConfigDisable;
110 uint8_t ChvSvidConfig;
111 uint8_t DptfDisable;
112 uint8_t PcdEmmcMode;
113 uint8_t PcdUsb3ClkSsc;
114 uint8_t PcdDispClkSsc;
115 uint8_t PcdSataClkSsc;
116 uint8_t Usb2Port0PerPortPeTxiSet;
117 uint8_t Usb2Port0PerPortTxiSet;
118 uint8_t Usb2Port0IUsbTxEmphasisEn;
119 uint8_t Usb2Port0PerPortTxPeHalf;
120 uint8_t Usb2Port1PerPortPeTxiSet;
121 uint8_t Usb2Port1PerPortTxiSet;
122 uint8_t Usb2Port1IUsbTxEmphasisEn;
123 uint8_t Usb2Port1PerPortTxPeHalf;
124 uint8_t Usb2Port2PerPortPeTxiSet;
125 uint8_t Usb2Port2PerPortTxiSet;
126 uint8_t Usb2Port2IUsbTxEmphasisEn;
127 uint8_t Usb2Port2PerPortTxPeHalf;
128 uint8_t Usb2Port3PerPortPeTxiSet;
129 uint8_t Usb2Port3PerPortTxiSet;
130 uint8_t Usb2Port3IUsbTxEmphasisEn;
131 uint8_t Usb2Port3PerPortTxPeHalf;
132 uint8_t Usb2Port4PerPortPeTxiSet;
133 uint8_t Usb2Port4PerPortTxiSet;
134 uint8_t Usb2Port4IUsbTxEmphasisEn;
135 uint8_t Usb2Port4PerPortTxPeHalf;
136 uint8_t Usb3Lane0Ow2tapgen2deemph3p5;
137 uint8_t Usb3Lane1Ow2tapgen2deemph3p5;
138 uint8_t Usb3Lane2Ow2tapgen2deemph3p5;
139 uint8_t Usb3Lane3Ow2tapgen2deemph3p5;
140 uint8_t PcdSataInterfaceSpeed;
141 uint8_t PcdPchUsbSsicPort;
142 uint8_t PcdPchUsbHsicPort;
143 uint8_t PcdPcieRootPortSpeed;
144 uint8_t PcdPchSsicEnable;
145 uint32_t PcdLogoPtr;
146 uint32_t PcdLogoSize;
147 uint8_t PcdRtcLock;
148 uint8_t PMIC_I2CBus;
149 uint8_t ISPEnable;
150 uint8_t ISPPciDevConfig;
151 uint8_t PcdSdDetectChk; /* Enable / Disable SD Card Detect Simulation */
152 uint8_t I2C0Frequency; /* 0 - 100KHz, 1 - 400KHz, 2 - 1MHz */
153 uint8_t I2C1Frequency;
154 uint8_t I2C2Frequency;
155 uint8_t I2C3Frequency;
156 uint8_t I2C4Frequency;
157 uint8_t I2C5Frequency;
158 uint8_t I2C6Frequency;
Matt DeVillier8ff2ecd2020-03-29 16:58:48 -0500159
160 struct i915_gpu_controller_info gfx;
Lee Leahy77ff0b12015-05-05 15:07:29 -0700161};
162
Lee Leahy32471722015-04-20 15:20:28 -0700163#endif /* _SOC_CHIP_H_ */