blob: c6528aefba817b46f4403962c4c143453cfc9e91 [file] [log] [blame]
Dave Frodin2093c4f2014-06-13 08:12:48 -06001/*
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.
Dave Frodin2093c4f2014-06-13 08:12:48 -060014 */
15
16#ifndef _AGESA_HUDSON_PCI_DEVS_H_
17#define _AGESA_HUDSON_PCI_DEVS_H_
18
Kyösti Mälkkif7ca6722017-09-10 06:30:54 +030019#include <device/pci_def.h>
20
Dave Frodin2093c4f2014-06-13 08:12:48 -060021#define BUS0 0
22
23/* XHCI */
24#define XHCI_DEV 0x10
25#define XHCI_FUNC 0
26#define XHCI_DEVID 0x7814
27#define XHCI_DEVFN PCI_DEVFN(XHCI_DEV,XHCI_FUNC)
28
29/* SATA */
30#define SATA_DEV 0x11
31#define SATA_FUNC 0
32#define SATA_IDE_DEVID 0x7800
33#define AHCI_DEVID_MS 0x7801
34#define AHCI_DEVID_AMD 0x7804
35#define SATA_DEVFN PCI_DEVFN(SATA_DEV,SATA_FUNC)
36
37/* OHCI */
38#define OHCI1_DEV 0x12
39#define OHCI1_FUNC 0
40#define OHCI2_DEV 0x13
41#define OHCI2_FUNC 0
42#define OHCI3_DEV 0x16
43#define OHCI3_FUNC 0
44#define OHCI4_DEV 0x14
45#define OHCI4_FUNC 5
46#define OHCI_DEVID 0x7807
47#define OHCI1_DEVFN PCI_DEVFN(OHCI1_DEV,OHCI1_FUNC)
48#define OHCI2_DEVFN PCI_DEVFN(OHCI2_DEV,OHCI2_FUNC)
49#define OHCI3_DEVFN PCI_DEVFN(OHCI3_DEV,OHCI3_FUNC)
50#define OHCI4_DEVFN PCI_DEVFN(OHCI4_DEV,OHCI4_FUNC)
51
52/* EHCI */
53#define EHCI1_DEV 0x12
54#define EHCI1_FUNC 2
55#define EHCI2_DEV 0x13
56#define EHCI2_FUNC 2
Dave Frodin59919ad2014-12-14 17:29:28 -070057#define EHCI3_DEV 0x16
Dave Frodin2093c4f2014-06-13 08:12:48 -060058#define EHCI3_FUNC 2
59#define EHCI_DEVID 0x7808
60#define EHCI1_DEVFN PCI_DEVFN(EHCI1_DEV,EHCI1_FUNC)
61#define EHCI2_DEVFN PCI_DEVFN(EHCI2_DEV,EHCI2_FUNC)
62#define EHCI3_DEVFN PCI_DEVFN(EHCI3_DEV,EHCI3_FUNC)
63
64/* SMBUS */
65#define SMBUS_DEV 0x14
66#define SMBUS_FUNC 0
67#define SMBUS_DEVID 0x780B
68#define SMBUS_DEVFN PCI_DEVFN(SMBUS_DEV,SMBUS_FUNC)
69
70/* IDE */
Kyösti Mälkki109a58a2019-01-10 10:00:38 +020071#if IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_AGESA_HUDSON)
Dave Frodin2093c4f2014-06-13 08:12:48 -060072#define IDE_DEV 0x14
73#define IDE_FUNC 1
74# define IDE_DEVID 0x780C
75# define IDE_DEVFN PCI_DEVFN(IDE_DEV,IDE_FUNC)
76#endif
77
78/* HD Audio */
79#define HDA_DEV 0x14
80#define HDA_FUNC 2
81#define HDA_DEVID 0x780D
82#define HDA_DEVFN PCI_DEVFN(HDA_DEV,HDA_FUNC)
83
84/* LPC BUS */
85#define PCU_DEV 0x14
Sergej Ivanovf687c922015-04-03 16:58:19 +030086#define LPC_DEV PCU_DEV
Dave Frodin2093c4f2014-06-13 08:12:48 -060087#define LPC_FUNC 3
88#define LPC_DEVID 0x780E
89#define LPC_DEVFN PCI_DEVFN(LPC_DEV,LPC_FUNC)
90
91/* PCI Ports */
92#define SB_PCI_PORT_DEV 0x14
93#define SB_PCI_PORT_FUNC 4
94# define SB_PCI_PORT_DEVID 0x780F
95# define SB_PCI_PORT_DEVFN PCI_DEVFN(SB_PCI_PORT_DEV,SB_PCI_PORT_FUNC)
96
97/* SD Controller */
98#define SD_DEV 0x14
99#define SD_FUNC 7
100#define SD_DEVID 0x7806
101#define SD_DEVFN PCI_DEVFN(SD_DEV,SD_FUNC)
102
103/* PCIe Ports */
Kyösti Mälkki109a58a2019-01-10 10:00:38 +0200104#if IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_AGESA_HUDSON)
Dave Frodin2093c4f2014-06-13 08:12:48 -0600105#define SB_PCIE_DEV 0x15
106#define SB_PCIE_PORT1_FUNC 0
107#define SB_PCIE_PORT2_FUNC 1
108#define SB_PCIE_PORT3_FUNC 2
109#define SB_PCIE_PORT4_FUNC 3
110#define SB_PCIE_PORT1_DEVID 0x7820
111#define SB_PCIE_PORT2_DEVID 0x7821
112#define SB_PCIE_PORT3_DEVID 0x7822
113#define SB_PCIE_PORT4_DEVID 0x7823
114#define SB_PCIE_PORT1_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT1_FUNC)
115#define SB_PCIE_PORT2_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT2_FUNC)
116#define SB_PCIE_PORT3_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT3_FUNC)
117#define SB_PCIE_PORT4_DEVFN PCI_DEVFN(SB_PCIE_DEV,SB_PCIE_PORT4_FUNC)
118#endif
119
120#endif /* _AGESA_HUDSON_PCI_DEVS_H_ */