aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcmdhd/include/sbchipc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/sbchipc.h')
-rw-r--r--drivers/net/wireless/bcmdhd/include/sbchipc.h1615
1 files changed, 1615 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/sbchipc.h b/drivers/net/wireless/bcmdhd/include/sbchipc.h
new file mode 100644
index 00000000000..cbd37490f1c
--- /dev/null
+++ b/drivers/net/wireless/bcmdhd/include/sbchipc.h
@@ -0,0 +1,1615 @@
1/*
2 * SiliconBackplane Chipcommon core hardware definitions.
3 *
4 * The chipcommon core provides chip identification, SB control,
5 * JTAG, 0/1/2 UARTs, clock frequency control, a watchdog interrupt timer,
6 * GPIO interface, extbus, and support for serial and parallel flashes.
7 *
8 * $Id: sbchipc.h,v 13.169.2.14 2011-02-10 23:43:55 Exp $
9 *
10 * Copyright (C) 1999-2011, Broadcom Corporation
11 *
12 * Unless you and Broadcom execute a separate written software license
13 * agreement governing use of this software, this software is licensed to you
14 * under the terms of the GNU General Public License version 2 (the "GPL"),
15 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
16 * following added to such license:
17 *
18 * As a special exception, the copyright holders of this software give you
19 * permission to link this software with independent modules, and to copy and
20 * distribute the resulting executable under terms of your choice, provided that
21 * you also meet, for each linked independent module, the terms and conditions of
22 * the license of that module. An independent module is a module which is not
23 * derived from this software. The special exception does not apply to any
24 * modifications of the software.
25 *
26 * Notwithstanding the above, under no circumstances may you combine this
27 * software in any way with any other Broadcom software provided under a license
28 * other than the GPL, without Broadcom's express prior written consent.
29 */
30
31
32#ifndef _SBCHIPC_H
33#define _SBCHIPC_H
34
35#ifndef _LANGUAGE_ASSEMBLY
36
37
38#ifndef PAD
39#define _PADLINE(line) pad ## line
40#define _XSTR(line) _PADLINE(line)
41#define PAD _XSTR(__LINE__)
42#endif
43
44typedef volatile struct {
45 uint32 chipid;
46 uint32 capabilities;
47 uint32 corecontrol;
48 uint32 bist;
49
50
51 uint32 otpstatus;
52 uint32 otpcontrol;
53 uint32 otpprog;
54 uint32 otplayout;
55
56
57 uint32 intstatus;
58 uint32 intmask;
59
60
61 uint32 chipcontrol;
62 uint32 chipstatus;
63
64
65 uint32 jtagcmd;
66 uint32 jtagir;
67 uint32 jtagdr;
68 uint32 jtagctrl;
69
70
71 uint32 flashcontrol;
72 uint32 flashaddress;
73 uint32 flashdata;
74 uint32 PAD[1];
75
76
77 uint32 broadcastaddress;
78 uint32 broadcastdata;
79
80
81 uint32 gpiopullup;
82 uint32 gpiopulldown;
83 uint32 gpioin;
84 uint32 gpioout;
85 uint32 gpioouten;
86 uint32 gpiocontrol;
87 uint32 gpiointpolarity;
88 uint32 gpiointmask;
89
90
91 uint32 gpioevent;
92 uint32 gpioeventintmask;
93
94
95 uint32 watchdog;
96
97
98 uint32 gpioeventintpolarity;
99
100
101 uint32 gpiotimerval;
102 uint32 gpiotimeroutmask;
103
104
105 uint32 clockcontrol_n;
106 uint32 clockcontrol_sb;
107 uint32 clockcontrol_pci;
108 uint32 clockcontrol_m2;
109 uint32 clockcontrol_m3;
110 uint32 clkdiv;
111 uint32 gpiodebugsel;
112 uint32 capabilities_ext;
113
114
115 uint32 pll_on_delay;
116 uint32 fref_sel_delay;
117 uint32 slow_clk_ctl;
118 uint32 PAD;
119
120
121 uint32 system_clk_ctl;
122 uint32 clkstatestretch;
123 uint32 PAD[2];
124
125
126 uint32 bp_addrlow;
127 uint32 bp_addrhigh;
128 uint32 bp_data;
129 uint32 PAD;
130 uint32 bp_indaccess;
131
132 uint32 gsioctrl;
133 uint32 gsioaddress;
134 uint32 gsiodata;
135
136
137 uint32 clkdiv2;
138 uint32 PAD[2];
139
140
141 uint32 eromptr;
142
143
144 uint32 pcmcia_config;
145 uint32 pcmcia_memwait;
146 uint32 pcmcia_attrwait;
147 uint32 pcmcia_iowait;
148 uint32 ide_config;
149 uint32 ide_memwait;
150 uint32 ide_attrwait;
151 uint32 ide_iowait;
152 uint32 prog_config;
153 uint32 prog_waitcount;
154 uint32 flash_config;
155 uint32 flash_waitcount;
156 uint32 PAD[4];
157 uint32 PAD[40];
158
159
160
161 uint32 clk_ctl_st;
162 uint32 hw_war;
163 uint32 PAD[70];
164
165
166 uint8 uart0data;
167 uint8 uart0imr;
168 uint8 uart0fcr;
169 uint8 uart0lcr;
170 uint8 uart0mcr;
171 uint8 uart0lsr;
172 uint8 uart0msr;
173 uint8 uart0scratch;
174 uint8 PAD[248];
175
176 uint8 uart1data;
177 uint8 uart1imr;
178 uint8 uart1fcr;
179 uint8 uart1lcr;
180 uint8 uart1mcr;
181 uint8 uart1lsr;
182 uint8 uart1msr;
183 uint8 uart1scratch;
184 uint32 PAD[126];
185
186
187
188 uint32 pmucontrol;
189 uint32 pmucapabilities;
190 uint32 pmustatus;
191 uint32 res_state;
192 uint32 res_pending;
193 uint32 pmutimer;
194 uint32 min_res_mask;
195 uint32 max_res_mask;
196 uint32 res_table_sel;
197 uint32 res_dep_mask;
198 uint32 res_updn_timer;
199 uint32 res_timer;
200 uint32 clkstretch;
201 uint32 pmuwatchdog;
202 uint32 gpiosel;
203 uint32 gpioenable;
204 uint32 res_req_timer_sel;
205 uint32 res_req_timer;
206 uint32 res_req_mask;
207 uint32 PAD;
208 uint32 chipcontrol_addr;
209 uint32 chipcontrol_data;
210 uint32 regcontrol_addr;
211 uint32 regcontrol_data;
212 uint32 pllcontrol_addr;
213 uint32 pllcontrol_data;
214 uint32 pmustrapopt;
215 uint32 pmu_xtalfreq;
216 uint32 PAD[100];
217 uint16 sromotp[768];
218} chipcregs_t;
219
220#endif
221
222
223#define CC_CHIPID 0
224#define CC_CAPABILITIES 4
225#define CC_CHIPST 0x2c
226#define CC_EROMPTR 0xfc
227
228
229#define CC_OTPST 0x10
230#define CC_JTAGCMD 0x30
231#define CC_JTAGIR 0x34
232#define CC_JTAGDR 0x38
233#define CC_JTAGCTRL 0x3c
234#define CC_GPIOPU 0x58
235#define CC_GPIOPD 0x5c
236#define CC_GPIOIN 0x60
237#define CC_GPIOOUT 0x64
238#define CC_GPIOOUTEN 0x68
239#define CC_GPIOCTRL 0x6c
240#define CC_GPIOPOL 0x70
241#define CC_GPIOINTM 0x74
242#define CC_WATCHDOG 0x80
243#define CC_CLKC_N 0x90
244#define CC_CLKC_M0 0x94
245#define CC_CLKC_M1 0x98
246#define CC_CLKC_M2 0x9c
247#define CC_CLKC_M3 0xa0
248#define CC_CLKDIV 0xa4
249#define CC_SYS_CLK_CTL 0xc0
250#define CC_CLK_CTL_ST SI_CLK_CTL_ST
251#define PMU_CTL 0x600
252#define PMU_CAP 0x604
253#define PMU_ST 0x608
254#define PMU_RES_STATE 0x60c
255#define PMU_TIMER 0x614
256#define PMU_MIN_RES_MASK 0x618
257#define PMU_MAX_RES_MASK 0x61c
258#define CC_CHIPCTL_ADDR 0x650
259#define CC_CHIPCTL_DATA 0x654
260#define PMU_REG_CONTROL_ADDR 0x658
261#define PMU_REG_CONTROL_DATA 0x65C
262#define PMU_PLL_CONTROL_ADDR 0x660
263#define PMU_PLL_CONTROL_DATA 0x664
264#define CC_SROM_OTP 0x800
265
266
267#define CID_ID_MASK 0x0000ffff
268#define CID_REV_MASK 0x000f0000
269#define CID_REV_SHIFT 16
270#define CID_PKG_MASK 0x00f00000
271#define CID_PKG_SHIFT 20
272#define CID_CC_MASK 0x0f000000
273#define CID_CC_SHIFT 24
274#define CID_TYPE_MASK 0xf0000000
275#define CID_TYPE_SHIFT 28
276
277
278#define CC_CAP_UARTS_MASK 0x00000003
279#define CC_CAP_MIPSEB 0x00000004
280#define CC_CAP_UCLKSEL 0x00000018
281#define CC_CAP_UINTCLK 0x00000008
282#define CC_CAP_UARTGPIO 0x00000020
283#define CC_CAP_EXTBUS_MASK 0x000000c0
284#define CC_CAP_EXTBUS_NONE 0x00000000
285#define CC_CAP_EXTBUS_FULL 0x00000040
286#define CC_CAP_EXTBUS_PROG 0x00000080
287#define CC_CAP_FLASH_MASK 0x00000700
288#define CC_CAP_PLL_MASK 0x00038000
289#define CC_CAP_PWR_CTL 0x00040000
290#define CC_CAP_OTPSIZE 0x00380000
291#define CC_CAP_OTPSIZE_SHIFT 19
292#define CC_CAP_OTPSIZE_BASE 5
293#define CC_CAP_JTAGP 0x00400000
294#define CC_CAP_ROM 0x00800000
295#define CC_CAP_BKPLN64 0x08000000
296#define CC_CAP_PMU 0x10000000
297#define CC_CAP_ECI 0x20000000
298#define CC_CAP_SROM 0x40000000
299#define CC_CAP_NFLASH 0x80000000
300
301#define CC_CAP2_SECI 0x00000001
302#define CC_CAP2_GSIO 0x00000002
303
304
305#define CC_CAP_EXT_SECI_PRESENT 0x00000001
306
307
308#define PLL_NONE 0x00000000
309#define PLL_TYPE1 0x00010000
310#define PLL_TYPE2 0x00020000
311#define PLL_TYPE3 0x00030000
312#define PLL_TYPE4 0x00008000
313#define PLL_TYPE5 0x00018000
314#define PLL_TYPE6 0x00028000
315#define PLL_TYPE7 0x00038000
316
317
318#define ILP_CLOCK 32000
319
320
321#define ALP_CLOCK 20000000
322
323
324#define HT_CLOCK 80000000
325
326
327#define CC_UARTCLKO 0x00000001
328#define CC_SE 0x00000002
329#define CC_ASYNCGPIO 0x00000004
330#define CC_UARTCLKEN 0x00000008
331
332
333#define CHIPCTRL_4321A0_DEFAULT 0x3a4
334#define CHIPCTRL_4321A1_DEFAULT 0x0a4
335#define CHIPCTRL_4321_PLL_DOWN 0x800000
336
337
338#define OTPS_OL_MASK 0x000000ff
339#define OTPS_OL_MFG 0x00000001
340#define OTPS_OL_OR1 0x00000002
341#define OTPS_OL_OR2 0x00000004
342#define OTPS_OL_GU 0x00000008
343#define OTPS_GUP_MASK 0x00000f00
344#define OTPS_GUP_SHIFT 8
345#define OTPS_GUP_HW 0x00000100
346#define OTPS_GUP_SW 0x00000200
347#define OTPS_GUP_CI 0x00000400
348#define OTPS_GUP_FUSE 0x00000800
349#define OTPS_READY 0x00001000
350#define OTPS_RV(x) (1 << (16 + (x)))
351#define OTPS_RV_MASK 0x0fff0000
352
353
354#define OTPC_PROGSEL 0x00000001
355#define OTPC_PCOUNT_MASK 0x0000000e
356#define OTPC_PCOUNT_SHIFT 1
357#define OTPC_VSEL_MASK 0x000000f0
358#define OTPC_VSEL_SHIFT 4
359#define OTPC_TMM_MASK 0x00000700
360#define OTPC_TMM_SHIFT 8
361#define OTPC_ODM 0x00000800
362#define OTPC_PROGEN 0x80000000
363
364
365#define OTPP_COL_MASK 0x000000ff
366#define OTPP_COL_SHIFT 0
367#define OTPP_ROW_MASK 0x0000ff00
368#define OTPP_ROW_SHIFT 8
369#define OTPP_OC_MASK 0x0f000000
370#define OTPP_OC_SHIFT 24
371#define OTPP_READERR 0x10000000
372#define OTPP_VALUE_MASK 0x20000000
373#define OTPP_VALUE_SHIFT 29
374#define OTPP_START_BUSY 0x80000000
375#define OTPP_READ 0x40000000
376
377
378#define OTP_CISFORMAT_NEW 0x80000000
379
380
381#define OTPPOC_READ 0
382#define OTPPOC_BIT_PROG 1
383#define OTPPOC_VERIFY 3
384#define OTPPOC_INIT 4
385#define OTPPOC_SET 5
386#define OTPPOC_RESET 6
387#define OTPPOC_OCST 7
388#define OTPPOC_ROW_LOCK 8
389#define OTPPOC_PRESCN_TEST 9
390
391
392
393#define JTAGM_CREV_OLD 10
394#define JTAGM_CREV_IRP 22
395#define JTAGM_CREV_RTI 28
396
397
398#define JCMD_START 0x80000000
399#define JCMD_BUSY 0x80000000
400#define JCMD_STATE_MASK 0x60000000
401#define JCMD_STATE_TLR 0x00000000
402#define JCMD_STATE_PIR 0x20000000
403#define JCMD_STATE_PDR 0x40000000
404#define JCMD_STATE_RTI 0x60000000
405#define JCMD0_ACC_MASK 0x0000f000
406#define JCMD0_ACC_IRDR 0x00000000
407#define JCMD0_ACC_DR 0x00001000
408#define JCMD0_ACC_IR 0x00002000
409#define JCMD0_ACC_RESET 0x00003000
410#define JCMD0_ACC_IRPDR 0x00004000
411#define JCMD0_ACC_PDR 0x00005000
412#define JCMD0_IRW_MASK 0x00000f00
413#define JCMD_ACC_MASK 0x000f0000
414#define JCMD_ACC_IRDR 0x00000000
415#define JCMD_ACC_DR 0x00010000
416#define JCMD_ACC_IR 0x00020000
417#define JCMD_ACC_RESET 0x00030000
418#define JCMD_ACC_IRPDR 0x00040000
419#define JCMD_ACC_PDR 0x00050000
420#define JCMD_ACC_PIR 0x00060000
421#define JCMD_ACC_IRDR_I 0x00070000
422#define JCMD_ACC_DR_I 0x00080000
423#define JCMD_IRW_MASK 0x00001f00
424#define JCMD_IRW_SHIFT 8
425#define JCMD_DRW_MASK 0x0000003f
426
427
428#define JCTRL_FORCE_CLK 4
429#define JCTRL_EXT_EN 2
430#define JCTRL_EN 1
431
432
433#define CLKD_SFLASH 0x0f000000
434#define CLKD_SFLASH_SHIFT 24
435#define CLKD_OTP 0x000f0000
436#define CLKD_OTP_SHIFT 16
437#define CLKD_JTAG 0x00000f00
438#define CLKD_JTAG_SHIFT 8
439#define CLKD_UART 0x000000ff
440
441#define CLKD2_SROM 0x00000003
442
443
444#define CI_GPIO 0x00000001
445#define CI_EI 0x00000002
446#define CI_TEMP 0x00000004
447#define CI_SIRQ 0x00000008
448#define CI_ECI 0x00000010
449#define CI_PMU 0x00000020
450#define CI_UART 0x00000040
451#define CI_WDRESET 0x80000000
452
453
454#define SCC_SS_MASK 0x00000007
455#define SCC_SS_LPO 0x00000000
456#define SCC_SS_XTAL 0x00000001
457#define SCC_SS_PCI 0x00000002
458#define SCC_LF 0x00000200
459#define SCC_LP 0x00000400
460#define SCC_FS 0x00000800
461#define SCC_IP 0x00001000
462#define SCC_XC 0x00002000
463#define SCC_XP 0x00004000
464#define SCC_CD_MASK 0xffff0000
465#define SCC_CD_SHIFT 16
466
467
468#define SYCC_IE 0x00000001
469#define SYCC_AE 0x00000002
470#define SYCC_FP 0x00000004
471#define SYCC_AR 0x00000008
472#define SYCC_HR 0x00000010
473#define SYCC_CD_MASK 0xffff0000
474#define SYCC_CD_SHIFT 16
475
476
477#define BPIA_BYTEEN 0x0000000f
478#define BPIA_SZ1 0x00000001
479#define BPIA_SZ2 0x00000003
480#define BPIA_SZ4 0x00000007
481#define BPIA_SZ8 0x0000000f
482#define BPIA_WRITE 0x00000100
483#define BPIA_START 0x00000200
484#define BPIA_BUSY 0x00000200
485#define BPIA_ERROR 0x00000400
486
487
488#define CF_EN 0x00000001
489#define CF_EM_MASK 0x0000000e
490#define CF_EM_SHIFT 1
491#define CF_EM_FLASH 0
492#define CF_EM_SYNC 2
493#define CF_EM_PCMCIA 4
494#define CF_DS 0x00000010
495#define CF_BS 0x00000020
496#define CF_CD_MASK 0x000000c0
497#define CF_CD_SHIFT 6
498#define CF_CD_DIV2 0x00000000
499#define CF_CD_DIV3 0x00000040
500#define CF_CD_DIV4 0x00000080
501#define CF_CE 0x00000100
502#define CF_SB 0x00000200
503
504
505#define PM_W0_MASK 0x0000003f
506#define PM_W1_MASK 0x00001f00
507#define PM_W1_SHIFT 8
508#define PM_W2_MASK 0x001f0000
509#define PM_W2_SHIFT 16
510#define PM_W3_MASK 0x1f000000
511#define PM_W3_SHIFT 24
512
513
514#define PA_W0_MASK 0x0000003f
515#define PA_W1_MASK 0x00001f00
516#define PA_W1_SHIFT 8
517#define PA_W2_MASK 0x001f0000
518#define PA_W2_SHIFT 16
519#define PA_W3_MASK 0x1f000000
520#define PA_W3_SHIFT 24
521
522
523#define PI_W0_MASK 0x0000003f
524#define PI_W1_MASK 0x00001f00
525#define PI_W1_SHIFT 8
526#define PI_W2_MASK 0x001f0000
527#define PI_W2_SHIFT 16
528#define PI_W3_MASK 0x1f000000
529#define PI_W3_SHIFT 24
530
531
532#define PW_W0_MASK 0x0000001f
533#define PW_W1_MASK 0x00001f00
534#define PW_W1_SHIFT 8
535#define PW_W2_MASK 0x001f0000
536#define PW_W2_SHIFT 16
537#define PW_W3_MASK 0x1f000000
538#define PW_W3_SHIFT 24
539
540#define PW_W0 0x0000000c
541#define PW_W1 0x00000a00
542#define PW_W2 0x00020000
543#define PW_W3 0x01000000
544
545
546#define FW_W0_MASK 0x0000003f
547#define FW_W1_MASK 0x00001f00
548#define FW_W1_SHIFT 8
549#define FW_W2_MASK 0x001f0000
550#define FW_W2_SHIFT 16
551#define FW_W3_MASK 0x1f000000
552#define FW_W3_SHIFT 24
553
554
555#define SRC_START 0x80000000
556#define SRC_BUSY 0x80000000
557#define SRC_OPCODE 0x60000000
558#define SRC_OP_READ 0x00000000
559#define SRC_OP_WRITE 0x20000000
560#define SRC_OP_WRDIS 0x40000000
561#define SRC_OP_WREN 0x60000000
562#define SRC_OTPSEL 0x00000010
563#define SRC_LOCK 0x00000008
564#define SRC_SIZE_MASK 0x00000006
565#define SRC_SIZE_1K 0x00000000
566#define SRC_SIZE_4K 0x00000002
567#define SRC_SIZE_16K 0x00000004
568#define SRC_SIZE_SHIFT 1
569#define SRC_PRESENT 0x00000001
570
571
572#define PCTL_ILP_DIV_MASK 0xffff0000
573#define PCTL_ILP_DIV_SHIFT 16
574#define PCTL_PLL_PLLCTL_UPD 0x00000400
575#define PCTL_NOILP_ON_WAIT 0x00000200
576#define PCTL_HT_REQ_EN 0x00000100
577#define PCTL_ALP_REQ_EN 0x00000080
578#define PCTL_XTALFREQ_MASK 0x0000007c
579#define PCTL_XTALFREQ_SHIFT 2
580#define PCTL_ILP_DIV_EN 0x00000002
581#define PCTL_LPO_SEL 0x00000001
582
583
584#define CSTRETCH_HT 0xffff0000
585#define CSTRETCH_ALP 0x0000ffff
586
587
588#define GPIO_ONTIME_SHIFT 16
589
590
591#define CN_N1_MASK 0x3f
592#define CN_N2_MASK 0x3f00
593#define CN_N2_SHIFT 8
594#define CN_PLLC_MASK 0xf0000
595#define CN_PLLC_SHIFT 16
596
597
598#define CC_M1_MASK 0x3f
599#define CC_M2_MASK 0x3f00
600#define CC_M2_SHIFT 8
601#define CC_M3_MASK 0x3f0000
602#define CC_M3_SHIFT 16
603#define CC_MC_MASK 0x1f000000
604#define CC_MC_SHIFT 24
605
606
607#define CC_F6_2 0x02
608#define CC_F6_3 0x03
609#define CC_F6_4 0x05
610#define CC_F6_5 0x09
611#define CC_F6_6 0x11
612#define CC_F6_7 0x21
613
614#define CC_F5_BIAS 5
615
616#define CC_MC_BYPASS 0x08
617#define CC_MC_M1 0x04
618#define CC_MC_M1M2 0x02
619#define CC_MC_M1M2M3 0x01
620#define CC_MC_M1M3 0x11
621
622
623#define CC_T2_BIAS 2
624#define CC_T2M2_BIAS 3
625
626#define CC_T2MC_M1BYP 1
627#define CC_T2MC_M2BYP 2
628#define CC_T2MC_M3BYP 4
629
630
631#define CC_T6_MMASK 1
632#define CC_T6_M0 120000000
633#define CC_T6_M1 100000000
634#define SB2MIPS_T6(sb) (2 * (sb))
635
636
637#define CC_CLOCK_BASE1 24000000
638#define CC_CLOCK_BASE2 12500000
639
640
641#define CLKC_5350_N 0x0311
642#define CLKC_5350_M 0x04020009
643
644
645#define FLASH_NONE 0x000
646#define SFLASH_ST 0x100
647#define SFLASH_AT 0x200
648#define PFLASH 0x700
649
650
651#define CC_CFG_EN 0x0001
652#define CC_CFG_EM_MASK 0x000e
653#define CC_CFG_EM_ASYNC 0x0000
654#define CC_CFG_EM_SYNC 0x0002
655#define CC_CFG_EM_PCMCIA 0x0004
656#define CC_CFG_EM_IDE 0x0006
657#define CC_CFG_DS 0x0010
658#define CC_CFG_CD_MASK 0x00e0
659#define CC_CFG_CE 0x0100
660#define CC_CFG_SB 0x0200
661#define CC_CFG_IS 0x0400
662
663
664#define CC_EB_BASE 0x1a000000
665#define CC_EB_PCMCIA_MEM 0x1a000000
666#define CC_EB_PCMCIA_IO 0x1a200000
667#define CC_EB_PCMCIA_CFG 0x1a400000
668#define CC_EB_IDE 0x1a800000
669#define CC_EB_PCMCIA1_MEM 0x1a800000
670#define CC_EB_PCMCIA1_IO 0x1aa00000
671#define CC_EB_PCMCIA1_CFG 0x1ac00000
672#define CC_EB_PROGIF 0x1b000000
673
674
675
676#define SFLASH_OPCODE 0x000000ff
677#define SFLASH_ACTION 0x00000700
678#define SFLASH_CS_ACTIVE 0x00001000
679#define SFLASH_START 0x80000000
680#define SFLASH_BUSY SFLASH_START
681
682
683#define SFLASH_ACT_OPONLY 0x0000
684#define SFLASH_ACT_OP1D 0x0100
685#define SFLASH_ACT_OP3A 0x0200
686#define SFLASH_ACT_OP3A1D 0x0300
687#define SFLASH_ACT_OP3A4D 0x0400
688#define SFLASH_ACT_OP3A4X4D 0x0500
689#define SFLASH_ACT_OP3A1X4D 0x0700
690
691
692#define SFLASH_ST_WREN 0x0006
693#define SFLASH_ST_WRDIS 0x0004
694#define SFLASH_ST_RDSR 0x0105
695#define SFLASH_ST_WRSR 0x0101
696#define SFLASH_ST_READ 0x0303
697#define SFLASH_ST_PP 0x0302
698#define SFLASH_ST_SE 0x02d8
699#define SFLASH_ST_BE 0x00c7
700#define SFLASH_ST_DP 0x00b9
701#define SFLASH_ST_RES 0x03ab
702#define SFLASH_ST_CSA 0x1000
703#define SFLASH_ST_SSE 0x0220
704
705
706#define SFLASH_ST_WIP 0x01
707#define SFLASH_ST_WEL 0x02
708#define SFLASH_ST_BP_MASK 0x1c
709#define SFLASH_ST_BP_SHIFT 2
710#define SFLASH_ST_SRWD 0x80
711
712
713#define SFLASH_AT_READ 0x07e8
714#define SFLASH_AT_PAGE_READ 0x07d2
715#define SFLASH_AT_BUF1_READ
716#define SFLASH_AT_BUF2_READ
717#define SFLASH_AT_STATUS 0x01d7
718#define SFLASH_AT_BUF1_WRITE 0x0384
719#define SFLASH_AT_BUF2_WRITE 0x0387
720#define SFLASH_AT_BUF1_ERASE_PROGRAM 0x0283
721#define SFLASH_AT_BUF2_ERASE_PROGRAM 0x0286
722#define SFLASH_AT_BUF1_PROGRAM 0x0288
723#define SFLASH_AT_BUF2_PROGRAM 0x0289
724#define SFLASH_AT_PAGE_ERASE 0x0281
725#define SFLASH_AT_BLOCK_ERASE 0x0250
726#define SFLASH_AT_BUF1_WRITE_ERASE_PROGRAM 0x0382
727#define SFLASH_AT_BUF2_WRITE_ERASE_PROGRAM 0x0385
728#define SFLASH_AT_BUF1_LOAD 0x0253
729#define SFLASH_AT_BUF2_LOAD 0x0255
730#define SFLASH_AT_BUF1_COMPARE 0x0260
731#define SFLASH_AT_BUF2_COMPARE 0x0261
732#define SFLASH_AT_BUF1_REPROGRAM 0x0258
733#define SFLASH_AT_BUF2_REPROGRAM 0x0259
734
735
736#define SFLASH_AT_READY 0x80
737#define SFLASH_AT_MISMATCH 0x40
738#define SFLASH_AT_ID_MASK 0x38
739#define SFLASH_AT_ID_SHIFT 3
740
741
742#define GSIO_START 0x80000000
743#define GSIO_BUSY GSIO_START
744
745
746
747#define UART_RX 0
748#define UART_TX 0
749#define UART_DLL 0
750#define UART_IER 1
751#define UART_DLM 1
752#define UART_IIR 2
753#define UART_FCR 2
754#define UART_LCR 3
755#define UART_MCR 4
756#define UART_LSR 5
757#define UART_MSR 6
758#define UART_SCR 7
759#define UART_LCR_DLAB 0x80
760#define UART_LCR_WLEN8 0x03
761#define UART_MCR_OUT2 0x08
762#define UART_MCR_LOOP 0x10
763#define UART_LSR_RX_FIFO 0x80
764#define UART_LSR_TDHR 0x40
765#define UART_LSR_THRE 0x20
766#define UART_LSR_BREAK 0x10
767#define UART_LSR_FRAMING 0x08
768#define UART_LSR_PARITY 0x04
769#define UART_LSR_OVERRUN 0x02
770#define UART_LSR_RXRDY 0x01
771#define UART_FCR_FIFO_ENABLE 1
772
773
774#define UART_IIR_FIFO_MASK 0xc0
775#define UART_IIR_INT_MASK 0xf
776#define UART_IIR_MDM_CHG 0x0
777#define UART_IIR_NOINT 0x1
778#define UART_IIR_THRE 0x2
779#define UART_IIR_RCVD_DATA 0x4
780#define UART_IIR_RCVR_STATUS 0x6
781#define UART_IIR_CHAR_TIME 0xc
782
783
784#define UART_IER_EDSSI 8
785#define UART_IER_ELSI 4
786#define UART_IER_ETBEI 2
787#define UART_IER_ERBFI 1
788
789
790#define PST_EXTLPOAVAIL 0x0100
791#define PST_WDRESET 0x0080
792#define PST_INTPEND 0x0040
793#define PST_SBCLKST 0x0030
794#define PST_SBCLKST_ILP 0x0010
795#define PST_SBCLKST_ALP 0x0020
796#define PST_SBCLKST_HT 0x0030
797#define PST_ALPAVAIL 0x0008
798#define PST_HTAVAIL 0x0004
799#define PST_RESINIT 0x0003
800
801
802#define PCAP_REV_MASK 0x000000ff
803#define PCAP_RC_MASK 0x00001f00
804#define PCAP_RC_SHIFT 8
805#define PCAP_TC_MASK 0x0001e000
806#define PCAP_TC_SHIFT 13
807#define PCAP_PC_MASK 0x001e0000
808#define PCAP_PC_SHIFT 17
809#define PCAP_VC_MASK 0x01e00000
810#define PCAP_VC_SHIFT 21
811#define PCAP_CC_MASK 0x1e000000
812#define PCAP_CC_SHIFT 25
813#define PCAP5_PC_MASK 0x003e0000
814#define PCAP5_PC_SHIFT 17
815#define PCAP5_VC_MASK 0x07c00000
816#define PCAP5_VC_SHIFT 22
817#define PCAP5_CC_MASK 0xf8000000
818#define PCAP5_CC_SHIFT 27
819
820
821
822#define PRRT_TIME_MASK 0x03ff
823#define PRRT_INTEN 0x0400
824#define PRRT_REQ_ACTIVE 0x0800
825#define PRRT_ALP_REQ 0x1000
826#define PRRT_HT_REQ 0x2000
827
828
829#define PMURES_BIT(bit) (1 << (bit))
830
831
832#define PMURES_MAX_RESNUM 30
833
834
835#define PMU_CHIPCTL0 0
836
837
838#define PMU_CC1_CLKREQ_TYPE_SHIFT 19
839#define PMU_CC1_CLKREQ_TYPE_MASK (1 << PMU_CC1_CLKREQ_TYPE_SHIFT)
840
841#define CLKREQ_TYPE_CONFIG_OPENDRAIN 0
842#define CLKREQ_TYPE_CONFIG_PUSHPULL 1
843
844
845#define PMU_CHIPCTL1 1
846#define PMU_CC1_RXC_DLL_BYPASS 0x00010000
847
848#define PMU_CC1_IF_TYPE_MASK 0x00000030
849#define PMU_CC1_IF_TYPE_RMII 0x00000000
850#define PMU_CC1_IF_TYPE_MII 0x00000010
851#define PMU_CC1_IF_TYPE_RGMII 0x00000020
852
853#define PMU_CC1_SW_TYPE_MASK 0x000000c0
854#define PMU_CC1_SW_TYPE_EPHY 0x00000000
855#define PMU_CC1_SW_TYPE_EPHYMII 0x00000040
856#define PMU_CC1_SW_TYPE_EPHYRMII 0x00000080
857#define PMU_CC1_SW_TYPE_RGMII 0x000000c0
858
859
860
861
862
863#define PMU0_PLL0_PLLCTL0 0
864#define PMU0_PLL0_PC0_PDIV_MASK 1
865#define PMU0_PLL0_PC0_PDIV_FREQ 25000
866#define PMU0_PLL0_PC0_DIV_ARM_MASK 0x00000038
867#define PMU0_PLL0_PC0_DIV_ARM_SHIFT 3
868#define PMU0_PLL0_PC0_DIV_ARM_BASE 8
869
870
871#define PMU0_PLL0_PC0_DIV_ARM_110MHZ 0
872#define PMU0_PLL0_PC0_DIV_ARM_97_7MHZ 1
873#define PMU0_PLL0_PC0_DIV_ARM_88MHZ 2
874#define PMU0_PLL0_PC0_DIV_ARM_80MHZ 3
875#define PMU0_PLL0_PC0_DIV_ARM_73_3MHZ 4
876#define PMU0_PLL0_PC0_DIV_ARM_67_7MHZ 5
877#define PMU0_PLL0_PC0_DIV_ARM_62_9MHZ 6
878#define PMU0_PLL0_PC0_DIV_ARM_58_6MHZ 7
879
880
881#define PMU0_PLL0_PLLCTL1 1
882#define PMU0_PLL0_PC1_WILD_INT_MASK 0xf0000000
883#define PMU0_PLL0_PC1_WILD_INT_SHIFT 28
884#define PMU0_PLL0_PC1_WILD_FRAC_MASK 0x0fffff00
885#define PMU0_PLL0_PC1_WILD_FRAC_SHIFT 8
886#define PMU0_PLL0_PC1_STOP_MOD 0x00000040
887
888
889#define PMU0_PLL0_PLLCTL2 2
890#define PMU0_PLL0_PC2_WILD_INT_MASK 0xf
891#define PMU0_PLL0_PC2_WILD_INT_SHIFT 4
892
893
894
895#define PMU1_PLL0_PLLCTL0 0
896#define PMU1_PLL0_PC0_P1DIV_MASK 0x00f00000
897#define PMU1_PLL0_PC0_P1DIV_SHIFT 20
898#define PMU1_PLL0_PC0_P2DIV_MASK 0x0f000000
899#define PMU1_PLL0_PC0_P2DIV_SHIFT 24
900
901
902#define PMU1_PLL0_PLLCTL1 1
903#define PMU1_PLL0_PC1_M1DIV_MASK 0x000000ff
904#define PMU1_PLL0_PC1_M1DIV_SHIFT 0
905#define PMU1_PLL0_PC1_M2DIV_MASK 0x0000ff00
906#define PMU1_PLL0_PC1_M2DIV_SHIFT 8
907#define PMU1_PLL0_PC1_M3DIV_MASK 0x00ff0000
908#define PMU1_PLL0_PC1_M3DIV_SHIFT 16
909#define PMU1_PLL0_PC1_M4DIV_MASK 0xff000000
910#define PMU1_PLL0_PC1_M4DIV_SHIFT 24
911#define PMU1_PLL0_PC1_M4DIV_BY_9 9
912#define PMU1_PLL0_PC1_M4DIV_BY_18 0x12
913#define PMU1_PLL0_PC1_M4DIV_BY_36 0x24
914
915#define DOT11MAC_880MHZ_CLK_DIVISOR_SHIFT 8
916#define DOT11MAC_880MHZ_CLK_DIVISOR_MASK (0xFF << DOT11MAC_880MHZ_CLK_DIVISOR_SHIFT)
917#define DOT11MAC_880MHZ_CLK_DIVISOR_VAL (0xE << DOT11MAC_880MHZ_CLK_DIVISOR_SHIFT)
918
919
920#define PMU1_PLL0_PLLCTL2 2
921#define PMU1_PLL0_PC2_M5DIV_MASK 0x000000ff
922#define PMU1_PLL0_PC2_M5DIV_SHIFT 0
923#define PMU1_PLL0_PC2_M5DIV_BY_12 0xc
924#define PMU1_PLL0_PC2_M5DIV_BY_18 0x12
925#define PMU1_PLL0_PC2_M5DIV_BY_36 0x24
926#define PMU1_PLL0_PC2_M6DIV_MASK 0x0000ff00
927#define PMU1_PLL0_PC2_M6DIV_SHIFT 8
928#define PMU1_PLL0_PC2_M6DIV_BY_18 0x12
929#define PMU1_PLL0_PC2_M6DIV_BY_36 0x24
930#define PMU1_PLL0_PC2_NDIV_MODE_MASK 0x000e0000
931#define PMU1_PLL0_PC2_NDIV_MODE_SHIFT 17
932#define PMU1_PLL0_PC2_NDIV_MODE_MASH 1
933#define PMU1_PLL0_PC2_NDIV_MODE_MFB 2
934#define PMU1_PLL0_PC2_NDIV_INT_MASK 0x1ff00000
935#define PMU1_PLL0_PC2_NDIV_INT_SHIFT 20
936
937
938#define PMU1_PLL0_PLLCTL3 3
939#define PMU1_PLL0_PC3_NDIV_FRAC_MASK 0x00ffffff
940#define PMU1_PLL0_PC3_NDIV_FRAC_SHIFT 0
941
942
943#define PMU1_PLL0_PLLCTL4 4
944
945
946#define PMU1_PLL0_PLLCTL5 5
947#define PMU1_PLL0_PC5_CLK_DRV_MASK 0xffffff00
948#define PMU1_PLL0_PC5_CLK_DRV_SHIFT 8
949
950
951#define PMU2_PHY_PLL_PLLCTL 4
952#define PMU2_SI_PLL_PLLCTL 10
953
954
955
956
957#define PMU2_PLL_PLLCTL0 0
958#define PMU2_PLL_PC0_P1DIV_MASK 0x00f00000
959#define PMU2_PLL_PC0_P1DIV_SHIFT 20
960#define PMU2_PLL_PC0_P2DIV_MASK 0x0f000000
961#define PMU2_PLL_PC0_P2DIV_SHIFT 24
962
963
964#define PMU2_PLL_PLLCTL1 1
965#define PMU2_PLL_PC1_M1DIV_MASK 0x000000ff
966#define PMU2_PLL_PC1_M1DIV_SHIFT 0
967#define PMU2_PLL_PC1_M2DIV_MASK 0x0000ff00
968#define PMU2_PLL_PC1_M2DIV_SHIFT 8
969#define PMU2_PLL_PC1_M3DIV_MASK 0x00ff0000
970#define PMU2_PLL_PC1_M3DIV_SHIFT 16
971#define PMU2_PLL_PC1_M4DIV_MASK 0xff000000
972#define PMU2_PLL_PC1_M4DIV_SHIFT 24
973
974
975#define PMU2_PLL_PLLCTL2 2
976#define PMU2_PLL_PC2_M5DIV_MASK 0x000000ff
977#define PMU2_PLL_PC2_M5DIV_SHIFT 0
978#define PMU2_PLL_PC2_M6DIV_MASK 0x0000ff00
979#define PMU2_PLL_PC2_M6DIV_SHIFT 8
980#define PMU2_PLL_PC2_NDIV_MODE_MASK 0x000e0000
981#define PMU2_PLL_PC2_NDIV_MODE_SHIFT 17
982#define PMU2_PLL_PC2_NDIV_INT_MASK 0x1ff00000
983#define PMU2_PLL_PC2_NDIV_INT_SHIFT 20
984
985
986#define PMU2_PLL_PLLCTL3 3
987#define PMU2_PLL_PC3_NDIV_FRAC_MASK 0x00ffffff
988#define PMU2_PLL_PC3_NDIV_FRAC_SHIFT 0
989
990
991#define PMU2_PLL_PLLCTL4 4
992
993
994#define PMU2_PLL_PLLCTL5 5
995#define PMU2_PLL_PC5_CLKDRIVE_CH1_MASK 0x00000f00
996#define PMU2_PLL_PC5_CLKDRIVE_CH1_SHIFT 8
997#define PMU2_PLL_PC5_CLKDRIVE_CH2_MASK 0x0000f000
998#define PMU2_PLL_PC5_CLKDRIVE_CH2_SHIFT 12
999#define PMU2_PLL_PC5_CLKDRIVE_CH3_MASK 0x000f0000
1000#define PMU2_PLL_PC5_CLKDRIVE_CH3_SHIFT 16
1001#define PMU2_PLL_PC5_CLKDRIVE_CH4_MASK 0x00f00000
1002#define PMU2_PLL_PC5_CLKDRIVE_CH4_SHIFT 20
1003#define PMU2_PLL_PC5_CLKDRIVE_CH5_MASK 0x0f000000
1004#define PMU2_PLL_PC5_CLKDRIVE_CH5_SHIFT 24
1005#define PMU2_PLL_PC5_CLKDRIVE_CH6_MASK 0xf0000000
1006#define PMU2_PLL_PC5_CLKDRIVE_CH6_SHIFT 28
1007
1008
1009#define PMU5_PLL_P1P2_OFF 0
1010#define PMU5_PLL_P1_MASK 0x0f000000
1011#define PMU5_PLL_P1_SHIFT 24
1012#define PMU5_PLL_P2_MASK 0x00f00000
1013#define PMU5_PLL_P2_SHIFT 20
1014#define PMU5_PLL_M14_OFF 1
1015#define PMU5_PLL_MDIV_MASK 0x000000ff
1016#define PMU5_PLL_MDIV_WIDTH 8
1017#define PMU5_PLL_NM5_OFF 2
1018#define PMU5_PLL_NDIV_MASK 0xfff00000
1019#define PMU5_PLL_NDIV_SHIFT 20
1020#define PMU5_PLL_NDIV_MODE_MASK 0x000e0000
1021#define PMU5_PLL_NDIV_MODE_SHIFT 17
1022#define PMU5_PLL_FMAB_OFF 3
1023#define PMU5_PLL_MRAT_MASK 0xf0000000
1024#define PMU5_PLL_MRAT_SHIFT 28
1025#define PMU5_PLL_ABRAT_MASK 0x08000000
1026#define PMU5_PLL_ABRAT_SHIFT 27
1027#define PMU5_PLL_FDIV_MASK 0x07ffffff
1028#define PMU5_PLL_PLLCTL_OFF 4
1029#define PMU5_PLL_PCHI_OFF 5
1030#define PMU5_PLL_PCHI_MASK 0x0000003f
1031
1032
1033#define PMU_XTALFREQ_REG_ILPCTR_MASK 0x00001FFF
1034#define PMU_XTALFREQ_REG_MEASURE_MASK 0x80000000
1035#define PMU_XTALFREQ_REG_MEASURE_SHIFT 31
1036
1037
1038#define PMU5_MAINPLL_CPU 1
1039#define PMU5_MAINPLL_MEM 2
1040#define PMU5_MAINPLL_SI 3
1041
1042#define PMU7_PLL_PLLCTL7 7
1043#define PMU7_PLL_CTL7_M4DIV_MASK 0xff000000
1044#define PMU7_PLL_CTL7_M4DIV_SHIFT 24
1045#define PMU7_PLL_CTL7_M4DIV_BY_6 6
1046#define PMU7_PLL_CTL7_M4DIV_BY_12 0xc
1047#define PMU7_PLL_CTL7_M4DIV_BY_24 0x18
1048#define PMU7_PLL_PLLCTL8 8
1049#define PMU7_PLL_CTL8_M5DIV_MASK 0x000000ff
1050#define PMU7_PLL_CTL8_M5DIV_SHIFT 0
1051#define PMU7_PLL_CTL8_M5DIV_BY_8 8
1052#define PMU7_PLL_CTL8_M5DIV_BY_12 0xc
1053#define PMU7_PLL_CTL8_M5DIV_BY_24 0x18
1054#define PMU7_PLL_CTL8_M6DIV_MASK 0x0000ff00
1055#define PMU7_PLL_CTL8_M6DIV_SHIFT 8
1056#define PMU7_PLL_CTL8_M6DIV_BY_12 0xc
1057#define PMU7_PLL_CTL8_M6DIV_BY_24 0x18
1058#define PMU7_PLL_PLLCTL11 11
1059#define PMU7_PLL_PLLCTL11_MASK 0xffffff00
1060#define PMU7_PLL_PLLCTL11_VAL 0x22222200
1061
1062
1063#define PMU4716_MAINPLL_PLL0 12
1064
1065
1066#define PMU5356_MAINPLL_PLL0 0
1067#define PMU5357_MAINPLL_PLL0 0
1068
1069
1070#define RES4716_PROC_PLL_ON 0x00000040
1071#define RES4716_PROC_HT_AVAIL 0x00000080
1072
1073
1074#define CCTRL_471X_I2S_PINS_ENABLE 0x0080
1075
1076
1077
1078#define CCTRL_5357_I2S_PINS_ENABLE 0x00040000
1079#define CCTRL_5357_I2CSPI_PINS_ENABLE 0x00080000
1080
1081
1082#define RES5354_EXT_SWITCHER_PWM 0
1083#define RES5354_BB_SWITCHER_PWM 1
1084#define RES5354_BB_SWITCHER_BURST 2
1085#define RES5354_BB_EXT_SWITCHER_BURST 3
1086#define RES5354_ILP_REQUEST 4
1087#define RES5354_RADIO_SWITCHER_PWM 5
1088#define RES5354_RADIO_SWITCHER_BURST 6
1089#define RES5354_ROM_SWITCH 7
1090#define RES5354_PA_REF_LDO 8
1091#define RES5354_RADIO_LDO 9
1092#define RES5354_AFE_LDO 10
1093#define RES5354_PLL_LDO 11
1094#define RES5354_BG_FILTBYP 12
1095#define RES5354_TX_FILTBYP 13
1096#define RES5354_RX_FILTBYP 14
1097#define RES5354_XTAL_PU 15
1098#define RES5354_XTAL_EN 16
1099#define RES5354_BB_PLL_FILTBYP 17
1100#define RES5354_RF_PLL_FILTBYP 18
1101#define RES5354_BB_PLL_PU 19
1102
1103
1104#define CCTRL5357_EXTPA (1<<14)
1105#define CCTRL5357_ANT_MUX_2o3 (1<<15)
1106
1107
1108#define RES4328_EXT_SWITCHER_PWM 0
1109#define RES4328_BB_SWITCHER_PWM 1
1110#define RES4328_BB_SWITCHER_BURST 2
1111#define RES4328_BB_EXT_SWITCHER_BURST 3
1112#define RES4328_ILP_REQUEST 4
1113#define RES4328_RADIO_SWITCHER_PWM 5
1114#define RES4328_RADIO_SWITCHER_BURST 6
1115#define RES4328_ROM_SWITCH 7
1116#define RES4328_PA_REF_LDO 8
1117#define RES4328_RADIO_LDO 9
1118#define RES4328_AFE_LDO 10
1119#define RES4328_PLL_LDO 11
1120#define RES4328_BG_FILTBYP 12
1121#define RES4328_TX_FILTBYP 13
1122#define RES4328_RX_FILTBYP 14
1123#define RES4328_XTAL_PU 15
1124#define RES4328_XTAL_EN 16
1125#define RES4328_BB_PLL_FILTBYP 17
1126#define RES4328_RF_PLL_FILTBYP 18
1127#define RES4328_BB_PLL_PU 19
1128
1129
1130#define RES4325_BUCK_BOOST_BURST 0
1131#define RES4325_CBUCK_BURST 1
1132#define RES4325_CBUCK_PWM 2
1133#define RES4325_CLDO_CBUCK_BURST 3
1134#define RES4325_CLDO_CBUCK_PWM 4
1135#define RES4325_BUCK_BOOST_PWM 5
1136#define RES4325_ILP_REQUEST 6
1137#define RES4325_ABUCK_BURST 7
1138#define RES4325_ABUCK_PWM 8
1139#define RES4325_LNLDO1_PU 9
1140#define RES4325_OTP_PU 10
1141#define RES4325_LNLDO3_PU 11
1142#define RES4325_LNLDO4_PU 12
1143#define RES4325_XTAL_PU 13
1144#define RES4325_ALP_AVAIL 14
1145#define RES4325_RX_PWRSW_PU 15
1146#define RES4325_TX_PWRSW_PU 16
1147#define RES4325_RFPLL_PWRSW_PU 17
1148#define RES4325_LOGEN_PWRSW_PU 18
1149#define RES4325_AFE_PWRSW_PU 19
1150#define RES4325_BBPLL_PWRSW_PU 20
1151#define RES4325_HT_AVAIL 21
1152
1153
1154#define RES4325B0_CBUCK_LPOM 1
1155#define RES4325B0_CBUCK_BURST 2
1156#define RES4325B0_CBUCK_PWM 3
1157#define RES4325B0_CLDO_PU 4
1158
1159
1160#define RES4325C1_LNLDO2_PU 12
1161
1162
1163#define CST4325_SPROM_OTP_SEL_MASK 0x00000003
1164#define CST4325_DEFCIS_SEL 0
1165#define CST4325_SPROM_SEL 1
1166#define CST4325_OTP_SEL 2
1167#define CST4325_OTP_PWRDN 3
1168#define CST4325_SDIO_USB_MODE_MASK 0x00000004
1169#define CST4325_SDIO_USB_MODE_SHIFT 2
1170#define CST4325_RCAL_VALID_MASK 0x00000008
1171#define CST4325_RCAL_VALID_SHIFT 3
1172#define CST4325_RCAL_VALUE_MASK 0x000001f0
1173#define CST4325_RCAL_VALUE_SHIFT 4
1174#define CST4325_PMUTOP_2B_MASK 0x00000200
1175#define CST4325_PMUTOP_2B_SHIFT 9
1176
1177#define RES4329_RESERVED0 0
1178#define RES4329_CBUCK_LPOM 1
1179#define RES4329_CBUCK_BURST 2
1180#define RES4329_CBUCK_PWM 3
1181#define RES4329_CLDO_PU 4
1182#define RES4329_PALDO_PU 5
1183#define RES4329_ILP_REQUEST 6
1184#define RES4329_RESERVED7 7
1185#define RES4329_RESERVED8 8
1186#define RES4329_LNLDO1_PU 9
1187#define RES4329_OTP_PU 10
1188#define RES4329_RESERVED11 11
1189#define RES4329_LNLDO2_PU 12
1190#define RES4329_XTAL_PU 13
1191#define RES4329_ALP_AVAIL 14
1192#define RES4329_RX_PWRSW_PU 15
1193#define RES4329_TX_PWRSW_PU 16
1194#define RES4329_RFPLL_PWRSW_PU 17
1195#define RES4329_LOGEN_PWRSW_PU 18
1196#define RES4329_AFE_PWRSW_PU 19
1197#define RES4329_BBPLL_PWRSW_PU 20
1198#define RES4329_HT_AVAIL 21
1199
1200#define CST4329_SPROM_OTP_SEL_MASK 0x00000003
1201#define CST4329_DEFCIS_SEL 0
1202#define CST4329_SPROM_SEL 1
1203#define CST4329_OTP_SEL 2
1204#define CST4329_OTP_PWRDN 3
1205#define CST4329_SPI_SDIO_MODE_MASK 0x00000004
1206#define CST4329_SPI_SDIO_MODE_SHIFT 2
1207
1208
1209#define CST4312_SPROM_OTP_SEL_MASK 0x00000003
1210#define CST4312_DEFCIS_SEL 0
1211#define CST4312_SPROM_SEL 1
1212#define CST4312_OTP_SEL 2
1213#define CST4312_OTP_BAD 3
1214
1215
1216#define RES4312_SWITCHER_BURST 0
1217#define RES4312_SWITCHER_PWM 1
1218#define RES4312_PA_REF_LDO 2
1219#define RES4312_CORE_LDO_BURST 3
1220#define RES4312_CORE_LDO_PWM 4
1221#define RES4312_RADIO_LDO 5
1222#define RES4312_ILP_REQUEST 6
1223#define RES4312_BG_FILTBYP 7
1224#define RES4312_TX_FILTBYP 8
1225#define RES4312_RX_FILTBYP 9
1226#define RES4312_XTAL_PU 10
1227#define RES4312_ALP_AVAIL 11
1228#define RES4312_BB_PLL_FILTBYP 12
1229#define RES4312_RF_PLL_FILTBYP 13
1230#define RES4312_HT_AVAIL 14
1231
1232
1233#define RES4322_RF_LDO 0
1234#define RES4322_ILP_REQUEST 1
1235#define RES4322_XTAL_PU 2
1236#define RES4322_ALP_AVAIL 3
1237#define RES4322_SI_PLL_ON 4
1238#define RES4322_HT_SI_AVAIL 5
1239#define RES4322_PHY_PLL_ON 6
1240#define RES4322_HT_PHY_AVAIL 7
1241#define RES4322_OTP_PU 8
1242
1243
1244#define CST4322_XTAL_FREQ_20_40MHZ 0x00000020
1245#define CST4322_SPROM_OTP_SEL_MASK 0x000000c0
1246#define CST4322_SPROM_OTP_SEL_SHIFT 6
1247#define CST4322_NO_SPROM_OTP 0
1248#define CST4322_SPROM_PRESENT 1
1249#define CST4322_OTP_PRESENT 2
1250#define CST4322_PCI_OR_USB 0x00000100
1251#define CST4322_BOOT_MASK 0x00000600
1252#define CST4322_BOOT_SHIFT 9
1253#define CST4322_BOOT_FROM_SRAM 0
1254#define CST4322_BOOT_FROM_ROM 1
1255#define CST4322_BOOT_FROM_FLASH 2
1256#define CST4322_BOOT_FROM_INVALID 3
1257#define CST4322_ILP_DIV_EN 0x00000800
1258#define CST4322_FLASH_TYPE_MASK 0x00001000
1259#define CST4322_FLASH_TYPE_SHIFT 12
1260#define CST4322_FLASH_TYPE_SHIFT_ST 0
1261#define CST4322_FLASH_TYPE_SHIFT_ATMEL 1
1262#define CST4322_ARM_TAP_SEL 0x00002000
1263#define CST4322_RES_INIT_MODE_MASK 0x0000c000
1264#define CST4322_RES_INIT_MODE_SHIFT 14
1265#define CST4322_RES_INIT_MODE_ILPAVAIL 0
1266#define CST4322_RES_INIT_MODE_ILPREQ 1
1267#define CST4322_RES_INIT_MODE_ALPAVAIL 2
1268#define CST4322_RES_INIT_MODE_HTAVAIL 3
1269#define CST4322_PCIPLLCLK_GATING 0x00010000
1270#define CST4322_CLK_SWITCH_PCI_TO_ALP 0x00020000
1271#define CST4322_PCI_CARDBUS_MODE 0x00040000
1272
1273
1274#define CCTRL43224_GPIO_TOGGLE 0x8000
1275#define CCTRL_43224A0_12MA_LED_DRIVE 0x00F000F0
1276#define CCTRL_43224B0_12MA_LED_DRIVE 0xF0
1277
1278
1279#define RES43236_REGULATOR 0
1280#define RES43236_ILP_REQUEST 1
1281#define RES43236_XTAL_PU 2
1282#define RES43236_ALP_AVAIL 3
1283#define RES43236_SI_PLL_ON 4
1284#define RES43236_HT_SI_AVAIL 5
1285
1286
1287#define CCTRL43236_BT_COEXIST (1<<0)
1288#define CCTRL43236_SECI (1<<1)
1289#define CCTRL43236_EXT_LNA (1<<2)
1290#define CCTRL43236_ANT_MUX_2o3 (1<<3)
1291#define CCTRL43236_GSIO (1<<4)
1292
1293
1294#define CST43236_SFLASH_MASK 0x00000040
1295#define CST43236_OTP_SEL_MASK 0x00000080
1296#define CST43236_OTP_SEL_SHIFT 7
1297#define CST43236_HSIC_MASK 0x00000100
1298#define CST43236_BP_CLK 0x00000200
1299#define CST43236_BOOT_MASK 0x00001800
1300#define CST43236_BOOT_SHIFT 11
1301#define CST43236_BOOT_FROM_SRAM 0
1302#define CST43236_BOOT_FROM_ROM 1
1303#define CST43236_BOOT_FROM_FLASH 2
1304#define CST43236_BOOT_FROM_INVALID 3
1305
1306
1307#define RES43237_REGULATOR 0
1308#define RES43237_ILP_REQUEST 1
1309#define RES43237_XTAL_PU 2
1310#define RES43237_ALP_AVAIL 3
1311#define RES43237_SI_PLL_ON 4
1312#define RES43237_HT_SI_AVAIL 5
1313
1314
1315#define CCTRL43237_BT_COEXIST (1<<0)
1316#define CCTRL43237_SECI (1<<1)
1317#define CCTRL43237_EXT_LNA (1<<2)
1318#define CCTRL43237_ANT_MUX_2o3 (1<<3)
1319#define CCTRL43237_GSIO (1<<4)
1320
1321
1322#define CST43237_SFLASH_MASK 0x00000040
1323#define CST43237_OTP_SEL_MASK 0x00000080
1324#define CST43237_OTP_SEL_SHIFT 7
1325#define CST43237_HSIC_MASK 0x00000100
1326#define CST43237_BP_CLK 0x00000200
1327#define CST43237_BOOT_MASK 0x00001800
1328#define CST43237_BOOT_SHIFT 11
1329#define CST43237_BOOT_FROM_SRAM 0
1330#define CST43237_BOOT_FROM_ROM 1
1331#define CST43237_BOOT_FROM_FLASH 2
1332#define CST43237_BOOT_FROM_INVALID 3
1333
1334
1335#define RES43239_OTP_PU 9
1336#define RES43239_MACPHY_CLKAVAIL 23
1337#define RES43239_HT_AVAIL 24
1338
1339
1340#define CST43239_SPROM_MASK 0x00000002
1341#define CST43239_SFLASH_MASK 0x00000004
1342#define CST43239_RES_INIT_MODE_SHIFT 7
1343#define CST43239_RES_INIT_MODE_MASK 0x000001f0
1344#define CST43239_CHIPMODE_SDIOD(cs) ((cs) & (1 << 15))
1345#define CST43239_CHIPMODE_USB20D(cs) ((cs) & !(1 << 15))
1346#define CST43239_CHIPMODE_SDIO(cs) (((cs) & (1 << 0)) == 0)
1347#define CST43239_CHIPMODE_GSPI(cs) (((cs) & (1 << 0)) == (1 << 0))
1348
1349
1350#define CCTRL43239_XTAL_STRENGTH(ctl) ((ctl & 0x3F) << 12)
1351
1352
1353
1354
1355#define RES4315_CBUCK_LPOM 1
1356#define RES4315_CBUCK_BURST 2
1357#define RES4315_CBUCK_PWM 3
1358#define RES4315_CLDO_PU 4
1359#define RES4315_PALDO_PU 5
1360#define RES4315_ILP_REQUEST 6
1361#define RES4315_LNLDO1_PU 9
1362#define RES4315_OTP_PU 10
1363#define RES4315_LNLDO2_PU 12
1364#define RES4315_XTAL_PU 13
1365#define RES4315_ALP_AVAIL 14
1366#define RES4315_RX_PWRSW_PU 15
1367#define RES4315_TX_PWRSW_PU 16
1368#define RES4315_RFPLL_PWRSW_PU 17
1369#define RES4315_LOGEN_PWRSW_PU 18
1370#define RES4315_AFE_PWRSW_PU 19
1371#define RES4315_BBPLL_PWRSW_PU 20
1372#define RES4315_HT_AVAIL 21
1373
1374
1375#define CST4315_SPROM_OTP_SEL_MASK 0x00000003
1376#define CST4315_DEFCIS_SEL 0x00000000
1377#define CST4315_SPROM_SEL 0x00000001
1378#define CST4315_OTP_SEL 0x00000002
1379#define CST4315_OTP_PWRDN 0x00000003
1380#define CST4315_SDIO_MODE 0x00000004
1381#define CST4315_RCAL_VALID 0x00000008
1382#define CST4315_RCAL_VALUE_MASK 0x000001f0
1383#define CST4315_RCAL_VALUE_SHIFT 4
1384#define CST4315_PALDO_EXTPNP 0x00000200
1385#define CST4315_CBUCK_MODE_MASK 0x00000c00
1386#define CST4315_CBUCK_MODE_BURST 0x00000400
1387#define CST4315_CBUCK_MODE_LPBURST 0x00000c00
1388
1389
1390#define RES4319_CBUCK_LPOM 1
1391#define RES4319_CBUCK_BURST 2
1392#define RES4319_CBUCK_PWM 3
1393#define RES4319_CLDO_PU 4
1394#define RES4319_PALDO_PU 5
1395#define RES4319_ILP_REQUEST 6
1396#define RES4319_LNLDO1_PU 9
1397#define RES4319_OTP_PU 10
1398#define RES4319_LNLDO2_PU 12
1399#define RES4319_XTAL_PU 13
1400#define RES4319_ALP_AVAIL 14
1401#define RES4319_RX_PWRSW_PU 15
1402#define RES4319_TX_PWRSW_PU 16
1403#define RES4319_RFPLL_PWRSW_PU 17
1404#define RES4319_LOGEN_PWRSW_PU 18
1405#define RES4319_AFE_PWRSW_PU 19
1406#define RES4319_BBPLL_PWRSW_PU 20
1407#define RES4319_HT_AVAIL 21
1408
1409
1410#define CST4319_SPI_CPULESSUSB 0x00000001
1411#define CST4319_SPI_CLK_POL 0x00000002
1412#define CST4319_SPI_CLK_PH 0x00000008
1413#define CST4319_SPROM_OTP_SEL_MASK 0x000000c0
1414#define CST4319_SPROM_OTP_SEL_SHIFT 6
1415#define CST4319_DEFCIS_SEL 0x00000000
1416#define CST4319_SPROM_SEL 0x00000040
1417#define CST4319_OTP_SEL 0x00000080
1418#define CST4319_OTP_PWRDN 0x000000c0
1419#define CST4319_SDIO_USB_MODE 0x00000100
1420#define CST4319_REMAP_SEL_MASK 0x00000600
1421#define CST4319_ILPDIV_EN 0x00000800
1422#define CST4319_XTAL_PD_POL 0x00001000
1423#define CST4319_LPO_SEL 0x00002000
1424#define CST4319_RES_INIT_MODE 0x0000c000
1425#define CST4319_PALDO_EXTPNP 0x00010000
1426#define CST4319_CBUCK_MODE_MASK 0x00060000
1427#define CST4319_CBUCK_MODE_BURST 0x00020000
1428#define CST4319_CBUCK_MODE_LPBURST 0x00060000
1429#define CST4319_RCAL_VALID 0x01000000
1430#define CST4319_RCAL_VALUE_MASK 0x3e000000
1431#define CST4319_RCAL_VALUE_SHIFT 25
1432
1433#define PMU1_PLL0_CHIPCTL0 0
1434#define PMU1_PLL0_CHIPCTL1 1
1435#define PMU1_PLL0_CHIPCTL2 2
1436#define CCTL_4319USB_XTAL_SEL_MASK 0x00180000
1437#define CCTL_4319USB_XTAL_SEL_SHIFT 19
1438#define CCTL_4319USB_48MHZ_PLL_SEL 1
1439#define CCTL_4319USB_24MHZ_PLL_SEL 2
1440
1441
1442#define RES4336_CBUCK_LPOM 0
1443#define RES4336_CBUCK_BURST 1
1444#define RES4336_CBUCK_LP_PWM 2
1445#define RES4336_CBUCK_PWM 3
1446#define RES4336_CLDO_PU 4
1447#define RES4336_DIS_INT_RESET_PD 5
1448#define RES4336_ILP_REQUEST 6
1449#define RES4336_LNLDO_PU 7
1450#define RES4336_LDO3P3_PU 8
1451#define RES4336_OTP_PU 9
1452#define RES4336_XTAL_PU 10
1453#define RES4336_ALP_AVAIL 11
1454#define RES4336_RADIO_PU 12
1455#define RES4336_BG_PU 13
1456#define RES4336_VREG1p4_PU_PU 14
1457#define RES4336_AFE_PWRSW_PU 15
1458#define RES4336_RX_PWRSW_PU 16
1459#define RES4336_TX_PWRSW_PU 17
1460#define RES4336_BB_PWRSW_PU 18
1461#define RES4336_SYNTH_PWRSW_PU 19
1462#define RES4336_MISC_PWRSW_PU 20
1463#define RES4336_LOGEN_PWRSW_PU 21
1464#define RES4336_BBPLL_PWRSW_PU 22
1465#define RES4336_MACPHY_CLKAVAIL 23
1466#define RES4336_HT_AVAIL 24
1467#define RES4336_RSVD 25
1468
1469
1470#define CST4336_SPI_MODE_MASK 0x00000001
1471#define CST4336_SPROM_PRESENT 0x00000002
1472#define CST4336_OTP_PRESENT 0x00000004
1473#define CST4336_ARMREMAP_0 0x00000008
1474#define CST4336_ILPDIV_EN_MASK 0x00000010
1475#define CST4336_ILPDIV_EN_SHIFT 4
1476#define CST4336_XTAL_PD_POL_MASK 0x00000020
1477#define CST4336_XTAL_PD_POL_SHIFT 5
1478#define CST4336_LPO_SEL_MASK 0x00000040
1479#define CST4336_LPO_SEL_SHIFT 6
1480#define CST4336_RES_INIT_MODE_MASK 0x00000180
1481#define CST4336_RES_INIT_MODE_SHIFT 7
1482#define CST4336_CBUCK_MODE_MASK 0x00000600
1483#define CST4336_CBUCK_MODE_SHIFT 9
1484
1485
1486#define PCTL_4336_SERIAL_ENAB (1 << 24)
1487
1488
1489#define RES4330_CBUCK_LPOM 0
1490#define RES4330_CBUCK_BURST 1
1491#define RES4330_CBUCK_LP_PWM 2
1492#define RES4330_CBUCK_PWM 3
1493#define RES4330_CLDO_PU 4
1494#define RES4330_DIS_INT_RESET_PD 5
1495#define RES4330_ILP_REQUEST 6
1496#define RES4330_LNLDO_PU 7
1497#define RES4330_LDO3P3_PU 8
1498#define RES4330_OTP_PU 9
1499#define RES4330_XTAL_PU 10
1500#define RES4330_ALP_AVAIL 11
1501#define RES4330_RADIO_PU 12
1502#define RES4330_BG_PU 13
1503#define RES4330_VREG1p4_PU_PU 14
1504#define RES4330_AFE_PWRSW_PU 15
1505#define RES4330_RX_PWRSW_PU 16
1506#define RES4330_TX_PWRSW_PU 17
1507#define RES4330_BB_PWRSW_PU 18
1508#define RES4330_SYNTH_PWRSW_PU 19
1509#define RES4330_MISC_PWRSW_PU 20
1510#define RES4330_LOGEN_PWRSW_PU 21
1511#define RES4330_BBPLL_PWRSW_PU 22
1512#define RES4330_MACPHY_CLKAVAIL 23
1513#define RES4330_HT_AVAIL 24
1514#define RES4330_5gRX_PWRSW_PU 25
1515#define RES4330_5gTX_PWRSW_PU 26
1516#define RES4330_5g_LOGEN_PWRSW_PU 27
1517
1518
1519#define CST4330_CHIPMODE_SDIOD(cs) (((cs) & 0x7) < 6)
1520#define CST4330_CHIPMODE_USB20D(cs) (((cs) & 0x7) >= 6)
1521#define CST4330_CHIPMODE_SDIO(cs) (((cs) & 0x4) == 0)
1522#define CST4330_CHIPMODE_GSPI(cs) (((cs) & 0x6) == 4)
1523#define CST4330_CHIPMODE_USB(cs) (((cs) & 0x7) == 6)
1524#define CST4330_CHIPMODE_USBDA(cs) (((cs) & 0x7) == 7)
1525#define CST4330_OTP_PRESENT 0x00000010
1526#define CST4330_LPO_AUTODET_EN 0x00000020
1527#define CST4330_ARMREMAP_0 0x00000040
1528#define CST4330_SPROM_PRESENT 0x00000080
1529#define CST4330_ILPDIV_EN 0x00000100
1530#define CST4330_LPO_SEL 0x00000200
1531#define CST4330_RES_INIT_MODE_SHIFT 10
1532#define CST4330_RES_INIT_MODE_MASK 0x00000c00
1533#define CST4330_CBUCK_MODE_SHIFT 12
1534#define CST4330_CBUCK_MODE_MASK 0x00003000
1535#define CST4330_CBUCK_POWER_OK 0x00004000
1536#define CST4330_BB_PLL_LOCKED 0x00008000
1537#define SOCDEVRAM_4330_BP_ADDR 0x1E000000
1538#define SOCDEVRAM_4330_ARM_ADDR 0x00800000
1539
1540
1541#define PCTL_4330_SERIAL_ENAB (1 << 24)
1542
1543
1544#define CCTRL_4330_GPIO_SEL 0x00000001
1545#define CCTRL_4330_ERCX_SEL 0x00000002
1546#define CCTRL_4330_SDIO_HOST_WAKE 0x00000004
1547#define CCTRL_4330_JTAG_DISABLE 0x00000008
1548
1549
1550#define RES4313_BB_PU_RSRC 0
1551#define RES4313_ILP_REQ_RSRC 1
1552#define RES4313_XTAL_PU_RSRC 2
1553#define RES4313_ALP_AVAIL_RSRC 3
1554#define RES4313_RADIO_PU_RSRC 4
1555#define RES4313_BG_PU_RSRC 5
1556#define RES4313_VREG1P4_PU_RSRC 6
1557#define RES4313_AFE_PWRSW_RSRC 7
1558#define RES4313_RX_PWRSW_RSRC 8
1559#define RES4313_TX_PWRSW_RSRC 9
1560#define RES4313_BB_PWRSW_RSRC 10
1561#define RES4313_SYNTH_PWRSW_RSRC 11
1562#define RES4313_MISC_PWRSW_RSRC 12
1563#define RES4313_BB_PLL_PWRSW_RSRC 13
1564#define RES4313_HT_AVAIL_RSRC 14
1565#define RES4313_MACPHY_CLK_AVAIL_RSRC 15
1566
1567
1568#define CST4313_SPROM_PRESENT 1
1569#define CST4313_OTP_PRESENT 2
1570#define CST4313_SPROM_OTP_SEL_MASK 0x00000002
1571#define CST4313_SPROM_OTP_SEL_SHIFT 0
1572
1573
1574#define CCTRL_4313_12MA_LED_DRIVE 0x00000007
1575
1576
1577#define RES43228_NOT_USED 0
1578#define RES43228_ILP_REQUEST 1
1579#define RES43228_XTAL_PU 2
1580#define RES43228_ALP_AVAIL 3
1581#define RES43228_PLL_EN 4
1582#define RES43228_HT_PHY_AVAIL 5
1583
1584
1585#define CST43228_ILP_DIV_EN 0x1
1586#define CST43228_OTP_PRESENT 0x2
1587#define CST43228_SERDES_REFCLK_PADSEL 0x4
1588#define CST43228_SDIO_MODE 0x8
1589#define CST43228_SDIO_OTP_PRESENT 0x10
1590#define CST43228_SDIO_RESET 0x20
1591
1592
1593#define PMU_MAX_TRANSITION_DLY 15000
1594
1595
1596#define PMURES_UP_TRANSITION 2
1597
1598
1599
1600
1601
1602#define ECI_BW_20 0x0
1603#define ECI_BW_25 0x1
1604#define ECI_BW_30 0x2
1605#define ECI_BW_35 0x3
1606#define ECI_BW_40 0x4
1607#define ECI_BW_45 0x5
1608#define ECI_BW_50 0x6
1609#define ECI_BW_ALL 0x7
1610
1611
1612#define WLAN_NUM_ANT1 TXANT_0
1613#define WLAN_NUM_ANT2 TXANT_1
1614
1615#endif