coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pci_devs.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef AMD_SABRINA_PCI_DEVS_H
4 #define AMD_SABRINA_PCI_DEVS_H
5 
6 #include <device/pci_def.h>
7 #include <amdblocks/pci_devs.h>
8 
9 /* GNB Root Complex */
10 #define GNB_DEV 0x0
11 #define GNB_FUNC 0
12 #define GNB_DEVFN PCI_DEVFN(GNB_DEV, GNB_FUNC)
13 #define SOC_GNB_DEV _SOC_DEV(GNB_DEV, GNB_FUNC)
14 
15 /* IOMMU */
16 #define IOMMU_DEV 0x0
17 #define IOMMU_FUNC 2
18 #define IOMMU_DEVFN PCI_DEVFN(IOMMU_DEV, IOMMU_FUNC)
19 #define SOC_IOMMU_DEV _SOC_DEV(IOMMU_DEV, IOMMU_FUNC)
20 
21 /* PCIe GFX/GPP Bridge device 1 with no ports */
22 #define PCIE_GPP_BRIDGE_1_DEV 0x1
23 
24 /* PCIe GPP Bridge device 2 with up to 6 ports */
25 #define PCIE_GPP_BRIDGE_2_DEV 0x2
26 
27 #define PCIE_GPP_2_0_FUNC 1
28 #define PCIE_GPP_2_0_DEVFN PCI_DEVFN(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_0_FUNC)
29 #define SOC_GPP_2_0_DEV _SOC_DEV(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_0_FUNC)
30 
31 #define PCIE_GPP_2_1_FUNC 2
32 #define PCIE_GPP_2_1_DEVFN PCI_DEVFN(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_1_FUNC)
33 #define SOC_GPP_2_1_DEV _SOC_DEV(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_1_FUNC)
34 
35 #define PCIE_GPP_2_2_FUNC 3
36 #define PCIE_GPP_2_2_DEVFN PCI_DEVFN(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_2_FUNC)
37 #define SOC_GPP_2_2_DEV _SOC_DEV(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_2_FUNC)
38 
39 #define PCIE_GPP_2_3_FUNC 4
40 #define PCIE_GPP_2_3_DEVFN PCI_DEVFN(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_3_FUNC)
41 #define SOC_GPP_2_3_DEV _SOC_DEV(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_3_FUNC)
42 
43 #define PCIE_GPP_2_4_FUNC 5
44 #define PCIE_GPP_2_4_DEVFN PCI_DEVFN(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_4_FUNC)
45 #define SOC_GPP_2_4_DEV _SOC_DEV(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_4_FUNC)
46 
47 #define PCIE_GPP_2_5_FUNC 6
48 #define PCIE_GPP_2_5_DEVFN PCI_DEVFN(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_5_FUNC)
49 #define SOC_GPP_2_5_DEV _SOC_DEV(PCIE_GPP_BRIDGE_2_DEV, PCIE_GPP_2_5_FUNC)
50 
51 /* PCIe Bridges to Bus A, Bus B and Bus C devices */
52 #define PCIE_ABC_BRIDGE_DEV 0x8
53 
54 #define PCIE_ABC_A_FUNC 1
55 #define PCIE_ABC_A_DEVFN PCI_DEVFN(PCIE_ABC_BRIDGE_DEV, PCIE_ABC_A_FUNC)
56 #define SOC_PCIE_ABC_A_DEV _SOC_DEV(PCIE_ABC_BRIDGE_DEV, PCIE_ABC_A_FUNC)
57 
58 #define GFX_DEV 0x0
59 #define GFX_FUNC 0
60 #define GFX_DEVFN PCI_DEVFN(GFX_DEV, GFX_FUNC)
61 
62 #define GFX_HDA_DEV 0x0
63 #define GFX_HDA_FUNC 1
64 #define GFX_HDA_DEVFN PCI_DEVFN(GFX_HDA_DEV, GFX_HDA_FUNC)
65 
66 #define XHCI0_DEV 0x0
67 #define XHCI0_FUNC 3
68 #define XHCI0_DEVFN PCI_DEVFN(XHCI0_DEV, XHCI0_FUNC)
69 
70 #define XHCI1_DEV 0x0
71 #define XHCI1_FUNC 4
72 #define XHCI1_DEVFN PCI_DEVFN(XHCI1_DEV, XHCI1_FUNC)
73 
74 #define AUDIO_DEV 0x0
75 #define AUDIO_FUNC 5
76 #define AUDIO_DEVFN PCI_DEVFN(AUDIO_DEV, AUDIO_FUNC)
77 
78 #define HD_AUDIO_DEV 0x0
79 #define HD_AUDIO_FUNC 6
80 #define HD_AUDIO_DEVFN PCI_DEVFN(HD_AUDIO_DEV, HD_AUDIO_FUNC)
81 
82 #define PCIE_ABC_B_FUNC 2
83 #define PCIE_GPP_B_DEVFN PCI_DEVFN(PCIE_ABC_BRIDGE_DEV, PCIE_ABC_B_FUNC)
84 #define SOC_PCIE_GPP_B_DEV _SOC_DEV(PCIE_ABC_BRIDGE_DEV, PCIE_ABC_B_FUNC)
85 
86 #define PCIE_ABC_C_FUNC 3
87 #define PCIE_GPP_C_DEVFN PCI_DEVFN(PCIE_ABC_BRIDGE_DEV, PCIE_ABC_C_FUNC)
88 #define SOC_PCIE_GPP_C_DEV _SOC_DEV(PCIE_ABC_BRIDGE_DEV, PCIE_ABC_C_FUNC)
89 
90 #define XHCI2_DEV 0x0
91 #define XHCI2_FUNC 0
92 #define XHCI2_DEVFN PCI_DEVFN(XHCI2_DEV, XHCI2_FUNC)
93 
94 /* SMBUS */
95 #define SMBUS_DEV 0x14
96 #define SMBUS_FUNC 0
97 #define SMBUS_DEVFN PCI_DEVFN(SMBUS_DEV, SMBUS_FUNC)
98 #define SOC_SMBUS_DEV _SOC_DEV(SMBUS_DEV, SMBUS_FUNC)
99 
100 /* LPC BUS */
101 #define PCU_DEV 0x14
102 #define LPC_FUNC 3
103 #define LPC_DEVFN PCI_DEVFN(PCU_DEV, LPC_FUNC)
104 #define SOC_LPC_DEV _SOC_DEV(PCU_DEV, LPC_FUNC)
105 
106 /* Data Fabric functions */
107 #define DF_DEV 0x18
108 
109 #define DF_F0_DEVFN PCI_DEVFN(DF_DEV, 0)
110 #define SOC_DF_F0_DEV _SOC_DEV(DF_DEV, 0)
111 
112 #define DF_F1_DEVFN PCI_DEVFN(DF_DEV, 1)
113 #define SOC_DF_F1_DEV _SOC_DEV(DF_DEV, 1)
114 
115 #define DF_F2_DEVFN PCI_DEVFN(DF_DEV, 2)
116 #define SOC_DF_F2_DEV _SOC_DEV(DF_DEV, 2)
117 
118 #define DF_F3_DEVFN PCI_DEVFN(DF_DEV, 3)
119 #define SOC_DF_F3_DEV _SOC_DEV(DF_DEV, 3)
120 
121 #define DF_F4_DEVFN PCI_DEVFN(DF_DEV, 4)
122 #define SOC_DF_F4_DEV _SOC_DEV(DF_DEV, 4)
123 
124 #define DF_F5_DEVFN PCI_DEVFN(DF_DEV, 5)
125 #define SOC_DF_F5_DEV _SOC_DEV(DF_DEV, 5)
126 
127 #define DF_F6_DEVFN PCI_DEVFN(DF_DEV, 6)
128 #define SOC_DF_F6_DEV _SOC_DEV(DF_DEV, 6)
129 
130 #define DF_F7_DEVFN PCI_DEVFN(DF_DEV, 7)
131 #define SOC_DF_F7_DEV _SOC_DEV(DF_DEV, 7)
132 
133 #endif /* AMD_SABRINA_PCI_DEVS_H */