.. | .. |
---|
1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 1 | /* |
---|
3 | 2 | * Broadcom SiliconBackplane SDIO/PCMCIA hardware-specific |
---|
4 | 3 | * device core support |
---|
5 | 4 | * |
---|
6 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
---|
7 | | - * |
---|
| 5 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
---|
| 6 | + * |
---|
| 7 | + * Copyright (C) 1999-2017, Broadcom Corporation |
---|
| 8 | + * |
---|
8 | 9 | * Unless you and Broadcom execute a separate written software license |
---|
9 | 10 | * agreement governing use of this software, this software is licensed to you |
---|
10 | 11 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
---|
11 | 12 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
---|
12 | 13 | * following added to such license: |
---|
13 | | - * |
---|
| 14 | + * |
---|
14 | 15 | * As a special exception, the copyright holders of this software give you |
---|
15 | 16 | * permission to link this software with independent modules, and to copy and |
---|
16 | 17 | * distribute the resulting executable under terms of your choice, provided that |
---|
.. | .. |
---|
18 | 19 | * the license of that module. An independent module is a module which is not |
---|
19 | 20 | * derived from this software. The special exception does not apply to any |
---|
20 | 21 | * modifications of the software. |
---|
21 | | - * |
---|
| 22 | + * |
---|
22 | 23 | * Notwithstanding the above, under no circumstances may you combine this |
---|
23 | 24 | * software in any way with any other Broadcom software provided under a license |
---|
24 | 25 | * other than the GPL, without Broadcom's express prior written consent. |
---|
.. | .. |
---|
26 | 27 | * |
---|
27 | 28 | * <<Broadcom-WL-IPTag/Open:>> |
---|
28 | 29 | * |
---|
29 | | - * $Id: sbsdpcmdev.h 514727 2014-11-12 03:02:48Z $ |
---|
| 30 | + * $Id: sbsdpcmdev.h 616398 2016-02-01 09:37:52Z $ |
---|
30 | 31 | */ |
---|
31 | 32 | |
---|
32 | 33 | #ifndef _sbsdpcmdev_h_ |
---|
.. | .. |
---|
39 | 40 | #define PAD _XSTR(__LINE__) |
---|
40 | 41 | #endif /* PAD */ |
---|
41 | 42 | |
---|
42 | | - |
---|
43 | 43 | typedef volatile struct { |
---|
44 | 44 | dma64regs_t xmt; /* dma tx */ |
---|
45 | 45 | uint32 PAD[2]; |
---|
.. | .. |
---|
51 | 51 | typedef volatile struct { |
---|
52 | 52 | dma64p_t dma64regs[2]; |
---|
53 | 53 | dma64diag_t dmafifo; /* DMA Diagnostic Regs, 0x280-0x28c */ |
---|
54 | | - uint32 PAD[92]; |
---|
| 54 | + uint32 PAD[28]; |
---|
55 | 55 | } sdiodma64_t; |
---|
56 | 56 | |
---|
57 | 57 | /* dma32 sdiod corerev == 0 */ |
---|
58 | 58 | typedef volatile struct { |
---|
59 | 59 | dma32regp_t dma32regs[2]; /* dma tx & rx, 0x200-0x23c */ |
---|
60 | 60 | dma32diag_t dmafifo; /* DMA Diagnostic Regs, 0x240-0x24c */ |
---|
61 | | - uint32 PAD[108]; |
---|
| 61 | + uint32 PAD[44]; |
---|
62 | 62 | } sdiodma32_t; |
---|
63 | 63 | |
---|
64 | 64 | /* dma32 regs for pcmcia core */ |
---|
65 | 65 | typedef volatile struct { |
---|
66 | 66 | dma32regp_t dmaregs; /* DMA Regs, 0x200-0x21c, rev8 */ |
---|
67 | 67 | dma32diag_t dmafifo; /* DMA Diagnostic Regs, 0x220-0x22c */ |
---|
68 | | - uint32 PAD[116]; |
---|
| 68 | + uint32 PAD[52]; |
---|
69 | 69 | } pcmdma32_t; |
---|
70 | 70 | |
---|
71 | 71 | /* core registers */ |
---|
.. | .. |
---|
100 | 100 | |
---|
101 | 101 | /* synchronized access to registers in SDIO clock domain */ |
---|
102 | 102 | uint32 sdioaccess; /* SdioAccess, 0x050, rev8 */ |
---|
103 | | - uint32 PAD[3]; |
---|
| 103 | + uint32 PAD[1]; |
---|
| 104 | + uint32 MiscHostAccessIntEn; |
---|
| 105 | + uint32 PAD[1]; |
---|
104 | 106 | |
---|
105 | 107 | /* PCMCIA frame control */ |
---|
106 | 108 | uint8 pcmciaframectrl; /* pcmciaFrameCtrl, 0x060, rev8 */ |
---|
.. | .. |
---|
127 | 129 | uint32 writeterm; /* WriteTermCount, 0x13c, rev8, SDIO: wr frm terminates */ |
---|
128 | 130 | uint32 PAD[40]; |
---|
129 | 131 | uint32 clockctlstatus; /* ClockCtlStatus, 0x1e0, rev8 */ |
---|
130 | | - uint32 PAD[7]; |
---|
| 132 | + uint32 PAD[1]; |
---|
| 133 | + uint32 powerctl; /* 0x1e8 */ |
---|
| 134 | + uint32 PAD[5]; |
---|
131 | 135 | |
---|
132 | 136 | /* DMA engines */ |
---|
133 | 137 | volatile union { |
---|
.. | .. |
---|
135 | 139 | sdiodma32_t sdiod32; |
---|
136 | 140 | sdiodma64_t sdiod64; |
---|
137 | 141 | } dma; |
---|
| 142 | + |
---|
| 143 | + uint32 PAD[12]; /* 0x300-0x32c */ |
---|
| 144 | + uint32 chipid; /* SDIO ChipID Register, 0x330, rev31 */ |
---|
| 145 | + uint32 eromptr; /* SDIO EromPtrOffset Register, 0x334, rev31 */ |
---|
| 146 | + uint32 PAD[50]; |
---|
138 | 147 | |
---|
139 | 148 | /* SDIO/PCMCIA CIS region */ |
---|
140 | 149 | char cis[512]; /* 512 byte CIS, 0x400-0x5ff, rev6 */ |
---|
.. | .. |
---|
234 | 243 | #define SDA_F1_FBR_SPACE 0x100 /* sdioAccess F1 FBR register space */ |
---|
235 | 244 | #define SDA_F2_FBR_SPACE 0x200 /* sdioAccess F2 FBR register space */ |
---|
236 | 245 | #define SDA_F1_REG_SPACE 0x300 /* sdioAccess F1 core-specific register space */ |
---|
| 246 | +#define SDA_F3_FBR_SPACE 0x400 /* sdioAccess F3 FBR register space */ |
---|
237 | 247 | |
---|
238 | 248 | /* SDA_F1_REG_SPACE sdioaccess-accessible F1 reg space register offsets */ |
---|
239 | 249 | #define SDA_CHIPCONTROLDATA 0x006 /* ChipControlData */ |
---|
.. | .. |
---|
250 | 260 | #define SDA_SDIOWRFRAMEBCHIGH 0x01a /* SdioWrFrameBCHigh */ |
---|
251 | 261 | #define SDA_SDIORDFRAMEBCLOW 0x01b /* SdioRdFrameBCLow */ |
---|
252 | 262 | #define SDA_SDIORDFRAMEBCHIGH 0x01c /* SdioRdFrameBCHigh */ |
---|
| 263 | +#define SDA_MESBUSYCNTRL 0x01d /* mesBusyCntrl */ |
---|
| 264 | +#define SDA_WAKEUPCTRL 0x01e /* WakeupCtrl */ |
---|
| 265 | +#define SDA_SLEEPCSR 0x01f /* sleepCSR */ |
---|
| 266 | + |
---|
| 267 | +/* SDA_F1_REG_SPACE register bits */ |
---|
| 268 | +/* sleepCSR register */ |
---|
| 269 | +#define SDA_SLEEPCSR_KEEP_SDIO_ON 0x1 |
---|
253 | 270 | |
---|
254 | 271 | /* SDA_F2WATERMARK */ |
---|
255 | 272 | #define SDA_F2WATERMARK_MASK 0x7f /* F2Watermark Mask */ |
---|