Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 2 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 3 | /* |
| 4 | * The devicetree parser expects chip.h to reside directly in the path |
| 5 | * specified by the devicetree. |
| 6 | */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 7 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 8 | #ifndef _SOC_CHIP_H_ |
| 9 | #define _SOC_CHIP_H_ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 10 | |
| 11 | #include <stdint.h> |
Matt DeVillier | 8ff2ecd | 2020-03-29 16:58:48 -0500 | [diff] [blame] | 12 | #include <drivers/intel/gma/i915.h> |
Aaron Durbin | 789f2b6 | 2015-09-09 17:05:06 -0500 | [diff] [blame] | 13 | #include <fsp/util.h> |
Frans Hendriks | 2c63017 | 2019-04-02 15:06:29 +0200 | [diff] [blame] | 14 | #include <intelblocks/lpc_lib.h> |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 15 | #include <soc/pci_devs.h> |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 16 | |
Jenny TC | 153ae10 | 2015-06-18 14:55:10 +0530 | [diff] [blame] | 17 | #define SVID_CONFIG1 1 |
| 18 | #define SVID_CONFIG3 3 |
| 19 | #define SVID_PMIC_CONFIG 8 |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 20 | |
Frans Hendriks | f26a198 | 2019-10-02 10:16:26 +0200 | [diff] [blame] | 21 | #define IGD_MEMSIZE_32MB 0x01 |
| 22 | #define IGD_MEMSIZE_64MB 0x02 |
| 23 | #define IGD_MEMSIZE_96MB 0x03 |
| 24 | #define IGD_MEMSIZE_128MB 0x04 |
| 25 | |
fdurairx | aff502e | 2015-08-21 15:36:53 -0700 | [diff] [blame] | 26 | enum lpe_clk_src { |
Lee Leahy | 6598b91 | 2017-03-16 17:30:09 -0700 | [diff] [blame] | 27 | LPE_CLK_SRC_XTAL, |
| 28 | LPE_CLK_SRC_PLL, |
fdurairx | aff502e | 2015-08-21 15:36:53 -0700 | [diff] [blame] | 29 | }; |
| 30 | |
shkim | cc728f0 | 2015-09-22 17:53:58 +0900 | [diff] [blame] | 31 | enum 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 Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 42 | struct soc_intel_braswell_config { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 43 | uint8_t enable_xdp_tap; |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 44 | uint8_t clkreq_enable; |
| 45 | |
Frans Hendriks | 2c63017 | 2019-04-02 15:06:29 +0200 | [diff] [blame] | 46 | enum serirq_mode serirq_mode; |
| 47 | |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 48 | /* Disable SLP_X stretching after SUS power well loss */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 49 | int disable_slp_x_stretch_sus_fail; |
| 50 | |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 51 | /* LPE Audio Clock configuration */ |
| 52 | enum lpe_clk_src lpe_codec_clk_src; /* Both are 19.2MHz */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 53 | |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 54 | /* Native SD Card controller - override controller capabilities */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 55 | uint32_t sdcard_cap_low; |
| 56 | uint32_t sdcard_cap_high; |
| 57 | |
| 58 | /* Enable devices in ACPI mode */ |
| 59 | int lpss_acpi_mode; |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 60 | int emmc_acpi_mode; |
| 61 | int sd_acpi_mode; |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 62 | int lpe_acpi_mode; |
| 63 | |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 64 | /* Allow PCIe devices to wake system from suspend */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 65 | int pcie_wake_enable; |
| 66 | |
shkim | cc728f0 | 2015-09-22 17:53:58 +0900 | [diff] [blame] | 67 | /* Program USB2_COMPBG register. |
Lee Leahy | 6598b91 | 2017-03-16 17:30:09 -0700 | [diff] [blame] | 68 | * [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 | */ |
shkim | cc728f0 | 2015-09-22 17:53:58 +0900 | [diff] [blame] | 72 | enum usb_comp_bg_value usb_comp_bg; |
| 73 | |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 74 | /* |
| 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 */ |
shkim | cc728f0 | 2015-09-22 17:53:58 +0900 | [diff] [blame] | 88 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 89 | /* |
| 90 | * The following fields come from fsp_vpd.h .aka. VpdHeader.h. |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 91 | * These are configuration values that are passed to FSP during SiliconInit. |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 92 | */ |
Angel Pons | aee7ab2 | 2020-03-19 00:31:58 +0100 | [diff] [blame] | 93 | 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 DeVillier | 8ff2ecd | 2020-03-29 16:58:48 -0500 | [diff] [blame] | 159 | |
| 160 | struct i915_gpu_controller_info gfx; |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 161 | }; |
| 162 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 163 | #endif /* _SOC_CHIP_H_ */ |