blob: de86a1248844ffd61a833875b405106e54cf610f [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
Matt DeVillier8ff2ecd2020-03-29 16:58:48 -050011#include <drivers/intel/gma/i915.h>
Aaron Durbin789f2b62015-09-09 17:05:06 -050012#include <fsp/util.h>
Frans Hendriks2c630172019-04-02 15:06:29 +020013#include <intelblocks/lpc_lib.h>
Lee Leahy32471722015-04-20 15:20:28 -070014#include <soc/pci_devs.h>
Angel Ponsfbca40c2021-09-27 12:59:26 +020015#include <types.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 {
Angel Ponsfbca40c2021-09-27 12:59:26 +020043 bool enable_xdp_tap;
Lee Leahy77ff0b12015-05-05 15:07:29 -070044
Frans Hendriks2c630172019-04-02 15:06:29 +020045 enum serirq_mode serirq_mode;
46
Angel Ponsaee7ab22020-03-19 00:31:58 +010047 /* Disable SLP_X stretching after SUS power well loss */
Angel Ponsfbca40c2021-09-27 12:59:26 +020048 bool disable_slp_x_stretch_sus_fail;
Lee Leahy77ff0b12015-05-05 15:07:29 -070049
Angel Ponsaee7ab22020-03-19 00:31:58 +010050 /* LPE Audio Clock configuration */
51 enum lpe_clk_src lpe_codec_clk_src; /* Both are 19.2MHz */
Lee Leahy77ff0b12015-05-05 15:07:29 -070052
Angel Ponsaee7ab22020-03-19 00:31:58 +010053 /* Native SD Card controller - override controller capabilities */
Lee Leahy77ff0b12015-05-05 15:07:29 -070054 uint32_t sdcard_cap_low;
55 uint32_t sdcard_cap_high;
56
57 /* Enable devices in ACPI mode */
Angel Ponsfbca40c2021-09-27 12:59:26 +020058 bool lpss_acpi_mode;
59 bool emmc_acpi_mode;
60 bool sd_acpi_mode;
61 bool lpe_acpi_mode;
Lee Leahy77ff0b12015-05-05 15:07:29 -070062
Angel Ponsaee7ab22020-03-19 00:31:58 +010063 /* Allow PCIe devices to wake system from suspend */
Angel Ponsfbca40c2021-09-27 12:59:26 +020064 bool pcie_wake_enable;
Lee Leahy77ff0b12015-05-05 15:07:29 -070065
shkimcc728f02015-09-22 17:53:58 +090066 /* Program USB2_COMPBG register.
Lee Leahy6598b912017-03-16 17:30:09 -070067 * [10:7] - select vref to AFE port
68 * x111 - 575mV, x110 - 650mV, x101 - 550mV, x100 - 537.5mV,
69 * x011 - 625mV, x010 - 700mV, x001 - 600mV, x000 - 675mV
70 */
shkimcc728f02015-09-22 17:53:58 +090071 enum usb_comp_bg_value usb_comp_bg;
72
Angel Ponsaee7ab22020-03-19 00:31:58 +010073 /*
74 * The following fields come from fsp_vpd.h .aka. VpdHeader.h.
75 * These are configuration values that are passed to FSP during MemoryInit.
76 */
Angel Ponsaee7ab22020-03-19 00:31:58 +010077 uint8_t PcdMrcInitSpdAddr1;
78 uint8_t PcdMrcInitSpdAddr2;
79 uint8_t PcdIgdDvmt50PreAlloc;
Angel Ponsaee7ab22020-03-19 00:31:58 +010080 uint8_t PcdDvfsEnable;
81 uint8_t PcdCaMirrorEn; /* Command Address Mirroring Enabled */
shkimcc728f02015-09-22 17:53:58 +090082
Lee Leahy32471722015-04-20 15:20:28 -070083 /*
84 * The following fields come from fsp_vpd.h .aka. VpdHeader.h.
Angel Ponsaee7ab22020-03-19 00:31:58 +010085 * These are configuration values that are passed to FSP during SiliconInit.
Lee Leahy32471722015-04-20 15:20:28 -070086 */
Angel Ponsaee7ab22020-03-19 00:31:58 +010087 uint8_t PcdSdcardMode;
88 uint8_t PcdEnableHsuart0;
89 uint8_t PcdEnableHsuart1;
90 uint8_t PcdEnableAzalia;
91 uint8_t PcdEnableSata;
92 uint8_t PcdEnableXhci;
93 uint8_t PcdEnableLpe;
94 uint8_t PcdEnableDma0;
95 uint8_t PcdEnableDma1;
96 uint8_t PcdEnableI2C0;
97 uint8_t PcdEnableI2C1;
98 uint8_t PcdEnableI2C2;
99 uint8_t PcdEnableI2C3;
100 uint8_t PcdEnableI2C4;
101 uint8_t PcdEnableI2C5;
102 uint8_t PcdEnableI2C6;
103 uint8_t PunitPwrConfigDisable;
104 uint8_t ChvSvidConfig;
Angel Ponsaee7ab22020-03-19 00:31:58 +0100105 uint8_t PcdEmmcMode;
Angel Ponsaee7ab22020-03-19 00:31:58 +0100106 uint8_t Usb2Port0PerPortPeTxiSet;
107 uint8_t Usb2Port0PerPortTxiSet;
108 uint8_t Usb2Port0IUsbTxEmphasisEn;
109 uint8_t Usb2Port0PerPortTxPeHalf;
110 uint8_t Usb2Port1PerPortPeTxiSet;
111 uint8_t Usb2Port1PerPortTxiSet;
112 uint8_t Usb2Port1IUsbTxEmphasisEn;
113 uint8_t Usb2Port1PerPortTxPeHalf;
114 uint8_t Usb2Port2PerPortPeTxiSet;
115 uint8_t Usb2Port2PerPortTxiSet;
116 uint8_t Usb2Port2IUsbTxEmphasisEn;
117 uint8_t Usb2Port2PerPortTxPeHalf;
118 uint8_t Usb2Port3PerPortPeTxiSet;
119 uint8_t Usb2Port3PerPortTxiSet;
120 uint8_t Usb2Port3IUsbTxEmphasisEn;
121 uint8_t Usb2Port3PerPortTxPeHalf;
122 uint8_t Usb2Port4PerPortPeTxiSet;
123 uint8_t Usb2Port4PerPortTxiSet;
124 uint8_t Usb2Port4IUsbTxEmphasisEn;
125 uint8_t Usb2Port4PerPortTxPeHalf;
126 uint8_t Usb3Lane0Ow2tapgen2deemph3p5;
127 uint8_t Usb3Lane1Ow2tapgen2deemph3p5;
128 uint8_t Usb3Lane2Ow2tapgen2deemph3p5;
129 uint8_t Usb3Lane3Ow2tapgen2deemph3p5;
Angel Ponsaee7ab22020-03-19 00:31:58 +0100130 uint8_t PcdPchUsbSsicPort;
131 uint8_t PcdPchUsbHsicPort;
Angel Ponsaee7ab22020-03-19 00:31:58 +0100132 uint8_t PcdPchSsicEnable;
Angel Ponsaee7ab22020-03-19 00:31:58 +0100133 uint8_t PMIC_I2CBus;
134 uint8_t ISPEnable;
135 uint8_t ISPPciDevConfig;
136 uint8_t PcdSdDetectChk; /* Enable / Disable SD Card Detect Simulation */
137 uint8_t I2C0Frequency; /* 0 - 100KHz, 1 - 400KHz, 2 - 1MHz */
138 uint8_t I2C1Frequency;
139 uint8_t I2C2Frequency;
140 uint8_t I2C3Frequency;
141 uint8_t I2C4Frequency;
142 uint8_t I2C5Frequency;
143 uint8_t I2C6Frequency;
Matt DeVillier8ff2ecd2020-03-29 16:58:48 -0500144
145 struct i915_gpu_controller_info gfx;
Lee Leahy77ff0b12015-05-05 15:07:29 -0700146};
147
Lee Leahy32471722015-04-20 15:20:28 -0700148#endif /* _SOC_CHIP_H_ */