3 #ifndef SOUTHBRIDGE_INTEL_BD82X6X_PCH_H
4 #define SOUTHBRIDGE_INTEL_BD82X6X_PCH_H
9 #define PCH_TYPE_CPT 0x1c
10 #define PCH_TYPE_PPT 0x1e
11 #define PCH_TYPE_MOBILE5 0x3b
21 #define SMBUS_SLAVE_ADDR 0x24
23 #define DEFAULT_GPIOBASE 0x0480
24 #define DEFAULT_PMBASE 0x0500
25 #define DEFAULT_HECIBAR ((u8 *)0xfed17000)
66 #define MAINBOARD_POWER_OFF 0
67 #define MAINBOARD_POWER_ON 1
68 #define MAINBOARD_POWER_KEEP 2
72 #define UPRWC_WR_EN (1 << 1)
80 #define PCH_EHCI1_DEV PCI_DEV(0, 0x1d, 0)
81 #define PCH_EHCI2_DEV PCI_DEV(0, 0x1a, 0)
82 #define PCH_XHCI_DEV PCI_DEV(0, 0x14, 0)
83 #define PCH_ME_DEV PCI_DEV(0, 0x16, 0)
84 #define PCH_PCIE_DEV_SLOT 28
87 #define PCH_LPC_DEV PCI_DEV(0, 0x1f, 0)
88 #define SERIRQ_CNTL 0x64
90 #define GEN_PMCON_1 0xa0
91 #define GEN_PMCON_2 0xa2
92 #define GEN_PMCON_3 0xa4
94 #define ETR3_CWORWRE (1 << 18)
95 #define ETR3_CF9GR (1 << 20)
101 #define RTC_BATTERY_DEAD (1 << 2)
102 #define RTC_POWER_FAILED (1 << 1)
103 #define SLEEP_AFTER_POWER_FAIL (1 << 0)
106 #define ACPI_CNTL 0x44
107 #define ACPI_EN (1 << 7)
108 #define BIOS_CNTL 0xDC
109 #define GPIO_BASE 0x48
110 #define GPIO_CNTL 0x4C
112 #define GPIO_ROUT 0xb8
113 #define GPI_DISABLE 0x00
114 #define GPI_IS_SMI 0x01
115 #define GPI_IS_SCI 0x02
116 #define GPI_IS_NMI 0x03
118 #define PIRQA_ROUT 0x60
119 #define PIRQB_ROUT 0x61
120 #define PIRQC_ROUT 0x62
121 #define PIRQD_ROUT 0x63
122 #define PIRQE_ROUT 0x68
123 #define PIRQF_ROUT 0x69
124 #define PIRQG_ROUT 0x6A
125 #define PIRQH_ROUT 0x6B
127 #define LPC_IO_DEC 0x80
129 #define CNF2_LPC_EN (1 << 13)
130 #define CNF1_LPC_EN (1 << 12)
131 #define MC_LPC_EN (1 << 11)
132 #define KBC_LPC_EN (1 << 10)
133 #define GAMEH_LPC_EN (1 << 9)
134 #define GAMEL_LPC_EN (1 << 8)
135 #define FDD_LPC_EN (1 << 3)
136 #define LPT_LPC_EN (1 << 2)
137 #define COMB_LPC_EN (1 << 1)
138 #define COMA_LPC_EN (1 << 0)
139 #define LPC_GEN1_DEC 0x84
140 #define LPC_GEN2_DEC 0x88
141 #define LPC_GEN3_DEC 0x8c
142 #define LPC_GEN4_DEC 0x90
145 #define PCH_SATA_DEV PCI_DEV(0, 0x1f, 2)
146 #define PCH_SATA2_DEV PCI_DEV(0, 0x1f, 5)
148 #define IDE_TIM_PRI 0x40
149 #define IDE_DECODE_ENABLE (1 << 15)
150 #define IDE_TIM_SEC 0x42
152 #define SATA_SIRI 0xa0
153 #define SATA_SIRD 0xa4
157 #define SATA_IOBP_SP0G3IR 0xea000151
158 #define SATA_IOBP_SP1G3IR 0xea000051
161 #define PCH_SMBUS_DEV PCI_DEV(0, 0x1f, 3)
162 #define SMB_BASE 0x20
166 #define I2C_EN (1 << 2)
167 #define SMB_SMI_EN (1 << 1)
168 #define HST_EN (1 << 0)
172 #define GPIOBASE 0x48
214 #define RPFN_HIDE(port) (1 << (((port) * 4) + 3))
216 #define RPFN_FNGET(reg,port) (((reg) >> ((port) * 4)) & 7)
218 #define RPFN_FNSET(port,func) (((func) & 7) << ((port) * 4))
220 #define RPFN_FNMASK(port) (7 << ((port) * 4))
254 #define IOBPIRI 0x2330
257 #define IOBPS_RW_BX ((1 << 9)|(1 << 10))
258 #define IOBPS_WRITE_AX ((1 << 9)|(1 << 10))
259 #define IOBPS_READ_AX ((1 << 8)|(1 << 9)|(1 << 10))
262 #define D31IP_TTIP 24
263 #define D31IP_SIP2 20
264 #define D31IP_UNKIP 16
265 #define D31IP_SMIP 12
272 #define D28IP_P8IP 28
273 #define D28IP_P7IP 24
274 #define D28IP_P6IP 20
275 #define D28IP_P5IP 16
276 #define D28IP_P4IP 12
287 #define D22IP_KTIP 12
288 #define D22IP_IDERIP 8
289 #define D22IP_MEI2IP 4
290 #define D22IP_MEI1IP 0
292 #define D20IP_XHCIIP 0
303 #define SOFT_RESET_CTRL 0x38f4
304 #define SOFT_RESET_DATA 0x38f8
323 #define DIR_ROUTE(x,a,b,c,d) \
324 RCBA32(x) = (((d) << DIR_IDR) | ((c) << DIR_ICR) | \
325 ((b) << DIR_IBR) | ((a) << DIR_IAR))
331 #define PCH_DISABLE_GBE (1 << 5)
333 #define DISPBDF 0x3424
338 #define PCH_DISABLE_ALWAYS ((1 << 0)|(1 << 26))
339 #define PCH_DISABLE_P2P (1 << 1)
340 #define PCH_DISABLE_SATA1 (1 << 2)
341 #define PCH_DISABLE_SMBUS (1 << 3)
342 #define PCH_DISABLE_HD_AUDIO (1 << 4)
343 #define PCH_DISABLE_EHCI2 (1 << 13)
344 #define PCH_DISABLE_LPC (1 << 14)
345 #define PCH_DISABLE_EHCI1 (1 << 15)
346 #define PCH_DISABLE_PCIE(x) (1 << (16 + x))
347 #define PCH_DISABLE_THERMAL (1 << 24)
348 #define PCH_DISABLE_SATA2 (1 << 25)
349 #define PCH_DISABLE_XHCI (1 << 27)
352 #define PCH_DISABLE_KT (1 << 4)
353 #define PCH_DISABLE_IDER (1 << 3)
354 #define PCH_DISABLE_MEI2 (1 << 2)
355 #define PCH_DISABLE_MEI1 (1 << 1)
356 #define PCH_ENABLE_DBDF (1 << 0)
359 #define USBIR0 0x3500
360 #define USBIR1 0x3504
361 #define USBIR2 0x3508
362 #define USBIR3 0x350c
363 #define USBIR4 0x3510
364 #define USBIR5 0x3514
365 #define USBIR6 0x3518
366 #define USBIR7 0x351c
367 #define USBIR8 0x3520
368 #define USBIR9 0x3524
369 #define USBIR10 0x3528
370 #define USBIR11 0x352c
371 #define USBIR12 0x3530
372 #define USBIR13 0x3534
374 #define USBIRC 0x3564
375 #define USBIRA 0x3570
376 #define USBIRB 0x357c
379 #define MISCCTL 0x3590
381 #define USBPDO 0x359c
383 #define USBOCM1 0x35a0
384 #define USBOCM2 0x35a4
386 #define RMHWKCTL 0x35b0
390 #define WAK_STS (1 << 15)
391 #define PCIEXPWAK_STS (1 << 14)
392 #define PRBTNOR_STS (1 << 11)
393 #define RTC_STS (1 << 10)
394 #define PWRBTN_STS (1 << 8)
395 #define GBL_STS (1 << 5)
396 #define BM_STS (1 << 4)
397 #define TMROF_STS (1 << 0)
399 #define PCIEXPWAK_DIS (1 << 14)
400 #define RTC_EN (1 << 10)
401 #define PWRBTN_EN (1 << 8)
402 #define GBL_EN (1 << 5)
403 #define TMROF_EN (1 << 0)
405 #define GBL_RLS (1 << 2)
406 #define BM_RLD (1 << 1)
407 #define SCI_EN (1 << 0)
409 #define PROC_CNT 0x10
414 #define GPE0_STS 0x20
415 #define PME_B0_STS (1 << 13)
416 #define PME_STS (1 << 11)
417 #define BATLOW_STS (1 << 10)
418 #define PCI_EXP_STS (1 << 9)
419 #define RI_STS (1 << 8)
420 #define SMB_WAK_STS (1 << 7)
421 #define TCOSCI_STS (1 << 6)
422 #define SWGPE_STS (1 << 2)
423 #define HOT_PLUG_STS (1 << 1)
425 #define PME_B0_EN (1 << 13)
426 #define PME_EN (1 << 11)
427 #define TCOSCI_EN (1 << 6)
429 #define INTEL_USB2_EN (1 << 18)
430 #define LEGACY_USB2_EN (1 << 17)
431 #define PERIODIC_EN (1 << 14)
432 #define TCO_EN (1 << 13)
433 #define MCSMI_EN (1 << 11)
434 #define BIOS_RLS (1 << 7)
435 #define SWSMI_TMR_EN (1 << 6)
436 #define APMC_EN (1 << 5)
437 #define SLP_SMI_EN (1 << 4)
438 #define LEGACY_USB_EN (1 << 3)
439 #define BIOS_EN (1 << 2)
441 #define GBL_SMI_EN (1 << 0)
443 #define ALT_GP_SMI_EN 0x38
444 #define ALT_GP_SMI_STS 0x3a
445 #define GPE_CNTL 0x42
446 #define DEVACT_STS 0x44
449 #define TCO1_STS 0x64
450 #define DMISCI_STS (1 << 9)
451 #define TCO2_STS 0x66
453 #define SPIBAR_HSFS 0x3804
454 #define SPIBAR_HSFS_SCIP (1 << 5)
455 #define SPIBAR_HSFS_AEL (1 << 2)
456 #define SPIBAR_HSFS_FCERR (1 << 1)
457 #define SPIBAR_HSFS_FDONE (1 << 0)
458 #define SPIBAR_HSFC 0x3806
459 #define SPIBAR_HSFC_BYTE_COUNT(c) (((c - 1) & 0x3f) << 8)
460 #define SPIBAR_HSFC_CYCLE_READ (0 << 1)
461 #define SPIBAR_HSFC_CYCLE_WRITE (2 << 1)
462 #define SPIBAR_HSFC_CYCLE_ERASE (3 << 1)
463 #define SPIBAR_HSFC_GO (1 << 0)
464 #define SPIBAR_FADDR 0x3808
465 #define SPIBAR_FDATA(n) (0x3810 + (4 * n))
void early_thermal_init(void)
void southbridge_configure_default_intmap(void)
void early_pch_init(void)
void enable_usb_bar(void)
void pch_iobp_update(u32 address, u32 andvalue, u32 orvalue)
void early_usb_init(const struct southbridge_usb_port *portmap)
void pch_enable(struct device *dev)
const struct southbridge_usb_port mainboard_usb_ports[14]
void pch_setup_cir(int chipset_type)
void ibexpeak_setup_bars(void)