Go to the documentation of this file.
26 #include <linux/bitops.h>
28 #define REGISTERS_BASE 0x00300000
29 #define DRPW_BASE 0x00310000
31 #define REGISTERS_DOWN_SIZE 0x00008800
32 #define REGISTERS_WORK_SIZE 0x0000b000
34 #define HW_ACCESS_ELP_CTRL_REG_ADDR 0x1FFFC
37 #define ELPCTRL_WAKE_UP 0x1
38 #define ELPCTRL_WAKE_UP_WLAN_READY 0x5
39 #define ELPCTRL_SLEEP 0x0
41 #define ELPCTRL_WLAN_READY 0x2
44 #define SOR_CFG (REGISTERS_BASE + 0x0800)
45 #define ECPU_CTRL (REGISTERS_BASE + 0x0804)
46 #define HI_CFG (REGISTERS_BASE + 0x0808)
49 #define EE_START (REGISTERS_BASE + 0x080C)
50 #define EE_CTL (REGISTERS_BASE + 0x2000)
51 #define EE_DATA (REGISTERS_BASE + 0x2004)
52 #define EE_ADDR (REGISTERS_BASE + 0x2008)
56 #define CHIP_ID_B (REGISTERS_BASE + 0x5674)
58 #define CHIP_ID_1251_PG10 (0x7010101)
59 #define CHIP_ID_1251_PG11 (0x7020101)
60 #define CHIP_ID_1251_PG12 (0x7030101)
62 #define ENABLE (REGISTERS_BASE + 0x5450)
65 #define ELP_CFG_MODE (REGISTERS_BASE + 0x5804)
66 #define ELP_CMD (REGISTERS_BASE + 0x5808)
67 #define PLL_CAL_TIME (REGISTERS_BASE + 0x5810)
68 #define CLK_REQ_TIME (REGISTERS_BASE + 0x5814)
69 #define CLK_BUF_TIME (REGISTERS_BASE + 0x5818)
71 #define CFG_PLL_SYNC_CNT (REGISTERS_BASE + 0x5820)
74 #define SCR_PAD0 (REGISTERS_BASE + 0x5608)
75 #define SCR_PAD1 (REGISTERS_BASE + 0x560C)
76 #define SCR_PAD2 (REGISTERS_BASE + 0x5610)
77 #define SCR_PAD3 (REGISTERS_BASE + 0x5614)
78 #define SCR_PAD4 (REGISTERS_BASE + 0x5618)
79 #define SCR_PAD4_SET (REGISTERS_BASE + 0x561C)
80 #define SCR_PAD4_CLR (REGISTERS_BASE + 0x5620)
81 #define SCR_PAD5 (REGISTERS_BASE + 0x5624)
82 #define SCR_PAD5_SET (REGISTERS_BASE + 0x5628)
83 #define SCR_PAD5_CLR (REGISTERS_BASE + 0x562C)
84 #define SCR_PAD6 (REGISTERS_BASE + 0x5630)
85 #define SCR_PAD7 (REGISTERS_BASE + 0x5634)
86 #define SCR_PAD8 (REGISTERS_BASE + 0x5638)
87 #define SCR_PAD9 (REGISTERS_BASE + 0x563C)
90 #define SPARE_A1 (REGISTERS_BASE + 0x0994)
91 #define SPARE_A2 (REGISTERS_BASE + 0x0998)
92 #define SPARE_A3 (REGISTERS_BASE + 0x099C)
93 #define SPARE_A4 (REGISTERS_BASE + 0x09A0)
94 #define SPARE_A5 (REGISTERS_BASE + 0x09A4)
95 #define SPARE_A6 (REGISTERS_BASE + 0x09A8)
96 #define SPARE_A7 (REGISTERS_BASE + 0x09AC)
97 #define SPARE_A8 (REGISTERS_BASE + 0x09B0)
98 #define SPARE_B1 (REGISTERS_BASE + 0x5420)
99 #define SPARE_B2 (REGISTERS_BASE + 0x5424)
100 #define SPARE_B3 (REGISTERS_BASE + 0x5428)
101 #define SPARE_B4 (REGISTERS_BASE + 0x542C)
102 #define SPARE_B5 (REGISTERS_BASE + 0x5430)
103 #define SPARE_B6 (REGISTERS_BASE + 0x5434)
104 #define SPARE_B7 (REGISTERS_BASE + 0x5438)
105 #define SPARE_B8 (REGISTERS_BASE + 0x543C)
253 #define ACX_SLV_SOFT_RESET_BIT BIT(0)
254 #define ACX_REG_EEPROM_START_BIT BIT(0)
271 #define REG_COMMAND_MAILBOX_PTR (SCR_PAD0)
286 #define REG_EVENT_MAILBOX_PTR (SCR_PAD1)
291 #define REG_ENABLE_TX_RX (ENABLE)
296 #define REG_RX_CONFIG (RX_CFG)
297 #define REG_RX_FILTER (RX_FILTER_CFG)
300 #define RX_CFG_ENABLE_PHY_HEADER_PLCP 0x0002
303 #define RX_CFG_PROMISCUOUS 0x0008
306 #define RX_CFG_BSSID 0x0020
309 #define RX_CFG_MAC 0x0010
311 #define RX_CFG_ENABLE_ONLY_MY_DEST_MAC 0x0010
312 #define RX_CFG_ENABLE_ANY_DEST_MAC 0x0000
313 #define RX_CFG_ENABLE_ONLY_MY_BSSID 0x0020
314 #define RX_CFG_ENABLE_ANY_BSSID 0x0000
317 #define RX_CFG_DISABLE_BCAST 0x0200
319 #define RX_CFG_ENABLE_ONLY_MY_SSID 0x0400
320 #define RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR 0x0800
321 #define RX_CFG_COPY_RX_STATUS 0x2000
322 #define RX_CFG_TSF 0x10000
324 #define RX_CONFIG_OPTION_ANY_DST_MY_BSS (RX_CFG_ENABLE_ANY_DEST_MAC | \
325 RX_CFG_ENABLE_ONLY_MY_BSSID)
327 #define RX_CONFIG_OPTION_MY_DST_ANY_BSS (RX_CFG_ENABLE_ONLY_MY_DEST_MAC\
328 | RX_CFG_ENABLE_ANY_BSSID)
330 #define RX_CONFIG_OPTION_ANY_DST_ANY_BSS (RX_CFG_ENABLE_ANY_DEST_MAC | \
331 RX_CFG_ENABLE_ANY_BSSID)
333 #define RX_CONFIG_OPTION_MY_DST_MY_BSS (RX_CFG_ENABLE_ONLY_MY_DEST_MAC\
334 | RX_CFG_ENABLE_ONLY_MY_BSSID)
336 #define RX_CONFIG_OPTION_FOR_SCAN (RX_CFG_ENABLE_PHY_HEADER_PLCP \
337 | RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR \
338 | RX_CFG_COPY_RX_STATUS | RX_CFG_TSF)
340 #define RX_CONFIG_OPTION_FOR_MEASUREMENT (RX_CFG_ENABLE_ANY_DEST_MAC)
342 #define RX_CONFIG_OPTION_FOR_JOIN (RX_CFG_ENABLE_ONLY_MY_BSSID | \
343 RX_CFG_ENABLE_ONLY_MY_DEST_MAC)
345 #define RX_CONFIG_OPTION_FOR_IBSS_JOIN (RX_CFG_ENABLE_ONLY_MY_SSID | \
346 RX_CFG_ENABLE_ONLY_MY_DEST_MAC)
348 #define RX_FILTER_OPTION_DEF (CFG_RX_MGMT_EN | CFG_RX_DATA_EN\
349 | CFG_RX_CTL_EN | CFG_RX_BCN_EN\
350 | CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
352 #define RX_FILTER_OPTION_FILTER_ALL 0
354 #define RX_FILTER_OPTION_DEF_PRSP_BCN (CFG_RX_PRSP_EN | CFG_RX_MGMT_EN\
355 | CFG_RX_RCTS_ACK | CFG_RX_BCN_EN)
357 #define RX_FILTER_OPTION_JOIN (CFG_RX_MGMT_EN | CFG_RX_DATA_EN\
358 | CFG_RX_BCN_EN | CFG_RX_AUTH_EN\
359 | CFG_RX_ASSOC_EN | CFG_RX_RCTS_ACK\
378 #define EE_CTL (REGISTERS_BASE + 0x2000)
379 #define ACX_EE_CTL_REG EE_CTL
380 #define EE_WRITE 0x00000001ul
381 #define EE_READ 0x00000002ul
389 #define EE_ADDR (REGISTERS_BASE + 0x2008)
390 #define ACX_EE_ADDR_REG EE_ADDR
399 #define EE_DATA (REGISTERS_BASE + 0x2004)
400 #define ACX_EE_DATA_REG EE_DATA
402 #define EEPROM_ACCESS_TO 10000
403 #define START_EEPROM_MGR 0x00000001
414 #define ACX_EE_CFG EE_CFG
423 #define ACX_GPIO_OUT_REG GPIO_OUT
424 #define ACX_MAX_GPIO_LINES 15
434 #define ACX_CONT_WIND_CFG_REG CONT_WIND_CFG
435 #define ACX_CONT_WIND_MIN_MASK 0x0000007f
436 #define ACX_CONT_WIND_MAX 0x03ff0000
442 #define HI_CFG_UART_ENABLE 0x00000004
443 #define HI_CFG_RST232_ENABLE 0x00000008
444 #define HI_CFG_CLOCK_REQ_SELECT 0x00000010
445 #define HI_CFG_HOST_INT_ENABLE 0x00000020
446 #define HI_CFG_VLYNQ_OUTPUT_ENABLE 0x00000040
447 #define HI_CFG_HOST_INT_ACTIVE_LOW 0x00000080
448 #define HI_CFG_UART_TX_OUT_GPIO_15 0x00000100
449 #define HI_CFG_UART_TX_OUT_GPIO_14 0x00000200
450 #define HI_CFG_UART_TX_OUT_GPIO_7 0x00000400
456 #ifdef USE_ACTIVE_HIGH
457 #define HI_CFG_DEF_VAL \
458 (HI_CFG_UART_ENABLE | \
459 HI_CFG_RST232_ENABLE | \
460 HI_CFG_CLOCK_REQ_SELECT | \
461 HI_CFG_HOST_INT_ENABLE)
463 #define HI_CFG_DEF_VAL \
464 (HI_CFG_UART_ENABLE | \
465 HI_CFG_RST232_ENABLE | \
466 HI_CFG_CLOCK_REQ_SELECT | \
467 HI_CFG_HOST_INT_ENABLE)
471 #define REF_FREQ_19_2 0
472 #define REF_FREQ_26_0 1
473 #define REF_FREQ_38_4 2
474 #define REF_FREQ_40_0 3
475 #define REF_FREQ_33_6 4
476 #define REF_FREQ_NUM 5
478 #define LUT_PARAM_INTEGER_DIVIDER 0
479 #define LUT_PARAM_FRACTIONAL_DIVIDER 1
480 #define LUT_PARAM_ATTN_BB 2
481 #define LUT_PARAM_ALPHA_BB 3
482 #define LUT_PARAM_STOP_TIME_BB 4
483 #define LUT_PARAM_BB_PLL_LOOP_FILTER 5
484 #define LUT_PARAM_NUM 6
486 #define ACX_EEPROMLESS_IND_REG (SCR_PAD4)
488 #define SOFT_RESET_MAX_TIME 1000000
489 #define SOFT_RESET_STALL_TIME 1000
490 #define NVS_DATA_BUNDARY_ALIGNMENT 4
494 #define CHUNK_SIZE 512
497 #define FW_HDR_SIZE 8
499 #define ECPU_CONTROL_HALT 0x00000101
562 #define SHORT_PREAMBLE_BIT BIT(0)
563 #define OFDM_RATE_BIT BIT(6)
564 #define PBCC_RATE_BIT BIT(7)
610 #define INTR_TRIG_CMD BIT(0)
618 #define INTR_TRIG_EVENT_ACK BIT(1)
625 #define INTR_TRIG_TX_PROC0 BIT(2)
632 #define INTR_TRIG_RX_PROC0 BIT(3)
634 #define INTR_TRIG_DEBUG_ACK BIT(4)
636 #define INTR_TRIG_STATE_CHANGED BIT(5)
646 #define INTR_TRIG_RX_PROC1 BIT(17)
653 #define INTR_TRIG_TX_PROC1 BIT(18)