1 /* 2 * SiliconBackplane GCI core hardware definitions 3 * 4 * Copyright (C) 1999-2017, Broadcom Corporation 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 * Notwithstanding the above, under no circumstances may you combine this 21 * software in any way with any other Broadcom software provided under a license 22 * other than the GPL, without Broadcom's express prior written consent. 23 * 24 * 25 * <<Broadcom-WL-IPTag/Open:>> 26 * 27 * $Id: sbgci.h 612498 2016-01-14 05:09:09Z $ 28 */ 29 30 #ifndef _SBGCI_H 31 #define _SBGCI_H 32 33 #if !defined(_LANGUAGE_ASSEMBLY) && !defined(__ASSEMBLY__) 34 35 /* cpp contortions to concatenate w/arg prescan */ 36 #ifndef PAD 37 #define _PADLINE(line) pad ## line 38 #define _XSTR(line) _PADLINE(line) 39 #define PAD _XSTR(__LINE__) 40 #endif /* PAD */ 41 42 #define GCI_OFFSETOF(sih, reg) \ 43 (AOB_ENAB(sih) ? OFFSETOF(gciregs_t, reg) : OFFSETOF(chipcregs_t, reg)) 44 #define GCI_CORE_IDX(sih) (AOB_ENAB(sih) ? si_findcoreidx(sih, GCI_CORE_ID, 0) : SI_CC_IDX) 45 46 typedef volatile struct { 47 uint32 gci_corecaps0; /* 0x000 */ 48 uint32 gci_corecaps1; /* 0x004 */ 49 uint32 gci_corecaps2; /* 0x008 */ 50 uint32 gci_corectrl; /* 0x00c */ 51 uint32 gci_corestat; /* 0x010 */ 52 uint32 gci_intstat; /* 0x014 */ 53 uint32 gci_intmask; /* 0x018 */ 54 uint32 gci_wakemask; /* 0x01c */ 55 uint32 gci_levelintstat; /* 0x020 */ 56 uint32 gci_eventintstat; /* 0x024 */ 57 uint32 gci_wakelevelintstat; /* 0x028 */ 58 uint32 gci_wakeeventintstat; /* 0x02c */ 59 uint32 semaphoreintstatus; /* 0x030 */ 60 uint32 semaphoreintmask; /* 0x034 */ 61 uint32 semaphorerequest; /* 0x038 */ 62 uint32 semaphorereserve; /* 0x03c */ 63 uint32 gci_indirect_addr; /* 0x040 */ 64 uint32 gci_gpioctl; /* 0x044 */ 65 uint32 gci_gpiostatus; /* 0x048 */ 66 uint32 gci_gpiomask; /* 0x04c */ 67 uint32 eventsummary; /* 0x050 */ 68 uint32 gci_miscctl; /* 0x054 */ 69 uint32 gci_gpiointmask; /* 0x058 */ 70 uint32 gci_gpiowakemask; /* 0x05c */ 71 uint32 gci_input[32]; /* 0x060 */ 72 uint32 gci_event[32]; /* 0x0e0 */ 73 uint32 gci_output[4]; /* 0x160 */ 74 uint32 gci_control_0; /* 0x170 */ 75 uint32 gci_control_1; /* 0x174 */ 76 uint32 gci_intpolreg; /* 0x178 */ 77 uint32 gci_levelintmask; /* 0x17c */ 78 uint32 gci_eventintmask; /* 0x180 */ 79 uint32 wakelevelintmask; /* 0x184 */ 80 uint32 wakeeventintmask; /* 0x188 */ 81 uint32 hwmask; /* 0x18c */ 82 uint32 PAD; 83 uint32 gci_inbandeventintmask; /* 0x194 */ 84 uint32 PAD; 85 uint32 gci_inbandeventstatus; /* 0x19c */ 86 uint32 gci_seciauxtx; /* 0x1a0 */ 87 uint32 gci_seciauxrx; /* 0x1a4 */ 88 uint32 gci_secitx_datatag; /* 0x1a8 */ 89 uint32 gci_secirx_datatag; /* 0x1ac */ 90 uint32 gci_secitx_datamask; /* 0x1b0 */ 91 uint32 gci_seciusef0tx_reg; /* 0x1b4 */ 92 uint32 gci_secif0tx_offset; /* 0x1b8 */ 93 uint32 gci_secif0rx_offset; /* 0x1bc */ 94 uint32 gci_secif1tx_offset; /* 0x1c0 */ 95 uint32 gci_rxfifo_common_ctrl; /* 0x1c4 */ 96 uint32 gci_rxfifoctrl; /* 0x1c8 */ 97 uint32 gci_hw_sema_status; /* 0x1cc */ 98 uint32 gci_seciuartescval; /* 0x1d0 */ 99 uint32 gic_seciuartautobaudctr; /* 0x1d4 */ 100 uint32 gci_secififolevel; /* 0x1d8 */ 101 uint32 gci_seciuartdata; /* 0x1dc */ 102 uint32 gci_secibauddiv; /* 0x1e0 */ 103 uint32 gci_secifcr; /* 0x1e4 */ 104 uint32 gci_secilcr; /* 0x1e8 */ 105 uint32 gci_secimcr; /* 0x1ec */ 106 uint32 gci_secilsr; /* 0x1f0 */ 107 uint32 gci_secimsr; /* 0x1f4 */ 108 uint32 gci_baudadj; /* 0x1f8 */ 109 uint32 gci_inbandintmask; /* 0x1fc */ 110 uint32 gci_chipctrl; /* 0x200 */ 111 uint32 gci_chipsts; /* 0x204 */ 112 uint32 gci_gpioout; /* 0x208 */ 113 uint32 gci_gpioout_read; /* 0x20C */ 114 uint32 gci_mpwaketx; /* 0x210 */ 115 uint32 gci_mpwakedetect; /* 0x214 */ 116 uint32 gci_seciin_ctrl; /* 0x218 */ 117 uint32 gci_seciout_ctrl; /* 0x21C */ 118 uint32 gci_seciin_auxfifo_en; /* 0x220 */ 119 uint32 gci_seciout_txen_txbr; /* 0x224 */ 120 uint32 gci_seciin_rxbrstatus; /* 0x228 */ 121 uint32 gci_seciin_rxerrstatus; /* 0x22C */ 122 uint32 gci_seciin_fcstatus; /* 0x230 */ 123 uint32 gci_seciout_txstatus; /* 0x234 */ 124 uint32 gci_seciout_txbrstatus; /* 0x238 */ 125 uint32 wlan_mem_info; /* 0x23C */ 126 uint32 wlan_bankxinfo; /* 0x240 */ 127 uint32 bt_smem_select; /* 0x244 */ 128 uint32 bt_smem_stby; /* 0x248 */ 129 uint32 bt_smem_status; /* 0x24C */ 130 uint32 wlan_bankxactivepda; /* 0x250 */ 131 uint32 wlan_bankxsleeppda; /* 0x254 */ 132 uint32 wlan_bankxkill; /* 0x258 */ 133 uint32 PAD[41]; 134 uint32 gci_chipid; /* 0x300 */ 135 uint32 PAD[3]; 136 uint32 otpstatus; /* 0x310 */ 137 uint32 otpcontrol; /* 0x314 */ 138 uint32 otpprog; /* 0x318 */ 139 uint32 otplayout; /* 0x31c */ 140 uint32 otplayoutextension; /* 0x320 */ 141 uint32 otpcontrol1; /* 0x324 */ 142 uint32 otpprogdata; /* 0x328 */ 143 uint32 PAD[52]; 144 uint32 otpECCstatus; /* 0x3FC */ 145 uint32 PAD[512]; 146 uint32 lhl_core_capab_adr; /* 0xC00 */ 147 uint32 lhl_main_ctl_adr; /* 0xC04 */ 148 uint32 lhl_pmu_ctl_adr; /* 0xC08 */ 149 uint32 lhl_extlpo_ctl_adr; /* 0xC0C */ 150 uint32 lpo_ctl_adr; /* 0xC10 */ 151 uint32 lhl_lpo2_ctl_adr; /* 0xC14 */ 152 uint32 lhl_osc32k_ctl_adr; /* 0xC18 */ 153 uint32 lhl_clk_status_adr; /* 0xC1C */ 154 uint32 lhl_clk_det_ctl_adr; /* 0xC20 */ 155 uint32 lhl_clk_sel_adr; /* 0xC24 */ 156 uint32 hidoff_cnt_adr[2]; /* 0xC28-0xC2C */ 157 uint32 lhl_autoclk_ctl_adr; /* 0xC30 */ 158 uint32 PAD; /* reserved */ 159 uint32 lhl_hibtim_adr; /* 0xC38 */ 160 uint32 lhl_wl_ilp_val_adr; /* 0xC3C */ 161 uint32 lhl_wl_armtim0_intrp_adr; /* 0xC40 */ 162 uint32 lhl_wl_armtim0_st_adr; /* 0xC44 */ 163 uint32 lhl_wl_armtim0_adr; /* 0xC48 */ 164 uint32 PAD[9]; /* 0xC4C-0xC6C */ 165 uint32 lhl_wl_mactim0_intrp_adr; /* 0xC70 */ 166 uint32 lhl_wl_mactim0_st_adr; /* 0xC74 */ 167 uint32 lhl_wl_mactim_int0_adr; /* 0xC78 */ 168 uint32 lhl_wl_mactim_frac0_adr; /* 0xC7C */ 169 uint32 lhl_wl_mactim1_intrp_adr; /* 0xC80 */ 170 uint32 lhl_wl_mactim1_st_adr; /* 0xC84 */ 171 uint32 lhl_wl_mactim_int1_adr; /* 0xC88 */ 172 uint32 lhl_wl_mactim_frac1_adr; /* 0xC8C */ 173 uint32 PAD[8]; /* 0xC90-0xCAC */ 174 uint32 gpio_int_en_port_adr[4]; /* 0xCB0-0xCBC */ 175 uint32 gpio_int_st_port_adr[4]; /* 0xCC0-0xCCC */ 176 uint32 gpio_ctrl_iocfg_p_adr[64]; /* 0xCD0-0xDCC */ 177 uint32 gpio_gctrl_iocfg_p0_p39_adr; /* 0xDD0 */ 178 uint32 gpio_gdsctrl_iocfg_p0_p25_p30_p39_adr; /* 0xDD4 */ 179 uint32 gpio_gdsctrl_iocfg_p26_p29_adr; /* 0xDD8 */ 180 uint32 PAD[8]; /* 0xDDC-0xDF8 */ 181 uint32 lhl_gpio_din0_adr; /* 0xDFC */ 182 uint32 lhl_gpio_din1_adr; /* 0xE00 */ 183 uint32 lhl_wkup_status_adr; /* 0xE04 */ 184 uint32 lhl_ctl_adr; /* 0xE08 */ 185 uint32 lhl_adc_ctl_adr; /* 0xE0C */ 186 uint32 lhl_qdxyz_in_dly_adr; /* 0xE10 */ 187 uint32 lhl_optctl_adr; /* 0xE14 */ 188 uint32 lhl_optct2_adr; /* 0xE18 */ 189 uint32 lhl_scanp_cntr_init_val_adr; /* 0xE1C */ 190 uint32 lhl_opt_togg_val_adr[6]; /* 0xE20-0xE34 */ 191 uint32 lhl_optx_smp_val_adr; /* 0xE38 */ 192 uint32 lhl_opty_smp_val_adr; /* 0xE3C */ 193 uint32 lhl_optz_smp_val_adr; /* 0xE40 */ 194 uint32 lhl_hidoff_keepstate_adr[3]; /* 0xE44-0xE4C */ 195 uint32 lhl_bt_slmboot_ctl0_adr[4]; /* 0xE50-0xE5C */ 196 uint32 lhl_wl_fw_ctl; /* 0xE60 */ 197 uint32 lhl_wl_hw_ctl_adr[2]; /* 0xE64-0xE68 */ 198 uint32 lhl_bt_hw_ctl_adr; /* 0xE6C */ 199 uint32 lhl_top_pwrseq_en_adr; /* 0xE70 */ 200 uint32 lhl_top_pwrdn_ctl_adr; /* 0xE74 */ 201 uint32 lhl_top_pwrup_ctl_adr; /* 0xE78 */ 202 uint32 lhl_top_pwrseq_ctl_adr; /* 0xE7C */ 203 uint32 lhl_top_pwrdn2_ctl_adr; /* 0xE80 */ 204 uint32 lhl_top_pwrup2_ctl_adr; /* 0xE84 */ 205 uint32 wpt_regon_intrp_cfg_adr; /* 0xE88 */ 206 uint32 bt_regon_intrp_cfg_adr; /* 0xE8C */ 207 uint32 wl_regon_intrp_cfg_adr; /* 0xE90 */ 208 uint32 regon_intrp_st_adr; /* 0xE94 */ 209 uint32 regon_intrp_en_adr; /* 0xE98 */ 210 } gciregs_t; 211 212 #define GCI_CAP0_REV_MASK 0x000000ff 213 214 /* GCI Capabilities registers */ 215 #define GCI_CORE_CAP_0_COREREV_MASK 0xFF 216 #define GCI_CORE_CAP_0_COREREV_SHIFT 0 217 218 #define GCI_INDIRECT_ADDRESS_REG_REGINDEX_MASK 0x3F 219 #define GCI_INDIRECT_ADDRESS_REG_REGINDEX_SHIFT 0 220 #define GCI_INDIRECT_ADDRESS_REG_GPIOINDEX_MASK 0xF 221 #define GCI_INDIRECT_ADDRESS_REG_GPIOINDEX_SHIFT 16 222 223 #define WLAN_BANKX_SLEEPPDA_REG_SLEEPPDA_MASK 0xFFFF 224 225 #define WLAN_BANKX_PKILL_REG_SLEEPPDA_MASK 0x1 226 227 /* WLAN BankXInfo Register */ 228 #define WLAN_BANKXINFO_BANK_SIZE_MASK 0x00FFF000 229 #define WLAN_BANKXINFO_BANK_SIZE_SHIFT 12 230 231 /* WLAN Mem Info Register */ 232 #define WLAN_MEM_INFO_REG_NUMSOCRAMBANKS_MASK 0x000000FF 233 #define WLAN_MEM_INFO_REG_NUMSOCRAMBANKS_SHIFT 0 234 235 #define WLAN_MEM_INFO_REG_NUMD11MACBM_MASK 0x0000FF00 236 #define WLAN_MEM_INFO_REG_NUMD11MACBM_SHIFT 8 237 238 #define WLAN_MEM_INFO_REG_NUMD11MACUCM_MASK 0x00FF0000 239 #define WLAN_MEM_INFO_REG_NUMD11MACUCM_SHIFT 16 240 241 #define WLAN_MEM_INFO_REG_NUMD11MACSHM_MASK 0xFF000000 242 #define WLAN_MEM_INFO_REG_NUMD11MACSHM_SHIFT 24 243 244 245 #endif /* !_LANGUAGE_ASSEMBLY && !__ASSEMBLY__ */ 246 247 248 #endif /* _SBGCI_H */ 249