blob: 8ad0c1756bfff4b9bab12ab5cb326f992cfdbf57 [file] [log] [blame]
Vladimir Serbinenko3129f792014-10-15 21:51:47 +02001package main
2
3import (
4 "fmt"
5 "os"
6)
7
8type bd82x6x struct {
9 variant string
10 node *DevTreeNode
11}
12
13func (b bd82x6x) writeGPIOSet(ctx Context, sb *os.File,
Arthur Heymans128205fd2017-05-01 09:40:43 +020014 val uint32, set uint, partno int, constraint uint32) {
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020015
16 max := uint(32)
17 if set == 3 {
18 max = 12
19 }
20
21 bits := [6][2]string{
22 {"GPIO_MODE_NATIVE", "GPIO_MODE_GPIO"},
23 {"GPIO_DIR_OUTPUT", "GPIO_DIR_INPUT"},
24 {"GPIO_LEVEL_LOW", "GPIO_LEVEL_HIGH"},
25 {"GPIO_RESET_PWROK", "GPIO_RESET_RSMRST"},
26 {"GPIO_NO_INVERT", "GPIO_INVERT"},
27 {"GPIO_NO_BLINK", "GPIO_BLINK"},
28 }
29
30 for i := uint(0); i < max; i++ {
Arthur Heymans6beaef92019-06-16 23:29:23 +020031 if (constraint>>i)&1 == 1 {
Arthur Heymans128205fd2017-05-01 09:40:43 +020032 fmt.Fprintf(sb, " .gpio%d = %s,\n",
33 (set-1)*32+i,
34 bits[partno][(val>>i)&1])
35 }
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020036 }
37}
38
39func (b bd82x6x) GPIO(ctx Context, inteltool InteltoolData) {
Arthur Heymans128205fd2017-05-01 09:40:43 +020040 var constraint uint32
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020041 gpio := Create(ctx, "gpio.c")
42 defer gpio.Close()
43
Angel Pons6779d232020-01-08 15:05:56 +010044 AddBootBlockFile("gpio.c", "")
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020045 AddROMStageFile("gpio.c", "")
46
Arthur Heymans59302852017-05-01 10:33:56 +020047 Add_gpl(gpio)
Arthur Heymans128205fd2017-05-01 09:40:43 +020048 gpio.WriteString("#include <southbridge/intel/common/gpio.h>\n\n")
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020049
Arthur Heymans128205fd2017-05-01 09:40:43 +020050 addresses := [3][6]int{
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020051 {0x00, 0x04, 0x0c, 0x60, 0x2c, 0x18},
52 {0x30, 0x34, 0x38, 0x64, -1, -1},
53 {0x40, 0x44, 0x48, 0x68, -1, -1},
54 }
55
56 for set := 1; set <= 3; set++ {
57 for partno, part := range []string{"mode", "direction", "level", "reset", "invert", "blink"} {
Arthur Heymans128205fd2017-05-01 09:40:43 +020058 addr := addresses[set-1][partno]
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020059 if addr < 0 {
60 continue
61 }
Arthur Heymans128205fd2017-05-01 09:40:43 +020062 fmt.Fprintf(gpio, "static const struct pch_gpio_set%d pch_gpio_set%d_%s = {\n",
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020063 set, set, part)
64
Arthur Heymans128205fd2017-05-01 09:40:43 +020065 constraint = 0xffffffff
66 switch part {
67 case "direction":
68 /* Ignored on native mode */
69 constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
70 case "level":
71 /* Level doesn't matter for input */
72 constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
73 constraint &^= inteltool.GPIO[uint16(addresses[set-1][1])]
74 case "reset":
75 /* Only show reset */
76 constraint = inteltool.GPIO[uint16(addresses[set-1][3])]
77 case "invert":
78 /* Only on input and only show inverted GPIO */
79 constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
80 constraint &= inteltool.GPIO[uint16(addresses[set-1][1])]
81 constraint &= inteltool.GPIO[uint16(addresses[set-1][4])]
82 case "blink":
83 /* Only on output and only show blinking GPIO */
84 constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
85 constraint &^= inteltool.GPIO[uint16(addresses[set-1][1])]
86 constraint &= inteltool.GPIO[uint16(addresses[set-1][5])]
87 }
88 b.writeGPIOSet(ctx, gpio, inteltool.GPIO[uint16(addr)], uint(set), partno, constraint)
Vladimir Serbinenko3129f792014-10-15 21:51:47 +020089 gpio.WriteString("};\n\n")
90 }
91 }
92
93 gpio.WriteString(`const struct pch_gpio_map mainboard_gpio_map = {
94 .set1 = {
95 .mode = &pch_gpio_set1_mode,
96 .direction = &pch_gpio_set1_direction,
97 .level = &pch_gpio_set1_level,
98 .blink = &pch_gpio_set1_blink,
99 .invert = &pch_gpio_set1_invert,
100 .reset = &pch_gpio_set1_reset,
101 },
102 .set2 = {
103 .mode = &pch_gpio_set2_mode,
104 .direction = &pch_gpio_set2_direction,
105 .level = &pch_gpio_set2_level,
106 .reset = &pch_gpio_set2_reset,
107 },
108 .set3 = {
109 .mode = &pch_gpio_set3_mode,
110 .direction = &pch_gpio_set3_direction,
111 .level = &pch_gpio_set3_level,
112 .reset = &pch_gpio_set3_reset,
113 },
114};
115`)
116}
117
118func (b bd82x6x) IsPCIeHotplug(ctx Context, port int) bool {
119 portDev, ok := PCIMap[PCIAddr{Bus: 0, Dev: 0x1c, Func: port}]
120 if !ok {
121 return false
122 }
123 return (portDev.ConfigDump[0xdb] & (1 << 6)) != 0
124}
125
126func ich9GetFlashSize(ctx Context) {
127 inteltool := ctx.InfoSource.GetInteltool()
128 switch (inteltool.RCBA[0x3410] >> 10) & 3 {
129 /* SPI. All boards I've seen with sandy/ivy use SPI. */
130 case 3:
131 ROMProtocol = "SPI"
132 highflkb := uint32(0)
133 for reg := uint16(0); reg < 5; reg++ {
134 fl := (inteltool.RCBA[0x3854+4*reg] >> 16) & 0x1fff
Vladimir Serbinenko68f5f622015-05-29 21:43:42 +0200135 flkb := (fl + 1) << 2
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200136 if flkb > highflkb {
137 highflkb = flkb
138 }
139 }
140 ROMSizeKB = int(highflkb)
141 /* Shared with ME. Flashrom is unable to handle it. */
142 FlashROMSupport = "n"
143 }
144}
145
146func (b bd82x6x) GetGPIOHeader() string {
147 return "southbridge/intel/bd82x6x/pch.h"
148}
149
150func (b bd82x6x) EnableGPE(in int) {
151 b.node.Registers[fmt.Sprintf("gpi%d_routing", in)] = "2"
152}
153
154func (b bd82x6x) EncodeGPE(in int) int {
155 return in + 0x10
156}
157
158func (b bd82x6x) DecodeGPE(in int) int {
159 return in - 0x10
160}
161
162func (b bd82x6x) NeedRouteGPIOManually() {
163 b.node.Comment += ", FIXME: set gpiX_routing for EC support"
164}
165
166func (b bd82x6x) Scan(ctx Context, addr PCIDevData) {
167
168 SouthBridge = &b
169
170 inteltool := ctx.InfoSource.GetInteltool()
171 b.GPIO(ctx, inteltool)
172
173 KconfigBool["SOUTHBRIDGE_INTEL_"+b.variant] = true
174 KconfigBool["SERIRQ_CONTINUOUS_MODE"] = true
175 KconfigInt["USBDEBUG_HCD_INDEX"] = 2
176 KconfigComment["USBDEBUG_HCD_INDEX"] = "FIXME: check this"
177 dmi := ctx.InfoSource.GetDMI()
178 if dmi.Vendor == "LENOVO" {
179 KconfigInt["DRAM_RESET_GATE_GPIO"] = 10
180 } else {
181 KconfigInt["DRAM_RESET_GATE_GPIO"] = 60
182 }
183 KconfigComment["DRAM_RESET_GATE_GPIO"] = "FIXME: check this"
184
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200185 ich9GetFlashSize(ctx)
186
187 DSDTDefines = append(DSDTDefines,
188 DSDTDefine{
189 Key: "BRIGHTNESS_UP",
190 Value: "\\_SB.PCI0.GFX0.INCB",
191 },
192 DSDTDefine{
193 Key: "BRIGHTNESS_DOWN",
194 Value: "\\_SB.PCI0.GFX0.DECB",
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200195 })
196
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200197 FADT := ctx.InfoSource.GetACPI()["FACP"]
198
199 pcieHotplugMap := "{ "
200
201 for port := 0; port < 7; port++ {
202 if b.IsPCIeHotplug(ctx, port) {
203 pcieHotplugMap += "1, "
204 } else {
205 pcieHotplugMap += "0, "
206 }
207 }
208
209 if b.IsPCIeHotplug(ctx, 7) {
210 pcieHotplugMap += "1 }"
211 } else {
212 pcieHotplugMap += "0 }"
213 }
214
215 cur := DevTreeNode{
216 Chip: "southbridge/intel/bd82x6x",
217 Comment: "Intel Series 6 Cougar Point PCH",
218
219 Registers: map[string]string{
220 "sata_interface_speed_support": "0x3",
221 "gen1_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x84:0x88]),
222 "gen2_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x88:0x8c]),
223 "gen3_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x8c:0x90]),
224 "gen4_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x90:0x94]),
225 "pcie_port_coalesce": "1",
226 "pcie_hotplug_map": pcieHotplugMap,
227
228 "sata_port_map": fmt.Sprintf("0x%x", PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 2}].ConfigDump[0x92]&0x3f),
229
Arthur Heymansbc3261f2023-01-30 13:32:44 +0100230 "docking_supported": (FormatBool((FADT[113] & (1 << 1)) != 0)),
231 "spi_uvscc": fmt.Sprintf("0x%x", inteltool.RCBA[0x38c8]),
232 "spi_lvscc": fmt.Sprintf("0x%x", inteltool.RCBA[0x38c4]&^(1<<23)),
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200233 },
234 PCISlots: []PCISlot{
Arthur Heymansbc3261f2023-01-30 13:32:44 +0100235 PCISlot{PCIAddr: PCIAddr{Dev: 0x14, Func: 0}, writeEmpty: false, alias: "xhci", additionalComment: "USB 3.0 Controller"},
236 PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 0}, writeEmpty: true, alias: "mei1", additionalComment: "Management Engine Interface 1"},
237 PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 1}, writeEmpty: true, alias: "mei2", additionalComment: "Management Engine Interface 2"},
238 PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 2}, writeEmpty: true, alias: "me_ide_r", additionalComment: "Management Engine IDE-R"},
239 PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 3}, writeEmpty: true, alias: "me_kt", additionalComment: "Management Engine KT"},
240 PCISlot{PCIAddr: PCIAddr{Dev: 0x19, Func: 0}, writeEmpty: true, alias: "gbe", additionalComment: "Intel Gigabit Ethernet"},
Iru Cai9874b1a2023-02-12 08:42:24 +0800241 PCISlot{PCIAddr: PCIAddr{Dev: 0x1a, Func: 0}, writeEmpty: true, alias: "ehci2", additionalComment: "USB2 EHCI #2"},
Arthur Heymansbc3261f2023-01-30 13:32:44 +0100242 PCISlot{PCIAddr: PCIAddr{Dev: 0x1b, Func: 0}, writeEmpty: true, alias: "hda", additionalComment: "High Definition Audio"},
243 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 0}, writeEmpty: true, alias: "pcie_rp1", additionalComment: "PCIe Port #1"},
244 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 1}, writeEmpty: true, alias: "pcie_rp2", additionalComment: "PCIe Port #2"},
245 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 2}, writeEmpty: true, alias: "pcie_rp3", additionalComment: "PCIe Port #3"},
246 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 3}, writeEmpty: true, alias: "pcie_rp4", additionalComment: "PCIe Port #4"},
247 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 4}, writeEmpty: true, alias: "pcie_rp5", additionalComment: "PCIe Port #5"},
248 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 5}, writeEmpty: true, alias: "pcie_rp6", additionalComment: "PCIe Port #6"},
249 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 6}, writeEmpty: true, alias: "pcie_rp7", additionalComment: "PCIe Port #7"},
250 PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 7}, writeEmpty: true, alias: "pcie_rp8", additionalComment: "PCIe Port #8"},
251 PCISlot{PCIAddr: PCIAddr{Dev: 0x1d, Func: 0}, writeEmpty: true, alias: "ehci1", additionalComment: "USB2 EHCI #1"},
252 PCISlot{PCIAddr: PCIAddr{Dev: 0x1e, Func: 0}, writeEmpty: true, alias: "pci_bridge", additionalComment: "PCI bridge"},
253 PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 0}, writeEmpty: true, alias: "lpc", additionalComment: "LPC bridge"},
254 PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 2}, writeEmpty: true, alias: "sata1", additionalComment: "SATA Controller 1"},
255 PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 3}, writeEmpty: true, alias: "smbus", additionalComment: "SMBus"},
256 PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 5}, writeEmpty: true, alias: "sata2", additionalComment: "SATA Controller 2"},
257 PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 6}, writeEmpty: true, alias: "thermal", additionalComment: "Thermal"},
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200258 },
259 }
260
261 b.node = &cur
262
263 xhciDev, ok := PCIMap[PCIAddr{Bus: 0, Dev: 0x14, Func: 0}]
264
265 if ok {
266 cur.Registers["xhci_switchable_ports"] = FormatHexLE32(xhciDev.ConfigDump[0xd4:0xd8])
267 cur.Registers["superspeed_capable_ports"] = FormatHexLE32(xhciDev.ConfigDump[0xdc:0xe0])
268 cur.Registers["xhci_overcurrent_mapping"] = FormatHexLE32(xhciDev.ConfigDump[0xc0:0xc4])
269 }
270
271 PutPCIChip(addr, cur)
Angel Pons447e3392020-03-05 00:32:02 +0100272 PutPCIDevParent(addr, "", "lpc")
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200273
274 DSDTIncludes = append(DSDTIncludes, DSDTInclude{
Angel Pons6779d232020-01-08 15:05:56 +0100275 File: "southbridge/intel/common/acpi/platform.asl",
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200276 })
277 DSDTIncludes = append(DSDTIncludes, DSDTInclude{
Arthur Heymansbc3261f2023-01-30 13:32:44 +0100278 File: "southbridge/intel/bd82x6x/acpi/globalnvs.asl",
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200279 })
280 DSDTIncludes = append(DSDTIncludes, DSDTInclude{
Angel Pons6779d232020-01-08 15:05:56 +0100281 File: "southbridge/intel/common/acpi/sleepstates.asl",
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200282 })
283 DSDTPCI0Includes = append(DSDTPCI0Includes, DSDTInclude{
284 File: "southbridge/intel/bd82x6x/acpi/pch.asl",
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200285 })
286
Angel Pons6779d232020-01-08 15:05:56 +0100287 AddBootBlockFile("early_init.c", "")
288 AddROMStageFile("early_init.c", "")
289
290 sb := Create(ctx, "early_init.c")
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200291 defer sb.Close()
Arthur Heymans59302852017-05-01 10:33:56 +0200292 Add_gpl(sb)
Angel Pons9b1ae442019-03-16 16:12:21 +0100293
Keith Huif8838552024-05-25 19:27:32 -0400294 sb.WriteString(`#include <bootblock_common.h>
Nicholas Chin87e0b5b2021-10-09 14:11:42 -0600295#include <device/pci_ops.h>
Angel Pons1b252fc2019-01-16 21:24:59 +0100296#include <southbridge/intel/bd82x6x/pch.h>
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200297
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200298`)
Keith Huif8838552024-05-25 19:27:32 -0400299 usbPortConfig := "{\n"
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200300
301 currentMap := map[uint32]int{
302 0x20000153: 0,
303 0x20000f57: 1,
304 0x2000055b: 2,
305 0x20000f51: 3,
306 0x2000094a: 4,
Patrick Rudolphd323d842023-10-29 19:59:56 +0100307 0x2000035f: 5,
308 0x20000f53: 6,
Keith Hui51a01bd2024-05-31 22:40:22 -0400309 0x20000f5b: 7,
310 0x20000553: 9,
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200311 }
312
313 for port := uint(0); port < 14; port++ {
314 var pinmask uint32
315 OCPin := -1
316 if port < 8 {
317 pinmask = inteltool.RCBA[0x35a0]
318 } else {
319 pinmask = inteltool.RCBA[0x35a4]
320 }
321 for pin := uint(0); pin < 4; pin++ {
322 if ((pinmask >> ((port % 8) + 8*pin)) & 1) != 0 {
323 OCPin = int(pin)
324 if port >= 8 {
325 OCPin += 4
326 }
327 }
328 }
Patrick Rudolphd323d842023-10-29 19:59:56 +0100329 current, ok := currentMap[inteltool.RCBA[uint16(0x3500+4*port)]]
Patrick Rudolphd323d842023-10-29 19:59:56 +0100330 if !ok {
Keith Huif8838552024-05-25 19:27:32 -0400331 usbPortConfig += fmt.Sprintf("\t\t\t\t{%d, 0x%x, %d},\n",
332 ((inteltool.RCBA[0x359c]>>port)&1)^1,
333 inteltool.RCBA[uint16(0x3500+4*port)] & 0xfff,
334 OCPin)
335 } else {
336 usbPortConfig += fmt.Sprintf("\t\t\t\t{%d, %d, %d},\n",
337 ((inteltool.RCBA[0x359c]>>port)&1)^1,
338 current,
339 OCPin)
Patrick Rudolphd323d842023-10-29 19:59:56 +0100340 }
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200341 }
Keith Huif8838552024-05-25 19:27:32 -0400342 usbPortConfig += "\t\t\t}"
343 cur.Registers["usb_port_config"] = usbPortConfig
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200344
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200345 sb.WriteString(`
Angel Pons6779d232020-01-08 15:05:56 +0100346void bootblock_mainboard_early_init(void)
Vladimir Serbinenko609bd942016-01-31 14:00:54 +0100347{
Angel Pons6779d232020-01-08 15:05:56 +0100348`)
349 RestorePCI16Simple(sb, addr, 0x82)
Vladimir Serbinenko609bd942016-01-31 14:00:54 +0100350
Angel Pons6779d232020-01-08 15:05:56 +0100351 RestorePCI16Simple(sb, addr, 0x80)
352
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200353 sb.WriteString("}\n")
354
Iru Cai1e2676b2019-01-12 21:05:10 +0800355 gnvs := Create(ctx, "acpi_tables.c")
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200356 defer gnvs.Close()
357
Arthur Heymans59302852017-05-01 10:33:56 +0200358 Add_gpl(gnvs)
Kyösti Mälkki732eaf22021-01-08 07:25:47 +0200359 gnvs.WriteString(`#include <acpi/acpi_gnvs.h>
Nicholas Chin87e0b5b2021-10-09 14:11:42 -0600360#include <soc/nvs.h>
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200361
362/* FIXME: check this function. */
Kyösti Mälkki732eaf22021-01-08 07:25:47 +0200363void mainboard_fill_gnvs(struct global_nvs *gnvs)
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200364{
Angel Pons6779d232020-01-08 15:05:56 +0100365 /* The lid is open by default. */
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200366 gnvs->lids = 1;
367
Peter Lemenkovf04b2622020-04-17 10:36:41 +0200368 /* Temperature at which OS will shutdown */
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200369 gnvs->tcrt = 100;
Peter Lemenkovf04b2622020-04-17 10:36:41 +0200370 /* Temperature at which OS will throttle CPU */
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200371 gnvs->tpsv = 90;
372}
373`)
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200374}
375
376func init() {
377 /* BD82X6X LPC */
Vladimir Serbinenko42d55e02016-01-02 01:47:26 +0100378 for id := 0x1c40; id <= 0x1c5f; id++ {
Vladimir Serbinenko6b2d83c2016-01-11 18:43:25 +0100379 RegisterPCI(0x8086, uint16(id), bd82x6x{variant: "BD82X6X"})
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200380 }
381
382 /* C216 LPC */
Vladimir Serbinenko42d55e02016-01-02 01:47:26 +0100383 for id := 0x1e41; id <= 0x1e5f; id++ {
Vladimir Serbinenko6b2d83c2016-01-11 18:43:25 +0100384 RegisterPCI(0x8086, uint16(id), bd82x6x{variant: "C216"})
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200385 }
386
387 /* PCIe bridge */
388 for _, id := range []uint16{
Angel Pons8296fdd2019-02-10 19:52:51 +0100389 0x1c10, 0x1c12, 0x1c14, 0x1c16,
390 0x1c18, 0x1c1a, 0x1c1c, 0x1c1e,
391 0x1e10, 0x1e12, 0x1e14, 0x1e16,
392 0x1e18, 0x1e1a, 0x1e1c, 0x1e1e,
393 0x1e25, 0x244e, 0x2448,
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200394 } {
395 RegisterPCI(0x8086, id, GenericPCI{})
396 }
397
398 /* SMBus controller */
399 RegisterPCI(0x8086, 0x1c22, GenericPCI{MissingParent: "smbus"})
400 RegisterPCI(0x8086, 0x1e22, GenericPCI{MissingParent: "smbus"})
401
402 /* SATA */
403 for _, id := range []uint16{
404 0x1c00, 0x1c01, 0x1c02, 0x1c03,
405 0x1e00, 0x1e01, 0x1e02, 0x1e03,
406 } {
407 RegisterPCI(0x8086, id, GenericPCI{})
408 }
409
410 /* EHCI */
411 for _, id := range []uint16{
412 0x1c26, 0x1c2d, 0x1e26, 0x1e2d,
413 } {
414 RegisterPCI(0x8086, id, GenericPCI{})
415 }
416
417 /* XHCI */
418 RegisterPCI(0x8086, 0x1e31, GenericPCI{})
419
420 /* ME and children */
421 for _, id := range []uint16{
422 0x1c3a, 0x1c3b, 0x1c3c, 0x1c3d,
423 0x1e3a, 0x1e3b, 0x1e3c, 0x1e3d,
424 } {
425 RegisterPCI(0x8086, id, GenericPCI{})
426 }
427
428 /* Ethernet */
429 RegisterPCI(0x8086, 0x1502, GenericPCI{})
Dan Elkouby3781e1f2018-03-24 21:15:08 +0300430 RegisterPCI(0x8086, 0x1503, GenericPCI{})
Vladimir Serbinenko3129f792014-10-15 21:51:47 +0200431
432}