blob: 572cd6ab52519e3296c5e4046951ee558fb4a4a4 [file] [log] [blame]
Maxim Polyakov1217af52019-02-25 11:06:19 +03001##
2## This file is part of the coreboot project.
3##
4## Copyright (C) 2017 Intel Corporation.
5## Copyright (C) 2019 Maxim Polyakov <max.senia.poliak@gmail.com>
6##
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.
15##
16
17chip soc/intel/skylake
18
19 # Enable deep Sx states
20 register "deep_s3_enable_ac" = "0"
21 register "deep_s3_enable_dc" = "0"
22 register "deep_s5_enable_ac" = "0"
23 register "deep_s5_enable_dc" = "0"
24 register "deep_sx_config" = "DSX_EN_WAKE_PIN"
25
26 register "eist_enable" = "1"
27
28 # GPE configuration
29 # Note that GPE events called out in ASL code rely on this
30 # route. i.e. If this route changes then the affected GPE
31 # offset bits also need to be changed.
32 register "gpe0_dw0" = "GPP_B"
33 register "gpe0_dw1" = "GPP_D"
34 register "gpe0_dw2" = "GPP_E"
35
Maxim Polyakov7d549f82019-09-11 18:56:24 +030036 # Set @0x280-0x2ff I/O Range for SuperIO HWM
37 register "gen1_dec" = "0x007c0281"
38
Maxim Polyakov1217af52019-02-25 11:06:19 +030039 # Enable "Intel Speed Shift Technology"
40 register "speed_shift_enable" = "1"
41
42 # Enable DPTF
43 register "dptf_enable" = "1"
44
45 # FSP Configuration
46 register "SmbusEnable" = "1"
47 register "ScsEmmcEnabled" = "0"
48 register "ScsEmmcHs400Enabled" = "0"
49 register "ScsSdCardEnabled" = "0"
50 register "HeciEnabled" = "0"
Maxim Polyakov1217af52019-02-25 11:06:19 +030051 register "SkipExtGfxScan" = "0"
Maxim Polyakov0de6c502019-04-03 00:44:28 +030052 register "PrimaryDisplay" = "Display_PEG"
Maxim Polyakov1217af52019-02-25 11:06:19 +030053 register "Device4Enable" = "1"
54 register "SaGv" = "SaGv_Enabled"
55 register "PmTimerDisabled" = "0"
56 register "EnableAzalia" = "1"
57 register "DspEnable" = "0"
58
59 register "pirqa_routing" = "PCH_IRQ11"
60 register "pirqb_routing" = "PCH_IRQ10"
61 register "pirqc_routing" = "PCH_IRQ11"
62 register "pirqd_routing" = "PCH_IRQ11"
63 register "pirqe_routing" = "PCH_IRQ11"
64 register "pirqf_routing" = "PCH_IRQ11"
65 register "pirqg_routing" = "PCH_IRQ11"
66 register "pirqh_routing" = "PCH_IRQ11"
67
Maxim Polyakove6a491e2019-06-26 11:17:37 +030068 # Set LPC Serial IRQ mode
69 register "serirq_mode" = "SERIRQ_CONTINUOUS"
70
Maxim Polyakov1217af52019-02-25 11:06:19 +030071 # Enabling SLP_S3#, SLP_S4#, SLP_SUS and SLP_A Stretch
72 # SLP_S3 Minimum Assertion Width. Values 0: 60us, 1: 1ms, 2: 50ms, 3: 2s
73 register "PmConfigSlpS3MinAssert" = "0x02"
74
75 # SLP_S4 Minimum Assertion Width. Values 0: default, 1: 1s, 2: 2s, 3: 3s, 4: 4s
76 register "PmConfigSlpS4MinAssert" = "0x04"
77
78 # SLP_SUS Minimum Assertion Width. Values 0: 0ms, 1: 500ms, 2: 1s, 3: 4s
79 register "PmConfigSlpSusMinAssert" = "0x03"
80
81 # SLP_A Minimum Assertion Width. Values 0: 0ms, 1: 4s, 2: 98ms, 3: 2s
82 register "PmConfigSlpAMinAssert" = "0x03"
83
84 # VR Settings Configuration for 5 Domains
85 #+----------------+-------+-------+-------------+-------------+-------+
86 #| Domain/Setting | SA | IA | Ring Sliced | GT Unsliced | GT |
87 #+----------------+-------+-------+-------------+-------------+-------+
88 #| Psi1Threshold | 20A | 20A | 20A | 20A | 20A |
89 #| Psi2Threshold | 4A | 5A | 5A | 5A | 5A |
90 #| Psi3Threshold | 1A | 1A | 1A | 1A | 1A |
91 #| Psi3Enable | 1 | 1 | 1 | 1 | 1 |
92 #| Psi4Enable | 1 | 1 | 1 | 1 | 1 |
93 #| ImonSlope | 0 | 0 | 0 | 0 | 0 |
94 #| ImonOffset | 0 | 0 | 0 | 0 | 0 |
Maxim Polyakova546f112019-08-21 14:21:03 +030095 #| IccMax* | 0 | 0 | 0 | 0 | 0 |
Maxim Polyakov1217af52019-02-25 11:06:19 +030096 #| VrVoltageLimit | 1.52V | 1.52V | 1.52V | 1.52V | 1.52V |
97 #+----------------+-------+-------+-------------+-------------+-------+
Maxim Polyakova546f112019-08-21 14:21:03 +030098 # * - is set automatically for the KBL-S/KBL-DT CPUs in the vr_config.c
Maxim Polyakov1217af52019-02-25 11:06:19 +030099 register "domain_vr_config[VR_SYSTEM_AGENT]" = "{
100 .vr_config_enable = 1, \
Maxim Polyakov6342c932019-08-21 14:47:59 +0300101 .psi1threshold = VR_CFG_AMP(20), \
102 .psi2threshold = VR_CFG_AMP(4), \
103 .psi3threshold = VR_CFG_AMP(1), \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300104 .psi3enable = 1, \
105 .psi4enable = 1, \
106 .imon_slope = 0x0, \
107 .imon_offset = 0x0, \
108 .icc_max = 0x0, \
Maxim Polyakova546f112019-08-21 14:21:03 +0300109 .voltage_limit = 1520 \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300110 }"
111
112 register "domain_vr_config[VR_IA_CORE]" = "{
113 .vr_config_enable = 1, \
Maxim Polyakov6342c932019-08-21 14:47:59 +0300114 .psi1threshold = VR_CFG_AMP(20), \
115 .psi2threshold = VR_CFG_AMP(5), \
116 .psi3threshold = VR_CFG_AMP(1), \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300117 .psi3enable = 1, \
118 .psi4enable = 1, \
119 .imon_slope = 0x0, \
120 .imon_offset = 0x0, \
121 .icc_max = 0x0, \
Maxim Polyakova546f112019-08-21 14:21:03 +0300122 .voltage_limit = 1520 \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300123 }"
124
125 register "domain_vr_config[VR_GT_UNSLICED]" = "{
126 .vr_config_enable = 1, \
Maxim Polyakov6342c932019-08-21 14:47:59 +0300127 .psi1threshold = VR_CFG_AMP(20), \
128 .psi2threshold = VR_CFG_AMP(5), \
129 .psi3threshold = VR_CFG_AMP(1), \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300130 .psi3enable = 1, \
131 .psi4enable = 1, \
132 .imon_slope = 0x0, \
133 .imon_offset = 0x0, \
134 .icc_max = 0x0 ,\
Maxim Polyakova546f112019-08-21 14:21:03 +0300135 .voltage_limit = 1520 \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300136 }"
137
138 register "domain_vr_config[VR_GT_SLICED]" = "{
139 .vr_config_enable = 1, \
Maxim Polyakov6342c932019-08-21 14:47:59 +0300140 .psi1threshold = VR_CFG_AMP(20), \
141 .psi2threshold = VR_CFG_AMP(5), \
142 .psi3threshold = VR_CFG_AMP(1), \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300143 .psi3enable = 1, \
144 .psi4enable = 1, \
145 .imon_slope = 0x0, \
146 .imon_offset = 0x0, \
147 .icc_max = 0x0, \
Maxim Polyakova546f112019-08-21 14:21:03 +0300148 .voltage_limit = 1520 \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300149 }"
150
151 register "EnableLan" = "0"
Maxim Polyakov1217af52019-02-25 11:06:19 +0300152 register "PmTimerDisabled" = "0"
153
154 # USB
155 register "usb2_ports[0]" = "USB2_PORT_MID(OC0)"
156 register "usb2_ports[1]" = "USB2_PORT_MID(OC0)"
157 register "usb2_ports[2]" = "USB2_PORT_MID(OC4)"
158 register "usb2_ports[3]" = "USB2_PORT_MID(OC4)"
159 register "usb2_ports[4]" = "USB2_PORT_MID(OC2)"
160 register "usb2_ports[5]" = "USB2_PORT_MID(OC2)"
161 register "usb2_ports[6]" = "USB2_PORT_MID(OC0)"
162 register "usb2_ports[7]" = "USB2_PORT_MID(OC0)"
163 register "usb2_ports[8]" = "USB2_PORT_MID(OC0)"
164 register "usb2_ports[9]" = "USB2_PORT_MID(OC0)"
165 register "usb2_ports[10]" = "USB2_PORT_MID(OC1)"
166 register "usb2_ports[11]" = "USB2_PORT_MID(OC1)"
167 register "usb2_ports[12]" = "USB2_PORT_MID(OC_SKIP)"
168 register "usb2_ports[13]" = "USB2_PORT_MID(OC_SKIP)"
169 register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)"
170 register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC0)"
171 register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC3)"
172 register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC3)"
173 register "usb3_ports[4]" = "USB3_PORT_DEFAULT(OC1)"
174 register "usb3_ports[5]" = "USB3_PORT_DEFAULT(OC1)"
175 register "usb3_ports[6]" = "USB3_PORT_DEFAULT(OC_SKIP)"
176 register "usb3_ports[7]" = "USB3_PORT_DEFAULT(OC_SKIP)"
177 register "usb3_ports[8]" = "USB3_PORT_DEFAULT(OC_SKIP)"
178 register "usb3_ports[9]" = "USB3_PORT_DEFAULT(OC_SKIP)"
179
180 # SATA
181 register "EnableSata" = "1"
182 register "SataSalpSupport" = "1"
183 register "SataPortsEnable" = "{ \
184 [0] = 1, \
185 [1] = 1, \
186 [2] = 1, \
187 [3] = 1, \
Maxim Polyakov50f4c5a2019-08-21 19:05:13 +0300188 [4] = 0, \
189 [5] = 0, \
190 [6] = 0, \
191 [7] = 0, \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300192 }"
Maxim Polyakov50f4c5a2019-08-21 19:05:13 +0300193 # SATA4 and SATA5 are located in the lower right corner
194 # of the board, but there is no connector for this
Maxim Polyakov1217af52019-02-25 11:06:19 +0300195
196 # PCH UART, SPI, I2C
197 register "SerialIoDevMode" = "{ \
Maxim Polyakova433da72019-08-21 16:29:07 +0300198 [PchSerialIoIndexI2C0] = PchSerialIoDisabled, \
199 [PchSerialIoIndexI2C1] = PchSerialIoDisabled, \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300200 [PchSerialIoIndexI2C2] = PchSerialIoDisabled, \
201 [PchSerialIoIndexI2C3] = PchSerialIoDisabled, \
202 [PchSerialIoIndexI2C4] = PchSerialIoDisabled, \
203 [PchSerialIoIndexI2C5] = PchSerialIoDisabled, \
Maxim Polyakova433da72019-08-21 16:29:07 +0300204 [PchSerialIoIndexSpi0] = PchSerialIoDisabled, \
Maxim Polyakov1217af52019-02-25 11:06:19 +0300205 [PchSerialIoIndexSpi1] = PchSerialIoDisabled, \
206 [PchSerialIoIndexUart0] = PchSerialIoDisabled, \
207 [PchSerialIoIndexUart1] = PchSerialIoDisabled, \
208 [PchSerialIoIndexUart2] = PchSerialIoDisabled, \
209 }"
210
Maxim Polyakov16a11812019-03-18 10:50:01 +0300211 # Set params for PEG 0:1:0
212 register "Peg0MaxLinkWidth" = "Peg0_x16"
213 # Configure PCIe clockgen in PCH
214 # PEG0 uses SRCCLKREQ0 and CLKSRC0
215 register "PcieRpClkReqSupport[0]" = "1"
216 register "PcieRpClkReqNumber[0]" = "0"
217 register "PcieRpClkSrcNumber[0]" = "0"
218
Maxim Polyakov1217af52019-02-25 11:06:19 +0300219 # Enable Root port 6(x1) for LAN.
220 register "PcieRpEnable[5]" = "1"
221 # Enable CLKREQ#
222 register "PcieRpClkReqSupport[5]" = "1"
223 # Use SRCCLKREQ1#
224 register "PcieRpClkReqNumber[5]" = "1"
225 # Enable Advanced Error Reporting
226 register "PcieRpAdvancedErrorReporting[5]" = "1"
227 # Enable Latency Tolerance Reporting Mechanism
228 register "PcieRpLtrEnable[5]" = "1"
229 # Use CLK SRC 1
230 register "PcieRpClkSrcNumber[5]" = "1"
231
232 # Enable Root port 5 (x1) for PCIE slot.
233 register "PcieRpEnable[4]" = "1"
234 # Enable CLKREQ#
235 register "PcieRpClkReqSupport[4]" = "1"
236 # Use SRCCLKREQ2#
237 register "PcieRpClkReqNumber[4]" = "2"
238 # Enable Advanced Error Reporting
239 register "PcieRpAdvancedErrorReporting[4]" = "1"
240 # Enable Latency Tolerance Reporting Mechanism
241 register "PcieRpLtrEnable[4]" = "1"
242 # Use CLK SRC 2
243 register "PcieRpClkSrcNumber[4]" = "2"
244 # Use Hot Plug subsystem
245 register "PcieRpHotPlug[4]" = "1"
246
247 # Enable Root port 7(x1) for PCIE slot.
248 register "PcieRpEnable[6]" = "1"
249 # Enable CLKREQ#
250 register "PcieRpClkReqSupport[6]" = "1"
251 # Use SRCCLKREQ3#
252 register "PcieRpClkReqNumber[6]" = "3"
253 # Enable Advanced Error Reporting
254 register "PcieRpAdvancedErrorReporting[6]" = "1"
255 # Enable Latency Tolerance Reporting Mechanism
256 register "PcieRpLtrEnable[6]" = "1"
257 # Use CLK SRC 3
258 register "PcieRpClkSrcNumber[6]" = "3"
259 # Use Hot Plug subsystem
260 register "PcieRpHotPlug[6]" = "1"
261
262 # PL2 override 91W
263 register "tdp_pl2_override" = "91"
264
265 # Send an extra VR mailbox command for the PS4 exit issue
266 register "SendVrMbxCmd" = "2"
267
268 device cpu_cluster 0 on
269 device lapic 0 on end
270 end
271 device domain 0 on
272 device pci 00.0 on # Host Bridge
273 subsystemid 0x1849 0x191f
274 end
275 device pci 01.0 on # PEG
276 subsystemid 0x1849 0x1901
277 end
278 device pci 02.0 on # Integrated Graphics Device
279 subsystemid 0x1849 0x1912
280 end
Maxim Polyakov59613ee2019-08-23 15:16:12 +0300281 device pci 04.0 on end # Thermal Subsystem
282 device pci 08.0 off end # Gaussian Mixture Model
Maxim Polyakov1217af52019-02-25 11:06:19 +0300283 device pci 14.0 on # USB xHCI
284 subsystemid 0x1849 0xa131
285 end
286 device pci 14.1 off end # USB xDCI (OTG)
287 device pci 14.2 on # Thermal Subsystem
288 subsystemid 0x1849 0xa131
289 end
290 device pci 15.0 off end # I2C #0
291 device pci 15.1 off end # I2C #1
292 device pci 15.2 off end # I2C #2
293 device pci 15.3 off end # I2C #3
294 device pci 16.0 on # Management Engine Interface 1
295 subsystemid 0x1849 0xa131
296 end
297 device pci 16.1 off end # Management Engine Interface 2
298 device pci 16.2 off end # Management Engine IDE-R
299 device pci 16.3 off end # Management Engine KT Redirection
300 device pci 16.4 off end # Management Engine Interface 3
301 device pci 17.0 on # SATA
302 subsystemid 0x1849 0xa102
303 end
304 device pci 19.0 off end # UART #2
305 device pci 19.1 off end # I2C #5
306 device pci 19.2 off end # I2C #4
307 device pci 1c.0 on end # PCI Express Port 1
308 device pci 1c.1 off end # PCI Express Port 2
309 device pci 1c.2 off end # PCI Express Port 3
310 device pci 1c.3 off end # PCI Express Port 4
311 device pci 1c.4 on end # PCI Express Port 5
312 device pci 1c.5 on end # PCI Express Port 6
313 device pci 1c.6 on end # PCI Express Port 7
314 device pci 1c.7 off end # PCI Express Port 8
315 device pci 1d.0 off end # PCI Express Port 9
316 device pci 1d.1 off end # PCI Express Port 10
317 device pci 1d.2 off end # PCI Express Port 11
318 device pci 1d.3 off end # PCI Express Port 12
319 device pci 1e.0 off end # UART #0
320 device pci 1e.1 off end # UART #1
321 device pci 1e.2 off end # GSPI #0
322 device pci 1e.3 off end # GSPI #1
323 device pci 1e.4 off end # eMMC
324 device pci 1e.5 off end # SDIO
325 device pci 1e.6 off end # SDCard
326 device pci 1f.0 on # LPC bridge
327 subsystemid 0x1849 0x1a43
328 chip superio/nuvoton/nct6791d
329 device pnp 2e.0 off end # Floppy
Maxim Polyakov66d875a2019-09-12 17:27:10 +0300330 device pnp 2e.1 on
331 # Global Control Registers
332 # Device IRQ Polarity
333 irq 0x13 = 0x00
334 irq 0x14 = 0x00
335 # Global Option
336 irq 0x24 = 0xfb
Maxim Polyakov1217af52019-02-25 11:06:19 +0300337 irq 0x27 = 0x10
Maxim Polyakov66d875a2019-09-12 17:27:10 +0300338 # Multi Function
339 irq 0x1a = 0xb0
340 irq 0x1b = 0xe6
341 irq 0x2a = 0x04
342 irq 0x2c = 0x40
343 irq 0x2d = 0x03
344
345 # Parallel Port
Maxim Polyakov1217af52019-02-25 11:06:19 +0300346 io 0x60 = 0x0378
347 irq 0x70 = 7
348 drq 0x74 = 4 # No DMA
349 irq 0xf0 = 0x3c # Printer mode
350 end
351 device pnp 2e.2 on # UART A
352 io 0x60 = 0x03f8
353 irq 0x70 = 4
354 end
355 device pnp 2e.3 on # IR
356 io 0x60 = 0x02f8
357 irq 0x70 = 3
358 end
359 device pnp 2e.5 on # PS/2 KBC
360 io 0x60 = 0x0060
361 io 0x62 = 0x0064
362 irq 0x70 = 1 # Keyboard
363 irq 0x72 = 12 # Mouse
364 end
365 device pnp 2e.6 off end # CIR
Maxim Polyakov15b0ab52019-09-12 13:43:18 +0300366 device pnp 2e.7 on # GPIO6
367 irq 0xf6 = 0xff
368 irq 0xf7 = 0xff
369 irq 0xf8 = 0xff
370 end
371 device pnp 2e.107 on # GPIO7
372 irq 0xe0 = 0x7f
373 irq 0xe1 = 0x0d
374 end
375 device pnp 2e.207 on # GPIO8
376 irq 0xe6 = 0xff
377 irq 0xe7 = 0xff
378 irq 0xed = 0xff
379 end
Maxim Polyakovdd1181032019-04-10 10:43:16 +0300380 device pnp 2e.8 off end # WDT
Maxim Polyakov15b0ab52019-09-12 13:43:18 +0300381 device pnp 2e.108 on end # GPIO0
Maxim Polyakovdd1181032019-04-10 10:43:16 +0300382 device pnp 2e.308 off end # GPIO base
383 device pnp 2e.408 off end # WDTMEM
Maxim Polyakov15b0ab52019-09-12 13:43:18 +0300384 device pnp 2e.708 on end # GPIO1
385 device pnp 2e.9 on end # GPIO2
386 device pnp 2e.109 on # GPIO3
387 irq 0xe4 = 0x7b
388 irq 0xe5 = 0x02
389 irq 0xea = 0x04
390 end
391 device pnp 2e.209 on # GPIO4
392 irq 0xf0 = 0x7f
393 irq 0xf1 = 0x80
394 end
395 device pnp 2e.309 on # GPIO5
396 irq 0xf4 = 0xdf
397 irq 0xf5 = 0xd5
398 end
Maxim Polyakovafd7ce62019-09-11 19:18:02 +0300399 device pnp 2e.a on
400 # Power RAM in S3 and let the PCH
401 # handle power failure actions
402 irq 0xe4 = 0x70
403 # Set HWM reset source to LRESET#
404 irq 0xe7 = 0x01
405 end # ACPI
Maxim Polyakov1217af52019-02-25 11:06:19 +0300406 device pnp 2e.b on # HWM, LED
407 io 0x60 = 0x0290
408 io 0x62 = 0
409 irq 0x70 = 0
410 end
411 device pnp 2e.d off end # BCLK, WDT2, WDT_MEM
412 device pnp 2e.e off end # CIR wake-up
413 device pnp 2e.f off end # GPIO PP/OD
414 device pnp 2e.14 off end # SVID, Port 80 UART
Maxim Polyakovdd1181032019-04-10 10:43:16 +0300415 device pnp 2e.16 off end # DS5
416 device pnp 2e.116 off end # DS3
417 device pnp 2e.316 off end # PCHDSW
418 device pnp 2e.416 off end # DSWWOPT
419 device pnp 2e.516 off end # DS3OPT
420 device pnp 2e.616 off end # DSDSS
421 device pnp 2e.716 off end # DSPU
Maxim Polyakov1217af52019-02-25 11:06:19 +0300422 end # superio/nuvoton/nct6791d
423 chip drivers/pc80/tpm
424 device pnp 4e.0 on end # TPM module
425 end
426 end # LPC Interface
427 device pci 1f.1 on end # P2SB
428 device pci 1f.2 on end # Power Management Controller
429 device pci 1f.3 on end # Intel HDA
430 device pci 1f.4 on end # SMBus
431 device pci 1f.5 on end # PCH SPI
432 device pci 1f.6 off end # GbE
433 end
434end