blob: c22f75816eba6b326f2da0e6d6cbf6ed46f15efe [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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef _PI_HUDSON_PCI_DEVS_H_
21#define _PI_HUDSON_PCI_DEVS_H_
22
23#define BUS0 0
24
25/* XHCI */
26#define XHCI_DEV 0x10
27#define XHCI_FUNC 0
28#define XHCI_DEVID 0x7814
29#define XHCI_DEVFN PCI_DEVFN(XHCI_DEV,XHCI_FUNC)
30
Dave Frodin9cfa7422015-01-27 07:19:48 -070031#define XHCI2_DEV 0x10
32#define XHCI2_FUNC 1
33#define XHCI2_DEVID 0x7814
34#define XHCI2_DEVFN PCI_DEVFN(XHCI2_DEV,XHCI2_FUNC)
35
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030036/* SATA */
37#define SATA_DEV 0x11
38#define SATA_FUNC 0
39#define SATA_IDE_DEVID 0x7800
40#define AHCI_DEVID_MS 0x7801
41#define AHCI_DEVID_AMD 0x7804
42#define SATA_DEVFN PCI_DEVFN(SATA_DEV,SATA_FUNC)
43
44/* OHCI */
45#define OHCI1_DEV 0x12
46#define OHCI1_FUNC 0
47#define OHCI2_DEV 0x13
48#define OHCI2_FUNC 0
49#define OHCI3_DEV 0x16
50#define OHCI3_FUNC 0
51#define OHCI4_DEV 0x14
52#define OHCI4_FUNC 5
53#define OHCI_DEVID 0x7807
54#define OHCI1_DEVFN PCI_DEVFN(OHCI1_DEV,OHCI1_FUNC)
55#define OHCI2_DEVFN PCI_DEVFN(OHCI2_DEV,OHCI2_FUNC)
56#define OHCI3_DEVFN PCI_DEVFN(OHCI3_DEV,OHCI3_FUNC)
57#define OHCI4_DEVFN PCI_DEVFN(OHCI4_DEV,OHCI4_FUNC)
58
59/* EHCI */
60#define EHCI1_DEV 0x12
61#define EHCI1_FUNC 2
62#define EHCI2_DEV 0x13
63#define EHCI2_FUNC 2
Paul Menzel68402102014-12-15 07:55:52 +010064#define EHCI3_DEV 0x16
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030065#define EHCI3_FUNC 2
66#define EHCI_DEVID 0x7808
67#define EHCI1_DEVFN PCI_DEVFN(EHCI1_DEV,EHCI1_FUNC)
68#define EHCI2_DEVFN PCI_DEVFN(EHCI2_DEV,EHCI2_FUNC)
69#define EHCI3_DEVFN PCI_DEVFN(EHCI3_DEV,EHCI3_FUNC)
70
71/* SMBUS */
72#define SMBUS_DEV 0x14
73#define SMBUS_FUNC 0
74#define SMBUS_DEVID 0x780B
75#define SMBUS_DEVFN PCI_DEVFN(SMBUS_DEV,SMBUS_FUNC)
76
Dave Frodin9cfa7422015-01-27 07:19:48 -070077/* IDE */
78#if IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_PI_BOLTON)
79#define IDE_DEV 0x14
80#define IDE_FUNC 1
81# define IDE_DEVID 0x780C
82# define IDE_DEVFN PCI_DEVFN(IDE_DEV,IDE_FUNC)
83#endif
84
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030085/* HD Audio */
86#define HDA_DEV 0x14
87#define HDA_FUNC 2
88#define HDA_DEVID 0x780D
89#define HDA_DEVFN PCI_DEVFN(HDA_DEV,HDA_FUNC)
90
91/* LPC BUS */
92#define PCU_DEV 0x14
93#define LPC_FUNC 3
94#define LPC_DEVID 0x780E
95#define LPC_DEVFN PCI_DEVFN(LPC_DEV,LPC_FUNC)
96
97/* PCI Ports */
98#define SB_PCI_PORT_DEV 0x14
99#define SB_PCI_PORT_FUNC 4
100# define SB_PCI_PORT_DEVID 0x780F
101# define SB_PCI_PORT_DEVFN PCI_DEVFN(SB_PCI_PORT_DEV,SB_PCI_PORT_FUNC)
102
103/* SD Controller */
104#define SD_DEV 0x14
105#define SD_FUNC 7
106#define SD_DEVID 0x7806
107#define SD_DEVFN PCI_DEVFN(SD_DEV,SD_FUNC)
108
Dave Frodin9cfa7422015-01-27 07:19:48 -0700109/* PCIe Ports */
110#if IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_PI_BOLTON)
111#define SB_PCIE_DEV 0x15
112#define SB_PCIE_PORT1_FUNC 0
113#define SB_PCIE_PORT2_FUNC 1
114#define SB_PCIE_PORT3_FUNC 2
115#define SB_PCIE_PORT4_FUNC 3
116#define SB_PCIE_PORT1_DEVID 0x7820
117#define SB_PCIE_PORT2_DEVID 0x7821
118#define SB_PCIE_PORT3_DEVID 0x7822
119#define SB_PCIE_PORT4_DEVID 0x7823
120#define SB_PCIE_PORT1_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT1_FUNC)
121#define SB_PCIE_PORT2_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT2_FUNC)
122#define SB_PCIE_PORT3_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT3_FUNC)
123#define SB_PCIE_PORT4_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT4_FUNC)
124#endif
125
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +0300126#endif /* _PI_HUDSON_PCI_DEVS_H_ */