162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 262306a36Sopenharmony_ci/* Copyright(c) 2020 Realtek Corporation 362306a36Sopenharmony_ci */ 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#ifndef __RTW89_PCI_H__ 662306a36Sopenharmony_ci#define __RTW89_PCI_H__ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include "txrx.h" 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#define MDIO_PG0_G1 0 1162306a36Sopenharmony_ci#define MDIO_PG1_G1 1 1262306a36Sopenharmony_ci#define MDIO_PG0_G2 2 1362306a36Sopenharmony_ci#define MDIO_PG1_G2 3 1462306a36Sopenharmony_ci#define RAC_CTRL_PPR 0x00 1562306a36Sopenharmony_ci#define RAC_ANA0A 0x0A 1662306a36Sopenharmony_ci#define B_BAC_EQ_SEL BIT(5) 1762306a36Sopenharmony_ci#define RAC_ANA0C 0x0C 1862306a36Sopenharmony_ci#define B_PCIE_BIT_PSAVE BIT(15) 1962306a36Sopenharmony_ci#define RAC_ANA10 0x10 2062306a36Sopenharmony_ci#define B_PCIE_BIT_PINOUT_DIS BIT(3) 2162306a36Sopenharmony_ci#define RAC_REG_REV2 0x1B 2262306a36Sopenharmony_ci#define BAC_CMU_EN_DLY_MASK GENMASK(15, 12) 2362306a36Sopenharmony_ci#define PCIE_DPHY_DLY_25US 0x1 2462306a36Sopenharmony_ci#define RAC_ANA19 0x19 2562306a36Sopenharmony_ci#define B_PCIE_BIT_RD_SEL BIT(2) 2662306a36Sopenharmony_ci#define RAC_REG_FLD_0 0x1D 2762306a36Sopenharmony_ci#define BAC_AUTOK_N_MASK GENMASK(3, 2) 2862306a36Sopenharmony_ci#define PCIE_AUTOK_4 0x3 2962306a36Sopenharmony_ci#define RAC_ANA1F 0x1F 3062306a36Sopenharmony_ci#define RAC_ANA24 0x24 3162306a36Sopenharmony_ci#define B_AX_DEGLITCH GENMASK(11, 8) 3262306a36Sopenharmony_ci#define RAC_ANA26 0x26 3362306a36Sopenharmony_ci#define B_AX_RXEN GENMASK(15, 14) 3462306a36Sopenharmony_ci#define RAC_CTRL_PPR_V1 0x30 3562306a36Sopenharmony_ci#define B_AX_CLK_CALIB_EN BIT(12) 3662306a36Sopenharmony_ci#define B_AX_CALIB_EN BIT(13) 3762306a36Sopenharmony_ci#define B_AX_DIV GENMASK(15, 14) 3862306a36Sopenharmony_ci#define RAC_SET_PPR_V1 0x31 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#define R_AX_DBI_FLAG 0x1090 4162306a36Sopenharmony_ci#define B_AX_DBI_RFLAG BIT(17) 4262306a36Sopenharmony_ci#define B_AX_DBI_WFLAG BIT(16) 4362306a36Sopenharmony_ci#define B_AX_DBI_WREN_MSK GENMASK(15, 12) 4462306a36Sopenharmony_ci#define B_AX_DBI_ADDR_MSK GENMASK(11, 2) 4562306a36Sopenharmony_ci#define R_AX_DBI_WDATA 0x1094 4662306a36Sopenharmony_ci#define R_AX_DBI_RDATA 0x1098 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#define R_AX_MDIO_WDATA 0x10A4 4962306a36Sopenharmony_ci#define R_AX_MDIO_RDATA 0x10A6 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define R_AX_PCIE_PS_CTRL_V1 0x3008 5262306a36Sopenharmony_ci#define B_AX_CMAC_EXIT_L1_EN BIT(7) 5362306a36Sopenharmony_ci#define B_AX_DMAC0_EXIT_L1_EN BIT(6) 5462306a36Sopenharmony_ci#define B_AX_SEL_XFER_PENDING BIT(3) 5562306a36Sopenharmony_ci#define B_AX_SEL_REQ_ENTR_L1 BIT(2) 5662306a36Sopenharmony_ci#define B_AX_SEL_REQ_EXIT_L1 BIT(0) 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#define R_AX_PCIE_MIX_CFG_V1 0x300C 5962306a36Sopenharmony_ci#define B_AX_ASPM_CTRL_L1 BIT(17) 6062306a36Sopenharmony_ci#define B_AX_ASPM_CTRL_L0 BIT(16) 6162306a36Sopenharmony_ci#define B_AX_ASPM_CTRL_MASK GENMASK(17, 16) 6262306a36Sopenharmony_ci#define B_AX_XFER_PENDING_FW BIT(11) 6362306a36Sopenharmony_ci#define B_AX_XFER_PENDING BIT(10) 6462306a36Sopenharmony_ci#define B_AX_REQ_EXIT_L1 BIT(9) 6562306a36Sopenharmony_ci#define B_AX_REQ_ENTR_L1 BIT(8) 6662306a36Sopenharmony_ci#define B_AX_L1SUB_DISABLE BIT(0) 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#define R_AX_L1_CLK_CTRL 0x3010 6962306a36Sopenharmony_ci#define B_AX_CLK_REQ_N BIT(1) 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#define R_AX_PCIE_BG_CLR 0x303C 7262306a36Sopenharmony_ci#define B_AX_BG_CLR_ASYNC_M3 BIT(4) 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#define R_AX_PCIE_LAT_CTRL 0x3044 7562306a36Sopenharmony_ci#define B_AX_CLK_REQ_SEL_OPT BIT(1) 7662306a36Sopenharmony_ci#define B_AX_CLK_REQ_SEL BIT(0) 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#define R_AX_PCIE_IO_RCY_M1 0x3100 7962306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_P_M1 BIT(5) 8062306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_P_M1 BIT(4) 8162306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_MODE_M1 BIT(3) 8262306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_TRIG_M1 BIT(0) 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci#define R_AX_PCIE_WDT_TIMER_M1 0x3104 8562306a36Sopenharmony_ci#define B_AX_PCIE_WDT_TIMER_M1_MASK GENMASK(31, 0) 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci#define R_AX_PCIE_IO_RCY_M2 0x310C 8862306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_P_M2 BIT(5) 8962306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_P_M2 BIT(4) 9062306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_MODE_M2 BIT(3) 9162306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_TRIG_M2 BIT(0) 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci#define R_AX_PCIE_WDT_TIMER_M2 0x3110 9462306a36Sopenharmony_ci#define B_AX_PCIE_WDT_TIMER_M2_MASK GENMASK(31, 0) 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci#define R_AX_PCIE_IO_RCY_E0 0x3118 9762306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_P_E0 BIT(5) 9862306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_P_E0 BIT(4) 9962306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_MODE_E0 BIT(3) 10062306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_TRIG_E0 BIT(0) 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci#define R_AX_PCIE_WDT_TIMER_E0 0x311C 10362306a36Sopenharmony_ci#define B_AX_PCIE_WDT_TIMER_E0_MASK GENMASK(31, 0) 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci#define R_AX_PCIE_IO_RCY_S1 0x3124 10662306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_RP_S1 BIT(7) 10762306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WP_S1 BIT(6) 10862306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_RP_S1 BIT(5) 10962306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_WP_S1 BIT(4) 11062306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WDT_MODE_S1 BIT(3) 11162306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_RTRIG_S1 BIT(1) 11262306a36Sopenharmony_ci#define B_AX_PCIE_IO_RCY_WTRIG_S1 BIT(0) 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci#define R_AX_PCIE_WDT_TIMER_S1 0x3128 11562306a36Sopenharmony_ci#define B_AX_PCIE_WDT_TIMER_S1_MASK GENMASK(31, 0) 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci#define R_RAC_DIRECT_OFFSET_G1 0x3800 11862306a36Sopenharmony_ci#define FILTER_OUT_EQ_MASK GENMASK(14, 10) 11962306a36Sopenharmony_ci#define R_RAC_DIRECT_OFFSET_G2 0x3880 12062306a36Sopenharmony_ci#define REG_FILTER_OUT_MASK GENMASK(6, 2) 12162306a36Sopenharmony_ci#define RAC_MULT 2 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define RTW89_PCI_WR_RETRY_CNT 20 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci/* Interrupts */ 12662306a36Sopenharmony_ci#define R_AX_HIMR0 0x01A0 12762306a36Sopenharmony_ci#define B_AX_WDT_TIMEOUT_INT_EN BIT(22) 12862306a36Sopenharmony_ci#define B_AX_HALT_C2H_INT_EN BIT(21) 12962306a36Sopenharmony_ci#define R_AX_HISR0 0x01A4 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define R_AX_HIMR1 0x01A8 13262306a36Sopenharmony_ci#define B_AX_GPIO18_INT_EN BIT(2) 13362306a36Sopenharmony_ci#define B_AX_GPIO17_INT_EN BIT(1) 13462306a36Sopenharmony_ci#define B_AX_GPIO16_INT_EN BIT(0) 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci#define R_AX_HISR1 0x01AC 13762306a36Sopenharmony_ci#define B_AX_GPIO18_INT BIT(2) 13862306a36Sopenharmony_ci#define B_AX_GPIO17_INT BIT(1) 13962306a36Sopenharmony_ci#define B_AX_GPIO16_INT BIT(0) 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci#define R_AX_MDIO_CFG 0x10A0 14262306a36Sopenharmony_ci#define B_AX_MDIO_PHY_ADDR_MASK GENMASK(13, 12) 14362306a36Sopenharmony_ci#define B_AX_MDIO_RFLAG BIT(9) 14462306a36Sopenharmony_ci#define B_AX_MDIO_WFLAG BIT(8) 14562306a36Sopenharmony_ci#define B_AX_MDIO_ADDR_MASK GENMASK(4, 0) 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci#define R_AX_PCIE_HIMR00 0x10B0 14862306a36Sopenharmony_ci#define R_AX_HAXI_HIMR00 0x10B0 14962306a36Sopenharmony_ci#define B_AX_HC00ISR_IND_INT_EN BIT(27) 15062306a36Sopenharmony_ci#define B_AX_HD1ISR_IND_INT_EN BIT(26) 15162306a36Sopenharmony_ci#define B_AX_HD0ISR_IND_INT_EN BIT(25) 15262306a36Sopenharmony_ci#define B_AX_HS0ISR_IND_INT_EN BIT(24) 15362306a36Sopenharmony_ci#define B_AX_HS0ISR_IND_INT_EN_WKARND BIT(23) 15462306a36Sopenharmony_ci#define B_AX_RETRAIN_INT_EN BIT(21) 15562306a36Sopenharmony_ci#define B_AX_RPQBD_FULL_INT_EN BIT(20) 15662306a36Sopenharmony_ci#define B_AX_RDU_INT_EN BIT(19) 15762306a36Sopenharmony_ci#define B_AX_RXDMA_STUCK_INT_EN BIT(18) 15862306a36Sopenharmony_ci#define B_AX_TXDMA_STUCK_INT_EN BIT(17) 15962306a36Sopenharmony_ci#define B_AX_PCIE_HOTRST_INT_EN BIT(16) 16062306a36Sopenharmony_ci#define B_AX_PCIE_FLR_INT_EN BIT(15) 16162306a36Sopenharmony_ci#define B_AX_PCIE_PERST_INT_EN BIT(14) 16262306a36Sopenharmony_ci#define B_AX_TXDMA_CH12_INT_EN BIT(13) 16362306a36Sopenharmony_ci#define B_AX_TXDMA_CH9_INT_EN BIT(12) 16462306a36Sopenharmony_ci#define B_AX_TXDMA_CH8_INT_EN BIT(11) 16562306a36Sopenharmony_ci#define B_AX_TXDMA_ACH7_INT_EN BIT(10) 16662306a36Sopenharmony_ci#define B_AX_TXDMA_ACH6_INT_EN BIT(9) 16762306a36Sopenharmony_ci#define B_AX_TXDMA_ACH5_INT_EN BIT(8) 16862306a36Sopenharmony_ci#define B_AX_TXDMA_ACH4_INT_EN BIT(7) 16962306a36Sopenharmony_ci#define B_AX_TXDMA_ACH3_INT_EN BIT(6) 17062306a36Sopenharmony_ci#define B_AX_TXDMA_ACH2_INT_EN BIT(5) 17162306a36Sopenharmony_ci#define B_AX_TXDMA_ACH1_INT_EN BIT(4) 17262306a36Sopenharmony_ci#define B_AX_TXDMA_ACH0_INT_EN BIT(3) 17362306a36Sopenharmony_ci#define B_AX_RPQDMA_INT_EN BIT(2) 17462306a36Sopenharmony_ci#define B_AX_RXP1DMA_INT_EN BIT(1) 17562306a36Sopenharmony_ci#define B_AX_RXDMA_INT_EN BIT(0) 17662306a36Sopenharmony_ci 17762306a36Sopenharmony_ci#define R_AX_PCIE_HISR00 0x10B4 17862306a36Sopenharmony_ci#define R_AX_HAXI_HISR00 0x10B4 17962306a36Sopenharmony_ci#define B_AX_HC00ISR_IND_INT BIT(27) 18062306a36Sopenharmony_ci#define B_AX_HD1ISR_IND_INT BIT(26) 18162306a36Sopenharmony_ci#define B_AX_HD0ISR_IND_INT BIT(25) 18262306a36Sopenharmony_ci#define B_AX_HS0ISR_IND_INT BIT(24) 18362306a36Sopenharmony_ci#define B_AX_RETRAIN_INT BIT(21) 18462306a36Sopenharmony_ci#define B_AX_RPQBD_FULL_INT BIT(20) 18562306a36Sopenharmony_ci#define B_AX_RDU_INT BIT(19) 18662306a36Sopenharmony_ci#define B_AX_RXDMA_STUCK_INT BIT(18) 18762306a36Sopenharmony_ci#define B_AX_TXDMA_STUCK_INT BIT(17) 18862306a36Sopenharmony_ci#define B_AX_PCIE_HOTRST_INT BIT(16) 18962306a36Sopenharmony_ci#define B_AX_PCIE_FLR_INT BIT(15) 19062306a36Sopenharmony_ci#define B_AX_PCIE_PERST_INT BIT(14) 19162306a36Sopenharmony_ci#define B_AX_TXDMA_CH12_INT BIT(13) 19262306a36Sopenharmony_ci#define B_AX_TXDMA_CH9_INT BIT(12) 19362306a36Sopenharmony_ci#define B_AX_TXDMA_CH8_INT BIT(11) 19462306a36Sopenharmony_ci#define B_AX_TXDMA_ACH7_INT BIT(10) 19562306a36Sopenharmony_ci#define B_AX_TXDMA_ACH6_INT BIT(9) 19662306a36Sopenharmony_ci#define B_AX_TXDMA_ACH5_INT BIT(8) 19762306a36Sopenharmony_ci#define B_AX_TXDMA_ACH4_INT BIT(7) 19862306a36Sopenharmony_ci#define B_AX_TXDMA_ACH3_INT BIT(6) 19962306a36Sopenharmony_ci#define B_AX_TXDMA_ACH2_INT BIT(5) 20062306a36Sopenharmony_ci#define B_AX_TXDMA_ACH1_INT BIT(4) 20162306a36Sopenharmony_ci#define B_AX_TXDMA_ACH0_INT BIT(3) 20262306a36Sopenharmony_ci#define B_AX_RPQDMA_INT BIT(2) 20362306a36Sopenharmony_ci#define B_AX_RXP1DMA_INT BIT(1) 20462306a36Sopenharmony_ci#define B_AX_RXDMA_INT BIT(0) 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci#define R_AX_HAXI_IDCT_MSK 0x10B8 20762306a36Sopenharmony_ci#define B_AX_TXBD_LEN0_ERR_IDCT_MSK BIT(3) 20862306a36Sopenharmony_ci#define B_AX_TXBD_4KBOUND_ERR_IDCT_MSK BIT(2) 20962306a36Sopenharmony_ci#define B_AX_RXMDA_STUCK_IDCT_MSK BIT(1) 21062306a36Sopenharmony_ci#define B_AX_TXMDA_STUCK_IDCT_MSK BIT(0) 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci#define R_AX_HAXI_IDCT 0x10BC 21362306a36Sopenharmony_ci#define B_AX_TXBD_LEN0_ERR_IDCT BIT(3) 21462306a36Sopenharmony_ci#define B_AX_TXBD_4KBOUND_ERR_IDCT BIT(2) 21562306a36Sopenharmony_ci#define B_AX_RXMDA_STUCK_IDCT BIT(1) 21662306a36Sopenharmony_ci#define B_AX_TXMDA_STUCK_IDCT BIT(0) 21762306a36Sopenharmony_ci 21862306a36Sopenharmony_ci#define R_AX_HAXI_HIMR10 0x11E0 21962306a36Sopenharmony_ci#define B_AX_TXDMA_CH11_INT_EN_V1 BIT(1) 22062306a36Sopenharmony_ci#define B_AX_TXDMA_CH10_INT_EN_V1 BIT(0) 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ci#define R_AX_PCIE_HIMR10 0x13B0 22362306a36Sopenharmony_ci#define B_AX_HC10ISR_IND_INT_EN BIT(28) 22462306a36Sopenharmony_ci#define B_AX_TXDMA_CH11_INT_EN BIT(12) 22562306a36Sopenharmony_ci#define B_AX_TXDMA_CH10_INT_EN BIT(11) 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_ci#define R_AX_PCIE_HISR10 0x13B4 22862306a36Sopenharmony_ci#define B_AX_HC10ISR_IND_INT BIT(28) 22962306a36Sopenharmony_ci#define B_AX_TXDMA_CH11_INT BIT(12) 23062306a36Sopenharmony_ci#define B_AX_TXDMA_CH10_INT BIT(11) 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ci#define R_AX_PCIE_HIMR00_V1 0x30B0 23362306a36Sopenharmony_ci#define B_AX_HCI_AXIDMA_INT_EN BIT(29) 23462306a36Sopenharmony_ci#define B_AX_HC00ISR_IND_INT_EN_V1 BIT(28) 23562306a36Sopenharmony_ci#define B_AX_HD1ISR_IND_INT_EN_V1 BIT(27) 23662306a36Sopenharmony_ci#define B_AX_HD0ISR_IND_INT_EN_V1 BIT(26) 23762306a36Sopenharmony_ci#define B_AX_HS1ISR_IND_INT_EN BIT(25) 23862306a36Sopenharmony_ci#define B_AX_PCIE_DBG_STE_INT_EN BIT(13) 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci#define R_AX_PCIE_HISR00_V1 0x30B4 24162306a36Sopenharmony_ci#define B_AX_HCI_AXIDMA_INT BIT(29) 24262306a36Sopenharmony_ci#define B_AX_HC00ISR_IND_INT_V1 BIT(28) 24362306a36Sopenharmony_ci#define B_AX_HD1ISR_IND_INT_V1 BIT(27) 24462306a36Sopenharmony_ci#define B_AX_HD0ISR_IND_INT_V1 BIT(26) 24562306a36Sopenharmony_ci#define B_AX_HS1ISR_IND_INT BIT(25) 24662306a36Sopenharmony_ci#define B_AX_PCIE_DBG_STE_INT BIT(13) 24762306a36Sopenharmony_ci 24862306a36Sopenharmony_ci/* TX/RX */ 24962306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_0 0x01B0 25062306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_1 0x01B4 25162306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_2 0x01B8 25262306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_3 0x01BC 25362306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_4 0x01C0 25462306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_5 0x01C4 25562306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_6 0x01C8 25662306a36Sopenharmony_ci#define R_AX_DRV_FW_HSK_7 0x01CC 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_IDX 0x1050 25962306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_IDX 0x1054 26062306a36Sopenharmony_ci#define R_AX_ACH0_TXBD_IDX 0x1058 26162306a36Sopenharmony_ci#define R_AX_ACH1_TXBD_IDX 0x105C 26262306a36Sopenharmony_ci#define R_AX_ACH2_TXBD_IDX 0x1060 26362306a36Sopenharmony_ci#define R_AX_ACH3_TXBD_IDX 0x1064 26462306a36Sopenharmony_ci#define R_AX_ACH4_TXBD_IDX 0x1068 26562306a36Sopenharmony_ci#define R_AX_ACH5_TXBD_IDX 0x106C 26662306a36Sopenharmony_ci#define R_AX_ACH6_TXBD_IDX 0x1070 26762306a36Sopenharmony_ci#define R_AX_ACH7_TXBD_IDX 0x1074 26862306a36Sopenharmony_ci#define R_AX_CH8_TXBD_IDX 0x1078 /* Management Queue band 0 */ 26962306a36Sopenharmony_ci#define R_AX_CH9_TXBD_IDX 0x107C /* HI Queue band 0 */ 27062306a36Sopenharmony_ci#define R_AX_CH10_TXBD_IDX 0x137C /* Management Queue band 1 */ 27162306a36Sopenharmony_ci#define R_AX_CH11_TXBD_IDX 0x1380 /* HI Queue band 1 */ 27262306a36Sopenharmony_ci#define R_AX_CH12_TXBD_IDX 0x1080 /* FWCMD Queue */ 27362306a36Sopenharmony_ci#define R_AX_CH10_TXBD_IDX_V1 0x11D0 27462306a36Sopenharmony_ci#define R_AX_CH11_TXBD_IDX_V1 0x11D4 27562306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_IDX_V1 0x1218 27662306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_IDX_V1 0x121C 27762306a36Sopenharmony_ci#define TXBD_HW_IDX_MASK GENMASK(27, 16) 27862306a36Sopenharmony_ci#define TXBD_HOST_IDX_MASK GENMASK(11, 0) 27962306a36Sopenharmony_ci 28062306a36Sopenharmony_ci#define R_AX_ACH0_TXBD_DESA_L 0x1110 28162306a36Sopenharmony_ci#define R_AX_ACH0_TXBD_DESA_H 0x1114 28262306a36Sopenharmony_ci#define R_AX_ACH1_TXBD_DESA_L 0x1118 28362306a36Sopenharmony_ci#define R_AX_ACH1_TXBD_DESA_H 0x111C 28462306a36Sopenharmony_ci#define R_AX_ACH2_TXBD_DESA_L 0x1120 28562306a36Sopenharmony_ci#define R_AX_ACH2_TXBD_DESA_H 0x1124 28662306a36Sopenharmony_ci#define R_AX_ACH3_TXBD_DESA_L 0x1128 28762306a36Sopenharmony_ci#define R_AX_ACH3_TXBD_DESA_H 0x112C 28862306a36Sopenharmony_ci#define R_AX_ACH4_TXBD_DESA_L 0x1130 28962306a36Sopenharmony_ci#define R_AX_ACH4_TXBD_DESA_H 0x1134 29062306a36Sopenharmony_ci#define R_AX_ACH5_TXBD_DESA_L 0x1138 29162306a36Sopenharmony_ci#define R_AX_ACH5_TXBD_DESA_H 0x113C 29262306a36Sopenharmony_ci#define R_AX_ACH6_TXBD_DESA_L 0x1140 29362306a36Sopenharmony_ci#define R_AX_ACH6_TXBD_DESA_H 0x1144 29462306a36Sopenharmony_ci#define R_AX_ACH7_TXBD_DESA_L 0x1148 29562306a36Sopenharmony_ci#define R_AX_ACH7_TXBD_DESA_H 0x114C 29662306a36Sopenharmony_ci#define R_AX_CH8_TXBD_DESA_L 0x1150 29762306a36Sopenharmony_ci#define R_AX_CH8_TXBD_DESA_H 0x1154 29862306a36Sopenharmony_ci#define R_AX_CH9_TXBD_DESA_L 0x1158 29962306a36Sopenharmony_ci#define R_AX_CH9_TXBD_DESA_H 0x115C 30062306a36Sopenharmony_ci#define R_AX_CH10_TXBD_DESA_L 0x1358 30162306a36Sopenharmony_ci#define R_AX_CH10_TXBD_DESA_H 0x135C 30262306a36Sopenharmony_ci#define R_AX_CH11_TXBD_DESA_L 0x1360 30362306a36Sopenharmony_ci#define R_AX_CH11_TXBD_DESA_H 0x1364 30462306a36Sopenharmony_ci#define R_AX_CH12_TXBD_DESA_L 0x1160 30562306a36Sopenharmony_ci#define R_AX_CH12_TXBD_DESA_H 0x1164 30662306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_DESA_L 0x1100 30762306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_DESA_H 0x1104 30862306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_DESA_L 0x1108 30962306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_DESA_H 0x110C 31062306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_DESA_L_V1 0x1220 31162306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_DESA_H_V1 0x1224 31262306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_DESA_L_V1 0x1228 31362306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_DESA_H_V1 0x122C 31462306a36Sopenharmony_ci#define R_AX_ACH0_TXBD_DESA_L_V1 0x1230 31562306a36Sopenharmony_ci#define R_AX_ACH0_TXBD_DESA_H_V1 0x1234 31662306a36Sopenharmony_ci#define R_AX_ACH1_TXBD_DESA_L_V1 0x1238 31762306a36Sopenharmony_ci#define R_AX_ACH1_TXBD_DESA_H_V1 0x123C 31862306a36Sopenharmony_ci#define R_AX_ACH2_TXBD_DESA_L_V1 0x1240 31962306a36Sopenharmony_ci#define R_AX_ACH2_TXBD_DESA_H_V1 0x1244 32062306a36Sopenharmony_ci#define R_AX_ACH3_TXBD_DESA_L_V1 0x1248 32162306a36Sopenharmony_ci#define R_AX_ACH3_TXBD_DESA_H_V1 0x124C 32262306a36Sopenharmony_ci#define R_AX_ACH4_TXBD_DESA_L_V1 0x1250 32362306a36Sopenharmony_ci#define R_AX_ACH4_TXBD_DESA_H_V1 0x1254 32462306a36Sopenharmony_ci#define R_AX_ACH5_TXBD_DESA_L_V1 0x1258 32562306a36Sopenharmony_ci#define R_AX_ACH5_TXBD_DESA_H_V1 0x125C 32662306a36Sopenharmony_ci#define R_AX_ACH6_TXBD_DESA_L_V1 0x1260 32762306a36Sopenharmony_ci#define R_AX_ACH6_TXBD_DESA_H_V1 0x1264 32862306a36Sopenharmony_ci#define R_AX_ACH7_TXBD_DESA_L_V1 0x1268 32962306a36Sopenharmony_ci#define R_AX_ACH7_TXBD_DESA_H_V1 0x126C 33062306a36Sopenharmony_ci#define R_AX_CH8_TXBD_DESA_L_V1 0x1270 33162306a36Sopenharmony_ci#define R_AX_CH8_TXBD_DESA_H_V1 0x1274 33262306a36Sopenharmony_ci#define R_AX_CH9_TXBD_DESA_L_V1 0x1278 33362306a36Sopenharmony_ci#define R_AX_CH9_TXBD_DESA_H_V1 0x127C 33462306a36Sopenharmony_ci#define R_AX_CH12_TXBD_DESA_L_V1 0x1280 33562306a36Sopenharmony_ci#define R_AX_CH12_TXBD_DESA_H_V1 0x1284 33662306a36Sopenharmony_ci#define R_AX_CH10_TXBD_DESA_L_V1 0x1458 33762306a36Sopenharmony_ci#define R_AX_CH10_TXBD_DESA_H_V1 0x145C 33862306a36Sopenharmony_ci#define R_AX_CH11_TXBD_DESA_L_V1 0x1460 33962306a36Sopenharmony_ci#define R_AX_CH11_TXBD_DESA_H_V1 0x1464 34062306a36Sopenharmony_ci#define B_AX_DESC_NUM_MSK GENMASK(11, 0) 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_NUM 0x1020 34362306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_NUM 0x1022 34462306a36Sopenharmony_ci#define R_AX_ACH0_TXBD_NUM 0x1024 34562306a36Sopenharmony_ci#define R_AX_ACH1_TXBD_NUM 0x1026 34662306a36Sopenharmony_ci#define R_AX_ACH2_TXBD_NUM 0x1028 34762306a36Sopenharmony_ci#define R_AX_ACH3_TXBD_NUM 0x102A 34862306a36Sopenharmony_ci#define R_AX_ACH4_TXBD_NUM 0x102C 34962306a36Sopenharmony_ci#define R_AX_ACH5_TXBD_NUM 0x102E 35062306a36Sopenharmony_ci#define R_AX_ACH6_TXBD_NUM 0x1030 35162306a36Sopenharmony_ci#define R_AX_ACH7_TXBD_NUM 0x1032 35262306a36Sopenharmony_ci#define R_AX_CH8_TXBD_NUM 0x1034 35362306a36Sopenharmony_ci#define R_AX_CH9_TXBD_NUM 0x1036 35462306a36Sopenharmony_ci#define R_AX_CH10_TXBD_NUM 0x1338 35562306a36Sopenharmony_ci#define R_AX_CH11_TXBD_NUM 0x133A 35662306a36Sopenharmony_ci#define R_AX_CH12_TXBD_NUM 0x1038 35762306a36Sopenharmony_ci#define R_AX_RXQ_RXBD_NUM_V1 0x1210 35862306a36Sopenharmony_ci#define R_AX_RPQ_RXBD_NUM_V1 0x1212 35962306a36Sopenharmony_ci#define R_AX_CH10_TXBD_NUM_V1 0x1438 36062306a36Sopenharmony_ci#define R_AX_CH11_TXBD_NUM_V1 0x143A 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci#define R_AX_ACH0_BDRAM_CTRL 0x1200 36362306a36Sopenharmony_ci#define R_AX_ACH1_BDRAM_CTRL 0x1204 36462306a36Sopenharmony_ci#define R_AX_ACH2_BDRAM_CTRL 0x1208 36562306a36Sopenharmony_ci#define R_AX_ACH3_BDRAM_CTRL 0x120C 36662306a36Sopenharmony_ci#define R_AX_ACH4_BDRAM_CTRL 0x1210 36762306a36Sopenharmony_ci#define R_AX_ACH5_BDRAM_CTRL 0x1214 36862306a36Sopenharmony_ci#define R_AX_ACH6_BDRAM_CTRL 0x1218 36962306a36Sopenharmony_ci#define R_AX_ACH7_BDRAM_CTRL 0x121C 37062306a36Sopenharmony_ci#define R_AX_CH8_BDRAM_CTRL 0x1220 37162306a36Sopenharmony_ci#define R_AX_CH9_BDRAM_CTRL 0x1224 37262306a36Sopenharmony_ci#define R_AX_CH10_BDRAM_CTRL 0x1320 37362306a36Sopenharmony_ci#define R_AX_CH11_BDRAM_CTRL 0x1324 37462306a36Sopenharmony_ci#define R_AX_CH12_BDRAM_CTRL 0x1228 37562306a36Sopenharmony_ci#define R_AX_ACH0_BDRAM_CTRL_V1 0x1300 37662306a36Sopenharmony_ci#define R_AX_ACH1_BDRAM_CTRL_V1 0x1304 37762306a36Sopenharmony_ci#define R_AX_ACH2_BDRAM_CTRL_V1 0x1308 37862306a36Sopenharmony_ci#define R_AX_ACH3_BDRAM_CTRL_V1 0x130C 37962306a36Sopenharmony_ci#define R_AX_ACH4_BDRAM_CTRL_V1 0x1310 38062306a36Sopenharmony_ci#define R_AX_ACH5_BDRAM_CTRL_V1 0x1314 38162306a36Sopenharmony_ci#define R_AX_ACH6_BDRAM_CTRL_V1 0x1318 38262306a36Sopenharmony_ci#define R_AX_ACH7_BDRAM_CTRL_V1 0x131C 38362306a36Sopenharmony_ci#define R_AX_CH8_BDRAM_CTRL_V1 0x1320 38462306a36Sopenharmony_ci#define R_AX_CH9_BDRAM_CTRL_V1 0x1324 38562306a36Sopenharmony_ci#define R_AX_CH12_BDRAM_CTRL_V1 0x1328 38662306a36Sopenharmony_ci#define R_AX_CH10_BDRAM_CTRL_V1 0x1420 38762306a36Sopenharmony_ci#define R_AX_CH11_BDRAM_CTRL_V1 0x1424 38862306a36Sopenharmony_ci#define BDRAM_SIDX_MASK GENMASK(7, 0) 38962306a36Sopenharmony_ci#define BDRAM_MAX_MASK GENMASK(15, 8) 39062306a36Sopenharmony_ci#define BDRAM_MIN_MASK GENMASK(23, 16) 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_ci#define R_AX_PCIE_INIT_CFG1 0x1000 39362306a36Sopenharmony_ci#define B_AX_PCIE_RXRST_KEEP_REG BIT(23) 39462306a36Sopenharmony_ci#define B_AX_PCIE_TXRST_KEEP_REG BIT(22) 39562306a36Sopenharmony_ci#define B_AX_PCIE_PERST_KEEP_REG BIT(21) 39662306a36Sopenharmony_ci#define B_AX_PCIE_FLR_KEEP_REG BIT(20) 39762306a36Sopenharmony_ci#define B_AX_PCIE_TRAIN_KEEP_REG BIT(19) 39862306a36Sopenharmony_ci#define B_AX_RXBD_MODE BIT(18) 39962306a36Sopenharmony_ci#define B_AX_PCIE_MAX_RXDMA_MASK GENMASK(16, 14) 40062306a36Sopenharmony_ci#define B_AX_RXHCI_EN BIT(13) 40162306a36Sopenharmony_ci#define B_AX_LATENCY_CONTROL BIT(12) 40262306a36Sopenharmony_ci#define B_AX_TXHCI_EN BIT(11) 40362306a36Sopenharmony_ci#define B_AX_PCIE_MAX_TXDMA_MASK GENMASK(10, 8) 40462306a36Sopenharmony_ci#define B_AX_TX_TRUNC_MODE BIT(5) 40562306a36Sopenharmony_ci#define B_AX_RX_TRUNC_MODE BIT(4) 40662306a36Sopenharmony_ci#define B_AX_RST_BDRAM BIT(3) 40762306a36Sopenharmony_ci#define B_AX_DIS_RXDMA_PRE BIT(2) 40862306a36Sopenharmony_ci 40962306a36Sopenharmony_ci#define R_AX_TXDMA_ADDR_H 0x10F0 41062306a36Sopenharmony_ci#define R_AX_RXDMA_ADDR_H 0x10F4 41162306a36Sopenharmony_ci 41262306a36Sopenharmony_ci#define R_AX_PCIE_DMA_STOP1 0x1010 41362306a36Sopenharmony_ci#define B_AX_STOP_PCIEIO BIT(20) 41462306a36Sopenharmony_ci#define B_AX_STOP_WPDMA BIT(19) 41562306a36Sopenharmony_ci#define B_AX_STOP_CH12 BIT(18) 41662306a36Sopenharmony_ci#define B_AX_STOP_CH9 BIT(17) 41762306a36Sopenharmony_ci#define B_AX_STOP_CH8 BIT(16) 41862306a36Sopenharmony_ci#define B_AX_STOP_ACH7 BIT(15) 41962306a36Sopenharmony_ci#define B_AX_STOP_ACH6 BIT(14) 42062306a36Sopenharmony_ci#define B_AX_STOP_ACH5 BIT(13) 42162306a36Sopenharmony_ci#define B_AX_STOP_ACH4 BIT(12) 42262306a36Sopenharmony_ci#define B_AX_STOP_ACH3 BIT(11) 42362306a36Sopenharmony_ci#define B_AX_STOP_ACH2 BIT(10) 42462306a36Sopenharmony_ci#define B_AX_STOP_ACH1 BIT(9) 42562306a36Sopenharmony_ci#define B_AX_STOP_ACH0 BIT(8) 42662306a36Sopenharmony_ci#define B_AX_STOP_RPQ BIT(1) 42762306a36Sopenharmony_ci#define B_AX_STOP_RXQ BIT(0) 42862306a36Sopenharmony_ci#define B_AX_TX_STOP1_ALL GENMASK(18, 8) 42962306a36Sopenharmony_ci#define B_AX_TX_STOP1_MASK (B_AX_STOP_ACH0 | B_AX_STOP_ACH1 | \ 43062306a36Sopenharmony_ci B_AX_STOP_ACH2 | B_AX_STOP_ACH3 | \ 43162306a36Sopenharmony_ci B_AX_STOP_ACH4 | B_AX_STOP_ACH5 | \ 43262306a36Sopenharmony_ci B_AX_STOP_ACH6 | B_AX_STOP_ACH7 | \ 43362306a36Sopenharmony_ci B_AX_STOP_CH8 | B_AX_STOP_CH9 | \ 43462306a36Sopenharmony_ci B_AX_STOP_CH12) 43562306a36Sopenharmony_ci#define B_AX_TX_STOP1_MASK_V1 (B_AX_STOP_ACH0 | B_AX_STOP_ACH1 | \ 43662306a36Sopenharmony_ci B_AX_STOP_ACH2 | B_AX_STOP_ACH3 | \ 43762306a36Sopenharmony_ci B_AX_STOP_CH8 | B_AX_STOP_CH9 | \ 43862306a36Sopenharmony_ci B_AX_STOP_CH12) 43962306a36Sopenharmony_ci 44062306a36Sopenharmony_ci#define R_AX_PCIE_DMA_STOP2 0x1310 44162306a36Sopenharmony_ci#define B_AX_STOP_CH11 BIT(1) 44262306a36Sopenharmony_ci#define B_AX_STOP_CH10 BIT(0) 44362306a36Sopenharmony_ci#define B_AX_TX_STOP2_ALL GENMASK(1, 0) 44462306a36Sopenharmony_ci 44562306a36Sopenharmony_ci#define R_AX_TXBD_RWPTR_CLR1 0x1014 44662306a36Sopenharmony_ci#define B_AX_CLR_CH12_IDX BIT(10) 44762306a36Sopenharmony_ci#define B_AX_CLR_CH9_IDX BIT(9) 44862306a36Sopenharmony_ci#define B_AX_CLR_CH8_IDX BIT(8) 44962306a36Sopenharmony_ci#define B_AX_CLR_ACH7_IDX BIT(7) 45062306a36Sopenharmony_ci#define B_AX_CLR_ACH6_IDX BIT(6) 45162306a36Sopenharmony_ci#define B_AX_CLR_ACH5_IDX BIT(5) 45262306a36Sopenharmony_ci#define B_AX_CLR_ACH4_IDX BIT(4) 45362306a36Sopenharmony_ci#define B_AX_CLR_ACH3_IDX BIT(3) 45462306a36Sopenharmony_ci#define B_AX_CLR_ACH2_IDX BIT(2) 45562306a36Sopenharmony_ci#define B_AX_CLR_ACH1_IDX BIT(1) 45662306a36Sopenharmony_ci#define B_AX_CLR_ACH0_IDX BIT(0) 45762306a36Sopenharmony_ci#define B_AX_TXBD_CLR1_ALL GENMASK(10, 0) 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_ci#define R_AX_RXBD_RWPTR_CLR 0x1018 46062306a36Sopenharmony_ci#define B_AX_CLR_RPQ_IDX BIT(1) 46162306a36Sopenharmony_ci#define B_AX_CLR_RXQ_IDX BIT(0) 46262306a36Sopenharmony_ci#define B_AX_RXBD_CLR_ALL GENMASK(1, 0) 46362306a36Sopenharmony_ci 46462306a36Sopenharmony_ci#define R_AX_TXBD_RWPTR_CLR2 0x1314 46562306a36Sopenharmony_ci#define B_AX_CLR_CH11_IDX BIT(1) 46662306a36Sopenharmony_ci#define B_AX_CLR_CH10_IDX BIT(0) 46762306a36Sopenharmony_ci#define B_AX_TXBD_CLR2_ALL GENMASK(1, 0) 46862306a36Sopenharmony_ci 46962306a36Sopenharmony_ci#define R_AX_PCIE_DMA_BUSY1 0x101C 47062306a36Sopenharmony_ci#define B_AX_PCIEIO_RX_BUSY BIT(22) 47162306a36Sopenharmony_ci#define B_AX_PCIEIO_TX_BUSY BIT(21) 47262306a36Sopenharmony_ci#define B_AX_PCIEIO_BUSY BIT(20) 47362306a36Sopenharmony_ci#define B_AX_WPDMA_BUSY BIT(19) 47462306a36Sopenharmony_ci#define B_AX_CH12_BUSY BIT(18) 47562306a36Sopenharmony_ci#define B_AX_CH9_BUSY BIT(17) 47662306a36Sopenharmony_ci#define B_AX_CH8_BUSY BIT(16) 47762306a36Sopenharmony_ci#define B_AX_ACH7_BUSY BIT(15) 47862306a36Sopenharmony_ci#define B_AX_ACH6_BUSY BIT(14) 47962306a36Sopenharmony_ci#define B_AX_ACH5_BUSY BIT(13) 48062306a36Sopenharmony_ci#define B_AX_ACH4_BUSY BIT(12) 48162306a36Sopenharmony_ci#define B_AX_ACH3_BUSY BIT(11) 48262306a36Sopenharmony_ci#define B_AX_ACH2_BUSY BIT(10) 48362306a36Sopenharmony_ci#define B_AX_ACH1_BUSY BIT(9) 48462306a36Sopenharmony_ci#define B_AX_ACH0_BUSY BIT(8) 48562306a36Sopenharmony_ci#define B_AX_RPQ_BUSY BIT(1) 48662306a36Sopenharmony_ci#define B_AX_RXQ_BUSY BIT(0) 48762306a36Sopenharmony_ci#define DMA_BUSY1_CHECK (B_AX_ACH0_BUSY | B_AX_ACH1_BUSY | B_AX_ACH2_BUSY | \ 48862306a36Sopenharmony_ci B_AX_ACH3_BUSY | B_AX_ACH4_BUSY | B_AX_ACH5_BUSY | \ 48962306a36Sopenharmony_ci B_AX_ACH6_BUSY | B_AX_ACH7_BUSY | B_AX_CH8_BUSY | \ 49062306a36Sopenharmony_ci B_AX_CH9_BUSY | B_AX_CH12_BUSY) 49162306a36Sopenharmony_ci#define DMA_BUSY1_CHECK_V1 (B_AX_ACH0_BUSY | B_AX_ACH1_BUSY | B_AX_ACH2_BUSY | \ 49262306a36Sopenharmony_ci B_AX_ACH3_BUSY | B_AX_CH8_BUSY | B_AX_CH9_BUSY | \ 49362306a36Sopenharmony_ci B_AX_CH12_BUSY) 49462306a36Sopenharmony_ci 49562306a36Sopenharmony_ci#define R_AX_PCIE_DMA_BUSY2 0x131C 49662306a36Sopenharmony_ci#define B_AX_CH11_BUSY BIT(1) 49762306a36Sopenharmony_ci#define B_AX_CH10_BUSY BIT(0) 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci/* Configure */ 50062306a36Sopenharmony_ci#define R_AX_PCIE_INIT_CFG2 0x1004 50162306a36Sopenharmony_ci#define B_AX_WD_ITVL_IDLE GENMASK(27, 24) 50262306a36Sopenharmony_ci#define B_AX_WD_ITVL_ACT GENMASK(19, 16) 50362306a36Sopenharmony_ci#define B_AX_PCIE_RX_APPLEN_MASK GENMASK(13, 0) 50462306a36Sopenharmony_ci 50562306a36Sopenharmony_ci#define R_AX_PCIE_PS_CTRL 0x1008 50662306a36Sopenharmony_ci#define B_AX_L1OFF_PWR_OFF_EN BIT(5) 50762306a36Sopenharmony_ci 50862306a36Sopenharmony_ci#define R_AX_INT_MIT_RX 0x10D4 50962306a36Sopenharmony_ci#define B_AX_RXMIT_RXP2_SEL BIT(19) 51062306a36Sopenharmony_ci#define B_AX_RXMIT_RXP1_SEL BIT(18) 51162306a36Sopenharmony_ci#define B_AX_RXTIMER_UNIT_MASK GENMASK(17, 16) 51262306a36Sopenharmony_ci#define AX_RXTIMER_UNIT_64US 0 51362306a36Sopenharmony_ci#define AX_RXTIMER_UNIT_128US 1 51462306a36Sopenharmony_ci#define AX_RXTIMER_UNIT_256US 2 51562306a36Sopenharmony_ci#define AX_RXTIMER_UNIT_512US 3 51662306a36Sopenharmony_ci#define B_AX_RXCOUNTER_MATCH_MASK GENMASK(15, 8) 51762306a36Sopenharmony_ci#define B_AX_RXTIMER_MATCH_MASK GENMASK(7, 0) 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ci#define R_AX_DBG_ERR_FLAG 0x11C4 52062306a36Sopenharmony_ci#define B_AX_PCIE_RPQ_FULL BIT(29) 52162306a36Sopenharmony_ci#define B_AX_PCIE_RXQ_FULL BIT(28) 52262306a36Sopenharmony_ci#define B_AX_CPL_STATUS_MASK GENMASK(27, 25) 52362306a36Sopenharmony_ci#define B_AX_RX_STUCK BIT(22) 52462306a36Sopenharmony_ci#define B_AX_TX_STUCK BIT(21) 52562306a36Sopenharmony_ci#define B_AX_PCIEDBG_TXERR0 BIT(16) 52662306a36Sopenharmony_ci#define B_AX_PCIE_RXP1_ERR0 BIT(4) 52762306a36Sopenharmony_ci#define B_AX_PCIE_TXBD_LEN0 BIT(1) 52862306a36Sopenharmony_ci#define B_AX_PCIE_TXBD_4KBOUD_LENERR BIT(0) 52962306a36Sopenharmony_ci 53062306a36Sopenharmony_ci#define R_AX_TXBD_RWPTR_CLR2_V1 0x11C4 53162306a36Sopenharmony_ci#define B_AX_CLR_CH11_IDX BIT(1) 53262306a36Sopenharmony_ci#define B_AX_CLR_CH10_IDX BIT(0) 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ci#define R_AX_LBC_WATCHDOG 0x11D8 53562306a36Sopenharmony_ci#define B_AX_LBC_TIMER GENMASK(7, 4) 53662306a36Sopenharmony_ci#define B_AX_LBC_FLAG BIT(1) 53762306a36Sopenharmony_ci#define B_AX_LBC_EN BIT(0) 53862306a36Sopenharmony_ci 53962306a36Sopenharmony_ci#define R_AX_RXBD_RWPTR_CLR_V1 0x1200 54062306a36Sopenharmony_ci#define B_AX_CLR_RPQ_IDX BIT(1) 54162306a36Sopenharmony_ci#define B_AX_CLR_RXQ_IDX BIT(0) 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci#define R_AX_HAXI_EXP_CTRL 0x1204 54462306a36Sopenharmony_ci#define B_AX_MAX_TAG_NUM_V1_MASK GENMASK(2, 0) 54562306a36Sopenharmony_ci 54662306a36Sopenharmony_ci#define R_AX_PCIE_EXP_CTRL 0x13F0 54762306a36Sopenharmony_ci#define B_AX_EN_CHKDSC_NO_RX_STUCK BIT(20) 54862306a36Sopenharmony_ci#define B_AX_MAX_TAG_NUM GENMASK(18, 16) 54962306a36Sopenharmony_ci#define B_AX_SIC_EN_FORCE_CLKREQ BIT(4) 55062306a36Sopenharmony_ci 55162306a36Sopenharmony_ci#define R_AX_PCIE_RX_PREF_ADV 0x13F4 55262306a36Sopenharmony_ci#define B_AX_RXDMA_PREF_ADV_EN BIT(0) 55362306a36Sopenharmony_ci 55462306a36Sopenharmony_ci#define R_AX_PCIE_HRPWM_V1 0x30C0 55562306a36Sopenharmony_ci#define R_AX_PCIE_CRPWM 0x30C4 55662306a36Sopenharmony_ci 55762306a36Sopenharmony_ci#define RTW89_PCI_TXBD_NUM_MAX 256 55862306a36Sopenharmony_ci#define RTW89_PCI_RXBD_NUM_MAX 256 55962306a36Sopenharmony_ci#define RTW89_PCI_TXWD_NUM_MAX 512 56062306a36Sopenharmony_ci#define RTW89_PCI_TXWD_PAGE_SIZE 128 56162306a36Sopenharmony_ci#define RTW89_PCI_ADDRINFO_MAX 4 56262306a36Sopenharmony_ci#define RTW89_PCI_RX_BUF_SIZE 11460 56362306a36Sopenharmony_ci 56462306a36Sopenharmony_ci#define RTW89_PCI_POLL_BDRAM_RST_CNT 100 56562306a36Sopenharmony_ci#define RTW89_PCI_MULTITAG 8 56662306a36Sopenharmony_ci 56762306a36Sopenharmony_ci/* PCIE CFG register */ 56862306a36Sopenharmony_ci#define RTW89_PCIE_L1_STS_V1 0x80 56962306a36Sopenharmony_ci#define RTW89_BCFG_LINK_SPEED_MASK GENMASK(19, 16) 57062306a36Sopenharmony_ci#define RTW89_PCIE_GEN1_SPEED 0x01 57162306a36Sopenharmony_ci#define RTW89_PCIE_GEN2_SPEED 0x02 57262306a36Sopenharmony_ci#define RTW89_PCIE_PHY_RATE 0x82 57362306a36Sopenharmony_ci#define RTW89_PCIE_PHY_RATE_MASK GENMASK(1, 0) 57462306a36Sopenharmony_ci#define RTW89_PCIE_L1SS_STS_V1 0x0168 57562306a36Sopenharmony_ci#define RTW89_PCIE_BIT_ASPM_L11 BIT(3) 57662306a36Sopenharmony_ci#define RTW89_PCIE_BIT_ASPM_L12 BIT(2) 57762306a36Sopenharmony_ci#define RTW89_PCIE_BIT_PCI_L11 BIT(1) 57862306a36Sopenharmony_ci#define RTW89_PCIE_BIT_PCI_L12 BIT(0) 57962306a36Sopenharmony_ci#define RTW89_PCIE_ASPM_CTRL 0x070F 58062306a36Sopenharmony_ci#define RTW89_L1DLY_MASK GENMASK(5, 3) 58162306a36Sopenharmony_ci#define RTW89_L0DLY_MASK GENMASK(2, 0) 58262306a36Sopenharmony_ci#define RTW89_PCIE_TIMER_CTRL 0x0718 58362306a36Sopenharmony_ci#define RTW89_PCIE_BIT_L1SUB BIT(5) 58462306a36Sopenharmony_ci#define RTW89_PCIE_L1_CTRL 0x0719 58562306a36Sopenharmony_ci#define RTW89_PCIE_BIT_CLK BIT(4) 58662306a36Sopenharmony_ci#define RTW89_PCIE_BIT_L1 BIT(3) 58762306a36Sopenharmony_ci#define RTW89_PCIE_CLK_CTRL 0x0725 58862306a36Sopenharmony_ci#define RTW89_PCIE_RST_MSTATE 0x0B48 58962306a36Sopenharmony_ci#define RTW89_PCIE_BIT_CFG_RST_MSTATE BIT(0) 59062306a36Sopenharmony_ci 59162306a36Sopenharmony_ci#define INTF_INTGRA_MINREF_V1 90 59262306a36Sopenharmony_ci#define INTF_INTGRA_HOSTREF_V1 100 59362306a36Sopenharmony_ci 59462306a36Sopenharmony_cienum rtw89_pcie_phy { 59562306a36Sopenharmony_ci PCIE_PHY_GEN1, 59662306a36Sopenharmony_ci PCIE_PHY_GEN2, 59762306a36Sopenharmony_ci PCIE_PHY_GEN1_UNDEFINE = 0x7F, 59862306a36Sopenharmony_ci}; 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_cienum rtw89_pcie_l0sdly { 60162306a36Sopenharmony_ci PCIE_L0SDLY_1US = 0, 60262306a36Sopenharmony_ci PCIE_L0SDLY_2US = 1, 60362306a36Sopenharmony_ci PCIE_L0SDLY_3US = 2, 60462306a36Sopenharmony_ci PCIE_L0SDLY_4US = 3, 60562306a36Sopenharmony_ci PCIE_L0SDLY_5US = 4, 60662306a36Sopenharmony_ci PCIE_L0SDLY_6US = 5, 60762306a36Sopenharmony_ci PCIE_L0SDLY_7US = 6, 60862306a36Sopenharmony_ci}; 60962306a36Sopenharmony_ci 61062306a36Sopenharmony_cienum rtw89_pcie_l1dly { 61162306a36Sopenharmony_ci PCIE_L1DLY_16US = 4, 61262306a36Sopenharmony_ci PCIE_L1DLY_32US = 5, 61362306a36Sopenharmony_ci PCIE_L1DLY_64US = 6, 61462306a36Sopenharmony_ci PCIE_L1DLY_HW_INFI = 7, 61562306a36Sopenharmony_ci}; 61662306a36Sopenharmony_ci 61762306a36Sopenharmony_cienum rtw89_pcie_clkdly_hw { 61862306a36Sopenharmony_ci PCIE_CLKDLY_HW_0 = 0, 61962306a36Sopenharmony_ci PCIE_CLKDLY_HW_30US = 0x1, 62062306a36Sopenharmony_ci PCIE_CLKDLY_HW_50US = 0x2, 62162306a36Sopenharmony_ci PCIE_CLKDLY_HW_100US = 0x3, 62262306a36Sopenharmony_ci PCIE_CLKDLY_HW_150US = 0x4, 62362306a36Sopenharmony_ci PCIE_CLKDLY_HW_200US = 0x5, 62462306a36Sopenharmony_ci}; 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_cienum mac_ax_bd_trunc_mode { 62762306a36Sopenharmony_ci MAC_AX_BD_NORM, 62862306a36Sopenharmony_ci MAC_AX_BD_TRUNC, 62962306a36Sopenharmony_ci MAC_AX_BD_DEF = 0xFE 63062306a36Sopenharmony_ci}; 63162306a36Sopenharmony_ci 63262306a36Sopenharmony_cienum mac_ax_rxbd_mode { 63362306a36Sopenharmony_ci MAC_AX_RXBD_PKT, 63462306a36Sopenharmony_ci MAC_AX_RXBD_SEP, 63562306a36Sopenharmony_ci MAC_AX_RXBD_DEF = 0xFE 63662306a36Sopenharmony_ci}; 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_cienum mac_ax_tag_mode { 63962306a36Sopenharmony_ci MAC_AX_TAG_SGL, 64062306a36Sopenharmony_ci MAC_AX_TAG_MULTI, 64162306a36Sopenharmony_ci MAC_AX_TAG_DEF = 0xFE 64262306a36Sopenharmony_ci}; 64362306a36Sopenharmony_ci 64462306a36Sopenharmony_cienum mac_ax_tx_burst { 64562306a36Sopenharmony_ci MAC_AX_TX_BURST_16B = 0, 64662306a36Sopenharmony_ci MAC_AX_TX_BURST_32B = 1, 64762306a36Sopenharmony_ci MAC_AX_TX_BURST_64B = 2, 64862306a36Sopenharmony_ci MAC_AX_TX_BURST_V1_64B = 0, 64962306a36Sopenharmony_ci MAC_AX_TX_BURST_128B = 3, 65062306a36Sopenharmony_ci MAC_AX_TX_BURST_V1_128B = 1, 65162306a36Sopenharmony_ci MAC_AX_TX_BURST_256B = 4, 65262306a36Sopenharmony_ci MAC_AX_TX_BURST_V1_256B = 2, 65362306a36Sopenharmony_ci MAC_AX_TX_BURST_512B = 5, 65462306a36Sopenharmony_ci MAC_AX_TX_BURST_1024B = 6, 65562306a36Sopenharmony_ci MAC_AX_TX_BURST_2048B = 7, 65662306a36Sopenharmony_ci MAC_AX_TX_BURST_DEF = 0xFE 65762306a36Sopenharmony_ci}; 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_cienum mac_ax_rx_burst { 66062306a36Sopenharmony_ci MAC_AX_RX_BURST_16B = 0, 66162306a36Sopenharmony_ci MAC_AX_RX_BURST_32B = 1, 66262306a36Sopenharmony_ci MAC_AX_RX_BURST_64B = 2, 66362306a36Sopenharmony_ci MAC_AX_RX_BURST_V1_64B = 0, 66462306a36Sopenharmony_ci MAC_AX_RX_BURST_128B = 3, 66562306a36Sopenharmony_ci MAC_AX_RX_BURST_V1_128B = 1, 66662306a36Sopenharmony_ci MAC_AX_RX_BURST_V1_256B = 0, 66762306a36Sopenharmony_ci MAC_AX_RX_BURST_DEF = 0xFE 66862306a36Sopenharmony_ci}; 66962306a36Sopenharmony_ci 67062306a36Sopenharmony_cienum mac_ax_wd_dma_intvl { 67162306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_0S, 67262306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_256NS, 67362306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_512NS, 67462306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_768NS, 67562306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_1US, 67662306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_1_5US, 67762306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_2US, 67862306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_4US, 67962306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_8US, 68062306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_16US, 68162306a36Sopenharmony_ci MAC_AX_WD_DMA_INTVL_DEF = 0xFE 68262306a36Sopenharmony_ci}; 68362306a36Sopenharmony_ci 68462306a36Sopenharmony_cienum mac_ax_multi_tag_num { 68562306a36Sopenharmony_ci MAC_AX_TAG_NUM_1, 68662306a36Sopenharmony_ci MAC_AX_TAG_NUM_2, 68762306a36Sopenharmony_ci MAC_AX_TAG_NUM_3, 68862306a36Sopenharmony_ci MAC_AX_TAG_NUM_4, 68962306a36Sopenharmony_ci MAC_AX_TAG_NUM_5, 69062306a36Sopenharmony_ci MAC_AX_TAG_NUM_6, 69162306a36Sopenharmony_ci MAC_AX_TAG_NUM_7, 69262306a36Sopenharmony_ci MAC_AX_TAG_NUM_8, 69362306a36Sopenharmony_ci MAC_AX_TAG_NUM_DEF = 0xFE 69462306a36Sopenharmony_ci}; 69562306a36Sopenharmony_ci 69662306a36Sopenharmony_cienum mac_ax_lbc_tmr { 69762306a36Sopenharmony_ci MAC_AX_LBC_TMR_8US = 0, 69862306a36Sopenharmony_ci MAC_AX_LBC_TMR_16US, 69962306a36Sopenharmony_ci MAC_AX_LBC_TMR_32US, 70062306a36Sopenharmony_ci MAC_AX_LBC_TMR_64US, 70162306a36Sopenharmony_ci MAC_AX_LBC_TMR_128US, 70262306a36Sopenharmony_ci MAC_AX_LBC_TMR_256US, 70362306a36Sopenharmony_ci MAC_AX_LBC_TMR_512US, 70462306a36Sopenharmony_ci MAC_AX_LBC_TMR_1MS, 70562306a36Sopenharmony_ci MAC_AX_LBC_TMR_2MS, 70662306a36Sopenharmony_ci MAC_AX_LBC_TMR_4MS, 70762306a36Sopenharmony_ci MAC_AX_LBC_TMR_8MS, 70862306a36Sopenharmony_ci MAC_AX_LBC_TMR_DEF = 0xFE 70962306a36Sopenharmony_ci}; 71062306a36Sopenharmony_ci 71162306a36Sopenharmony_cienum mac_ax_pcie_func_ctrl { 71262306a36Sopenharmony_ci MAC_AX_PCIE_DISABLE = 0, 71362306a36Sopenharmony_ci MAC_AX_PCIE_ENABLE = 1, 71462306a36Sopenharmony_ci MAC_AX_PCIE_DEFAULT = 0xFE, 71562306a36Sopenharmony_ci MAC_AX_PCIE_IGNORE = 0xFF 71662306a36Sopenharmony_ci}; 71762306a36Sopenharmony_ci 71862306a36Sopenharmony_cienum mac_ax_io_rcy_tmr { 71962306a36Sopenharmony_ci MAC_AX_IO_RCY_ANA_TMR_2MS = 24000, 72062306a36Sopenharmony_ci MAC_AX_IO_RCY_ANA_TMR_4MS = 48000, 72162306a36Sopenharmony_ci MAC_AX_IO_RCY_ANA_TMR_6MS = 72000, 72262306a36Sopenharmony_ci MAC_AX_IO_RCY_ANA_TMR_DEF = 0xFE 72362306a36Sopenharmony_ci}; 72462306a36Sopenharmony_ci 72562306a36Sopenharmony_cienum rtw89_pci_intr_mask_cfg { 72662306a36Sopenharmony_ci RTW89_PCI_INTR_MASK_RESET, 72762306a36Sopenharmony_ci RTW89_PCI_INTR_MASK_NORMAL, 72862306a36Sopenharmony_ci RTW89_PCI_INTR_MASK_LOW_POWER, 72962306a36Sopenharmony_ci RTW89_PCI_INTR_MASK_RECOVERY_START, 73062306a36Sopenharmony_ci RTW89_PCI_INTR_MASK_RECOVERY_COMPLETE, 73162306a36Sopenharmony_ci}; 73262306a36Sopenharmony_ci 73362306a36Sopenharmony_cistruct rtw89_pci_isrs; 73462306a36Sopenharmony_cistruct rtw89_pci; 73562306a36Sopenharmony_ci 73662306a36Sopenharmony_cistruct rtw89_pci_bd_idx_addr { 73762306a36Sopenharmony_ci u32 tx_bd_addrs[RTW89_TXCH_NUM]; 73862306a36Sopenharmony_ci u32 rx_bd_addrs[RTW89_RXCH_NUM]; 73962306a36Sopenharmony_ci}; 74062306a36Sopenharmony_ci 74162306a36Sopenharmony_cistruct rtw89_pci_ch_dma_addr { 74262306a36Sopenharmony_ci u32 num; 74362306a36Sopenharmony_ci u32 idx; 74462306a36Sopenharmony_ci u32 bdram; 74562306a36Sopenharmony_ci u32 desa_l; 74662306a36Sopenharmony_ci u32 desa_h; 74762306a36Sopenharmony_ci}; 74862306a36Sopenharmony_ci 74962306a36Sopenharmony_cistruct rtw89_pci_ch_dma_addr_set { 75062306a36Sopenharmony_ci struct rtw89_pci_ch_dma_addr tx[RTW89_TXCH_NUM]; 75162306a36Sopenharmony_ci struct rtw89_pci_ch_dma_addr rx[RTW89_RXCH_NUM]; 75262306a36Sopenharmony_ci}; 75362306a36Sopenharmony_ci 75462306a36Sopenharmony_cistruct rtw89_pci_bd_ram { 75562306a36Sopenharmony_ci u8 start_idx; 75662306a36Sopenharmony_ci u8 max_num; 75762306a36Sopenharmony_ci u8 min_num; 75862306a36Sopenharmony_ci}; 75962306a36Sopenharmony_ci 76062306a36Sopenharmony_cistruct rtw89_pci_info { 76162306a36Sopenharmony_ci enum mac_ax_bd_trunc_mode txbd_trunc_mode; 76262306a36Sopenharmony_ci enum mac_ax_bd_trunc_mode rxbd_trunc_mode; 76362306a36Sopenharmony_ci enum mac_ax_rxbd_mode rxbd_mode; 76462306a36Sopenharmony_ci enum mac_ax_tag_mode tag_mode; 76562306a36Sopenharmony_ci enum mac_ax_tx_burst tx_burst; 76662306a36Sopenharmony_ci enum mac_ax_rx_burst rx_burst; 76762306a36Sopenharmony_ci enum mac_ax_wd_dma_intvl wd_dma_idle_intvl; 76862306a36Sopenharmony_ci enum mac_ax_wd_dma_intvl wd_dma_act_intvl; 76962306a36Sopenharmony_ci enum mac_ax_multi_tag_num multi_tag_num; 77062306a36Sopenharmony_ci enum mac_ax_pcie_func_ctrl lbc_en; 77162306a36Sopenharmony_ci enum mac_ax_lbc_tmr lbc_tmr; 77262306a36Sopenharmony_ci enum mac_ax_pcie_func_ctrl autok_en; 77362306a36Sopenharmony_ci enum mac_ax_pcie_func_ctrl io_rcy_en; 77462306a36Sopenharmony_ci enum mac_ax_io_rcy_tmr io_rcy_tmr; 77562306a36Sopenharmony_ci 77662306a36Sopenharmony_ci u32 init_cfg_reg; 77762306a36Sopenharmony_ci u32 txhci_en_bit; 77862306a36Sopenharmony_ci u32 rxhci_en_bit; 77962306a36Sopenharmony_ci u32 rxbd_mode_bit; 78062306a36Sopenharmony_ci u32 exp_ctrl_reg; 78162306a36Sopenharmony_ci u32 max_tag_num_mask; 78262306a36Sopenharmony_ci u32 rxbd_rwptr_clr_reg; 78362306a36Sopenharmony_ci u32 txbd_rwptr_clr2_reg; 78462306a36Sopenharmony_ci struct rtw89_reg_def dma_stop1; 78562306a36Sopenharmony_ci struct rtw89_reg_def dma_stop2; 78662306a36Sopenharmony_ci struct rtw89_reg_def dma_busy1; 78762306a36Sopenharmony_ci u32 dma_busy2_reg; 78862306a36Sopenharmony_ci u32 dma_busy3_reg; 78962306a36Sopenharmony_ci 79062306a36Sopenharmony_ci u32 rpwm_addr; 79162306a36Sopenharmony_ci u32 cpwm_addr; 79262306a36Sopenharmony_ci u32 tx_dma_ch_mask; 79362306a36Sopenharmony_ci const struct rtw89_pci_bd_idx_addr *bd_idx_addr_low_power; 79462306a36Sopenharmony_ci const struct rtw89_pci_ch_dma_addr_set *dma_addr_set; 79562306a36Sopenharmony_ci const struct rtw89_pci_bd_ram (*bd_ram_table)[RTW89_TXCH_NUM]; 79662306a36Sopenharmony_ci 79762306a36Sopenharmony_ci int (*ltr_set)(struct rtw89_dev *rtwdev, bool en); 79862306a36Sopenharmony_ci u32 (*fill_txaddr_info)(struct rtw89_dev *rtwdev, 79962306a36Sopenharmony_ci void *txaddr_info_addr, u32 total_len, 80062306a36Sopenharmony_ci dma_addr_t dma, u8 *add_info_nr); 80162306a36Sopenharmony_ci void (*config_intr_mask)(struct rtw89_dev *rtwdev); 80262306a36Sopenharmony_ci void (*enable_intr)(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci); 80362306a36Sopenharmony_ci void (*disable_intr)(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci); 80462306a36Sopenharmony_ci void (*recognize_intrs)(struct rtw89_dev *rtwdev, 80562306a36Sopenharmony_ci struct rtw89_pci *rtwpci, 80662306a36Sopenharmony_ci struct rtw89_pci_isrs *isrs); 80762306a36Sopenharmony_ci}; 80862306a36Sopenharmony_ci 80962306a36Sopenharmony_cistruct rtw89_pci_tx_data { 81062306a36Sopenharmony_ci dma_addr_t dma; 81162306a36Sopenharmony_ci}; 81262306a36Sopenharmony_ci 81362306a36Sopenharmony_cistruct rtw89_pci_rx_info { 81462306a36Sopenharmony_ci dma_addr_t dma; 81562306a36Sopenharmony_ci u32 fs:1, ls:1, tag:11, len:14; 81662306a36Sopenharmony_ci}; 81762306a36Sopenharmony_ci 81862306a36Sopenharmony_ci#define RTW89_PCI_TXBD_OPTION_LS BIT(14) 81962306a36Sopenharmony_ci 82062306a36Sopenharmony_cistruct rtw89_pci_tx_bd_32 { 82162306a36Sopenharmony_ci __le16 length; 82262306a36Sopenharmony_ci __le16 option; 82362306a36Sopenharmony_ci __le32 dma; 82462306a36Sopenharmony_ci} __packed; 82562306a36Sopenharmony_ci 82662306a36Sopenharmony_ci#define RTW89_PCI_TXWP_VALID BIT(15) 82762306a36Sopenharmony_ci 82862306a36Sopenharmony_cistruct rtw89_pci_tx_wp_info { 82962306a36Sopenharmony_ci __le16 seq0; 83062306a36Sopenharmony_ci __le16 seq1; 83162306a36Sopenharmony_ci __le16 seq2; 83262306a36Sopenharmony_ci __le16 seq3; 83362306a36Sopenharmony_ci} __packed; 83462306a36Sopenharmony_ci 83562306a36Sopenharmony_ci#define RTW89_PCI_ADDR_MSDU_LS BIT(15) 83662306a36Sopenharmony_ci#define RTW89_PCI_ADDR_LS BIT(14) 83762306a36Sopenharmony_ci#define RTW89_PCI_ADDR_HIGH(a) (((a) << 6) & GENMASK(13, 6)) 83862306a36Sopenharmony_ci#define RTW89_PCI_ADDR_NUM(x) ((x) & GENMASK(5, 0)) 83962306a36Sopenharmony_ci 84062306a36Sopenharmony_cistruct rtw89_pci_tx_addr_info_32 { 84162306a36Sopenharmony_ci __le16 length; 84262306a36Sopenharmony_ci __le16 option; 84362306a36Sopenharmony_ci __le32 dma; 84462306a36Sopenharmony_ci} __packed; 84562306a36Sopenharmony_ci 84662306a36Sopenharmony_ci#define RTW89_TXADDR_INFO_NR_V1 10 84762306a36Sopenharmony_ci 84862306a36Sopenharmony_cistruct rtw89_pci_tx_addr_info_32_v1 { 84962306a36Sopenharmony_ci __le16 length_opt; 85062306a36Sopenharmony_ci#define B_PCIADDR_LEN_V1_MASK GENMASK(10, 0) 85162306a36Sopenharmony_ci#define B_PCIADDR_HIGH_SEL_V1_MASK GENMASK(14, 11) 85262306a36Sopenharmony_ci#define B_PCIADDR_LS_V1_MASK BIT(15) 85362306a36Sopenharmony_ci#define TXADDR_INFO_LENTHG_V1_MAX ALIGN_DOWN(BIT(11) - 1, 4) 85462306a36Sopenharmony_ci __le16 dma_low_lsb; 85562306a36Sopenharmony_ci __le16 dma_low_msb; 85662306a36Sopenharmony_ci} __packed; 85762306a36Sopenharmony_ci 85862306a36Sopenharmony_ci#define RTW89_PCI_RPP_POLLUTED BIT(31) 85962306a36Sopenharmony_ci#define RTW89_PCI_RPP_SEQ GENMASK(30, 16) 86062306a36Sopenharmony_ci#define RTW89_PCI_RPP_TX_STATUS GENMASK(15, 13) 86162306a36Sopenharmony_ci#define RTW89_TX_DONE 0x0 86262306a36Sopenharmony_ci#define RTW89_TX_RETRY_LIMIT 0x1 86362306a36Sopenharmony_ci#define RTW89_TX_LIFE_TIME 0x2 86462306a36Sopenharmony_ci#define RTW89_TX_MACID_DROP 0x3 86562306a36Sopenharmony_ci#define RTW89_PCI_RPP_QSEL GENMASK(12, 8) 86662306a36Sopenharmony_ci#define RTW89_PCI_RPP_MACID GENMASK(7, 0) 86762306a36Sopenharmony_ci 86862306a36Sopenharmony_cistruct rtw89_pci_rpp_fmt { 86962306a36Sopenharmony_ci __le32 dword; 87062306a36Sopenharmony_ci} __packed; 87162306a36Sopenharmony_ci 87262306a36Sopenharmony_cistruct rtw89_pci_rx_bd_32 { 87362306a36Sopenharmony_ci __le16 buf_size; 87462306a36Sopenharmony_ci __le16 rsvd; 87562306a36Sopenharmony_ci __le32 dma; 87662306a36Sopenharmony_ci} __packed; 87762306a36Sopenharmony_ci 87862306a36Sopenharmony_ci#define RTW89_PCI_RXBD_FS BIT(15) 87962306a36Sopenharmony_ci#define RTW89_PCI_RXBD_LS BIT(14) 88062306a36Sopenharmony_ci#define RTW89_PCI_RXBD_WRITE_SIZE GENMASK(13, 0) 88162306a36Sopenharmony_ci#define RTW89_PCI_RXBD_TAG GENMASK(28, 16) 88262306a36Sopenharmony_ci 88362306a36Sopenharmony_cistruct rtw89_pci_rxbd_info { 88462306a36Sopenharmony_ci __le32 dword; 88562306a36Sopenharmony_ci}; 88662306a36Sopenharmony_ci 88762306a36Sopenharmony_cistruct rtw89_pci_tx_wd { 88862306a36Sopenharmony_ci struct list_head list; 88962306a36Sopenharmony_ci struct sk_buff_head queue; 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ci void *vaddr; 89262306a36Sopenharmony_ci dma_addr_t paddr; 89362306a36Sopenharmony_ci u32 len; 89462306a36Sopenharmony_ci u32 seq; 89562306a36Sopenharmony_ci}; 89662306a36Sopenharmony_ci 89762306a36Sopenharmony_cistruct rtw89_pci_dma_ring { 89862306a36Sopenharmony_ci void *head; 89962306a36Sopenharmony_ci u8 desc_size; 90062306a36Sopenharmony_ci dma_addr_t dma; 90162306a36Sopenharmony_ci 90262306a36Sopenharmony_ci struct rtw89_pci_ch_dma_addr addr; 90362306a36Sopenharmony_ci 90462306a36Sopenharmony_ci u32 len; 90562306a36Sopenharmony_ci u32 wp; /* host idx */ 90662306a36Sopenharmony_ci u32 rp; /* hw idx */ 90762306a36Sopenharmony_ci}; 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_cistruct rtw89_pci_tx_wd_ring { 91062306a36Sopenharmony_ci void *head; 91162306a36Sopenharmony_ci dma_addr_t dma; 91262306a36Sopenharmony_ci 91362306a36Sopenharmony_ci struct rtw89_pci_tx_wd pages[RTW89_PCI_TXWD_NUM_MAX]; 91462306a36Sopenharmony_ci struct list_head free_pages; 91562306a36Sopenharmony_ci 91662306a36Sopenharmony_ci u32 page_size; 91762306a36Sopenharmony_ci u32 page_num; 91862306a36Sopenharmony_ci u32 curr_num; 91962306a36Sopenharmony_ci}; 92062306a36Sopenharmony_ci 92162306a36Sopenharmony_ci#define RTW89_RX_TAG_MAX 0x1fff 92262306a36Sopenharmony_ci 92362306a36Sopenharmony_cistruct rtw89_pci_tx_ring { 92462306a36Sopenharmony_ci struct rtw89_pci_tx_wd_ring wd_ring; 92562306a36Sopenharmony_ci struct rtw89_pci_dma_ring bd_ring; 92662306a36Sopenharmony_ci struct list_head busy_pages; 92762306a36Sopenharmony_ci u8 txch; 92862306a36Sopenharmony_ci bool dma_enabled; 92962306a36Sopenharmony_ci u16 tag; /* range from 0x0001 ~ 0x1fff */ 93062306a36Sopenharmony_ci 93162306a36Sopenharmony_ci u64 tx_cnt; 93262306a36Sopenharmony_ci u64 tx_acked; 93362306a36Sopenharmony_ci u64 tx_retry_lmt; 93462306a36Sopenharmony_ci u64 tx_life_time; 93562306a36Sopenharmony_ci u64 tx_mac_id_drop; 93662306a36Sopenharmony_ci}; 93762306a36Sopenharmony_ci 93862306a36Sopenharmony_cistruct rtw89_pci_rx_ring { 93962306a36Sopenharmony_ci struct rtw89_pci_dma_ring bd_ring; 94062306a36Sopenharmony_ci struct sk_buff *buf[RTW89_PCI_RXBD_NUM_MAX]; 94162306a36Sopenharmony_ci u32 buf_sz; 94262306a36Sopenharmony_ci struct sk_buff *diliver_skb; 94362306a36Sopenharmony_ci struct rtw89_rx_desc_info diliver_desc; 94462306a36Sopenharmony_ci}; 94562306a36Sopenharmony_ci 94662306a36Sopenharmony_cistruct rtw89_pci_isrs { 94762306a36Sopenharmony_ci u32 ind_isrs; 94862306a36Sopenharmony_ci u32 halt_c2h_isrs; 94962306a36Sopenharmony_ci u32 isrs[2]; 95062306a36Sopenharmony_ci}; 95162306a36Sopenharmony_ci 95262306a36Sopenharmony_cistruct rtw89_pci { 95362306a36Sopenharmony_ci struct pci_dev *pdev; 95462306a36Sopenharmony_ci 95562306a36Sopenharmony_ci /* protect HW irq related registers */ 95662306a36Sopenharmony_ci spinlock_t irq_lock; 95762306a36Sopenharmony_ci /* protect TRX resources (exclude RXQ) */ 95862306a36Sopenharmony_ci spinlock_t trx_lock; 95962306a36Sopenharmony_ci bool running; 96062306a36Sopenharmony_ci bool low_power; 96162306a36Sopenharmony_ci bool under_recovery; 96262306a36Sopenharmony_ci struct rtw89_pci_tx_ring tx_rings[RTW89_TXCH_NUM]; 96362306a36Sopenharmony_ci struct rtw89_pci_rx_ring rx_rings[RTW89_RXCH_NUM]; 96462306a36Sopenharmony_ci struct sk_buff_head h2c_queue; 96562306a36Sopenharmony_ci struct sk_buff_head h2c_release_queue; 96662306a36Sopenharmony_ci DECLARE_BITMAP(kick_map, RTW89_TXCH_NUM); 96762306a36Sopenharmony_ci 96862306a36Sopenharmony_ci u32 ind_intrs; 96962306a36Sopenharmony_ci u32 halt_c2h_intrs; 97062306a36Sopenharmony_ci u32 intrs[2]; 97162306a36Sopenharmony_ci void __iomem *mmap; 97262306a36Sopenharmony_ci}; 97362306a36Sopenharmony_ci 97462306a36Sopenharmony_cistatic inline struct rtw89_pci_rx_info *RTW89_PCI_RX_SKB_CB(struct sk_buff *skb) 97562306a36Sopenharmony_ci{ 97662306a36Sopenharmony_ci struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 97762306a36Sopenharmony_ci 97862306a36Sopenharmony_ci BUILD_BUG_ON(sizeof(struct rtw89_pci_tx_data) > 97962306a36Sopenharmony_ci sizeof(info->status.status_driver_data)); 98062306a36Sopenharmony_ci 98162306a36Sopenharmony_ci return (struct rtw89_pci_rx_info *)skb->cb; 98262306a36Sopenharmony_ci} 98362306a36Sopenharmony_ci 98462306a36Sopenharmony_cistatic inline struct rtw89_pci_rx_bd_32 * 98562306a36Sopenharmony_ciRTW89_PCI_RX_BD(struct rtw89_pci_rx_ring *rx_ring, u32 idx) 98662306a36Sopenharmony_ci{ 98762306a36Sopenharmony_ci struct rtw89_pci_dma_ring *bd_ring = &rx_ring->bd_ring; 98862306a36Sopenharmony_ci u8 *head = bd_ring->head; 98962306a36Sopenharmony_ci u32 desc_size = bd_ring->desc_size; 99062306a36Sopenharmony_ci u32 offset = idx * desc_size; 99162306a36Sopenharmony_ci 99262306a36Sopenharmony_ci return (struct rtw89_pci_rx_bd_32 *)(head + offset); 99362306a36Sopenharmony_ci} 99462306a36Sopenharmony_ci 99562306a36Sopenharmony_cistatic inline void 99662306a36Sopenharmony_cirtw89_pci_rxbd_increase(struct rtw89_pci_rx_ring *rx_ring, u32 cnt) 99762306a36Sopenharmony_ci{ 99862306a36Sopenharmony_ci struct rtw89_pci_dma_ring *bd_ring = &rx_ring->bd_ring; 99962306a36Sopenharmony_ci 100062306a36Sopenharmony_ci bd_ring->wp += cnt; 100162306a36Sopenharmony_ci 100262306a36Sopenharmony_ci if (bd_ring->wp >= bd_ring->len) 100362306a36Sopenharmony_ci bd_ring->wp -= bd_ring->len; 100462306a36Sopenharmony_ci} 100562306a36Sopenharmony_ci 100662306a36Sopenharmony_cistatic inline struct rtw89_pci_tx_data *RTW89_PCI_TX_SKB_CB(struct sk_buff *skb) 100762306a36Sopenharmony_ci{ 100862306a36Sopenharmony_ci struct rtw89_tx_skb_data *data = RTW89_TX_SKB_CB(skb); 100962306a36Sopenharmony_ci 101062306a36Sopenharmony_ci return (struct rtw89_pci_tx_data *)data->hci_priv; 101162306a36Sopenharmony_ci} 101262306a36Sopenharmony_ci 101362306a36Sopenharmony_cistatic inline struct rtw89_pci_tx_bd_32 * 101462306a36Sopenharmony_cirtw89_pci_get_next_txbd(struct rtw89_pci_tx_ring *tx_ring) 101562306a36Sopenharmony_ci{ 101662306a36Sopenharmony_ci struct rtw89_pci_dma_ring *bd_ring = &tx_ring->bd_ring; 101762306a36Sopenharmony_ci struct rtw89_pci_tx_bd_32 *tx_bd, *head; 101862306a36Sopenharmony_ci 101962306a36Sopenharmony_ci head = bd_ring->head; 102062306a36Sopenharmony_ci tx_bd = head + bd_ring->wp; 102162306a36Sopenharmony_ci 102262306a36Sopenharmony_ci return tx_bd; 102362306a36Sopenharmony_ci} 102462306a36Sopenharmony_ci 102562306a36Sopenharmony_cistatic inline struct rtw89_pci_tx_wd * 102662306a36Sopenharmony_cirtw89_pci_dequeue_txwd(struct rtw89_pci_tx_ring *tx_ring) 102762306a36Sopenharmony_ci{ 102862306a36Sopenharmony_ci struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring; 102962306a36Sopenharmony_ci struct rtw89_pci_tx_wd *txwd; 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_ci txwd = list_first_entry_or_null(&wd_ring->free_pages, 103262306a36Sopenharmony_ci struct rtw89_pci_tx_wd, list); 103362306a36Sopenharmony_ci if (!txwd) 103462306a36Sopenharmony_ci return NULL; 103562306a36Sopenharmony_ci 103662306a36Sopenharmony_ci list_del_init(&txwd->list); 103762306a36Sopenharmony_ci txwd->len = 0; 103862306a36Sopenharmony_ci wd_ring->curr_num--; 103962306a36Sopenharmony_ci 104062306a36Sopenharmony_ci return txwd; 104162306a36Sopenharmony_ci} 104262306a36Sopenharmony_ci 104362306a36Sopenharmony_cistatic inline void 104462306a36Sopenharmony_cirtw89_pci_enqueue_txwd(struct rtw89_pci_tx_ring *tx_ring, 104562306a36Sopenharmony_ci struct rtw89_pci_tx_wd *txwd) 104662306a36Sopenharmony_ci{ 104762306a36Sopenharmony_ci struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring; 104862306a36Sopenharmony_ci 104962306a36Sopenharmony_ci memset(txwd->vaddr, 0, wd_ring->page_size); 105062306a36Sopenharmony_ci list_add_tail(&txwd->list, &wd_ring->free_pages); 105162306a36Sopenharmony_ci wd_ring->curr_num++; 105262306a36Sopenharmony_ci} 105362306a36Sopenharmony_ci 105462306a36Sopenharmony_cistatic inline bool rtw89_pci_ltr_is_err_reg_val(u32 val) 105562306a36Sopenharmony_ci{ 105662306a36Sopenharmony_ci return val == 0xffffffff || val == 0xeaeaeaea; 105762306a36Sopenharmony_ci} 105862306a36Sopenharmony_ci 105962306a36Sopenharmony_ciextern const struct dev_pm_ops rtw89_pm_ops; 106062306a36Sopenharmony_ciextern const struct rtw89_pci_ch_dma_addr_set rtw89_pci_ch_dma_addr_set; 106162306a36Sopenharmony_ciextern const struct rtw89_pci_ch_dma_addr_set rtw89_pci_ch_dma_addr_set_v1; 106262306a36Sopenharmony_ciextern const struct rtw89_pci_bd_ram rtw89_bd_ram_table_dual[RTW89_TXCH_NUM]; 106362306a36Sopenharmony_ciextern const struct rtw89_pci_bd_ram rtw89_bd_ram_table_single[RTW89_TXCH_NUM]; 106462306a36Sopenharmony_ci 106562306a36Sopenharmony_cistruct pci_device_id; 106662306a36Sopenharmony_ci 106762306a36Sopenharmony_ciint rtw89_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); 106862306a36Sopenharmony_civoid rtw89_pci_remove(struct pci_dev *pdev); 106962306a36Sopenharmony_ciint rtw89_pci_ltr_set(struct rtw89_dev *rtwdev, bool en); 107062306a36Sopenharmony_ciint rtw89_pci_ltr_set_v1(struct rtw89_dev *rtwdev, bool en); 107162306a36Sopenharmony_ciu32 rtw89_pci_fill_txaddr_info(struct rtw89_dev *rtwdev, 107262306a36Sopenharmony_ci void *txaddr_info_addr, u32 total_len, 107362306a36Sopenharmony_ci dma_addr_t dma, u8 *add_info_nr); 107462306a36Sopenharmony_ciu32 rtw89_pci_fill_txaddr_info_v1(struct rtw89_dev *rtwdev, 107562306a36Sopenharmony_ci void *txaddr_info_addr, u32 total_len, 107662306a36Sopenharmony_ci dma_addr_t dma, u8 *add_info_nr); 107762306a36Sopenharmony_civoid rtw89_pci_config_intr_mask(struct rtw89_dev *rtwdev); 107862306a36Sopenharmony_civoid rtw89_pci_config_intr_mask_v1(struct rtw89_dev *rtwdev); 107962306a36Sopenharmony_civoid rtw89_pci_enable_intr(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci); 108062306a36Sopenharmony_civoid rtw89_pci_disable_intr(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci); 108162306a36Sopenharmony_civoid rtw89_pci_enable_intr_v1(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci); 108262306a36Sopenharmony_civoid rtw89_pci_disable_intr_v1(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci); 108362306a36Sopenharmony_civoid rtw89_pci_recognize_intrs(struct rtw89_dev *rtwdev, 108462306a36Sopenharmony_ci struct rtw89_pci *rtwpci, 108562306a36Sopenharmony_ci struct rtw89_pci_isrs *isrs); 108662306a36Sopenharmony_civoid rtw89_pci_recognize_intrs_v1(struct rtw89_dev *rtwdev, 108762306a36Sopenharmony_ci struct rtw89_pci *rtwpci, 108862306a36Sopenharmony_ci struct rtw89_pci_isrs *isrs); 108962306a36Sopenharmony_ci 109062306a36Sopenharmony_cistatic inline 109162306a36Sopenharmony_ciu32 rtw89_chip_fill_txaddr_info(struct rtw89_dev *rtwdev, 109262306a36Sopenharmony_ci void *txaddr_info_addr, u32 total_len, 109362306a36Sopenharmony_ci dma_addr_t dma, u8 *add_info_nr) 109462306a36Sopenharmony_ci{ 109562306a36Sopenharmony_ci const struct rtw89_pci_info *info = rtwdev->pci_info; 109662306a36Sopenharmony_ci 109762306a36Sopenharmony_ci return info->fill_txaddr_info(rtwdev, txaddr_info_addr, total_len, 109862306a36Sopenharmony_ci dma, add_info_nr); 109962306a36Sopenharmony_ci} 110062306a36Sopenharmony_ci 110162306a36Sopenharmony_cistatic inline void rtw89_chip_config_intr_mask(struct rtw89_dev *rtwdev, 110262306a36Sopenharmony_ci enum rtw89_pci_intr_mask_cfg cfg) 110362306a36Sopenharmony_ci{ 110462306a36Sopenharmony_ci struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; 110562306a36Sopenharmony_ci const struct rtw89_pci_info *info = rtwdev->pci_info; 110662306a36Sopenharmony_ci 110762306a36Sopenharmony_ci switch (cfg) { 110862306a36Sopenharmony_ci default: 110962306a36Sopenharmony_ci case RTW89_PCI_INTR_MASK_RESET: 111062306a36Sopenharmony_ci rtwpci->low_power = false; 111162306a36Sopenharmony_ci rtwpci->under_recovery = false; 111262306a36Sopenharmony_ci break; 111362306a36Sopenharmony_ci case RTW89_PCI_INTR_MASK_NORMAL: 111462306a36Sopenharmony_ci rtwpci->low_power = false; 111562306a36Sopenharmony_ci break; 111662306a36Sopenharmony_ci case RTW89_PCI_INTR_MASK_LOW_POWER: 111762306a36Sopenharmony_ci rtwpci->low_power = true; 111862306a36Sopenharmony_ci break; 111962306a36Sopenharmony_ci case RTW89_PCI_INTR_MASK_RECOVERY_START: 112062306a36Sopenharmony_ci rtwpci->under_recovery = true; 112162306a36Sopenharmony_ci break; 112262306a36Sopenharmony_ci case RTW89_PCI_INTR_MASK_RECOVERY_COMPLETE: 112362306a36Sopenharmony_ci rtwpci->under_recovery = false; 112462306a36Sopenharmony_ci break; 112562306a36Sopenharmony_ci } 112662306a36Sopenharmony_ci 112762306a36Sopenharmony_ci rtw89_debug(rtwdev, RTW89_DBG_HCI, 112862306a36Sopenharmony_ci "Configure PCI interrupt mask mode low_power=%d under_recovery=%d\n", 112962306a36Sopenharmony_ci rtwpci->low_power, rtwpci->under_recovery); 113062306a36Sopenharmony_ci 113162306a36Sopenharmony_ci info->config_intr_mask(rtwdev); 113262306a36Sopenharmony_ci} 113362306a36Sopenharmony_ci 113462306a36Sopenharmony_cistatic inline 113562306a36Sopenharmony_civoid rtw89_chip_enable_intr(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci) 113662306a36Sopenharmony_ci{ 113762306a36Sopenharmony_ci const struct rtw89_pci_info *info = rtwdev->pci_info; 113862306a36Sopenharmony_ci 113962306a36Sopenharmony_ci info->enable_intr(rtwdev, rtwpci); 114062306a36Sopenharmony_ci} 114162306a36Sopenharmony_ci 114262306a36Sopenharmony_cistatic inline 114362306a36Sopenharmony_civoid rtw89_chip_disable_intr(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci) 114462306a36Sopenharmony_ci{ 114562306a36Sopenharmony_ci const struct rtw89_pci_info *info = rtwdev->pci_info; 114662306a36Sopenharmony_ci 114762306a36Sopenharmony_ci info->disable_intr(rtwdev, rtwpci); 114862306a36Sopenharmony_ci} 114962306a36Sopenharmony_ci 115062306a36Sopenharmony_cistatic inline 115162306a36Sopenharmony_civoid rtw89_chip_recognize_intrs(struct rtw89_dev *rtwdev, 115262306a36Sopenharmony_ci struct rtw89_pci *rtwpci, 115362306a36Sopenharmony_ci struct rtw89_pci_isrs *isrs) 115462306a36Sopenharmony_ci{ 115562306a36Sopenharmony_ci const struct rtw89_pci_info *info = rtwdev->pci_info; 115662306a36Sopenharmony_ci 115762306a36Sopenharmony_ci info->recognize_intrs(rtwdev, rtwpci, isrs); 115862306a36Sopenharmony_ci} 115962306a36Sopenharmony_ci 116062306a36Sopenharmony_ci#endif 1161