xref: /dpdk/drivers/net/cxgbe/base/t4_pci_id_tbl.h (revision c979b04e742d768cab708f9e50ee4233a5cf179c)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2014-2019 Chelsio Communications.
3  * All rights reserved.
4  */
5 
6 #ifndef __T4_PCI_ID_TBL_H__
7 #define __T4_PCI_ID_TBL_H__
8 
9 /*
10  * The Os-Dependent code can defined cpp macros for creating a PCI Device ID
11  * Table.  This is useful because it allows the PCI ID Table to be maintained
12  * in a single place and all supporting OSes to get new PCI Device IDs
13  * automatically.
14  *
15  * The macros are:
16  *
17  * CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
18  *   -- Used to start the definition of the PCI ID Table.
19  *
20  * CH_PCI_DEVICE_ID_FUNCTION
21  *   -- The PCI Function Number to use in the PCI Device ID Table.  "0"
22  *   -- for drivers attaching to PF0-3, "4" for drivers attaching to PF4,
23  *   -- "8" for drivers attaching to SR-IOV Virtual Functions, etc.
24  *
25  * CH_PCI_DEVICE_ID_FUNCTION2 [optional]
26  *   -- If defined, create a PCI Device ID Table with both
27  *   -- CH_PCI_DEVICE_ID_FUNCTION and CH_PCI_DEVICE_ID_FUNCTION2 populated.
28  *
29  * CH_PCI_ID_TABLE_ENTRY(DeviceID)
30  *   -- Used for the individual PCI Device ID entries.  Note that we will
31  *   -- be adding a trailing comma (",") after all of the entries (and
32  *   -- between the pairs of entries if CH_PCI_DEVICE_ID_FUNCTION2 is defined).
33  *
34  * CH_PCI_DEVICE_ID_TABLE_DEFINE_END
35  *   -- Used to finish the definition of the PCI ID Table.  Note that we
36  *   -- will be adding a trailing semi-colon (";") here.
37  *
38  * CH_PCI_DEVICE_ID_BYPASS_SUPPORTED [optional]
39  *   -- If defined, indicates that the OS Driver has support for Bypass
40  *   -- Adapters.
41  */
42 #ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
43 
44 /*
45  * Some sanity checks ...
46  */
47 #ifndef CH_PCI_DEVICE_ID_FUNCTION
48 #error CH_PCI_DEVICE_ID_FUNCTION not defined!
49 #endif
50 #ifndef CH_PCI_ID_TABLE_ENTRY
51 #error CH_PCI_ID_TABLE_ENTRY not defined!
52 #endif
53 #ifndef CH_PCI_DEVICE_ID_TABLE_DEFINE_END
54 #error CH_PCI_DEVICE_ID_TABLE_DEFINE_END not defined!
55 #endif
56 
57 /*
58  * T4 and later ASICs use a PCI Device ID scheme of 0xVFPP where:
59  *
60  *   V  = "4" for T4; "5" for T5, etc.
61  *   F  = "0" for PF 0..3; "4".."7" for PF4..7; and "8" for VFs
62  *   PP = adapter product designation
63  *
64  * We use this consistency in order to create the proper PCI Device IDs
65  * for the specified CH_PCI_DEVICE_ID_FUNCTION.
66  */
67 #ifndef CH_PCI_DEVICE_ID_FUNCTION2
68 #define CH_PCI_ID_TABLE_FENTRY(devid) \
69 	CH_PCI_ID_TABLE_ENTRY((devid) | \
70 			      ((CH_PCI_DEVICE_ID_FUNCTION) << 8))
71 #else
72 #define CH_PCI_ID_TABLE_FENTRY(devid) \
73 	CH_PCI_ID_TABLE_ENTRY((devid) | \
74 			      ((CH_PCI_DEVICE_ID_FUNCTION) << 8)), \
75 	CH_PCI_ID_TABLE_ENTRY((devid) | \
76 			      ((CH_PCI_DEVICE_ID_FUNCTION2) << 8))
77 #endif
78 
79 CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
80 	/*
81 	 * T5 adapters:
82 	 */
83 	CH_PCI_ID_TABLE_FENTRY(0x5000),	/* T580-dbg */
84 	CH_PCI_ID_TABLE_FENTRY(0x5001),	/* T520-cr */
85 	CH_PCI_ID_TABLE_FENTRY(0x5002),	/* T522-cr */
86 	CH_PCI_ID_TABLE_FENTRY(0x5003),	/* T540-cr */
87 	CH_PCI_ID_TABLE_FENTRY(0x5004),	/* T520-bch */
88 	CH_PCI_ID_TABLE_FENTRY(0x5005),	/* T540-bch */
89 	CH_PCI_ID_TABLE_FENTRY(0x5006),	/* T540-ch */
90 	CH_PCI_ID_TABLE_FENTRY(0x5007),	/* T520-so */
91 	CH_PCI_ID_TABLE_FENTRY(0x5008),	/* T520-cx */
92 	CH_PCI_ID_TABLE_FENTRY(0x5009),	/* T520-bt */
93 	CH_PCI_ID_TABLE_FENTRY(0x500a),	/* T504-bt */
94 #ifdef CH_PCI_DEVICE_ID_BYPASS_SUPPORTED
95 	CH_PCI_ID_TABLE_FENTRY(0x500b),	/* B520-sr */
96 	CH_PCI_ID_TABLE_FENTRY(0x500c),	/* B504-bt */
97 #endif
98 	CH_PCI_ID_TABLE_FENTRY(0x500d),	/* T580-cr */
99 	CH_PCI_ID_TABLE_FENTRY(0x500e),	/* T540-LP-cr */
100 	CH_PCI_ID_TABLE_FENTRY(0x5010),	/* T580-LP-cr */
101 	CH_PCI_ID_TABLE_FENTRY(0x5011),	/* T520-LL-cr */
102 	CH_PCI_ID_TABLE_FENTRY(0x5012),	/* T560-cr */
103 	CH_PCI_ID_TABLE_FENTRY(0x5013),	/* T580-chr */
104 	CH_PCI_ID_TABLE_FENTRY(0x5014),	/* T580-so */
105 	CH_PCI_ID_TABLE_FENTRY(0x5015),	/* T502-bt */
106 	CH_PCI_ID_TABLE_FENTRY(0x5016),	/* T580-OCP-SO */
107 	CH_PCI_ID_TABLE_FENTRY(0x5017),	/* T520-OCP-SO */
108 	CH_PCI_ID_TABLE_FENTRY(0x5018),	/* T540-BT */
109 	CH_PCI_ID_TABLE_FENTRY(0x5019),	/* T540-LP-BT */
110 	CH_PCI_ID_TABLE_FENTRY(0x501a),	/* T540-SO-BT */
111 	CH_PCI_ID_TABLE_FENTRY(0x501b),	/* T540-SO-CR */
112 	CH_PCI_ID_TABLE_FENTRY(0x5080),	/* Custom T540-cr */
113 	CH_PCI_ID_TABLE_FENTRY(0x5081),	/* Custom T540-LL-cr */
114 	CH_PCI_ID_TABLE_FENTRY(0x5082),	/* Custom T504-cr */
115 	CH_PCI_ID_TABLE_FENTRY(0x5083),	/* Custom T540-LP-CR */
116 	CH_PCI_ID_TABLE_FENTRY(0x5084),	/* Custom T580-cr */
117 	CH_PCI_ID_TABLE_FENTRY(0x5085),	/* Custom 3x T580-CR */
118 	CH_PCI_ID_TABLE_FENTRY(0x5086),	/* Custom 2x T580-CR */
119 	CH_PCI_ID_TABLE_FENTRY(0x5087),	/* Custom T580-CR */
120 	CH_PCI_ID_TABLE_FENTRY(0x5088),	/* Custom T570-CR */
121 	CH_PCI_ID_TABLE_FENTRY(0x5089),	/* Custom T520-CR */
122 	CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */
123 	CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */
124 	CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */
125 	CH_PCI_ID_TABLE_FENTRY(0x5093),	/* Custom T580-LP-CR */
126 	CH_PCI_ID_TABLE_FENTRY(0x5094),	/* Custom T540-CR */
127 	CH_PCI_ID_TABLE_FENTRY(0x5095),	/* Custom T540-CR-SO */
128 	CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */
129 	CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */
130 	CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */
131 	CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */
132 	CH_PCI_ID_TABLE_FENTRY(0x509A), /* Custom T520-CR */
133 	CH_PCI_ID_TABLE_FENTRY(0x509B), /* Custom T540-CR LOM */
134 	CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR SFP+ LOM */
135 	CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR SFP+ */
136 	CH_PCI_ID_TABLE_FENTRY(0x509e), /* Custom T520-CR */
137 	CH_PCI_ID_TABLE_FENTRY(0x509f), /* Custom T540-CR */
138 	CH_PCI_ID_TABLE_FENTRY(0x50a0), /* Custom T540-CR */
139 	CH_PCI_ID_TABLE_FENTRY(0x50a1), /* Custom T540-CR */
140 	CH_PCI_ID_TABLE_FENTRY(0x50a2), /* Custom T580-KR4 */
141 	CH_PCI_ID_TABLE_FENTRY(0x50a3), /* Custom T580-KR4 */
142 	CH_PCI_ID_TABLE_FENTRY(0x50a4), /* Custom 2x T540-CR */
143 	CH_PCI_ID_TABLE_FENTRY(0x50a5), /* Custom T522-BT */
144 	CH_PCI_ID_TABLE_FENTRY(0x50a6), /* Custom T522-BT-SO */
145 	CH_PCI_ID_TABLE_FENTRY(0x50a7), /* Custom T580-CR */
146 	CH_PCI_ID_TABLE_FENTRY(0x50a8), /* Custom T580-KR */
147 	CH_PCI_ID_TABLE_FENTRY(0x50a9), /* Custom T580-KR */
148 	CH_PCI_ID_TABLE_FENTRY(0x50aa), /* Custom T580-CR */
149 	CH_PCI_ID_TABLE_FENTRY(0x50ab), /* Custom T520-CR */
150 	CH_PCI_ID_TABLE_FENTRY(0x50ac), /* Custom T540-BT */
151 	CH_PCI_ID_TABLE_FENTRY(0x50ad), /* Custom T520-CR */
152 	CH_PCI_ID_TABLE_FENTRY(0x50ae), /* Custom T540-XL-SO */
153 	CH_PCI_ID_TABLE_FENTRY(0x50af), /* Custom T580-KR-SO */
154 	CH_PCI_ID_TABLE_FENTRY(0x50b0), /* Custom T520-CR-LOM */
155 
156 	/* T6 adapter */
157 	CH_PCI_ID_TABLE_FENTRY(0x6001), /* T6225-CR */
158 	CH_PCI_ID_TABLE_FENTRY(0x6002), /* T6225-SO-CR */
159 	CH_PCI_ID_TABLE_FENTRY(0x6003), /* T6425-CR */
160 	CH_PCI_ID_TABLE_FENTRY(0x6004),	/* T6425-SO-CR */
161 	CH_PCI_ID_TABLE_FENTRY(0x6005), /* T6225-OCP */
162 	CH_PCI_ID_TABLE_FENTRY(0x6006),	/* T62100-OCP-SO */
163 	CH_PCI_ID_TABLE_FENTRY(0x6007), /* T62100-LP-CR	*/
164 	CH_PCI_ID_TABLE_FENTRY(0x6008), /* T62100-SO-CR	*/
165 	CH_PCI_ID_TABLE_FENTRY(0x6009),	/* T6210-BT */
166 	CH_PCI_ID_TABLE_FENTRY(0x600d), /* T62100-CR */
167 	CH_PCI_ID_TABLE_FENTRY(0x6011), /* T6225-LL-CR */
168 	CH_PCI_ID_TABLE_FENTRY(0x6014), /* T61100-OCP-SO */
169 	CH_PCI_ID_TABLE_FENTRY(0x6015),	/* T6201-BT */
170 	CH_PCI_ID_TABLE_FENTRY(0x6080), /* Custom T6225-CR SFP28 */
171 	CH_PCI_ID_TABLE_FENTRY(0x6081), /* Custom T62100-CR */
172 	CH_PCI_ID_TABLE_FENTRY(0x6082),	/* Custom T6225-CR */
173 	CH_PCI_ID_TABLE_FENTRY(0x6083),	/* Custom T62100-CR */
174 	CH_PCI_ID_TABLE_FENTRY(0x6084),	/* Custom T64100-CR */
175 	CH_PCI_ID_TABLE_FENTRY(0x6085),	/* Custom T6240-SO */
176 	CH_PCI_ID_TABLE_FENTRY(0x6086),	/* Custom T6225-SO-CR */
177 	CH_PCI_ID_TABLE_FENTRY(0x6087),	/* Custom T6225-CR */
178 	CH_PCI_ID_TABLE_FENTRY(0x6088),	/* Custom T62100-CR */
179 	CH_PCI_ID_TABLE_FENTRY(0x6089),	/* Custom T62100-KR */
180 	CH_PCI_ID_TABLE_FENTRY(0x608a),	/* Custom T62100-CR */
181 	CH_PCI_ID_TABLE_FENTRY(0x608b),	/* Custom T6225-CR */
182 CH_PCI_DEVICE_ID_TABLE_DEFINE_END;
183 
184 #endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */
185 
186 #endif /* __T4_PCI_ID_TBL_H__ */
187