blob: 76480e51ee8e803bc6af11e976e37eed9cbc594c [file] [log] [blame]
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Sage Electronic Engineering, LLC.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030014 */
15
16#ifndef _PI_HUDSON_PCI_DEVS_H_
17#define _PI_HUDSON_PCI_DEVS_H_
18
Marshall Dawsonc1f32332017-04-21 13:54:08 -060019#define BUS0 0
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030020
21/* XHCI */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060022#define XHCI_DEV 0x10
23#define XHCI_FUNC 0
24#define XHCI_DEVID 0x7814
25#define XHCI_DEVFN PCI_DEVFN(XHCI_DEV,XHCI_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030026
Marshall Dawsonc1f32332017-04-21 13:54:08 -060027#define XHCI2_DEV 0x10
28#define XHCI2_FUNC 1
29#define XHCI2_DEVID 0x7814
30#define XHCI2_DEVFN PCI_DEVFN(XHCI2_DEV,XHCI2_FUNC)
Dave Frodin9cfa7422015-01-27 07:19:48 -070031
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030032/* SATA */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060033#define SATA_DEV 0x11
34#define SATA_FUNC 0
35#define SATA_IDE_DEVID 0x7800
36#define AHCI_DEVID_MS 0x7801
37#define AHCI_DEVID_AMD 0x7804
38#define SATA_DEVFN PCI_DEVFN(SATA_DEV,SATA_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030039
40/* OHCI */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060041#define OHCI1_DEV 0x12
42#define OHCI1_FUNC 0
43#define OHCI2_DEV 0x13
44#define OHCI2_FUNC 0
45#define OHCI3_DEV 0x16
46#define OHCI3_FUNC 0
47#define OHCI4_DEV 0x14
48#define OHCI4_FUNC 5
49#define OHCI_DEVID 0x7807
50#define OHCI1_DEVFN PCI_DEVFN(OHCI1_DEV,OHCI1_FUNC)
51#define OHCI2_DEVFN PCI_DEVFN(OHCI2_DEV,OHCI2_FUNC)
52#define OHCI3_DEVFN PCI_DEVFN(OHCI3_DEV,OHCI3_FUNC)
53#define OHCI4_DEVFN PCI_DEVFN(OHCI4_DEV,OHCI4_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030054
55/* EHCI */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060056#define EHCI1_DEV 0x12
57#define EHCI1_FUNC 2
58#define EHCI2_DEV 0x13
59#define EHCI2_FUNC 2
60#define EHCI3_DEV 0x16
61#define EHCI3_FUNC 2
62#define EHCI_DEVID 0x7808
63#define EHCI1_DEVFN PCI_DEVFN(EHCI1_DEV,EHCI1_FUNC)
64#define EHCI2_DEVFN PCI_DEVFN(EHCI2_DEV,EHCI2_FUNC)
65#define EHCI3_DEVFN PCI_DEVFN(EHCI3_DEV,EHCI3_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030066
67/* SMBUS */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060068#define SMBUS_DEV 0x14
69#define SMBUS_FUNC 0
70#define SMBUS_DEVID 0x780B
71#define SMBUS_DEVFN PCI_DEVFN(SMBUS_DEV,SMBUS_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030072
Dave Frodin9cfa7422015-01-27 07:19:48 -070073/* IDE */
74#if IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_PI_BOLTON)
Marshall Dawsonc1f32332017-04-21 13:54:08 -060075#define IDE_DEV 0x14
76#define IDE_FUNC 1
77#define IDE_DEVID 0x780C
78#define IDE_DEVFN PCI_DEVFN(IDE_DEV,IDE_FUNC)
Dave Frodin9cfa7422015-01-27 07:19:48 -070079#endif
80
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030081/* HD Audio */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060082#define HDA_DEV 0x14
83#define HDA_FUNC 2
84#define HDA_DEVID 0x780D
85#define HDA_DEVFN PCI_DEVFN(HDA_DEV,HDA_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030086
87/* LPC BUS */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060088#define PCU_DEV 0x14
89#define LPC_FUNC 3
90#define LPC_DEVID 0x780E
91#define LPC_DEVFN PCI_DEVFN(LPC_DEV,LPC_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030092
93/* PCI Ports */
Marshall Dawsonc1f32332017-04-21 13:54:08 -060094#define SB_PCI_PORT_DEV 0x14
95#define SB_PCI_PORT_FUNC 4
96#define SB_PCI_PORT_DEVID 0x780F
97#define SB_PCI_PORT_DEVFN PCI_DEVFN(SB_PCI_PORT_DEV,SB_PCI_PORT_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030098
99/* SD Controller */
Marshall Dawsonc1f32332017-04-21 13:54:08 -0600100#define SD_DEV 0x14
101#define SD_FUNC 7
102#define SD_DEVID 0x7806
103#define SD_DEVFN PCI_DEVFN(SD_DEV,SD_FUNC)
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +0300104
Dave Frodin9cfa7422015-01-27 07:19:48 -0700105/* PCIe Ports */
106#if IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_PI_BOLTON)
Marshall Dawsonc1f32332017-04-21 13:54:08 -0600107#define SB_PCIE_DEV 0x15
108#define SB_PCIE_PORT1_FUNC 0
109#define SB_PCIE_PORT2_FUNC 1
110#define SB_PCIE_PORT3_FUNC 2
111#define SB_PCIE_PORT4_FUNC 3
112#define SB_PCIE_PORT1_DEVID 0x7820
113#define SB_PCIE_PORT2_DEVID 0x7821
114#define SB_PCIE_PORT3_DEVID 0x7822
115#define SB_PCIE_PORT4_DEVID 0x7823
116#define SB_PCIE_PORT1_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT1_FUNC)
117#define SB_PCIE_PORT2_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT2_FUNC)
118#define SB_PCIE_PORT3_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT3_FUNC)
119#define SB_PCIE_PORT4_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT4_FUNC)
Dave Frodin9cfa7422015-01-27 07:19:48 -0700120#endif
121
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +0300122#endif /* _PI_HUDSON_PCI_DEVS_H_ */