| .. | .. |
|---|
| 8 | 8 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
|---|
| 9 | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
|---|
| 10 | 10 | * Copyright(c) 2016 Intel Deutschland GmbH |
|---|
| 11 | | - * Copyright(c) 2018 Intel Corporation |
|---|
| 11 | + * Copyright(c) 2018 - 2019 Intel Corporation |
|---|
| 12 | 12 | * |
|---|
| 13 | 13 | * This program is free software; you can redistribute it and/or modify |
|---|
| 14 | 14 | * it under the terms of version 2 of the GNU General Public License as |
|---|
| .. | .. |
|---|
| 18 | 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 19 | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 20 | 20 | * General Public License for more details. |
|---|
| 21 | | - * |
|---|
| 22 | | - * You should have received a copy of the GNU General Public License |
|---|
| 23 | | - * along with this program; if not, write to the Free Software |
|---|
| 24 | | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, |
|---|
| 25 | | - * USA |
|---|
| 26 | 21 | * |
|---|
| 27 | 22 | * The full GNU General Public License is included in this distribution |
|---|
| 28 | 23 | * in the file called COPYING. |
|---|
| .. | .. |
|---|
| 35 | 30 | * |
|---|
| 36 | 31 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
|---|
| 37 | 32 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
|---|
| 38 | | - * Copyright(c) 2018 Intel Corporation |
|---|
| 33 | + * Copyright(c) 2018 - 2019 Intel Corporation |
|---|
| 39 | 34 | * All rights reserved. |
|---|
| 40 | 35 | * |
|---|
| 41 | 36 | * Redistribution and use in source and binary forms, with or without |
|---|
| .. | .. |
|---|
| 152 | 147 | #define CSR_MAC_SHADOW_REG_CTL2 (CSR_BASE + 0x0AC) |
|---|
| 153 | 148 | #define CSR_MAC_SHADOW_REG_CTL2_RX_WAKE 0xFFFF |
|---|
| 154 | 149 | |
|---|
| 150 | +/* LTR control (since IWL_DEVICE_FAMILY_22000) */ |
|---|
| 151 | +#define CSR_LTR_LONG_VAL_AD (CSR_BASE + 0x0D4) |
|---|
| 152 | +#define CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ 0x80000000 |
|---|
| 153 | +#define CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE 0x1c000000 |
|---|
| 154 | +#define CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL 0x03ff0000 |
|---|
| 155 | +#define CSR_LTR_LONG_VAL_AD_SNOOP_REQ 0x00008000 |
|---|
| 156 | +#define CSR_LTR_LONG_VAL_AD_SNOOP_SCALE 0x00001c00 |
|---|
| 157 | +#define CSR_LTR_LONG_VAL_AD_SNOOP_VAL 0x000003ff |
|---|
| 158 | +#define CSR_LTR_LONG_VAL_AD_SCALE_USEC 2 |
|---|
| 159 | + |
|---|
| 155 | 160 | /* GIO Chicken Bits (PCI Express bus link power management) */ |
|---|
| 156 | 161 | #define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100) |
|---|
| 157 | 162 | |
|---|
| .. | .. |
|---|
| 185 | 190 | /* Bits for CSR_HW_IF_CONFIG_REG */ |
|---|
| 186 | 191 | #define CSR_HW_IF_CONFIG_REG_MSK_MAC_DASH (0x00000003) |
|---|
| 187 | 192 | #define CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP (0x0000000C) |
|---|
| 193 | +#define CSR_HW_IF_CONFIG_REG_BIT_MONITOR_SRAM (0x00000080) |
|---|
| 188 | 194 | #define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x000000C0) |
|---|
| 189 | 195 | #define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100) |
|---|
| 190 | 196 | #define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200) |
|---|
| 197 | +#define CSR_HW_IF_CONFIG_REG_D3_DEBUG (0x00000200) |
|---|
| 191 | 198 | #define CSR_HW_IF_CONFIG_REG_MSK_PHY_TYPE (0x00000C00) |
|---|
| 192 | 199 | #define CSR_HW_IF_CONFIG_REG_MSK_PHY_DASH (0x00003000) |
|---|
| 193 | 200 | #define CSR_HW_IF_CONFIG_REG_MSK_PHY_STEP (0x0000C000) |
|---|
| .. | .. |
|---|
| 259 | 266 | /* RESET */ |
|---|
| 260 | 267 | #define CSR_RESET_REG_FLAG_NEVO_RESET (0x00000001) |
|---|
| 261 | 268 | #define CSR_RESET_REG_FLAG_FORCE_NMI (0x00000002) |
|---|
| 269 | +#define CSR_RESET_REG_FLAG_SW_RESET (0x00000080) |
|---|
| 262 | 270 | #define CSR_RESET_REG_FLAG_MASTER_DISABLED (0x00000100) |
|---|
| 263 | 271 | #define CSR_RESET_REG_FLAG_STOP_MASTER (0x00000200) |
|---|
| 264 | 272 | #define CSR_RESET_LINK_PWR_MGMT_DISABLED (0x80000000) |
|---|
| .. | .. |
|---|
| 281 | 289 | * 4: GOING_TO_SLEEP |
|---|
| 282 | 290 | * Indicates MAC is entering a power-saving sleep power-down. |
|---|
| 283 | 291 | * Not a good time to access device-internal resources. |
|---|
| 292 | + * 3: MAC_ACCESS_REQ |
|---|
| 293 | + * Host sets this to request and maintain MAC wakeup, to allow host |
|---|
| 294 | + * access to device-internal resources. Host must wait for |
|---|
| 295 | + * MAC_CLOCK_READY (and !GOING_TO_SLEEP) before accessing non-CSR |
|---|
| 296 | + * device registers. |
|---|
| 297 | + * 2: INIT_DONE |
|---|
| 298 | + * Host sets this to put device into fully operational D0 power mode. |
|---|
| 299 | + * Host resets this after SW_RESET to put device into low power mode. |
|---|
| 300 | + * 0: MAC_CLOCK_READY |
|---|
| 301 | + * Indicates MAC (ucode processor, etc.) is powered up and can run. |
|---|
| 302 | + * Internal resources are accessible. |
|---|
| 303 | + * NOTE: This does not indicate that the processor is actually running. |
|---|
| 304 | + * NOTE: This does not indicate that device has completed |
|---|
| 305 | + * init or post-power-down restore of internal SRAM memory. |
|---|
| 306 | + * Use CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP as indication that |
|---|
| 307 | + * SRAM is restored and uCode is in normal operation mode. |
|---|
| 308 | + * Later devices (5xxx/6xxx/1xxx) use non-volatile SRAM, and |
|---|
| 309 | + * do not need to save/restore it. |
|---|
| 310 | + * NOTE: After device reset, this bit remains "0" until host sets |
|---|
| 311 | + * INIT_DONE |
|---|
| 284 | 312 | */ |
|---|
| 285 | | -#define CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP (0x00000010) |
|---|
| 313 | +#define CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY (0x00000001) |
|---|
| 314 | +#define CSR_GP_CNTRL_REG_FLAG_INIT_DONE (0x00000004) |
|---|
| 315 | +#define CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ (0x00000008) |
|---|
| 316 | +#define CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP (0x00000010) |
|---|
| 286 | 317 | #define CSR_GP_CNTRL_REG_FLAG_XTAL_ON (0x00000400) |
|---|
| 318 | + |
|---|
| 319 | +#define CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN (0x00000001) |
|---|
| 287 | 320 | |
|---|
| 288 | 321 | #define CSR_GP_CNTRL_REG_MSK_POWER_SAVE_TYPE (0x07000000) |
|---|
| 289 | 322 | #define CSR_GP_CNTRL_REG_FLAG_RFKILL_WAKE_L1A_EN (0x04000000) |
|---|
| .. | .. |
|---|
| 293 | 326 | /* HW REV */ |
|---|
| 294 | 327 | #define CSR_HW_REV_DASH(_val) (((_val) & 0x0000003) >> 0) |
|---|
| 295 | 328 | #define CSR_HW_REV_STEP(_val) (((_val) & 0x000000C) >> 2) |
|---|
| 329 | +#define CSR_HW_REV_TYPE(_val) (((_val) & 0x000FFF0) >> 4) |
|---|
| 296 | 330 | |
|---|
| 297 | 331 | /* HW RFID */ |
|---|
| 298 | 332 | #define CSR_HW_RFID_FLAVOR(_val) (((_val) & 0x000000F) >> 0) |
|---|
| .. | .. |
|---|
| 329 | 363 | #define CSR_HW_REV_TYPE_7265D (0x0000210) |
|---|
| 330 | 364 | #define CSR_HW_REV_TYPE_NONE (0x00001F0) |
|---|
| 331 | 365 | #define CSR_HW_REV_TYPE_QNJ (0x0000360) |
|---|
| 366 | +#define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364) |
|---|
| 367 | +#define CSR_HW_REV_TYPE_QU_B0 (0x0000334) |
|---|
| 368 | +#define CSR_HW_REV_TYPE_QU_C0 (0x0000338) |
|---|
| 369 | +#define CSR_HW_REV_TYPE_QUZ (0x0000354) |
|---|
| 332 | 370 | #define CSR_HW_REV_TYPE_HR_CDB (0x0000340) |
|---|
| 371 | +#define CSR_HW_REV_TYPE_SO (0x0000370) |
|---|
| 372 | +#define CSR_HW_REV_TYPE_TY (0x0000420) |
|---|
| 333 | 373 | |
|---|
| 334 | 374 | /* RF_ID value */ |
|---|
| 335 | 375 | #define CSR_HW_RF_ID_TYPE_JF (0x00105100) |
|---|
| 336 | 376 | #define CSR_HW_RF_ID_TYPE_HR (0x0010A000) |
|---|
| 377 | +#define CSR_HW_RF_ID_TYPE_HR1 (0x0010c100) |
|---|
| 337 | 378 | #define CSR_HW_RF_ID_TYPE_HRCDB (0x00109F00) |
|---|
| 379 | +#define CSR_HW_RF_ID_TYPE_GF (0x0010D000) |
|---|
| 380 | +#define CSR_HW_RF_ID_TYPE_GF4 (0x0010E000) |
|---|
| 338 | 381 | |
|---|
| 339 | 382 | /* HW_RF CHIP ID */ |
|---|
| 340 | 383 | #define CSR_HW_RF_ID_TYPE_CHIP_ID(_val) (((_val) >> 12) & 0xFFF) |
|---|
| .. | .. |
|---|
| 371 | 414 | |
|---|
| 372 | 415 | |
|---|
| 373 | 416 | /* CSR GIO */ |
|---|
| 374 | | -#define CSR_GIO_REG_VAL_L0S_ENABLED (0x00000002) |
|---|
| 417 | +#define CSR_GIO_REG_VAL_L0S_DISABLED (0x00000002) |
|---|
| 375 | 418 | |
|---|
| 376 | 419 | /* |
|---|
| 377 | 420 | * UCODE-DRIVER GP (general purpose) mailbox register 1 |
|---|
| .. | .. |
|---|
| 595 | 638 | enum msix_hw_int_causes { |
|---|
| 596 | 639 | MSIX_HW_INT_CAUSES_REG_ALIVE = BIT(0), |
|---|
| 597 | 640 | MSIX_HW_INT_CAUSES_REG_WAKEUP = BIT(1), |
|---|
| 598 | | - MSIX_HW_INT_CAUSES_REG_IPC = BIT(1), |
|---|
| 599 | | - MSIX_HW_INT_CAUSES_REG_SW_ERR_V2 = BIT(5), |
|---|
| 641 | + MSIX_HW_INT_CAUSES_REG_IML = BIT(2), |
|---|
| 600 | 642 | MSIX_HW_INT_CAUSES_REG_CT_KILL = BIT(6), |
|---|
| 601 | 643 | MSIX_HW_INT_CAUSES_REG_RF_KILL = BIT(7), |
|---|
| 602 | 644 | MSIX_HW_INT_CAUSES_REG_PERIODIC = BIT(8), |
|---|