xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/bcmdevs.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Broadcom device-specific manifest constants.
3  *
4  * Copyright (C) 2020, Broadcom.
5  *
6  *      Unless you and Broadcom execute a separate written software license
7  * agreement governing use of this software, this software is licensed to you
8  * under the terms of the GNU General Public License version 2 (the "GPL"),
9  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10  * following added to such license:
11  *
12  *      As a special exception, the copyright holders of this software give you
13  * permission to link this software with independent modules, and to copy and
14  * distribute the resulting executable under terms of your choice, provided that
15  * you also meet, for each linked independent module, the terms and conditions of
16  * the license of that module.  An independent module is a module which is not
17  * derived from this software.  The special exception does not apply to any
18  * modifications of the software.
19  *
20  *
21  * <<Broadcom-WL-IPTag/Dual:>>
22  */
23 
24 #ifndef	_BCMDEVS_H
25 #define	_BCMDEVS_H
26 
27 /* PCI vendor IDs */
28 #define	VENDOR_EPIGRAM		0xfeda
29 #define	VENDOR_BROADCOM		0x14e4
30 #define	VENDOR_3COM		0x10b7
31 #define	VENDOR_NETGEAR		0x1385
32 #define	VENDOR_DIAMOND		0x1092
33 #define	VENDOR_INTEL		0x8086
34 #define	VENDOR_DELL		0x1028
35 #define	VENDOR_HP		0x103c
36 #define	VENDOR_HP_COMPAQ	0x0e11
37 #define	VENDOR_APPLE		0x106b
38 #define VENDOR_SI_IMAGE		0x1095		/* Silicon Image, used by Arasan SDIO Host */
39 #define VENDOR_BUFFALO		0x1154		/* Buffalo vendor id */
40 #define VENDOR_TI		0x104c		/* Texas Instruments */
41 #define VENDOR_RICOH		0x1180		/* Ricoh */
42 #define VENDOR_JMICRON		0x197b
43 
44 /* precommit failed when this is removed */
45 /* BLAZAR_BRANCH_101_10_DHD_001/build/dhd/linux-fc19/brix-brcm */
46 /* TBD: Revisit later */
47 #ifdef BCMINTERNAL
48 #define VENDOR_JINVANI		0x1947		/* Jinvani Systech, Inc. */
49 #endif
50 
51 /* PCMCIA vendor IDs */
52 #define	VENDOR_BROADCOM_PCMCIA	0x02d0
53 
54 /* SDIO vendor IDs */
55 #define	VENDOR_BROADCOM_SDIO	0x00BF
56 
57 /* DONGLE VID/PIDs */
58 #define BCM_DNGL_VID		0x0a5c
59 #define BCM_DNGL_BL_PID_4328	0xbd12
60 #define BCM_DNGL_BL_PID_4332	0xbd18
61 #define BCM_DNGL_BL_PID_4360	0xbd1d
62 
63 #define BCM_DNGL_BDC_PID	0x0bdc
64 #define BCM_DNGL_JTAG_PID	0x4a44
65 
66 /* Pseudo IDs */
67 #define FPGA_JTAGM_ID		0x43f0		/* FPGA jtagm device id */
68 #define BCM_JTAGM_ID		0x43f1		/* BCM jtagm device id */
69 #define SDIOH_FPGA_ID		0x43f2		/* sdio host fpga */
70 #define BCM_SDIOH_ID		0x43f3		/* BCM sdio host id */
71 #define SDIOD_FPGA_ID		0x43f4		/* sdio device fpga */
72 #define SPIH_FPGA_ID		0x43f5		/* PCI SPI Host Controller FPGA */
73 #define BCM_SPIH_ID		0x43f6		/* Synopsis SPI Host Controller */
74 #define MIMO_FPGA_ID		0x43f8		/* FPGA mimo minimacphy device id */
75 #define BCM_JTAGM2_ID		0x43f9		/* BCM alternate jtagm device id */
76 #define SDHCI_FPGA_ID		0x43fa		/* Standard SDIO Host Controller FPGA */
77 #define	BCM4710_DEVICE_ID	0x4710		/* 4710 primary function 0 */
78 #define	BCM47XX_AUDIO_ID	0x4711		/* 47xx audio codec */
79 #define	BCM47XX_V90_ID		0x4712		/* 47xx v90 codec */
80 #define	BCM47XX_ENET_ID		0x4713		/* 47xx enet */
81 #define	BCM47XX_EXT_ID		0x4714		/* 47xx external i/f */
82 #define	BCM47XX_GMAC_ID		0x4715		/* 47xx Unimac based GbE */
83 #define	BCM47XX_USBH_ID		0x4716		/* 47xx usb host */
84 #define	BCM47XX_USBD_ID		0x4717		/* 47xx usb device */
85 #define	BCM47XX_IPSEC_ID	0x4718		/* 47xx ipsec */
86 #define	BCM47XX_ROBO_ID		0x4719		/* 47xx/53xx roboswitch core */
87 #define	BCM47XX_USB20H_ID	0x471a		/* 47xx usb 2.0 host */
88 #define	BCM47XX_USB20D_ID	0x471b		/* 47xx usb 2.0 device */
89 #define	BCM47XX_ATA100_ID	0x471d		/* 47xx parallel ATA */
90 #define	BCM47XX_SATAXOR_ID	0x471e		/* 47xx serial ATA & XOR DMA */
91 #define	BCM47XX_GIGETH_ID	0x471f		/* 47xx GbE (5700) */
92 #define	BCM47XX_USB30H_ID	0x472a		/* 47xx usb 3.0 host */
93 #define	BCM47XX_USB30D_ID	0x472b		/* 47xx usb 3.0 device */
94 #define	BCM47XX_USBHUB_ID	0x472c		/* 47xx usb hub */
95 #define BCM47XX_SMBUS_EMU_ID	0x47fe		/* 47xx emulated SMBus device */
96 #define	BCM47XX_XOR_EMU_ID	0x47ff		/* 47xx emulated XOR engine */
97 #define JINVANI_SDIOH_ID	0x4743		/* Jinvani SDIO Gold Host */
98 #define BCM27XX_SDIOH_ID	0x2702		/* BCM27xx Standard SDIO Host */
99 #define PCIXX21_FLASHMEDIA_ID	0x803b		/* TI PCI xx21 Standard Host Controller */
100 #define PCIXX21_SDIOH_ID	0x803c		/* TI PCI xx21 Standard Host Controller */
101 #define R5C822_SDIOH_ID		0x0822		/* Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host */
102 #define JMICRON_SDIOH_ID	0x2381		/* JMicron Standard SDIO Host Controller */
103 
104 /* PCI Device IDs */
105 /* DEPRECATED but used */
106 #define	BCM4318_D11G_ID		0x4318		/* 4318 802.11b/g id */
107 /* DEPRECATED */
108 
109 #define BCM4360_D11AC_ID	0x43a0
110 #define BCM4360_D11AC2G_ID	0x43a1
111 #define BCM4360_D11AC5G_ID	0x43a2
112 #define BCM4352_D11AC_ID	0x43b1		/* 4352 802.11ac dualband device */
113 #define BCM4352_D11AC2G_ID	0x43b2		/* 4352 802.11ac 2.4G device */
114 #define BCM4352_D11AC5G_ID	0x43b3		/* 4352 802.11ac 5G device */
115 #define BCM43602_D11AC_ID	0x43ba		/* ac dualband PCI devid SPROM programmed */
116 #define BCM43602_D11AC2G_ID	0x43bb		/* 43602 802.11ac 2.4G device */
117 #define BCM43602_D11AC5G_ID	0x43bc		/* 43602 802.11ac 5G device */
118 
119 #define BCM43012_D11N_ID	0xA804		/* 43012 802.11n dualband device */
120 #define BCM43012_D11N2G_ID	0xA805		/* 43012 802.11n 2.4G device */
121 #define BCM43012_D11N5G_ID	0xA806		/* 43012 802.11n 5G device */
122 #define BCM43014_D11N_ID	0x4495		/* 43014 802.11n dualband device */
123 #define BCM43014_D11N2G_ID	0x4496		/* 43014 802.11n 2.4G device */
124 #define BCM43014_D11N5G_ID	0x4497		/* 43014 802.11n 5G device */
125 #define BCM43013_D11N_ID	0x4498		/* 43013 802.11n dualband device */
126 #define BCM43013_D11N2G_ID	0x4499		/* 43013 802.11n 2.4G device */
127 #define BCM43013_D11N5G_ID	0x449a		/* 43013 802.11n 5G device */
128 
129 /* PCI Subsystem ID */
130 #define BCM4376_D11AX_ID	0x4445		/* 4376 802.11ax dualband device */
131 #define BCM4376_D11AX2G_ID	0x4436		/* 4376 802.11ax 2.4G device */
132 #define BCM4376_D11AX5G_ID	0x4437		/* 4376 802.11ax 5G device */
133 
134 #define BCM4378_D11AX_ID	0x4425		/* 4378 802.11ax dualband device */
135 #define BCM4378_D11AX2G_ID	0x4426		/* 4378 802.11ax 2.4G device */
136 #define BCM4378_D11AX5G_ID	0x4427		/* 4378 802.11ax 5G device */
137 
138 #define BCM4387_D11AX_ID	0x4433		/* 4387 802.11ax dualband device */
139 #define BCM4388_D11AX_ID	0x4434		/* 4388 802.11ax dualband device */
140 #define BCM4385_D11AX_ID	0x4442		/* 4385 802.11ax dualband device */
141 #define BCM4389_D11AX_ID	0x4441		/* 4389 802.11ax dualband device */
142 #define BCM4397_D11AX_ID	0x4443		/* 4397 802.11ax dualband device */
143 
144 #define BCM4362_D11AX_ID	0x4490		/* 4362 802.11ax dualband device */
145 #define BCM4362_D11AX2G_ID	0x4491		/* 4362 802.11ax 2.4G device */
146 #define BCM4362_D11AX5G_ID	0x4492		/* 4362 802.11ax 5G device */
147 #define BCM43751_D11AX_ID	0x449a		/* 43751 802.11ac dualband device */
148 #define BCM43751_D11AX2G_ID	0x449b		/* 43751 802.11ac 2.4G device */
149 #define BCM43751_D11AX5G_ID	0x449c		/* 43751 802.11ac 5G device */
150 #define BCM43752_D11AX_ID	0x449d		/* 43752 802.11ax dualband device */
151 #define BCM43752_D11AX2G_ID	0x449e		/* 43752 802.11ax 2.4G device */
152 #define BCM43752_D11AX5G_ID	0x449f		/* 43752 802.11ax 5G device */
153 
154 /* TBD change below values */
155 #define BCM4369_D11AX_ID	0x4470		/* 4369 802.11ax dualband device */
156 #define BCM4369_D11AX2G_ID	0x4471		/* 4369 802.11ax 2.4G device */
157 #define BCM4369_D11AX5G_ID	0x4472		/* 4369 802.11ax 5G device */
158 
159 #define BCM4375_D11AX_ID	0x4475		/* 4375 802.11ax dualband device */
160 #define BCM4375_D11AX2G_ID	0x4476		/* 4375 802.11ax 2.4G device */
161 #define BCM4375_D11AX5G_ID	0x4477		/* 4375 802.11ax 5G device */
162 
163 #define BCM4377_D11AX_ID	0x4480		/* 4377 802.11ax dualband device */
164 #define BCM4377_D11AX2G_ID	0x4481		/* 4377 802.11ax 2.4G device */
165 #define BCM4377_D11AX5G_ID	0x4482		/* 4377 802.11ax 5G device */
166 
167 /* 4377 802.11ax dualband device with multifunction */
168 #define BCM4377_M_D11AX_ID	0x4488
169 
170 /* Chip IDs */
171 
172 #define BCM43143_CHIP_ID	43143		/* 43143 chipcommon chipid */
173 #define	BCM43242_CHIP_ID	43242		/* 43242 chipcommon chipid */
174 #define	BCM43460_CHIP_ID	43460		/* 4360  chipcommon chipid (OTP, RBBU) */
175 #define BCM4360_CHIP_ID		0x4360          /* 4360 chipcommon chipid */
176 #define BCM43362_CHIP_ID	43362		/* 43362 chipcommon chipid */
177 #define BCM4330_CHIP_ID		0x4330		/* 4330 chipcommon chipid */
178 #define	BCM4324_CHIP_ID		0x4324		/* 4324 chipcommon chipid */
179 #define BCM4334_CHIP_ID		0x4334		/* 4334 chipcommon chipid */
180 #define BCM4335_CHIP_ID		0x4335		/* 4335 chipcommon chipid */
181 #define BCM4339_CHIP_ID		0x4339		/* 4339 chipcommon chipid */
182 #define BCM4352_CHIP_ID		0x4352          /* 4352 chipcommon chipid */
183 #define BCM43526_CHIP_ID	0xAA06
184 #define BCM43340_CHIP_ID	43340		/* 43340 chipcommon chipid */
185 #define BCM43341_CHIP_ID	43341		/* 43341 chipcommon chipid */
186 #define BCM43562_CHIP_ID	0xAA2A          /* 43562 chipcommon chipid */
187 #define	BCM43012_CHIP_ID	0xA804          /* 43012 chipcommon chipid */
188 #define	BCM43013_CHIP_ID	0xA805          /* 43013 chipcommon chipid */
189 #define	BCM43014_CHIP_ID	0xA806          /* 43014 chipcommon chipid */
190 #define	BCM4369_CHIP_ID		0x4369          /* 4369 chipcommon chipid */
191 #define BCM4375_CHIP_ID		0x4375          /* 4375 chipcommon chipid */
192 #define BCM4376_CHIP_ID		0x4376          /* 4376 chipcommon chipid */
193 #define BCM4354_CHIP_ID		0x4354          /* 4354 chipcommon chipid */
194 #define BCM4356_CHIP_ID		0x4356          /* 4356 chipcommon chipid */
195 #define BCM4371_CHIP_ID		0x4371          /* 4371 chipcommon chipid */
196 #define BCM43569_CHIP_ID	0xAA31          /* 43569 chipcommon chipid */
197 
198 #define BCM4345_CHIP_ID		0x4345		/* 4345 chipcommon chipid */
199 #define BCM43454_CHIP_ID	43454		/* 43454 chipcommon chipid */
200 #define BCM43430_CHIP_ID	43430		/* 43430 chipcommon chipid */
201 #define BCM4359_CHIP_ID		0x4359		/* 4359 chipcommon chipid */
202 #define BCM4362_CHIP_ID		0x4362          /* 4362 chipcommon chipid */
203 #define BCM43751_CHIP_ID	0xAAE7          /* 43751 chipcommon chipid */
204 #define BCM43752_CHIP_ID	0xAAE8          /* 43752 chipcommon chipid */
205 #define BCM4369_CHIP_ID		0x4369          /* 4369 chipcommon chipid */
206 #define BCM4377_CHIP_ID		0x4377          /* 4377 chipcommon chipid */
207 #define BCM4378_CHIP_ID		0x4378          /* 4378 chipcommon chipid */
208 #define BCM4385_CHIP_ID		0x4385          /* 4385 chipcommon chipid */
209 #define BCM4387_CHIP_ID		0x4387          /* 4387 chipcommon chipid */
210 #define BCM4388_CHIP_ID		0x4388          /* 4388 chipcommon chipid */
211 #define BCM4389_CHIP_ID		0x4389          /* 4389 chipcommon chipid */
212 #define BCM4397_CHIP_ID		0x4397          /* 4397 chipcommon chipid */
213 
214 #define BCM4362_CHIP(chipid)	(CHIPID(chipid) == BCM4362_CHIP_ID)
215 #define BCM4362_CHIP_GRPID	BCM4362_CHIP_ID
216 
217 #define BCM4369_CHIP(chipid)	((CHIPID(chipid) == BCM4369_CHIP_ID) || \
218 				(CHIPID(chipid) == BCM4377_CHIP_ID) || \
219 				(CHIPID(chipid) == BCM4375_CHIP_ID))
220 #define BCM4369_CHIP_GRPID		BCM4369_CHIP_ID: \
221 					case BCM4377_CHIP_ID: \
222 					case BCM4375_CHIP_ID
223 
224 #define BCM4385_CHIP(chipid)	(CHIPID(chipid) == BCM4385_CHIP_ID)
225 #define BCM4385_CHIP_GRPID	BCM4385_CHIP_ID
226 
227 #define BCM4378_CHIP(chipid)    (CHIPID(chipid) == BCM4378_CHIP_ID)
228 #define BCM4378_CHIP_GRPID	BCM4378_CHIP_ID
229 
230 #define BCM4376_CHIP_GRPID	BCM4376_CHIP_ID
231 #define BCM4376_CHIP(chipid)    (CHIPID(chipid) == BCM4376_CHIP_ID)
232 
233 #define BCM4387_CHIP(chipid)    (CHIPID(chipid) == BCM4387_CHIP_ID)
234 #define BCM4387_CHIP_GRPID	BCM4387_CHIP_ID
235 
236 #define BCM4388_CHIP(chipid)	(CHIPID(chipid) == BCM4388_CHIP_ID)
237 #define BCM4388_CHIP_GRPID	BCM4388_CHIP_ID
238 
239 #define BCM4389_CHIP(chipid)	(CHIPID(chipid) == BCM4389_CHIP_ID)
240 #define BCM4389_CHIP_GRPID	BCM4389_CHIP_ID
241 
242 #define BCM4397_CHIP(chipid)	(CHIPID(chipid) == BCM4397_CHIP_ID)
243 #define BCM4397_CHIP_GRPID	BCM4397_CHIP_ID
244 
245 #define BCM43602_CHIP_ID	0xaa52		/* 43602 chipcommon chipid */
246 #define BCM43462_CHIP_ID	0xa9c6		/* 43462 chipcommon chipid */
247 #define BCM43522_CHIP_ID	0xaa02		/* 43522 chipcommon chipid */
248 #define BCM43602_CHIP(chipid)	((CHIPID(chipid) == BCM43602_CHIP_ID) || \
249 				(CHIPID(chipid) == BCM43462_CHIP_ID) || \
250 				(CHIPID(chipid) == BCM43522_CHIP_ID)) /* 43602 variations */
251 #define BCM43012_CHIP(chipid)	((CHIPID(chipid) == BCM43012_CHIP_ID) || \
252 				(CHIPID(chipid) == BCM43013_CHIP_ID) || \
253 				(CHIPID(chipid) == BCM43014_CHIP_ID))
254 #define CASE_BCM43602_CHIP		case BCM43602_CHIP_ID: /* fallthrough */ \
255 				case BCM43462_CHIP_ID: /* fallthrough */ \
256 				case BCM43522_CHIP_ID
257 
258 /* Package IDs */
259 
260 #define HDLSIM_PKG_ID		14		/* HDL simulator package id */
261 #define HWSIM_PKG_ID		15		/* Hardware simulator package id */
262 
263 #define PCIXX21_FLASHMEDIA0_ID	0x8033		/* TI PCI xx21 Standard Host Controller */
264 #define PCIXX21_SDIOH0_ID	0x8034		/* TI PCI xx21 Standard Host Controller */
265 
266 #define BCM43602_12x12_PKG_ID	(0x1)	/* 12x12 pins package, used for e.g. router designs */
267 
268 /* 43012 package ID's
269     http://confluence.broadcom.com/display/WLAN/BCM43012+Variants%2Cpackage%2Cballmap%2Cfloorplan#
270     BCM43012Variants,package,ballmap,floorplan-PackageOptions
271 */
272 #define BCM943012_WLCSPOLY_PKG_ID	0x0	/* WLCSP Oly package */
273 #define BCM943012_FCBGA_PKG_ID		0x3	/* FCBGA debug package */
274 #define BCM943012_WLCSPWE_PKG_ID	0x1	/* WLCSP WE package */
275 #define BCM943012_FCBGAWE_PKG_ID	0x5	/* FCBGA WE package */
276 #define BCM943012_WLBGA_PKG_ID		0x2	/* WLBGA package */
277 
278 /* boardflags */
279 #define	BFL_BTC2WIRE		0x00000001  /* old 2wire Bluetooth coexistence, OBSOLETE */
280 #define BFL_BTCOEX      0x00000001      /* Board supports BTCOEX */
281 #define	BFL_PACTRL		0x00000002  /* Board has gpio 9 controlling the PA */
282 #define BFL_AIRLINEMODE	0x00000004  /* Board implements gpio radio disable indication */
283 #define	BFL_ADCDIV		0x00000008  /* Board has the rssi ADC divider */
284 #define BFL_DIS_256QAM		0x00000008
285 					/* for 4360, this bit is to disable 256QAM support */
286 #define	BFL_ENETROBO		0x00000010  /* Board has robo switch or core */
287 #define	BFL_TSSIAVG		0x00000010  /* TSSI averaging for ACPHY chips */
288 #define	BFL_NOPLLDOWN		0x00000020  /* Not ok to power down the chip pll and oscillator */
289 #define	BFL_CCKHIPWR		0x00000040  /* Can do high-power CCK transmission */
290 #define	BFL_ENETADM		0x00000080  /* Board has ADMtek switch */
291 #define	BFL_ENETVLAN		0x00000100  /* Board has VLAN capability */
292 #define	BFL_LTECOEX		0x00000200  /* LTE Coex enabled */
293 #define BFL_NOPCI		0x00000400  /* Board leaves PCI floating */
294 #define BFL_FEM			0x00000800  /* Board supports the Front End Module */
295 #define BFL_EXTLNA		0x00001000  /* Board has an external LNA in 2.4GHz band */
296 #define BFL_HGPA		0x00002000  /* Board has a high gain PA */
297 #define	BFL_BTC2WIRE_ALTGPIO	0x00004000  /* Board's BTC 2wire is in the alternate gpios */
298 #define	BFL_ALTIQ		0x00008000  /* Alternate I/Q settings */
299 #define BFL_NOPA		0x00010000  /* Board has no PA */
300 #define BFL_RSSIINV		0x00020000  /* Board's RSSI uses positive slope(not TSSI) */
301 #define BFL_PAREF		0x00040000  /* Board uses the PARef LDO */
302 #define BFL_3TSWITCH		0x00080000  /* Board uses a triple throw switch shared with BT */
303 #define BFL_PHASESHIFT		0x00100000  /* Board can support phase shifter */
304 #define BFL_BUCKBOOST		0x00200000  /* Power topology uses BUCKBOOST */
305 #define BFL_FEM_BT		0x00400000  /* Board has FEM and switch to share antenna w/ BT */
306 #define BFL_NOCBUCK		0x00800000  /* Power topology doesn't use CBUCK */
307 #define BFL_CCKFAVOREVM		0x01000000  /* Favor CCK EVM over spectral mask */
308 #define BFL_PALDO		0x02000000  /* Power topology uses PALDO */
309 #define BFL_LNLDO2_2P5		0x04000000  /* Select 2.5V as LNLDO2 output voltage */
310 /* BFL_FASTPWR and BFL_UCPWRCTL_MININDX are non-overlaping features and use the same bit */
311 #define BFL_FASTPWR		0x08000000  /* Fast switch/antenna powerup (no POR WAR) */
312 #define BFL_UCPWRCTL_MININDX	0x08000000  /* Enforce min power index to avoid FEM damage */
313 #define BFL_EXTLNA_5GHz		0x10000000  /* Board has an external LNA in 5GHz band */
314 #define BFL_TRSW_1by2		0x20000000  /* Board has 2 TRSW's in 1by2 designs */
315 #define BFL_GAINBOOSTA01        0x20000000  /* 5g Gainboost for core0 and core1 */
316 #define BFL_LO_TRSW_R_5GHz	0x40000000  /* In 5G do not throw TRSW to T for clipLO gain */
317 #define BFL_ELNA_GAINDEF	0x80000000  /* Backoff InitGain based on elna_2g/5g field
318 					     * when this flag is set
319 					     */
320 #define BFL_EXTLNA_TX	0x20000000	/* Temp boardflag to indicate to */
321 
322 /* boardflags2 */
323 #define BFL2_RXBB_INT_REG_DIS	0x00000001  /* Board has an external rxbb regulator */
324 #define BFL2_APLL_WAR		0x00000002  /* Flag to implement alternative A-band PLL settings */
325 #define BFL2_TXPWRCTRL_EN	0x00000004  /* Board permits enabling TX Power Control */
326 #define BFL2_2X4_DIV		0x00000008  /* Board supports the 2X4 diversity switch */
327 #define BFL2_5G_PWRGAIN		0x00000010  /* Board supports 5G band power gain */
328 #define BFL2_PCIEWAR_OVR	0x00000020  /* Board overrides ASPM and Clkreq settings */
329 #define BFL2_CAESERS_BRD	0x00000040  /* Board is Caesers brd (unused by sw) */
330 #define BFL2_WLCX_ATLAS		0x00000040  /* Board flag to initialize ECI for WLCX on FL-ATLAS */
331 #define BFL2_BTC3WIRE		0x00000080  /* Board support legacy 3 wire or 4 wire */
332 #define BFL2_BTCLEGACY          0x00000080  /* Board support legacy 3/4 wire, to replace
333 					     * BFL2_BTC3WIRE
334 					     */
335 #define BFL2_SKWRKFEM_BRD	0x00000100  /* 4321mcm93 board uses Skyworks FEM */
336 #define BFL2_SPUR_WAR		0x00000200  /* Board has a WAR for clock-harmonic spurs */
337 #define BFL2_GPLL_WAR		0x00000400  /* Flag to narrow G-band PLL loop b/w */
338 #define BFL2_TRISTATE_LED	0x00000800  /* Tri-state the LED */
339 #define BFL2_SINGLEANT_CCK	0x00001000  /* Tx CCK pkts on Ant 0 only */
340 #define BFL2_2G_SPUR_WAR	0x00002000  /* WAR to reduce and avoid clock-harmonic spurs in 2G */
341 #define BFL2_BPHY_ALL_TXCORES	0x00004000  /* Transmit bphy frames using all tx cores */
342 #define BFL2_FCC_BANDEDGE_WAR	0x00008000  /* Activates WAR to improve FCC bandedge performance */
343 #define BFL2_DAC_SPUR_IMPROVEMENT 0x00008000       /* Reducing DAC Spurs */
344 #define BFL2_GPLL_WAR2	        0x00010000  /* Flag to widen G-band PLL loop b/w */
345 #define BFL2_REDUCED_PA_TURNONTIME 0x00010000  /* Flag to reduce PA turn on Time */
346 #define BFL2_IPALVLSHIFT_3P3    0x00020000  /* Flag to Activate the PR 74115 PA Level Shift
347 					     * Workaround where the gpaio pin is connected to 3.3V
348 					     */
349 #define BFL2_INTERNDET_TXIQCAL  0x00040000  /* Use internal envelope detector for TX IQCAL */
350 #define BFL2_XTALBUFOUTEN       0x00080000  /* Keep the buffered Xtal output from radio on */
351 				/* Most drivers will turn it off without this flag */
352 				/* to save power. */
353 
354 #define BFL2_ANAPACTRL_2G	0x00100000  /* 2G ext PAs are controlled by analog PA ctrl lines */
355 #define BFL2_ANAPACTRL_5G	0x00200000  /* 5G ext PAs are controlled by analog PA ctrl lines */
356 #define BFL2_ELNACTRL_TRSW_2G	0x00400000  /* AZW4329: 2G gmode_elna_gain controls TR Switch */
357 #define BFL2_BT_SHARE_ANT0	0x00800000  /* share core0 antenna with BT */
358 #define BFL2_TEMPSENSE_HIGHER	0x01000000  /* The tempsense threshold can sustain higher value
359 					     * than programmed. The exact delta is decided by
360 					     * driver per chip/boardtype. This can be used
361 					     * when tempsense qualification happens after shipment
362 					     */
363 #define BFL2_BTC3WIREONLY       0x02000000  /* standard 3 wire btc only.  4 wire not supported */
364 #define BFL2_PWR_NOMINAL	0x04000000  /* 0: power reduction on, 1: no power reduction */
365 #define BFL2_EXTLNA_PWRSAVE	0x08000000  /* boardflag to enable ucode to apply power save */
366 						/* ucode control of eLNA during Tx */
367 #define BFL2_SDR_EN		0x20000000  /* SDR enabled or disabled */
368 #define BFL2_DYNAMIC_VMID	0x10000000  /* boardflag to enable dynamic Vmid idle TSSI CAL */
369 #define BFL2_LNA1BYPFORTR2G	0x40000000  /* acphy, enable lna1 bypass for clip gain, 2g */
370 #define BFL2_LNA1BYPFORTR5G	0x80000000  /* acphy, enable lna1 bypass for clip gain, 5g */
371 
372 /* SROM 11 - 11ac boardflag definitions */
373 #define BFL_SROM11_BTCOEX  0x00000001  /* Board supports BTCOEX */
374 #define BFL_SROM11_WLAN_BT_SH_XTL  0x00000002  /* bluetooth and wlan share same crystal */
375 #define BFL_SROM11_EXTLNA	0x00001000  /* Board has an external LNA in 2.4GHz band */
376 #define BFL_SROM11_EPA_TURNON_TIME     0x00018000  /* 2 bits for different PA turn on times */
377 #define BFL_SROM11_EPA_TURNON_TIME_SHIFT  15
378 #define BFL_SROM11_PRECAL_TX_IDX	0x00040000  /* Dedicated TX IQLOCAL IDX values */
379 				/* per subband, as derived from 43602A1 MCH5 */
380 #define BFL_SROM11_EXTLNA_5GHz	0x10000000  /* Board has an external LNA in 5GHz band */
381 #define BFL_SROM11_GAINBOOSTA01	0x20000000  /* 5g Gainboost for core0 and core1 */
382 #define BFL2_SROM11_APLL_WAR	0x00000002  /* Flag to implement alternative A-band PLL settings */
383 #define BFL2_SROM11_ANAPACTRL_2G  0x00100000  /* 2G ext PAs are ctrl-ed by analog PA ctrl lines */
384 #define BFL2_SROM11_ANAPACTRL_5G  0x00200000  /* 5G ext PAs are ctrl-ed by analog PA ctrl lines */
385 #define BFL2_SROM11_SINGLEANT_CCK	0x00001000  /* Tx CCK pkts on Ant 0 only */
386 #define BFL2_SROM11_EPA_ON_DURING_TXIQLOCAL    0x00020000  /* Keep ext. PA's on in TX IQLO CAL */
387 
388 /* boardflags3 */
389 #define BFL3_FEMCTRL_SUB	  0x00000007  /* acphy, subrevs of femctrl on top of srom_femctrl */
390 #define BFL3_RCAL_WAR		  0x00000008  /* acphy, rcal war active on this board (4335a0) */
391 #define BFL3_TXGAINTBLID	  0x00000070  /* acphy, txgain table id */
392 #define BFL3_TXGAINTBLID_SHIFT	  0x4         /* acphy, txgain table id shift bit */
393 #define BFL3_TSSI_DIV_WAR	  0x00000080  /* acphy, Seperate paparam for 20/40/80 */
394 #define BFL3_TSSI_DIV_WAR_SHIFT	  0x7         /* acphy, Seperate paparam for 20/40/80 shift bit */
395 #define BFL3_FEMTBL_FROM_NVRAM    0x00000100  /* acphy, femctrl table is read from nvram */
396 #define BFL3_FEMTBL_FROM_NVRAM_SHIFT 0x8         /* acphy, femctrl table is read from nvram */
397 #define BFL3_AGC_CFG_2G           0x00000200  /* acphy, gain control configuration for 2G */
398 #define BFL3_AGC_CFG_5G           0x00000400  /* acphy, gain control configuration for 5G */
399 #define BFL3_PPR_BIT_EXT          0x00000800  /* acphy, bit position for 1bit extension for ppr */
400 #define BFL3_PPR_BIT_EXT_SHIFT    11          /* acphy, bit shift for 1bit extension for ppr */
401 #define BFL3_BBPLL_SPR_MODE_DIS	  0x00001000  /* acphy, disables bbpll spur modes */
402 #define BFL3_RCAL_OTP_VAL_EN      0x00002000  /* acphy, to read rcal_trim value from otp */
403 #define BFL3_2GTXGAINTBL_BLANK	  0x00004000  /* acphy, blank the first X ticks of 2g gaintbl */
404 #define BFL3_2GTXGAINTBL_BLANK_SHIFT 14       /* acphy, blank the first X ticks of 2g gaintbl */
405 #define BFL3_5GTXGAINTBL_BLANK	  0x00008000  /* acphy, blank the first X ticks of 5g gaintbl */
406 #define BFL3_5GTXGAINTBL_BLANK_SHIFT 15       /* acphy, blank the first X ticks of 5g gaintbl */
407 #define BFL3_PHASETRACK_MAX_ALPHABETA	  0x00010000  /* acphy, to max out alpha,beta to 511 */
408 #define BFL3_PHASETRACK_MAX_ALPHABETA_SHIFT 16       /* acphy, to max out alpha,beta to 511 */
409 /* acphy, to use backed off gaintbl for lte-coex */
410 #define BFL3_LTECOEX_GAINTBL_EN           0x00060000
411 /* acphy, to use backed off gaintbl for lte-coex */
412 #define BFL3_LTECOEX_GAINTBL_EN_SHIFT 17
413 #define BFL3_5G_SPUR_WAR          0x00080000  /* acphy, enable spur WAR in 5G band */
414 
415 /* acphy: lpmode2g and lpmode_5g related boardflags */
416 #define BFL3_ACPHY_LPMODE_2G	  0x00300000  /* bits 20:21 for lpmode_2g choice */
417 #define BFL3_ACPHY_LPMODE_2G_SHIFT	  20
418 
419 #define BFL3_ACPHY_LPMODE_5G	  0x00C00000  /* bits 22:23 for lpmode_5g choice */
420 #define BFL3_ACPHY_LPMODE_5G_SHIFT	  22
421 
422 #define BFL3_1X1_RSDB_ANT	  0x01000000  /* to find if 2-ant RSDB board or 1-ant RSDB board */
423 #define BFL3_1X1_RSDB_ANT_SHIFT           24
424 
425 #define BFL3_EXT_LPO_ISCLOCK      0x02000000  /* External LPO is clock, not x-tal */
426 #define BFL3_FORCE_INT_LPO_SEL    0x04000000  /* Force internal lpo */
427 #define BFL3_FORCE_EXT_LPO_SEL    0x08000000  /* Force external lpo */
428 
429 #define BFL3_EN_BRCM_IMPBF        0x10000000  /* acphy, Allow BRCM Implicit TxBF */
430 
431 #define BFL3_PADCAL_OTP_VAL_EN    0x20000000  /* acphy, to read pad cal values from otp */
432 
433 #define BFL3_AVVMID_FROM_NVRAM    0x40000000  /* Read Av Vmid from NVRAM  */
434 #define BFL3_VLIN_EN_FROM_NVRAM    0x80000000  /* Read Vlin En from NVRAM  */
435 
436 #define BFL3_AVVMID_FROM_NVRAM_SHIFT   30   /* Read Av Vmid from NVRAM  */
437 #define BFL3_VLIN_EN_FROM_NVRAM_SHIFT   31   /* Enable Vlin  from NVRAM  */
438 
439 /* boardflags4 for SROM12/SROM13 */
440 
441 /* To distinguigh between normal and 4dB pad board */
442 #define BFL4_SROM12_4dBPAD			(1u << 0)
443 
444 /* Determine power detector type for 2G */
445 #define BFL4_SROM12_2G_DETTYPE			(1u << 1u)
446 
447 /* Determine power detector type for 5G */
448 #define BFL4_SROM12_5G_DETTYPE			(1u << 2u)
449 
450 /* using pa_dettype from SROM13 flags */
451 #define BFL4_SROM13_DETTYPE_EN			(1u << 3u)
452 
453 /* using cck spur reduction setting */
454 #define BFL4_SROM13_CCK_SPUR_EN			(1u << 4u)
455 
456 /* using 1.5V cbuck board */
457 #define BFL4_SROM13_1P5V_CBUCK			(1u << 7u)
458 
459 /* Enable/disable bit for sw chain mask */
460 #define BFL4_SROM13_EN_SW_TXRXCHAIN_MASK	(1u << 8u)
461 
462 #define BFL4_BTCOEX_OVER_SECI	0x00000400u	/* Enable btcoex over gci seci */
463 
464 /* RFFE rFEM 5G and 2G present bit */
465 #define BFL4_FEM_RFFE		(1u << 21u)
466 
467 /* papd params */
468 #define PAPD_TX_ATTN_2G 0xFF
469 #define PAPD_TX_ATTN_5G 0xFF00
470 #define PAPD_TX_ATTN_5G_SHIFT 8
471 #define PAPD_RX_ATTN_2G 0xFF
472 #define PAPD_RX_ATTN_5G 0xFF00
473 #define PAPD_RX_ATTN_5G_SHIFT 8
474 #define PAPD_CAL_IDX_2G 0xFF
475 #define PAPD_CAL_IDX_5G 0xFF00
476 #define PAPD_CAL_IDX_5G_SHIFT 8
477 #define PAPD_BBMULT_2G 0xFF
478 #define PAPD_BBMULT_5G 0xFF00
479 #define PAPD_BBMULT_5G_SHIFT 8
480 #define TIA_GAIN_MODE_2G 0xFF
481 #define TIA_GAIN_MODE_5G 0xFF00
482 #define TIA_GAIN_MODE_5G_SHIFT 8
483 #define PAPD_EPS_OFFSET_2G 0xFFFF
484 #define PAPD_EPS_OFFSET_5G 0xFFFF0000
485 #define PAPD_EPS_OFFSET_5G_SHIFT 16
486 #define PAPD_CALREF_DB_2G 0xFF
487 #define PAPD_CALREF_DB_5G 0xFF00
488 #define PAPD_CALREF_DB_5G_SHIFT 8
489 
490 /* board specific GPIO assignment, gpio 0-3 are also customer-configurable led */
491 #define	BOARD_GPIO_BTC3W_IN	0x850	/* bit 4 is RF_ACTIVE, bit 6 is STATUS, bit 11 is PRI */
492 #define	BOARD_GPIO_BTC3W_OUT	0x020	/* bit 5 is TX_CONF */
493 #define	BOARD_GPIO_BTCMOD_IN	0x010	/* bit 4 is the alternate BT Coexistence Input */
494 #define	BOARD_GPIO_BTCMOD_OUT	0x020	/* bit 5 is the alternate BT Coexistence Out */
495 #define	BOARD_GPIO_BTC_IN	0x080	/* bit 7 is BT Coexistence Input */
496 #define	BOARD_GPIO_BTC_OUT	0x100	/* bit 8 is BT Coexistence Out */
497 #define	BOARD_GPIO_PACTRL	0x200	/* bit 9 controls the PA on new 4306 boards */
498 #define BOARD_GPIO_12		0x1000	/* gpio 12 */
499 #define BOARD_GPIO_13		0x2000	/* gpio 13 */
500 #define BOARD_GPIO_BTC4_IN	0x0800	/* gpio 11, coex4, in */
501 #define BOARD_GPIO_BTC4_BT	0x2000	/* gpio 12, coex4, bt active */
502 #define BOARD_GPIO_BTC4_STAT	0x4000	/* gpio 14, coex4, status */
503 #define BOARD_GPIO_BTC4_WLAN	0x8000	/* gpio 15, coex4, wlan active */
504 #define	BOARD_GPIO_1_WLAN_PWR	0x02	/* throttle WLAN power on X21 board */
505 #define	BOARD_GPIO_2_WLAN_PWR	0x04	/* throttle WLAN power on X29C board */
506 #define	BOARD_GPIO_3_WLAN_PWR	0x08	/* throttle WLAN power on X28 board */
507 #define	BOARD_GPIO_4_WLAN_PWR	0x10	/* throttle WLAN power on X19 board */
508 #define	BOARD_GPIO_13_WLAN_PWR	0x2000	/* throttle WLAN power on X14 board */
509 
510 #define GPIO_BTC4W_OUT_4312  0x010  /* bit 4 is BT_IODISABLE */
511 
512 #define	PCI_CFG_GPIO_SCS	0x10	/* PCI config space bit 4 for 4306c0 slow clock source */
513 #define PCI_CFG_GPIO_HWRAD	0x20	/* PCI config space GPIO 13 for hw radio disable */
514 #define PCI_CFG_GPIO_XTAL	0x40	/* PCI config space GPIO 14 for Xtal power-up */
515 #define PCI_CFG_GPIO_PLL	0x80	/* PCI config space GPIO 15 for PLL power-down */
516 
517 /* need to be moved to a chip specific header file */
518 /* power control defines */
519 #define PLL_DELAY		150		/* us pll on delay */
520 #define FREF_DELAY		200		/* us fref change delay */
521 #define MIN_SLOW_CLK		32		/* us Slow clock period */
522 #define	XTAL_ON_DELAY		1000		/* us crystal power-on delay */
523 
524 /* Board IDs */
525 
526 /* Reference Board Types */
527 #define	BU4710_BOARD		0x0400
528 #define	VSIM4710_BOARD		0x0401
529 #define	QT4710_BOARD		0x0402
530 
531 #define	BCM94710D_BOARD		0x041a
532 #define	BCM94710R1_BOARD	0x041b
533 #define	BCM94710R4_BOARD	0x041c
534 #define	BCM94710AP_BOARD	0x041d
535 
536 #define	BU2050_BOARD		0x041f
537 
538 /* BCM4318 boards */
539 #define BU4318_BOARD		0x0447
540 #define CB4318_BOARD		0x0448
541 #define MPG4318_BOARD		0x0449
542 #define MP4318_BOARD		0x044a
543 #define SD4318_BOARD		0x044b
544 #define	BCM94318MPGH_BOARD	0x0463
545 
546 /* 4321 boards */
547 #define BU4321_BOARD		0x046b
548 #define BU4321E_BOARD		0x047c
549 #define MP4321_BOARD		0x046c
550 #define CB2_4321_BOARD		0x046d
551 #define CB2_4321_AG_BOARD	0x0066
552 #define MC4321_BOARD		0x046e
553 
554 /* 4360 Boards */
555 #define BCM94360X52C            0X0117
556 #define BCM94360X52D            0X0137
557 #define BCM94360X29C            0X0112
558 #define BCM94360X29CP2          0X0134
559 #define BCM94360X29CP3          0X013B
560 #define BCM94360X51             0x0111
561 #define BCM94360X51P2           0x0129
562 #define BCM94360X51P3           0x0142
563 #define BCM94360X51A            0x0135
564 #define BCM94360X51B            0x0136
565 #define BCM94360CS              0x061B
566 #define BCM94360J28_D11AC2G     0x0c00
567 #define BCM94360J28_D11AC5G     0x0c01
568 #define BCM94360USBH5_D11AC5G   0x06aa
569 #define BCM94360MCM5            0x06d8
570 
571 /* need to update si_fixup_vid_overrides() for additional platforms */
572 
573 /* 43012 wlbga Board */
574 #define BCM943012WLREF_SSID	0x07d7
575 
576 /* 43012 fcbga Board */
577 #define BCM943012FCREF_SSID	0x07d4
578 
579 /* 43602 Boards, unclear yet what boards will be created. */
580 #define BCM943602RSVD1_SSID	0x06a5
581 #define BCM943602RSVD2_SSID	0x06a6
582 #define BCM943602X87            0X0133
583 #define BCM943602X87P2          0X0152
584 #define BCM943602X87P3          0X0153 /* need to update si_fixup_vid_overrides() */
585 #define BCM943602X238           0X0132
586 #define BCM943602X238D          0X014A
587 #define BCM943602X238DP2        0X0155 /* J117 */
588 #define BCM943602X238DP3        0X0156 /* J94 */
589 #define BCM943602X100           0x0761 /* Dev only */
590 #define BCM943602X100GS         0x0157 /* Woody */
591 #define BCM943602X100P2         0x015A /* Buzz, Zurg */
592 
593 /* 4375B0 WLCSP SEMCO Board */
594 #define BCM94375B0_WLCSP_SSID	0x086b
595 
596 /* # of GPIO pins */
597 #define GPIO_NUMPINS		32
598 
599 /* chip RAM specifications */
600 #define RDL_RAM_SIZE_4360  0xA0000
601 #define RDL_RAM_BASE_4360  0x60000000
602 
603 /* generic defs for nvram "muxenab" bits
604 * Note: these differ for 4335a0. refer bcmchipc.h for specific mux options.
605 */
606 #define MUXENAB_UART		0x00000001
607 #define MUXENAB_GPIO		0x00000002
608 #define MUXENAB_ERCX		0x00000004	/* External Radio BT coex */
609 #define MUXENAB_JTAG		0x00000008
610 #define MUXENAB_HOST_WAKE	0x00000010	/* configure GPIO for SDIO host_wake */
611 #define MUXENAB_I2S_EN		0x00000020
612 #define MUXENAB_I2S_MASTER	0x00000040
613 #define MUXENAB_I2S_FULL	0x00000080
614 #define MUXENAB_SFLASH		0x00000100
615 #define MUXENAB_RFSWCTRL0	0x00000200
616 #define MUXENAB_RFSWCTRL1	0x00000400
617 #define MUXENAB_RFSWCTRL2	0x00000800
618 #define MUXENAB_SECI		0x00001000
619 #define MUXENAB_BT_LEGACY	0x00002000
620 #define MUXENAB_HOST_WAKE1	0x00004000	/* configure alternative GPIO for SDIO host_wake */
621 
622 /* Boot flags */
623 #define FLASH_KERNEL_NFLASH	0x00000001
624 #define FLASH_BOOT_NFLASH	0x00000002
625 
626 #endif /* _BCMDEVS_H */
627