.. | .. |
---|
1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 1 | /* |
---|
3 | 2 | * Broadcom HND chip & on-chip-interconnect-related definitions. |
---|
4 | 3 | * |
---|
5 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
---|
6 | | - * |
---|
| 4 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
---|
| 5 | + * |
---|
| 6 | + * Copyright (C) 1999-2017, Broadcom Corporation |
---|
| 7 | + * |
---|
7 | 8 | * Unless you and Broadcom execute a separate written software license |
---|
8 | 9 | * agreement governing use of this software, this software is licensed to you |
---|
9 | 10 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
---|
10 | 11 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
---|
11 | 12 | * following added to such license: |
---|
12 | | - * |
---|
| 13 | + * |
---|
13 | 14 | * As a special exception, the copyright holders of this software give you |
---|
14 | 15 | * permission to link this software with independent modules, and to copy and |
---|
15 | 16 | * distribute the resulting executable under terms of your choice, provided that |
---|
.. | .. |
---|
17 | 18 | * the license of that module. An independent module is a module which is not |
---|
18 | 19 | * derived from this software. The special exception does not apply to any |
---|
19 | 20 | * modifications of the software. |
---|
20 | | - * |
---|
| 21 | + * |
---|
21 | 22 | * Notwithstanding the above, under no circumstances may you combine this |
---|
22 | 23 | * software in any way with any other Broadcom software provided under a license |
---|
23 | 24 | * other than the GPL, without Broadcom's express prior written consent. |
---|
.. | .. |
---|
25 | 26 | * |
---|
26 | 27 | * <<Broadcom-WL-IPTag/Open:>> |
---|
27 | 28 | * |
---|
28 | | - * $Id: hndsoc.h 517544 2014-11-26 00:40:42Z $ |
---|
| 29 | + * $Id: hndsoc.h 672520 2016-11-28 23:30:55Z $ |
---|
29 | 30 | */ |
---|
30 | 31 | |
---|
31 | 32 | #ifndef _HNDSOC_H |
---|
.. | .. |
---|
46 | 47 | #define SI_SDRAM_SWAPPED 0x10000000 /* Byteswapped Physical SDRAM */ |
---|
47 | 48 | #define SI_SDRAM_R2 0x80000000 /* Region 2 for sdram (512 MB) */ |
---|
48 | 49 | |
---|
49 | | -#define SI_ENUM_BASE 0x18000000 /* Enumeration space base */ |
---|
| 50 | +#ifdef STB_SOC_WIFI |
---|
| 51 | +#define SI_REG_BASE_SIZE 0xB000 /* size from 0xf1800000 to 0xf180AFFF (44KB) */ |
---|
| 52 | +#define SI_ENUM_BASE_DEFAULT 0xF1800000 /* Enumeration space base */ |
---|
| 53 | +#define SI_WRAP_BASE_DEFAULT 0xF1900000 /* Wrapper space base */ |
---|
| 54 | +#endif /* STB_SOC_WIFI */ |
---|
50 | 55 | |
---|
51 | | -#define SI_WRAP_BASE 0x18100000 /* Wrapper space base */ |
---|
52 | | -#define SI_CORE_SIZE 0x1000 /* each core gets 4Kbytes for registers */ |
---|
| 56 | +#ifndef SI_ENUM_BASE_DEFAULT |
---|
| 57 | +#define SI_ENUM_BASE_DEFAULT 0x18000000 /* Enumeration space base */ |
---|
| 58 | +#endif // endif |
---|
| 59 | + |
---|
| 60 | +#ifndef SI_WRAP_BASE_DEFAULT |
---|
| 61 | +#define SI_WRAP_BASE_DEFAULT 0x18100000 /* Wrapper space base */ |
---|
| 62 | +#endif // endif |
---|
| 63 | + |
---|
| 64 | +#ifndef SI_ENUM_PCIE2_BASE |
---|
| 65 | +#define SI_ENUM_PCIE2_BASE 0x18003000 /* PCIE Enumeration space base */ |
---|
| 66 | +#endif // endif |
---|
| 67 | + |
---|
| 68 | +/** new(er) chips started locating their chipc core at a different BP address than 0x1800_0000 */ |
---|
| 69 | +// NIC and DHD driver binaries should support both old(er) and new(er) chips at the same time |
---|
| 70 | +#define SI_ENUM_BASE(sih) ((sih)->enum_base) |
---|
| 71 | +#define SI_WRAP_BASE(sih) (SI_ENUM_BASE(sih) + 0x00100000) |
---|
| 72 | + |
---|
| 73 | +#define SI_CORE_SIZE 0x1000 /* each core gets 4Kbytes for registers */ |
---|
| 74 | + |
---|
| 75 | +#define SI_NIC400_GPV_BASE 0x18200000 /* NIC-400 Global Programmers View (GPV) */ |
---|
| 76 | +#define SI_GPV_WR_CAP_ADDR 0x4008 /* WR-CAP offset */ |
---|
| 77 | +#define SI_GPV_RD_CAP_EN 0x1 /* issue read */ |
---|
| 78 | +#define SI_GPV_WR_CAP_EN 0x2 /* issue write */ |
---|
53 | 79 | |
---|
54 | 80 | #ifndef SI_MAXCORES |
---|
55 | 81 | #define SI_MAXCORES 32 /* NorthStar has more cores */ |
---|
.. | .. |
---|
80 | 106 | #define SI_ARMCM3_SRAM2 0x60000000 /* ARM Cortex-M3 SRAM Region 2 */ |
---|
81 | 107 | #define SI_ARM7S_SRAM2 0x80000000 /* ARM7TDMI-S SRAM Region 2 */ |
---|
82 | 108 | #define SI_ARMCA7_ROM 0x00000000 /* ARM Cortex-A7 ROM */ |
---|
| 109 | +#ifndef SI_ARMCA7_RAM |
---|
83 | 110 | #define SI_ARMCA7_RAM 0x00200000 /* ARM Cortex-A7 RAM */ |
---|
| 111 | +#endif // endif |
---|
84 | 112 | #define SI_ARM_FLASH1 0xffff0000 /* ARM Flash Region 1 */ |
---|
85 | 113 | #define SI_ARM_FLASH1_SZ 0x00010000 /* ARM Size of Flash Region 1 */ |
---|
86 | 114 | |
---|
.. | .. |
---|
97 | 125 | |
---|
98 | 126 | #define SI_BCM53573_NANDFLASH 0x30000000 /* 53573 NAND flash base */ |
---|
99 | 127 | #define SI_BCM53573_NORFLASH 0x1c000000 /* 53573 NOR flash base */ |
---|
| 128 | +#define SI_BCM53573_FLASH2_SZ 0x04000000 /* 53573 NOR flash2 size */ |
---|
100 | 129 | |
---|
101 | 130 | #define SI_BCM53573_NORFLASH_WINDOW 0x01000000 /* only support 16M direct access for |
---|
102 | 131 | * 3-byte address modes in spi flash |
---|
.. | .. |
---|
104 | 133 | #define SI_BCM53573_BOOTDEV_MASK 0x3 |
---|
105 | 134 | #define SI_BCM53573_BOOTDEV_NOR 0x0 |
---|
106 | 135 | |
---|
| 136 | +#define SI_BCM53573_NAND_PRE_MASK 0x100 /* 53573 NAND present mask */ |
---|
| 137 | + |
---|
107 | 138 | #define SI_BCM53573_DDRTYPE_MASK 0x10 |
---|
108 | 139 | #define SI_BCM53573_DDRTYPE_DDR3 0x10 |
---|
| 140 | + |
---|
| 141 | +#define SI_BCM47189_RGMII_VDD_MASK 0x3 |
---|
| 142 | +#define SI_BCM47189_RGMII_VDD_SHIFT 21 |
---|
| 143 | +#define SI_BCM47189_RGMII_VDD_3_3V 0 |
---|
| 144 | +#define SI_BCM47189_RGMII_VDD_2_5V 1 |
---|
| 145 | +#define SI_BCM47189_RGMII_VDD_1_5V 1 |
---|
| 146 | + |
---|
| 147 | +#define SI_BCM53573_LOCKED_CPUPLL 0x1 |
---|
109 | 148 | |
---|
110 | 149 | /* APB bridge code */ |
---|
111 | 150 | #define APB_BRIDGE_ID 0x135 /* APB Bridge 0, 1, etc. */ |
---|
.. | .. |
---|
173 | 212 | #define USB30D_CORE_ID 0x83d /* usb 3.0 device core */ |
---|
174 | 213 | #define ARMCR4_CORE_ID 0x83e /* ARM CR4 CPU */ |
---|
175 | 214 | #define GCI_CORE_ID 0x840 /* GCI Core */ |
---|
| 215 | +#define SR_CORE_ID 0x841 /* SR_CORE ID */ |
---|
176 | 216 | #define M2MDMA_CORE_ID 0x844 /* memory to memory dma */ |
---|
177 | 217 | #define CMEM_CORE_ID 0x846 /* CNDS DDR2/3 memory controller */ |
---|
178 | 218 | #define ARMCA7_CORE_ID 0x847 /* ARM CA7 CPU */ |
---|
179 | 219 | #define SYSMEM_CORE_ID 0x849 /* System memory core */ |
---|
| 220 | +#define HUB_CORE_ID 0x84b /* Hub core ID */ |
---|
| 221 | +#define HND_OOBR_CORE_ID 0x85c /* Hnd oob router core ID */ |
---|
180 | 222 | #define APB_BRIDGE_CORE_ID 0x135 /* APB bridge core ID */ |
---|
181 | 223 | #define AXI_CORE_ID 0x301 /* AXI/GPV core ID */ |
---|
182 | 224 | #define EROM_CORE_ID 0x366 /* EROM core ID */ |
---|
.. | .. |
---|
185 | 227 | * unused address ranges |
---|
186 | 228 | */ |
---|
187 | 229 | |
---|
188 | | -#define CC_4706_CORE_ID 0x500 /* chipcommon core */ |
---|
189 | 230 | #define NS_PCIEG2_CORE_ID 0x501 /* PCIE Gen 2 core */ |
---|
190 | 231 | #define NS_DMA_CORE_ID 0x502 /* DMA core */ |
---|
191 | 232 | #define NS_SDIO3_CORE_ID 0x503 /* SDIO3 core */ |
---|
.. | .. |
---|
197 | 238 | #define NS_NAND_CORE_ID 0x509 /* NAND flash controller core */ |
---|
198 | 239 | #define NS_QSPI_CORE_ID 0x50a /* SPI flash controller core */ |
---|
199 | 240 | #define NS_CCB_CORE_ID 0x50b /* ChipcommonB core */ |
---|
200 | | -#define SOCRAM_4706_CORE_ID 0x50e /* internal memory core */ |
---|
201 | | -#define NS_SOCRAM_CORE_ID SOCRAM_4706_CORE_ID |
---|
| 241 | +#define NS_SOCRAM_CORE_ID 0x50e /* internal memory core */ |
---|
202 | 242 | #define ARMCA9_CORE_ID 0x510 /* ARM Cortex A9 core (ihost) */ |
---|
203 | 243 | #define NS_IHOST_CORE_ID ARMCA9_CORE_ID /* ARM Cortex A9 core (ihost) */ |
---|
204 | | -#define GMAC_COMMON_4706_CORE_ID 0x5dc /* Gigabit MAC core */ |
---|
205 | | -#define GMAC_4706_CORE_ID 0x52d /* Gigabit MAC core */ |
---|
206 | 244 | #define AMEMC_CORE_ID 0x52e /* DDR1/2 memory controller core */ |
---|
207 | 245 | #define ALTA_CORE_ID 0x534 /* I2S core */ |
---|
208 | 246 | #define DDR23_PHY_CORE_ID 0x5dd |
---|
.. | .. |
---|
212 | 250 | #define SI_PCIE1_DMA_H32 0xc0000000 /* PCIE Client Mode sb2pcitranslation2 |
---|
213 | 251 | * (2 ZettaBytes), high 32 bits |
---|
214 | 252 | */ |
---|
215 | | -#define CC_4706B0_CORE_REV 0x8000001f /* chipcommon core */ |
---|
216 | | -#define SOCRAM_4706B0_CORE_REV 0x80000005 /* internal memory core */ |
---|
217 | | -#define GMAC_4706B0_CORE_REV 0x80000000 /* Gigabit MAC core */ |
---|
218 | 253 | #define NS_PCIEG2_CORE_REV_B0 0x7 /* NS-B0 PCIE Gen 2 core rev */ |
---|
219 | 254 | |
---|
220 | | -/* There are TWO constants on all HND chips: SI_ENUM_BASE above, |
---|
| 255 | +/* There are TWO constants on all HND chips: SI_ENUM_BASE_DEFAULT above, |
---|
221 | 256 | * and chipcommon being the first core: |
---|
222 | 257 | */ |
---|
223 | 258 | #define SI_CC_IDX 0 |
---|
.. | .. |
---|
226 | 261 | #define SOCI_AI 1 |
---|
227 | 262 | #define SOCI_UBUS 2 |
---|
228 | 263 | #define SOCI_NAI 3 |
---|
| 264 | +#define SOCI_DVTBUS 4 /* BCM7XXX Digital Video Tech bus */ |
---|
229 | 265 | |
---|
230 | 266 | /* Common core control flags */ |
---|
231 | 267 | #define SICF_BIST_EN 0x8000 |
---|
.. | .. |
---|
249 | 285 | #define SISF_NS_BOOTDEV_OFFLOAD 0x0003 /* ROM core */ |
---|
250 | 286 | #define SISF_NS_SKUVEC_MASK 0x000c /* ROM core */ |
---|
251 | 287 | |
---|
| 288 | +/* dot11 core-specific status flags */ |
---|
| 289 | +#define SISF_MINORREV_D11_SHIFT 16 |
---|
| 290 | +#define SISF_MINORREV_D11_MASK 0xF /**< minor corerev (corerev == 61) */ |
---|
| 291 | + |
---|
252 | 292 | /* A register that is common to all cores to |
---|
253 | 293 | * communicate w/PMU regarding clock control. |
---|
254 | 294 | */ |
---|
.. | .. |
---|
266 | 306 | #define CCS_USBCLKREQ 0x00000100 /* USB Clock Req */ |
---|
267 | 307 | #define CCS_SECICLKREQ 0x00000100 /* SECI Clock Req */ |
---|
268 | 308 | #define CCS_ARMFASTCLOCKREQ 0x00000100 /* ARM CR4/CA7 fast clock request */ |
---|
| 309 | +#define CCS_SFLASH_CLKREQ 0x00000200 /* Sflash clk request */ |
---|
269 | 310 | #define CCS_AVBCLKREQ 0x00000400 /* AVB Clock enable request */ |
---|
270 | 311 | #define CCS_ERSRC_REQ_MASK 0x00000700 /* external resource requests */ |
---|
271 | 312 | #define CCS_ERSRC_REQ_SHIFT 8 |
---|
.. | .. |
---|
276 | 317 | #define CCS_ARMFASTCLOCKSTATUS 0x01000000 /* Fast CPU clock is running */ |
---|
277 | 318 | #define CCS_ERSRC_STS_MASK 0x07000000 /* external resource status */ |
---|
278 | 319 | #define CCS_ERSRC_STS_SHIFT 24 |
---|
279 | | - |
---|
280 | | -#define CCS0_HTAVAIL 0x00010000 /* HT avail in chipc and pcmcia on 4328a0 */ |
---|
281 | | -#define CCS0_ALPAVAIL 0x00020000 /* ALP avail in chipc and pcmcia on 4328a0 */ |
---|
| 320 | +#define CCS_SECI_AVAIL 0x01000000 /* RO: SECI is available */ |
---|
282 | 321 | |
---|
283 | 322 | /* Not really related to SOC Interconnect, but a couple of software |
---|
284 | 323 | * conventions for the use the flash space: |
---|
.. | .. |
---|
313 | 352 | int soc_knl_dev(void *sih); |
---|
314 | 353 | #endif /* !defined(_LANGUAGE_ASSEMBLY) && !defined(__ASSEMBLY__) */ |
---|
315 | 354 | |
---|
| 355 | +#define PMU_BASE_OFFSET 0x00012000 /* PMU offset is changed for ccrev >= 56 */ |
---|
316 | 356 | #endif /* _HNDSOC_H */ |
---|