mb/amb/birman*/gpio: remove configuration for VDD_MEM_VID[0,1]
[coreboot2.git] / src / include / device / path.h
blob8e9ec3bdd50a88fa0ba3f7fe4859f38e3032afb0
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef DEVICE_PATH_H
4 #define DEVICE_PATH_H
6 #include <stdint.h>
8 enum device_path_type {
9 DEVICE_PATH_NONE = 0,
10 DEVICE_PATH_ROOT,
11 DEVICE_PATH_PCI,
12 DEVICE_PATH_PNP,
13 DEVICE_PATH_I2C,
14 DEVICE_PATH_APIC,
15 DEVICE_PATH_DOMAIN,
16 DEVICE_PATH_CPU_CLUSTER,
17 DEVICE_PATH_CPU,
18 DEVICE_PATH_CPU_BUS,
19 DEVICE_PATH_IOAPIC,
20 DEVICE_PATH_GENERIC,
21 DEVICE_PATH_SPI,
22 DEVICE_PATH_USB,
23 DEVICE_PATH_MMIO,
24 DEVICE_PATH_GPIO,
25 DEVICE_PATH_MDIO,
26 DEVICE_PATH_GICC_V3,
29 * When adding path types to this table, please also update the
30 * DEVICE_PATH_NAMES macro below.
34 #define DEVICE_PATH_NAMES { \
35 "DEVICE_PATH_NONE", \
36 "DEVICE_PATH_ROOT", \
37 "DEVICE_PATH_PCI", \
38 "DEVICE_PATH_PNP", \
39 "DEVICE_PATH_I2C", \
40 "DEVICE_PATH_APIC", \
41 "DEVICE_PATH_DOMAIN", \
42 "DEVICE_PATH_CPU_CLUSTER", \
43 "DEVICE_PATH_CPU", \
44 "DEVICE_PATH_CPU_BUS", \
45 "DEVICE_PATH_IOAPIC", \
46 "DEVICE_PATH_GENERIC", \
47 "DEVICE_PATH_SPI", \
48 "DEVICE_PATH_USB", \
49 "DEVICE_PATH_MMIO", \
50 "DEVICE_PATH_GPIO", \
51 "DEVICE_PATH_MDIO", \
52 "DEVICE_PATH_GICC_V3", \
55 struct domain_path {
56 unsigned int domain_id;
59 struct pci_path {
60 unsigned int devfn;
63 struct pnp_path {
64 unsigned int port;
65 unsigned int device;
68 struct i2c_path {
69 unsigned int device;
70 unsigned int mode_10bit;
73 struct spi_path {
74 unsigned int cs;
77 struct apic_path {
78 unsigned int initial_lapicid;
79 unsigned int apic_id;
80 unsigned int package_id;
81 unsigned int node_id;
82 unsigned int core_id;
83 unsigned int thread_id;
84 unsigned char core_type;
87 struct ioapic_path {
88 uintptr_t addr;
89 unsigned int ioapic_id;
90 unsigned int gsi_base;
93 struct cpu_cluster_path {
94 unsigned int cluster;
97 struct cpu_path {
98 unsigned int id;
101 struct cpu_bus_path {
102 unsigned int id;
105 struct generic_path {
106 unsigned int id;
107 unsigned int subid;
110 struct usb_path {
111 unsigned int port_type;
112 unsigned int port_id;
115 struct mmio_path {
116 uintptr_t addr;
119 struct gpio_path {
120 unsigned int id;
123 struct mdio_path {
124 unsigned int addr;
127 struct gicc_v3_path {
128 unsigned long long mpidr;
129 unsigned int vgic_mi;
130 unsigned int pi_gsiv;
133 struct device_path {
134 enum device_path_type type;
135 union {
136 struct pci_path pci;
137 struct pnp_path pnp;
138 struct i2c_path i2c;
139 struct apic_path apic;
140 struct ioapic_path ioapic;
141 struct domain_path domain;
142 struct cpu_cluster_path cpu_cluster;
143 struct cpu_path cpu;
144 struct cpu_bus_path cpu_bus;
145 struct generic_path generic;
146 struct spi_path spi;
147 struct usb_path usb;
148 struct mmio_path mmio;
149 struct gpio_path gpio;
150 struct mdio_path mdio;
151 struct gicc_v3_path gicc_v3;
155 #define DEVICE_PATH_MAX 40
156 #define BUS_PATH_MAX (DEVICE_PATH_MAX+10)
158 extern const char *dev_path_name(enum device_path_type type);
160 #endif /* DEVICE_PATH_H */