162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/* Copyright(c) 2009-2012  Realtek Corporation.*/
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef __RTL92D_REG_H__
562306a36Sopenharmony_ci#define __RTL92D_REG_H__
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* ----------------------------------------------------- */
862306a36Sopenharmony_ci/* 0x0000h ~ 0x00FFh System Configuration */
962306a36Sopenharmony_ci/* ----------------------------------------------------- */
1062306a36Sopenharmony_ci#define REG_SYS_ISO_CTRL		0x0000
1162306a36Sopenharmony_ci#define REG_SYS_FUNC_EN			0x0002
1262306a36Sopenharmony_ci#define REG_APS_FSMCO			0x0004
1362306a36Sopenharmony_ci#define REG_SYS_CLKR			0x0008
1462306a36Sopenharmony_ci#define REG_9346CR			0x000A
1562306a36Sopenharmony_ci#define REG_EE_VPD			0x000C
1662306a36Sopenharmony_ci#define REG_AFE_MISC			0x0010
1762306a36Sopenharmony_ci#define REG_SPS0_CTRL			0x0011
1862306a36Sopenharmony_ci#define REG_POWER_OFF_IN_PROCESS	0x0017
1962306a36Sopenharmony_ci#define REG_SPS_OCP_CFG			0x0018
2062306a36Sopenharmony_ci#define REG_RSV_CTRL			0x001C
2162306a36Sopenharmony_ci#define REG_RF_CTRL			0x001F
2262306a36Sopenharmony_ci#define REG_LDOA15_CTRL			0x0020
2362306a36Sopenharmony_ci#define REG_LDOV12D_CTRL		0x0021
2462306a36Sopenharmony_ci#define REG_LDOHCI12_CTRL		0x0022
2562306a36Sopenharmony_ci#define REG_LPLDO_CTRL			0x0023
2662306a36Sopenharmony_ci#define REG_AFE_XTAL_CTRL		0x0024
2762306a36Sopenharmony_ci#define REG_AFE_PLL_CTRL		0x0028
2862306a36Sopenharmony_ci/* for 92d, DMDP,SMSP,DMSP contrl */
2962306a36Sopenharmony_ci#define REG_MAC_PHY_CTRL		0x002c
3062306a36Sopenharmony_ci#define REG_EFUSE_CTRL			0x0030
3162306a36Sopenharmony_ci#define REG_EFUSE_TEST			0x0034
3262306a36Sopenharmony_ci#define REG_PWR_DATA			0x0038
3362306a36Sopenharmony_ci#define REG_CAL_TIMER			0x003C
3462306a36Sopenharmony_ci#define REG_ACLK_MON			0x003E
3562306a36Sopenharmony_ci#define REG_GPIO_MUXCFG			0x0040
3662306a36Sopenharmony_ci#define REG_GPIO_IO_SEL			0x0042
3762306a36Sopenharmony_ci#define REG_MAC_PINMUX_CFG		0x0043
3862306a36Sopenharmony_ci#define REG_GPIO_PIN_CTRL		0x0044
3962306a36Sopenharmony_ci#define REG_GPIO_INTM			0x0048
4062306a36Sopenharmony_ci#define REG_LEDCFG0			0x004C
4162306a36Sopenharmony_ci#define REG_LEDCFG1			0x004D
4262306a36Sopenharmony_ci#define REG_LEDCFG2			0x004E
4362306a36Sopenharmony_ci#define REG_LEDCFG3			0x004F
4462306a36Sopenharmony_ci#define REG_FSIMR			0x0050
4562306a36Sopenharmony_ci#define REG_FSISR			0x0054
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#define REG_MCUFWDL			0x0080
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci#define REG_HMEBOX_EXT_0		0x0088
5062306a36Sopenharmony_ci#define REG_HMEBOX_EXT_1		0x008A
5162306a36Sopenharmony_ci#define REG_HMEBOX_EXT_2		0x008C
5262306a36Sopenharmony_ci#define REG_HMEBOX_EXT_3		0x008E
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci#define REG_BIST_SCAN			0x00D0
5562306a36Sopenharmony_ci#define REG_BIST_RPT			0x00D4
5662306a36Sopenharmony_ci#define REG_BIST_ROM_RPT		0x00D8
5762306a36Sopenharmony_ci#define REG_USB_SIE_INTF		0x00E0
5862306a36Sopenharmony_ci#define REG_PCIE_MIO_INTF		0x00E4
5962306a36Sopenharmony_ci#define REG_PCIE_MIO_INTD		0x00E8
6062306a36Sopenharmony_ci#define REG_HPON_FSM			0x00EC
6162306a36Sopenharmony_ci#define REG_SYS_CFG			0x00F0
6262306a36Sopenharmony_ci#define REG_MAC_PHY_CTRL_NORMAL		0x00f8
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci#define  REG_MAC0			0x0081
6562306a36Sopenharmony_ci#define  REG_MAC1			0x0053
6662306a36Sopenharmony_ci#define  FW_MAC0_READY			0x18
6762306a36Sopenharmony_ci#define  FW_MAC1_READY			0x1A
6862306a36Sopenharmony_ci#define  MAC0_ON			BIT(7)
6962306a36Sopenharmony_ci#define  MAC1_ON			BIT(0)
7062306a36Sopenharmony_ci#define  MAC0_READY			BIT(0)
7162306a36Sopenharmony_ci#define  MAC1_READY			BIT(0)
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci/* ----------------------------------------------------- */
7462306a36Sopenharmony_ci/* 0x0100h ~ 0x01FFh	MACTOP General Configuration */
7562306a36Sopenharmony_ci/* ----------------------------------------------------- */
7662306a36Sopenharmony_ci#define REG_CR				0x0100
7762306a36Sopenharmony_ci#define REG_PBP				0x0104
7862306a36Sopenharmony_ci#define REG_TRXDMA_CTRL			0x010C
7962306a36Sopenharmony_ci#define REG_TRXFF_BNDY			0x0114
8062306a36Sopenharmony_ci#define REG_TRXFF_STATUS		0x0118
8162306a36Sopenharmony_ci#define REG_RXFF_PTR			0x011C
8262306a36Sopenharmony_ci#define REG_HIMR			0x0120
8362306a36Sopenharmony_ci#define REG_HISR			0x0124
8462306a36Sopenharmony_ci#define REG_HIMRE			0x0128
8562306a36Sopenharmony_ci#define REG_HISRE			0x012C
8662306a36Sopenharmony_ci#define REG_CPWM			0x012F
8762306a36Sopenharmony_ci#define REG_FWIMR			0x0130
8862306a36Sopenharmony_ci#define REG_FWISR			0x0134
8962306a36Sopenharmony_ci#define REG_PKTBUF_DBG_CTRL		0x0140
9062306a36Sopenharmony_ci#define REG_PKTBUF_DBG_DATA_L		0x0144
9162306a36Sopenharmony_ci#define REG_PKTBUF_DBG_DATA_H		0x0148
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci#define REG_TC0_CTRL			0x0150
9462306a36Sopenharmony_ci#define REG_TC1_CTRL			0x0154
9562306a36Sopenharmony_ci#define REG_TC2_CTRL			0x0158
9662306a36Sopenharmony_ci#define REG_TC3_CTRL			0x015C
9762306a36Sopenharmony_ci#define REG_TC4_CTRL			0x0160
9862306a36Sopenharmony_ci#define REG_TCUNIT_BASE			0x0164
9962306a36Sopenharmony_ci#define REG_MBIST_START			0x0174
10062306a36Sopenharmony_ci#define REG_MBIST_DONE			0x0178
10162306a36Sopenharmony_ci#define REG_MBIST_FAIL			0x017C
10262306a36Sopenharmony_ci#define REG_C2HEVT_MSG_NORMAL		0x01A0
10362306a36Sopenharmony_ci#define REG_C2HEVT_MSG_TEST		0x01B8
10462306a36Sopenharmony_ci#define REG_C2HEVT_CLEAR		0x01BF
10562306a36Sopenharmony_ci#define REG_MCUTST_1			0x01c0
10662306a36Sopenharmony_ci#define REG_FMETHR			0x01C8
10762306a36Sopenharmony_ci#define REG_HMETFR			0x01CC
10862306a36Sopenharmony_ci#define REG_HMEBOX_0			0x01D0
10962306a36Sopenharmony_ci#define REG_HMEBOX_1			0x01D4
11062306a36Sopenharmony_ci#define REG_HMEBOX_2			0x01D8
11162306a36Sopenharmony_ci#define REG_HMEBOX_3			0x01DC
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ci#define REG_LLT_INIT			0x01E0
11462306a36Sopenharmony_ci#define REG_BB_ACCEESS_CTRL		0x01E8
11562306a36Sopenharmony_ci#define REG_BB_ACCESS_DATA		0x01EC
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ci/* ----------------------------------------------------- */
11962306a36Sopenharmony_ci/*	0x0200h ~ 0x027Fh	TXDMA Configuration */
12062306a36Sopenharmony_ci/* ----------------------------------------------------- */
12162306a36Sopenharmony_ci#define REG_RQPN			0x0200
12262306a36Sopenharmony_ci#define REG_FIFOPAGE			0x0204
12362306a36Sopenharmony_ci#define REG_TDECTRL			0x0208
12462306a36Sopenharmony_ci#define REG_TXDMA_OFFSET_CHK		0x020C
12562306a36Sopenharmony_ci#define REG_TXDMA_STATUS		0x0210
12662306a36Sopenharmony_ci#define REG_RQPN_NPQ			0x0214
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci/* ----------------------------------------------------- */
12962306a36Sopenharmony_ci/*	0x0280h ~ 0x02FFh	RXDMA Configuration */
13062306a36Sopenharmony_ci/* ----------------------------------------------------- */
13162306a36Sopenharmony_ci#define REG_RXDMA_AGG_PG_TH		0x0280
13262306a36Sopenharmony_ci#define REG_RXPKT_NUM			0x0284
13362306a36Sopenharmony_ci#define REG_RXDMA_STATUS		0x0288
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci/* ----------------------------------------------------- */
13662306a36Sopenharmony_ci/*	0x0300h ~ 0x03FFh	PCIe  */
13762306a36Sopenharmony_ci/* ----------------------------------------------------- */
13862306a36Sopenharmony_ci#define	REG_PCIE_CTRL_REG		0x0300
13962306a36Sopenharmony_ci#define	REG_INT_MIG			0x0304
14062306a36Sopenharmony_ci#define	REG_BCNQ_DESA			0x0308
14162306a36Sopenharmony_ci#define	REG_HQ_DESA			0x0310
14262306a36Sopenharmony_ci#define	REG_MGQ_DESA			0x0318
14362306a36Sopenharmony_ci#define	REG_VOQ_DESA			0x0320
14462306a36Sopenharmony_ci#define	REG_VIQ_DESA			0x0328
14562306a36Sopenharmony_ci#define	REG_BEQ_DESA			0x0330
14662306a36Sopenharmony_ci#define	REG_BKQ_DESA			0x0338
14762306a36Sopenharmony_ci#define	REG_RX_DESA			0x0340
14862306a36Sopenharmony_ci#define	REG_DBI				0x0348
14962306a36Sopenharmony_ci#define	REG_DBI_WDATA			0x0348
15062306a36Sopenharmony_ci#define REG_DBI_RDATA			0x034C
15162306a36Sopenharmony_ci#define REG_DBI_CTRL			0x0350
15262306a36Sopenharmony_ci#define REG_DBI_FLAG			0x0352
15362306a36Sopenharmony_ci#define	REG_MDIO			0x0354
15462306a36Sopenharmony_ci#define	REG_DBG_SEL			0x0360
15562306a36Sopenharmony_ci#define	REG_PCIE_HRPWM			0x0361
15662306a36Sopenharmony_ci#define	REG_PCIE_HCPWM			0x0363
15762306a36Sopenharmony_ci#define	REG_UART_CTRL			0x0364
15862306a36Sopenharmony_ci#define	REG_UART_TX_DESA		0x0370
15962306a36Sopenharmony_ci#define	REG_UART_RX_DESA		0x0378
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ci/* ----------------------------------------------------- */
16262306a36Sopenharmony_ci/*	0x0400h ~ 0x047Fh	Protocol Configuration  */
16362306a36Sopenharmony_ci/* ----------------------------------------------------- */
16462306a36Sopenharmony_ci#define REG_VOQ_INFORMATION		0x0400
16562306a36Sopenharmony_ci#define REG_VIQ_INFORMATION		0x0404
16662306a36Sopenharmony_ci#define REG_BEQ_INFORMATION		0x0408
16762306a36Sopenharmony_ci#define REG_BKQ_INFORMATION		0x040C
16862306a36Sopenharmony_ci#define REG_MGQ_INFORMATION		0x0410
16962306a36Sopenharmony_ci#define REG_HGQ_INFORMATION		0x0414
17062306a36Sopenharmony_ci#define REG_BCNQ_INFORMATION		0x0418
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ci#define REG_CPU_MGQ_INFORMATION		0x041C
17462306a36Sopenharmony_ci#define REG_FWHW_TXQ_CTRL		0x0420
17562306a36Sopenharmony_ci#define REG_HWSEQ_CTRL			0x0423
17662306a36Sopenharmony_ci#define REG_TXPKTBUF_BCNQ_BDNY		0x0424
17762306a36Sopenharmony_ci#define REG_TXPKTBUF_MGQ_BDNY		0x0425
17862306a36Sopenharmony_ci#define REG_MULTI_BCNQ_EN		0x0426
17962306a36Sopenharmony_ci#define REG_MULTI_BCNQ_OFFSET		0x0427
18062306a36Sopenharmony_ci#define REG_SPEC_SIFS			0x0428
18162306a36Sopenharmony_ci#define REG_RL				0x042A
18262306a36Sopenharmony_ci#define REG_DARFRC			0x0430
18362306a36Sopenharmony_ci#define REG_RARFRC			0x0438
18462306a36Sopenharmony_ci#define REG_RRSR			0x0440
18562306a36Sopenharmony_ci#define REG_ARFR0			0x0444
18662306a36Sopenharmony_ci#define REG_ARFR1			0x0448
18762306a36Sopenharmony_ci#define REG_ARFR2			0x044C
18862306a36Sopenharmony_ci#define REG_ARFR3			0x0450
18962306a36Sopenharmony_ci#define REG_AGGLEN_LMT			0x0458
19062306a36Sopenharmony_ci#define REG_AMPDU_MIN_SPACE		0x045C
19162306a36Sopenharmony_ci#define REG_TXPKTBUF_WMAC_LBK_BF_HD	0x045D
19262306a36Sopenharmony_ci#define REG_FAST_EDCA_CTRL		0x0460
19362306a36Sopenharmony_ci#define REG_RD_RESP_PKT_TH		0x0463
19462306a36Sopenharmony_ci#define REG_INIRTS_RATE_SEL		0x0480
19562306a36Sopenharmony_ci#define REG_INIDATA_RATE_SEL		0x0484
19662306a36Sopenharmony_ci#define REG_POWER_STATUS		0x04A4
19762306a36Sopenharmony_ci#define REG_POWER_STAGE1		0x04B4
19862306a36Sopenharmony_ci#define REG_POWER_STAGE2		0x04B8
19962306a36Sopenharmony_ci#define REG_PKT_LIFE_TIME		0x04C0
20062306a36Sopenharmony_ci#define REG_STBC_SETTING		0x04C4
20162306a36Sopenharmony_ci#define REG_PROT_MODE_CTRL		0x04C8
20262306a36Sopenharmony_ci#define REG_MAX_AGGR_NUM		0x04CA
20362306a36Sopenharmony_ci#define REG_RTS_MAX_AGGR_NUM		0x04CB
20462306a36Sopenharmony_ci#define REG_BAR_MODE_CTRL		0x04CC
20562306a36Sopenharmony_ci#define REG_RA_TRY_RATE_AGG_LMT		0x04CF
20662306a36Sopenharmony_ci#define REG_EARLY_MODE_CONTROL		0x4D0
20762306a36Sopenharmony_ci#define REG_NQOS_SEQ			0x04DC
20862306a36Sopenharmony_ci#define REG_QOS_SEQ			0x04DE
20962306a36Sopenharmony_ci#define REG_NEED_CPU_HANDLE		0x04E0
21062306a36Sopenharmony_ci#define REG_PKT_LOSE_RPT		0x04E1
21162306a36Sopenharmony_ci#define REG_PTCL_ERR_STATUS		0x04E2
21262306a36Sopenharmony_ci#define REG_DUMMY			0x04FC
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci/* ----------------------------------------------------- */
21562306a36Sopenharmony_ci/*	0x0500h ~ 0x05FFh	EDCA Configuration   */
21662306a36Sopenharmony_ci/* ----------------------------------------------------- */
21762306a36Sopenharmony_ci#define REG_EDCA_VO_PARAM		0x0500
21862306a36Sopenharmony_ci#define REG_EDCA_VI_PARAM		0x0504
21962306a36Sopenharmony_ci#define REG_EDCA_BE_PARAM		0x0508
22062306a36Sopenharmony_ci#define REG_EDCA_BK_PARAM		0x050C
22162306a36Sopenharmony_ci#define REG_BCNTCFG			0x0510
22262306a36Sopenharmony_ci#define REG_PIFS			0x0512
22362306a36Sopenharmony_ci#define REG_RDG_PIFS			0x0513
22462306a36Sopenharmony_ci#define REG_SIFS_CTX			0x0514
22562306a36Sopenharmony_ci#define REG_SIFS_TRX			0x0516
22662306a36Sopenharmony_ci#define REG_AGGR_BREAK_TIME		0x051A
22762306a36Sopenharmony_ci#define REG_SLOT			0x051B
22862306a36Sopenharmony_ci#define REG_TX_PTCL_CTRL		0x0520
22962306a36Sopenharmony_ci#define REG_TXPAUSE			0x0522
23062306a36Sopenharmony_ci#define REG_DIS_TXREQ_CLR		0x0523
23162306a36Sopenharmony_ci#define REG_RD_CTRL			0x0524
23262306a36Sopenharmony_ci#define REG_TBTT_PROHIBIT		0x0540
23362306a36Sopenharmony_ci#define REG_RD_NAV_NXT			0x0544
23462306a36Sopenharmony_ci#define REG_NAV_PROT_LEN		0x0546
23562306a36Sopenharmony_ci#define REG_BCN_CTRL			0x0550
23662306a36Sopenharmony_ci#define REG_MBID_NUM			0x0552
23762306a36Sopenharmony_ci#define REG_DUAL_TSF_RST		0x0553
23862306a36Sopenharmony_ci#define REG_BCN_INTERVAL		0x0554
23962306a36Sopenharmony_ci#define REG_MBSSID_BCN_SPACE		0x0554
24062306a36Sopenharmony_ci#define REG_DRVERLYINT			0x0558
24162306a36Sopenharmony_ci#define REG_BCNDMATIM			0x0559
24262306a36Sopenharmony_ci#define REG_ATIMWND			0x055A
24362306a36Sopenharmony_ci#define REG_USTIME_TSF			0x055C
24462306a36Sopenharmony_ci#define REG_BCN_MAX_ERR			0x055D
24562306a36Sopenharmony_ci#define REG_RXTSF_OFFSET_CCK		0x055E
24662306a36Sopenharmony_ci#define REG_RXTSF_OFFSET_OFDM		0x055F
24762306a36Sopenharmony_ci#define REG_TSFTR			0x0560
24862306a36Sopenharmony_ci#define REG_INIT_TSFTR			0x0564
24962306a36Sopenharmony_ci#define REG_PSTIMER			0x0580
25062306a36Sopenharmony_ci#define REG_TIMER0			0x0584
25162306a36Sopenharmony_ci#define REG_TIMER1			0x0588
25262306a36Sopenharmony_ci#define REG_ACMHWCTRL			0x05C0
25362306a36Sopenharmony_ci#define REG_ACMRSTCTRL			0x05C1
25462306a36Sopenharmony_ci#define REG_ACMAVG			0x05C2
25562306a36Sopenharmony_ci#define REG_VO_ADMTIME			0x05C4
25662306a36Sopenharmony_ci#define REG_VI_ADMTIME			0x05C6
25762306a36Sopenharmony_ci#define REG_BE_ADMTIME			0x05C8
25862306a36Sopenharmony_ci#define REG_EDCA_RANDOM_GEN		0x05CC
25962306a36Sopenharmony_ci#define REG_SCH_TXCMD			0x05D0
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci/* Dual MAC Co-Existence Register  */
26262306a36Sopenharmony_ci#define REG_DMC				0x05F0
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci/* ----------------------------------------------------- */
26562306a36Sopenharmony_ci/*	0x0600h ~ 0x07FFh	WMAC Configuration */
26662306a36Sopenharmony_ci/* ----------------------------------------------------- */
26762306a36Sopenharmony_ci#define REG_APSD_CTRL			0x0600
26862306a36Sopenharmony_ci#define REG_BWOPMODE			0x0603
26962306a36Sopenharmony_ci#define REG_TCR				0x0604
27062306a36Sopenharmony_ci#define REG_RCR				0x0608
27162306a36Sopenharmony_ci#define REG_RX_PKT_LIMIT		0x060C
27262306a36Sopenharmony_ci#define REG_RX_DLK_TIME			0x060D
27362306a36Sopenharmony_ci#define REG_RX_DRVINFO_SZ		0x060F
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ci#define REG_MACID			0x0610
27662306a36Sopenharmony_ci#define REG_BSSID			0x0618
27762306a36Sopenharmony_ci#define REG_MAR				0x0620
27862306a36Sopenharmony_ci#define REG_MBIDCAMCFG			0x0628
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_ci#define REG_USTIME_EDCA			0x0638
28162306a36Sopenharmony_ci#define REG_MAC_SPEC_SIFS		0x063A
28262306a36Sopenharmony_ci#define REG_RESP_SIFS_CCK		0x063C
28362306a36Sopenharmony_ci#define REG_RESP_SIFS_OFDM		0x063E
28462306a36Sopenharmony_ci#define REG_ACKTO			0x0640
28562306a36Sopenharmony_ci#define REG_CTS2TO			0x0641
28662306a36Sopenharmony_ci#define REG_EIFS			0x0642
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci/* WMA, BA, CCX */
29062306a36Sopenharmony_ci#define REG_NAV_CTRL			0x0650
29162306a36Sopenharmony_ci#define REG_BACAMCMD			0x0654
29262306a36Sopenharmony_ci#define REG_BACAMCONTENT		0x0658
29362306a36Sopenharmony_ci#define REG_LBDLY			0x0660
29462306a36Sopenharmony_ci#define REG_FWDLY			0x0661
29562306a36Sopenharmony_ci#define REG_RXERR_RPT			0x0664
29662306a36Sopenharmony_ci#define REG_WMAC_TRXPTCL_CTL		0x0668
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ci
29962306a36Sopenharmony_ci/* Security  */
30062306a36Sopenharmony_ci#define REG_CAMCMD			0x0670
30162306a36Sopenharmony_ci#define REG_CAMWRITE			0x0674
30262306a36Sopenharmony_ci#define REG_CAMREAD			0x0678
30362306a36Sopenharmony_ci#define REG_CAMDBG			0x067C
30462306a36Sopenharmony_ci#define REG_SECCFG			0x0680
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ci/* Power  */
30762306a36Sopenharmony_ci#define REG_WOW_CTRL			0x0690
30862306a36Sopenharmony_ci#define REG_PSSTATUS			0x0691
30962306a36Sopenharmony_ci#define REG_PS_RX_INFO			0x0692
31062306a36Sopenharmony_ci#define REG_LPNAV_CTRL			0x0694
31162306a36Sopenharmony_ci#define REG_WKFMCAM_CMD			0x0698
31262306a36Sopenharmony_ci#define REG_WKFMCAM_RWD			0x069C
31362306a36Sopenharmony_ci#define REG_RXFLTMAP0			0x06A0
31462306a36Sopenharmony_ci#define REG_RXFLTMAP1			0x06A2
31562306a36Sopenharmony_ci#define REG_RXFLTMAP2			0x06A4
31662306a36Sopenharmony_ci#define REG_BCN_PSR_RPT			0x06A8
31762306a36Sopenharmony_ci#define REG_CALB32K_CTRL		0x06AC
31862306a36Sopenharmony_ci#define REG_PKT_MON_CTRL		0x06B4
31962306a36Sopenharmony_ci#define REG_BT_COEX_TABLE		0x06C0
32062306a36Sopenharmony_ci#define REG_WMAC_RESP_TXINFO		0x06D8
32162306a36Sopenharmony_ci
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_ci/* ----------------------------------------------------- */
32462306a36Sopenharmony_ci/*	Redifine 8192C register definition for compatibility */
32562306a36Sopenharmony_ci/* ----------------------------------------------------- */
32662306a36Sopenharmony_ci#define	CR9346				REG_9346CR
32762306a36Sopenharmony_ci#define	MSR				(REG_CR + 2)
32862306a36Sopenharmony_ci#define	ISR				REG_HISR
32962306a36Sopenharmony_ci#define	TSFR				REG_TSFTR
33062306a36Sopenharmony_ci
33162306a36Sopenharmony_ci#define	MACIDR0				REG_MACID
33262306a36Sopenharmony_ci#define	MACIDR4				(REG_MACID + 4)
33362306a36Sopenharmony_ci
33462306a36Sopenharmony_ci#define PBP				REG_PBP
33562306a36Sopenharmony_ci
33662306a36Sopenharmony_ci#define	IDR0				MACIDR0
33762306a36Sopenharmony_ci#define	IDR4				MACIDR4
33862306a36Sopenharmony_ci
33962306a36Sopenharmony_ci/* ----------------------------------------------------- */
34062306a36Sopenharmony_ci/* 8192C (MSR) Media Status Register(Offset 0x4C, 8 bits)*/
34162306a36Sopenharmony_ci/* ----------------------------------------------------- */
34262306a36Sopenharmony_ci#define	MSR_NOLINK			0x00
34362306a36Sopenharmony_ci#define	MSR_ADHOC			0x01
34462306a36Sopenharmony_ci#define	MSR_INFRA			0x02
34562306a36Sopenharmony_ci#define	MSR_AP				0x03
34662306a36Sopenharmony_ci#define	MSR_MASK			0x03
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ci/* 6. Adaptive Control Registers  (Offset: 0x0160 - 0x01CF) */
34962306a36Sopenharmony_ci/* ----------------------------------------------------- */
35062306a36Sopenharmony_ci/* 8192C Response Rate Set Register(offset 0x181, 24bits)*/
35162306a36Sopenharmony_ci/* ----------------------------------------------------- */
35262306a36Sopenharmony_ci#define	RRSR_RSC_OFFSET			21
35362306a36Sopenharmony_ci#define	RRSR_SHORT_OFFSET		23
35462306a36Sopenharmony_ci#define	RRSR_RSC_BW_40M			0x600000
35562306a36Sopenharmony_ci#define	RRSR_RSC_UPSUBCHNL		0x400000
35662306a36Sopenharmony_ci#define	RRSR_RSC_LOWSUBCHNL		0x200000
35762306a36Sopenharmony_ci#define	RRSR_SHORT			0x800000
35862306a36Sopenharmony_ci#define	RRSR_1M				BIT0
35962306a36Sopenharmony_ci#define	RRSR_2M				BIT1
36062306a36Sopenharmony_ci#define	RRSR_5_5M			BIT2
36162306a36Sopenharmony_ci#define	RRSR_11M			BIT3
36262306a36Sopenharmony_ci#define	RRSR_6M				BIT4
36362306a36Sopenharmony_ci#define	RRSR_9M				BIT5
36462306a36Sopenharmony_ci#define	RRSR_12M			BIT6
36562306a36Sopenharmony_ci#define	RRSR_18M			BIT7
36662306a36Sopenharmony_ci#define	RRSR_24M			BIT8
36762306a36Sopenharmony_ci#define	RRSR_36M			BIT9
36862306a36Sopenharmony_ci#define	RRSR_48M			BIT10
36962306a36Sopenharmony_ci#define	RRSR_54M			BIT11
37062306a36Sopenharmony_ci#define	RRSR_MCS0			BIT12
37162306a36Sopenharmony_ci#define	RRSR_MCS1			BIT13
37262306a36Sopenharmony_ci#define	RRSR_MCS2			BIT14
37362306a36Sopenharmony_ci#define	RRSR_MCS3			BIT15
37462306a36Sopenharmony_ci#define	RRSR_MCS4			BIT16
37562306a36Sopenharmony_ci#define	RRSR_MCS5			BIT17
37662306a36Sopenharmony_ci#define	RRSR_MCS6			BIT18
37762306a36Sopenharmony_ci#define	RRSR_MCS7			BIT19
37862306a36Sopenharmony_ci#define	BRSR_ACKSHORTPMB		BIT23
37962306a36Sopenharmony_ci
38062306a36Sopenharmony_ci/* ----------------------------------------------------- */
38162306a36Sopenharmony_ci/*       8192C Rate Definition  */
38262306a36Sopenharmony_ci/* ----------------------------------------------------- */
38362306a36Sopenharmony_ci/* CCK */
38462306a36Sopenharmony_ci#define	RATR_1M				0x00000001
38562306a36Sopenharmony_ci#define	RATR_2M				0x00000002
38662306a36Sopenharmony_ci#define	RATR_55M			0x00000004
38762306a36Sopenharmony_ci#define	RATR_11M			0x00000008
38862306a36Sopenharmony_ci/* OFDM */
38962306a36Sopenharmony_ci#define	RATR_6M				0x00000010
39062306a36Sopenharmony_ci#define	RATR_9M				0x00000020
39162306a36Sopenharmony_ci#define	RATR_12M			0x00000040
39262306a36Sopenharmony_ci#define	RATR_18M			0x00000080
39362306a36Sopenharmony_ci#define	RATR_24M			0x00000100
39462306a36Sopenharmony_ci#define	RATR_36M			0x00000200
39562306a36Sopenharmony_ci#define	RATR_48M			0x00000400
39662306a36Sopenharmony_ci#define	RATR_54M			0x00000800
39762306a36Sopenharmony_ci/* MCS 1 Spatial Stream	*/
39862306a36Sopenharmony_ci#define	RATR_MCS0			0x00001000
39962306a36Sopenharmony_ci#define	RATR_MCS1			0x00002000
40062306a36Sopenharmony_ci#define	RATR_MCS2			0x00004000
40162306a36Sopenharmony_ci#define	RATR_MCS3			0x00008000
40262306a36Sopenharmony_ci#define	RATR_MCS4			0x00010000
40362306a36Sopenharmony_ci#define	RATR_MCS5			0x00020000
40462306a36Sopenharmony_ci#define	RATR_MCS6			0x00040000
40562306a36Sopenharmony_ci#define	RATR_MCS7			0x00080000
40662306a36Sopenharmony_ci/* MCS 2 Spatial Stream */
40762306a36Sopenharmony_ci#define	RATR_MCS8			0x00100000
40862306a36Sopenharmony_ci#define	RATR_MCS9			0x00200000
40962306a36Sopenharmony_ci#define	RATR_MCS10			0x00400000
41062306a36Sopenharmony_ci#define	RATR_MCS11			0x00800000
41162306a36Sopenharmony_ci#define	RATR_MCS12			0x01000000
41262306a36Sopenharmony_ci#define	RATR_MCS13			0x02000000
41362306a36Sopenharmony_ci#define	RATR_MCS14			0x04000000
41462306a36Sopenharmony_ci#define	RATR_MCS15			0x08000000
41562306a36Sopenharmony_ci
41662306a36Sopenharmony_ci/* CCK */
41762306a36Sopenharmony_ci#define RATE_1M				BIT(0)
41862306a36Sopenharmony_ci#define RATE_2M				BIT(1)
41962306a36Sopenharmony_ci#define RATE_5_5M			BIT(2)
42062306a36Sopenharmony_ci#define RATE_11M			BIT(3)
42162306a36Sopenharmony_ci/* OFDM  */
42262306a36Sopenharmony_ci#define RATE_6M				BIT(4)
42362306a36Sopenharmony_ci#define RATE_9M				BIT(5)
42462306a36Sopenharmony_ci#define RATE_12M			BIT(6)
42562306a36Sopenharmony_ci#define RATE_18M			BIT(7)
42662306a36Sopenharmony_ci#define RATE_24M			BIT(8)
42762306a36Sopenharmony_ci#define RATE_36M			BIT(9)
42862306a36Sopenharmony_ci#define RATE_48M			BIT(10)
42962306a36Sopenharmony_ci#define RATE_54M			BIT(11)
43062306a36Sopenharmony_ci/* MCS 1 Spatial Stream */
43162306a36Sopenharmony_ci#define RATE_MCS0			BIT(12)
43262306a36Sopenharmony_ci#define RATE_MCS1			BIT(13)
43362306a36Sopenharmony_ci#define RATE_MCS2			BIT(14)
43462306a36Sopenharmony_ci#define RATE_MCS3			BIT(15)
43562306a36Sopenharmony_ci#define RATE_MCS4			BIT(16)
43662306a36Sopenharmony_ci#define RATE_MCS5			BIT(17)
43762306a36Sopenharmony_ci#define RATE_MCS6			BIT(18)
43862306a36Sopenharmony_ci#define RATE_MCS7			BIT(19)
43962306a36Sopenharmony_ci/* MCS 2 Spatial Stream */
44062306a36Sopenharmony_ci#define RATE_MCS8			BIT(20)
44162306a36Sopenharmony_ci#define RATE_MCS9			BIT(21)
44262306a36Sopenharmony_ci#define RATE_MCS10			BIT(22)
44362306a36Sopenharmony_ci#define RATE_MCS11			BIT(23)
44462306a36Sopenharmony_ci#define RATE_MCS12			BIT(24)
44562306a36Sopenharmony_ci#define RATE_MCS13			BIT(25)
44662306a36Sopenharmony_ci#define RATE_MCS14			BIT(26)
44762306a36Sopenharmony_ci#define RATE_MCS15			BIT(27)
44862306a36Sopenharmony_ci
44962306a36Sopenharmony_ci/* ALL CCK Rate */
45062306a36Sopenharmony_ci#define	RATE_ALL_CCK			(RATR_1M | RATR_2M | RATR_55M | \
45162306a36Sopenharmony_ci					RATR_11M)
45262306a36Sopenharmony_ci#define	RATE_ALL_OFDM_AG		(RATR_6M | RATR_9M | RATR_12M | \
45362306a36Sopenharmony_ci					RATR_18M | RATR_24M | \
45462306a36Sopenharmony_ci					RATR_36M | RATR_48M | RATR_54M)
45562306a36Sopenharmony_ci#define	RATE_ALL_OFDM_1SS		(RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | \
45662306a36Sopenharmony_ci					RATR_MCS3 | RATR_MCS4 | RATR_MCS5 | \
45762306a36Sopenharmony_ci					RATR_MCS6 | RATR_MCS7)
45862306a36Sopenharmony_ci#define	RATE_ALL_OFDM_2SS		(RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \
45962306a36Sopenharmony_ci					RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \
46062306a36Sopenharmony_ci					RATR_MCS14 | RATR_MCS15)
46162306a36Sopenharmony_ci
46262306a36Sopenharmony_ci/* ----------------------------------------------------- */
46362306a36Sopenharmony_ci/*    8192C BW_OPMODE bits		(Offset 0x203, 8bit)     */
46462306a36Sopenharmony_ci/* ----------------------------------------------------- */
46562306a36Sopenharmony_ci#define	BW_OPMODE_20MHZ			BIT(2)
46662306a36Sopenharmony_ci#define	BW_OPMODE_5G			BIT(1)
46762306a36Sopenharmony_ci#define	BW_OPMODE_11J			BIT(0)
46862306a36Sopenharmony_ci
46962306a36Sopenharmony_ci
47062306a36Sopenharmony_ci/* ----------------------------------------------------- */
47162306a36Sopenharmony_ci/*     8192C CAM Config Setting (offset 0x250, 1 byte)   */
47262306a36Sopenharmony_ci/* ----------------------------------------------------- */
47362306a36Sopenharmony_ci#define	CAM_VALID			BIT(15)
47462306a36Sopenharmony_ci#define	CAM_NOTVALID			0x0000
47562306a36Sopenharmony_ci#define	CAM_USEDK			BIT(5)
47662306a36Sopenharmony_ci
47762306a36Sopenharmony_ci#define	CAM_NONE			0x0
47862306a36Sopenharmony_ci#define	CAM_WEP40			0x01
47962306a36Sopenharmony_ci#define	CAM_TKIP			0x02
48062306a36Sopenharmony_ci#define	CAM_AES				0x04
48162306a36Sopenharmony_ci#define	CAM_WEP104			0x05
48262306a36Sopenharmony_ci#define	CAM_SMS4			0x6
48362306a36Sopenharmony_ci
48462306a36Sopenharmony_ci
48562306a36Sopenharmony_ci#define	TOTAL_CAM_ENTRY			32
48662306a36Sopenharmony_ci#define	HALF_CAM_ENTRY			16
48762306a36Sopenharmony_ci
48862306a36Sopenharmony_ci#define	CAM_WRITE			BIT(16)
48962306a36Sopenharmony_ci#define	CAM_READ			0x00000000
49062306a36Sopenharmony_ci#define	CAM_POLLINIG			BIT(31)
49162306a36Sopenharmony_ci
49262306a36Sopenharmony_ci/* 10. Power Save Control Registers	 (Offset: 0x0260 - 0x02DF) */
49362306a36Sopenharmony_ci#define	WOW_PMEN			BIT0 /* Power management Enable. */
49462306a36Sopenharmony_ci#define	WOW_WOMEN			BIT1 /* WoW function on or off. */
49562306a36Sopenharmony_ci#define	WOW_MAGIC			BIT2 /* Magic packet */
49662306a36Sopenharmony_ci#define	WOW_UWF				BIT3 /* Unicast Wakeup frame. */
49762306a36Sopenharmony_ci
49862306a36Sopenharmony_ci/* 12. Host Interrupt Status Registers	 (Offset: 0x0300 - 0x030F) */
49962306a36Sopenharmony_ci/* ----------------------------------------------------- */
50062306a36Sopenharmony_ci/*      8190 IMR/ISR bits	(offset 0xfd,  8bits) */
50162306a36Sopenharmony_ci/* ----------------------------------------------------- */
50262306a36Sopenharmony_ci#define	IMR8190_DISABLED		0x0
50362306a36Sopenharmony_ci#define	IMR_BCNDMAINT6			BIT(31)
50462306a36Sopenharmony_ci#define	IMR_BCNDMAINT5			BIT(30)
50562306a36Sopenharmony_ci#define	IMR_BCNDMAINT4			BIT(29)
50662306a36Sopenharmony_ci#define	IMR_BCNDMAINT3			BIT(28)
50762306a36Sopenharmony_ci#define	IMR_BCNDMAINT2			BIT(27)
50862306a36Sopenharmony_ci#define	IMR_BCNDMAINT1			BIT(26)
50962306a36Sopenharmony_ci#define	IMR_BCNDOK8			BIT(25)
51062306a36Sopenharmony_ci#define	IMR_BCNDOK7			BIT(24)
51162306a36Sopenharmony_ci#define	IMR_BCNDOK6			BIT(23)
51262306a36Sopenharmony_ci#define	IMR_BCNDOK5			BIT(22)
51362306a36Sopenharmony_ci#define	IMR_BCNDOK4			BIT(21)
51462306a36Sopenharmony_ci#define	IMR_BCNDOK3			BIT(20)
51562306a36Sopenharmony_ci#define	IMR_BCNDOK2			BIT(19)
51662306a36Sopenharmony_ci#define	IMR_BCNDOK1			BIT(18)
51762306a36Sopenharmony_ci#define	IMR_TIMEOUT2			BIT(17)
51862306a36Sopenharmony_ci#define	IMR_TIMEOUT1			BIT(16)
51962306a36Sopenharmony_ci#define	IMR_TXFOVW			BIT(15)
52062306a36Sopenharmony_ci#define	IMR_PSTIMEOUT			BIT(14)
52162306a36Sopenharmony_ci#define	IMR_BCNINT			BIT(13)
52262306a36Sopenharmony_ci#define	IMR_RXFOVW			BIT(12)
52362306a36Sopenharmony_ci#define	IMR_RDU				BIT(11)
52462306a36Sopenharmony_ci#define	IMR_ATIMEND			BIT(10)
52562306a36Sopenharmony_ci#define	IMR_BDOK			BIT(9)
52662306a36Sopenharmony_ci#define	IMR_HIGHDOK			BIT(8)
52762306a36Sopenharmony_ci#define	IMR_TBDOK			BIT(7)
52862306a36Sopenharmony_ci#define	IMR_MGNTDOK			BIT(6)
52962306a36Sopenharmony_ci#define	IMR_TBDER			BIT(5)
53062306a36Sopenharmony_ci#define	IMR_BKDOK			BIT(4)
53162306a36Sopenharmony_ci#define	IMR_BEDOK			BIT(3)
53262306a36Sopenharmony_ci#define	IMR_VIDOK			BIT(2)
53362306a36Sopenharmony_ci#define	IMR_VODOK			BIT(1)
53462306a36Sopenharmony_ci#define	IMR_ROK				BIT(0)
53562306a36Sopenharmony_ci
53662306a36Sopenharmony_ci#define	IMR_TXERR			BIT(11)
53762306a36Sopenharmony_ci#define	IMR_RXERR			BIT(10)
53862306a36Sopenharmony_ci#define	IMR_C2HCMD			BIT(9)
53962306a36Sopenharmony_ci#define	IMR_CPWM			BIT(8)
54062306a36Sopenharmony_ci#define	IMR_OCPINT			BIT(1)
54162306a36Sopenharmony_ci#define	IMR_WLANOFF			BIT(0)
54262306a36Sopenharmony_ci
54362306a36Sopenharmony_ci/* ----------------------------------------------------- */
54462306a36Sopenharmony_ci/* 8192C EFUSE */
54562306a36Sopenharmony_ci/* ----------------------------------------------------- */
54662306a36Sopenharmony_ci#define	HWSET_MAX_SIZE			256
54762306a36Sopenharmony_ci#define EFUSE_MAX_SECTION		32
54862306a36Sopenharmony_ci#define EFUSE_REAL_CONTENT_LEN		512
54962306a36Sopenharmony_ci
55062306a36Sopenharmony_ci/* ----------------------------------------------------- */
55162306a36Sopenharmony_ci/*     8192C EEPROM/EFUSE share register definition. */
55262306a36Sopenharmony_ci/* ----------------------------------------------------- */
55362306a36Sopenharmony_ci#define	EEPROM_DEFAULT_TSSI			0x0
55462306a36Sopenharmony_ci#define EEPROM_DEFAULT_CRYSTALCAP		0x0
55562306a36Sopenharmony_ci#define	EEPROM_DEFAULT_THERMALMETER		0x12
55662306a36Sopenharmony_ci
55762306a36Sopenharmony_ci#define	EEPROM_DEFAULT_TXPOWERLEVEL_2G		0x2C
55862306a36Sopenharmony_ci#define	EEPROM_DEFAULT_TXPOWERLEVEL_5G		0x22
55962306a36Sopenharmony_ci
56062306a36Sopenharmony_ci#define	EEPROM_DEFAULT_HT40_2SDIFF		0x0
56162306a36Sopenharmony_ci/* HT20<->40 default Tx Power Index Difference */
56262306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT20_DIFF		2
56362306a36Sopenharmony_ci/* OFDM Tx Power index diff */
56462306a36Sopenharmony_ci#define	EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF	0x4
56562306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT40_PWRMAXOFFSET	0
56662306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT20_PWRMAXOFFSET	0
56762306a36Sopenharmony_ci
56862306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_FCC			0x0
56962306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_IC			0x1
57062306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_ETSI		0x2
57162306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_SPAIN		0x3
57262306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_FRANCE		0x4
57362306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_MKK			0x5
57462306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_MKK1		0x6
57562306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_ISRAEL		0x7
57662306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_TELEC		0x8
57762306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_GLOBAL_DOMAIN	0x9
57862306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_WORLD_WIDE_13	0xA
57962306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_NCC			0xB
58062306a36Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_BY_HW_MASK		0x80
58162306a36Sopenharmony_ci
58262306a36Sopenharmony_ci#define EEPROM_CID_DEFAULT			0x0
58362306a36Sopenharmony_ci#define EEPROM_CID_TOSHIBA			0x4
58462306a36Sopenharmony_ci#define	EEPROM_CID_CCX				0x10
58562306a36Sopenharmony_ci#define	EEPROM_CID_QMI				0x0D
58662306a36Sopenharmony_ci#define EEPROM_CID_WHQL				0xFE
58762306a36Sopenharmony_ci
58862306a36Sopenharmony_ci
58962306a36Sopenharmony_ci#define	RTL8192_EEPROM_ID			0x8129
59062306a36Sopenharmony_ci#define	EEPROM_WAPI_SUPPORT			0x78
59162306a36Sopenharmony_ci
59262306a36Sopenharmony_ci
59362306a36Sopenharmony_ci#define RTL8190_EEPROM_ID		0x8129	/* 0-1 */
59462306a36Sopenharmony_ci#define EEPROM_HPON			0x02 /* LDO settings.2-5 */
59562306a36Sopenharmony_ci#define EEPROM_CLK			0x06 /* Clock settings.6-7 */
59662306a36Sopenharmony_ci#define EEPROM_MAC_FUNCTION		0x08 /* SE Test mode.8 */
59762306a36Sopenharmony_ci
59862306a36Sopenharmony_ci#define EEPROM_VID			0x28 /* SE Vendor ID.A-B */
59962306a36Sopenharmony_ci#define EEPROM_DID			0x2A /* SE Device ID. C-D */
60062306a36Sopenharmony_ci#define EEPROM_SVID			0x2C /* SE Vendor ID.E-F */
60162306a36Sopenharmony_ci#define EEPROM_SMID			0x2E /* SE PCI Subsystem ID. 10-11 */
60262306a36Sopenharmony_ci
60362306a36Sopenharmony_ci#define EEPROM_MAC_ADDR			0x16 /* SEMAC Address. 12-17 */
60462306a36Sopenharmony_ci#define EEPROM_MAC_ADDR_MAC0_92D	0x55
60562306a36Sopenharmony_ci#define EEPROM_MAC_ADDR_MAC1_92D	0x5B
60662306a36Sopenharmony_ci
60762306a36Sopenharmony_ci/* 2.4G band Tx power index setting */
60862306a36Sopenharmony_ci#define EEPROM_CCK_TX_PWR_INX_2G	0x61
60962306a36Sopenharmony_ci#define EEPROM_HT40_1S_TX_PWR_INX_2G	0x67
61062306a36Sopenharmony_ci#define EEPROM_HT40_2S_TX_PWR_INX_DIFF_2G	0x6D
61162306a36Sopenharmony_ci#define EEPROM_HT20_TX_PWR_INX_DIFF_2G		0x70
61262306a36Sopenharmony_ci#define EEPROM_OFDM_TX_PWR_INX_DIFF_2G		0x73
61362306a36Sopenharmony_ci#define EEPROM_HT40_MAX_PWR_OFFSET_2G		0x76
61462306a36Sopenharmony_ci#define EEPROM_HT20_MAX_PWR_OFFSET_2G		0x79
61562306a36Sopenharmony_ci
61662306a36Sopenharmony_ci/*5GL channel 32-64 */
61762306a36Sopenharmony_ci#define EEPROM_HT40_1S_TX_PWR_INX_5GL		0x7C
61862306a36Sopenharmony_ci#define EEPROM_HT40_2S_TX_PWR_INX_DIFF_5GL	0x82
61962306a36Sopenharmony_ci#define EEPROM_HT20_TX_PWR_INX_DIFF_5GL		0x85
62062306a36Sopenharmony_ci#define EEPROM_OFDM_TX_PWR_INX_DIFF_5GL		0x88
62162306a36Sopenharmony_ci#define EEPROM_HT40_MAX_PWR_OFFSET_5GL		0x8B
62262306a36Sopenharmony_ci#define EEPROM_HT20_MAX_PWR_OFFSET_5GL		0x8E
62362306a36Sopenharmony_ci
62462306a36Sopenharmony_ci/* 5GM channel 100-140 */
62562306a36Sopenharmony_ci#define EEPROM_HT40_1S_TX_PWR_INX_5GM		0x91
62662306a36Sopenharmony_ci#define EEPROM_HT40_2S_TX_PWR_INX_DIFF_5GM	0x97
62762306a36Sopenharmony_ci#define EEPROM_HT20_TX_PWR_INX_DIFF_5GM		0x9A
62862306a36Sopenharmony_ci#define EEPROM_OFDM_TX_PWR_INX_DIFF_5GM		0x9D
62962306a36Sopenharmony_ci#define EEPROM_HT40_MAX_PWR_OFFSET_5GM		0xA0
63062306a36Sopenharmony_ci#define EEPROM_HT20_MAX_PWR_OFFSET_5GM		0xA3
63162306a36Sopenharmony_ci
63262306a36Sopenharmony_ci/* 5GH channel 149-165 */
63362306a36Sopenharmony_ci#define EEPROM_HT40_1S_TX_PWR_INX_5GH		0xA6
63462306a36Sopenharmony_ci#define EEPROM_HT40_2S_TX_PWR_INX_DIFF_5GH	0xAC
63562306a36Sopenharmony_ci#define EEPROM_HT20_TX_PWR_INX_DIFF_5GH		0xAF
63662306a36Sopenharmony_ci#define EEPROM_OFDM_TX_PWR_INX_DIFF_5GH		0xB2
63762306a36Sopenharmony_ci#define EEPROM_HT40_MAX_PWR_OFFSET_5GH		0xB5
63862306a36Sopenharmony_ci#define EEPROM_HT20_MAX_PWR_OFFSET_5GH		0xB8
63962306a36Sopenharmony_ci
64062306a36Sopenharmony_ci/* Map of supported channels. */
64162306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN			0xBB
64262306a36Sopenharmony_ci#define EEPROM_IQK_DELTA			0xBC
64362306a36Sopenharmony_ci#define EEPROM_LCK_DELTA			0xBC
64462306a36Sopenharmony_ci#define EEPROM_XTAL_K				0xBD	/* [7:5] */
64562306a36Sopenharmony_ci#define EEPROM_TSSI_A_5G			0xBE
64662306a36Sopenharmony_ci#define EEPROM_TSSI_B_5G			0xBF
64762306a36Sopenharmony_ci#define EEPROM_TSSI_AB_5G			0xC0
64862306a36Sopenharmony_ci#define EEPROM_THERMAL_METER			0xC3	/* [4:0] */
64962306a36Sopenharmony_ci#define EEPROM_RF_OPT1				0xC4
65062306a36Sopenharmony_ci#define EEPROM_RF_OPT2				0xC5
65162306a36Sopenharmony_ci#define EEPROM_RF_OPT3				0xC6
65262306a36Sopenharmony_ci#define EEPROM_RF_OPT4				0xC7
65362306a36Sopenharmony_ci#define EEPROM_RF_OPT5				0xC8
65462306a36Sopenharmony_ci#define EEPROM_RF_OPT6				0xC9
65562306a36Sopenharmony_ci#define EEPROM_VERSION				0xCA
65662306a36Sopenharmony_ci#define EEPROM_CUSTOMER_ID			0xCB
65762306a36Sopenharmony_ci#define EEPROM_RF_OPT7				0xCC
65862306a36Sopenharmony_ci
65962306a36Sopenharmony_ci#define EEPROM_DEF_PART_NO			0x3FD    /* Byte */
66062306a36Sopenharmony_ci#define EEPROME_CHIP_VERSION_L			0x3FF
66162306a36Sopenharmony_ci#define EEPROME_CHIP_VERSION_H			0x3FE
66262306a36Sopenharmony_ci
66362306a36Sopenharmony_ci/*
66462306a36Sopenharmony_ci * Current IOREG MAP
66562306a36Sopenharmony_ci * 0x0000h ~ 0x00FFh   System Configuration (256 Bytes)
66662306a36Sopenharmony_ci * 0x0100h ~ 0x01FFh   MACTOP General Configuration (256 Bytes)
66762306a36Sopenharmony_ci * 0x0200h ~ 0x027Fh   TXDMA Configuration (128 Bytes)
66862306a36Sopenharmony_ci * 0x0280h ~ 0x02FFh   RXDMA Configuration (128 Bytes)
66962306a36Sopenharmony_ci * 0x0300h ~ 0x03FFh   PCIE EMAC Reserved Region (256 Bytes)
67062306a36Sopenharmony_ci * 0x0400h ~ 0x04FFh   Protocol Configuration (256 Bytes)
67162306a36Sopenharmony_ci * 0x0500h ~ 0x05FFh   EDCA Configuration (256 Bytes)
67262306a36Sopenharmony_ci * 0x0600h ~ 0x07FFh   WMAC Configuration (512 Bytes)
67362306a36Sopenharmony_ci * 0x2000h ~ 0x3FFFh   8051 FW Download Region (8196 Bytes)
67462306a36Sopenharmony_ci */
67562306a36Sopenharmony_ci
67662306a36Sopenharmony_ci/* ----------------------------------------------------- */
67762306a36Sopenharmony_ci/* 8192C (RCR)	(Offset 0x608, 32 bits) */
67862306a36Sopenharmony_ci/* ----------------------------------------------------- */
67962306a36Sopenharmony_ci#define	RCR_APPFCS				BIT(31)
68062306a36Sopenharmony_ci#define	RCR_APP_MIC				BIT(30)
68162306a36Sopenharmony_ci#define	RCR_APP_ICV				BIT(29)
68262306a36Sopenharmony_ci#define	RCR_APP_PHYST_RXFF			BIT(28)
68362306a36Sopenharmony_ci#define	RCR_APP_BA_SSN				BIT(27)
68462306a36Sopenharmony_ci#define	RCR_ENMBID				BIT(24)
68562306a36Sopenharmony_ci#define	RCR_LSIGEN				BIT(23)
68662306a36Sopenharmony_ci#define	RCR_MFBEN				BIT(22)
68762306a36Sopenharmony_ci#define	RCR_HTC_LOC_CTRL			BIT(14)
68862306a36Sopenharmony_ci#define	RCR_AMF					BIT(13)
68962306a36Sopenharmony_ci#define	RCR_ACF					BIT(12)
69062306a36Sopenharmony_ci#define	RCR_ADF					BIT(11)
69162306a36Sopenharmony_ci#define	RCR_AICV				BIT(9)
69262306a36Sopenharmony_ci#define	RCR_ACRC32				BIT(8)
69362306a36Sopenharmony_ci#define	RCR_CBSSID_BCN				BIT(7)
69462306a36Sopenharmony_ci#define	RCR_CBSSID_DATA				BIT(6)
69562306a36Sopenharmony_ci#define	RCR_APWRMGT				BIT(5)
69662306a36Sopenharmony_ci#define	RCR_ADD3				BIT(4)
69762306a36Sopenharmony_ci#define	RCR_AB					BIT(3)
69862306a36Sopenharmony_ci#define	RCR_AM					BIT(2)
69962306a36Sopenharmony_ci#define	RCR_APM					BIT(1)
70062306a36Sopenharmony_ci#define	RCR_AAP					BIT(0)
70162306a36Sopenharmony_ci#define	RCR_MXDMA_OFFSET			8
70262306a36Sopenharmony_ci#define	RCR_FIFO_OFFSET				13
70362306a36Sopenharmony_ci
70462306a36Sopenharmony_ci/* ----------------------------------------------------- */
70562306a36Sopenharmony_ci/*       8192C Regsiter Bit and Content definition	 */
70662306a36Sopenharmony_ci/* ----------------------------------------------------- */
70762306a36Sopenharmony_ci/* ----------------------------------------------------- */
70862306a36Sopenharmony_ci/*	0x0000h ~ 0x00FFh	System Configuration */
70962306a36Sopenharmony_ci/* ----------------------------------------------------- */
71062306a36Sopenharmony_ci
71162306a36Sopenharmony_ci/* SPS0_CTRL */
71262306a36Sopenharmony_ci#define SW18_FPWM				BIT(3)
71362306a36Sopenharmony_ci
71462306a36Sopenharmony_ci
71562306a36Sopenharmony_ci/* SYS_ISO_CTRL */
71662306a36Sopenharmony_ci#define ISO_MD2PP				BIT(0)
71762306a36Sopenharmony_ci#define ISO_UA2USB				BIT(1)
71862306a36Sopenharmony_ci#define ISO_UD2CORE				BIT(2)
71962306a36Sopenharmony_ci#define ISO_PA2PCIE				BIT(3)
72062306a36Sopenharmony_ci#define ISO_PD2CORE				BIT(4)
72162306a36Sopenharmony_ci#define ISO_IP2MAC				BIT(5)
72262306a36Sopenharmony_ci#define ISO_DIOP				BIT(6)
72362306a36Sopenharmony_ci#define ISO_DIOE				BIT(7)
72462306a36Sopenharmony_ci#define ISO_EB2CORE				BIT(8)
72562306a36Sopenharmony_ci#define ISO_DIOR				BIT(9)
72662306a36Sopenharmony_ci
72762306a36Sopenharmony_ci#define PWC_EV25V				BIT(14)
72862306a36Sopenharmony_ci#define PWC_EV12V				BIT(15)
72962306a36Sopenharmony_ci
73062306a36Sopenharmony_ci
73162306a36Sopenharmony_ci/* SYS_FUNC_EN */
73262306a36Sopenharmony_ci#define FEN_BBRSTB				BIT(0)
73362306a36Sopenharmony_ci#define FEN_BB_GLB_RSTN				BIT(1)
73462306a36Sopenharmony_ci#define FEN_USBA				BIT(2)
73562306a36Sopenharmony_ci#define FEN_UPLL				BIT(3)
73662306a36Sopenharmony_ci#define FEN_USBD				BIT(4)
73762306a36Sopenharmony_ci#define FEN_DIO_PCIE				BIT(5)
73862306a36Sopenharmony_ci#define FEN_PCIEA				BIT(6)
73962306a36Sopenharmony_ci#define FEN_PPLL				BIT(7)
74062306a36Sopenharmony_ci#define FEN_PCIED				BIT(8)
74162306a36Sopenharmony_ci#define FEN_DIOE				BIT(9)
74262306a36Sopenharmony_ci#define FEN_CPUEN				BIT(10)
74362306a36Sopenharmony_ci#define FEN_DCORE				BIT(11)
74462306a36Sopenharmony_ci#define FEN_ELDR				BIT(12)
74562306a36Sopenharmony_ci#define FEN_DIO_RF				BIT(13)
74662306a36Sopenharmony_ci#define FEN_HWPDN				BIT(14)
74762306a36Sopenharmony_ci#define FEN_MREGEN				BIT(15)
74862306a36Sopenharmony_ci
74962306a36Sopenharmony_ci/* APS_FSMCO */
75062306a36Sopenharmony_ci#define PFM_LDALL				BIT(0)
75162306a36Sopenharmony_ci#define PFM_ALDN				BIT(1)
75262306a36Sopenharmony_ci#define PFM_LDKP				BIT(2)
75362306a36Sopenharmony_ci#define PFM_WOWL				BIT(3)
75462306a36Sopenharmony_ci#define ENPDN					BIT(4)
75562306a36Sopenharmony_ci#define PDN_PL					BIT(5)
75662306a36Sopenharmony_ci#define APFM_ONMAC				BIT(8)
75762306a36Sopenharmony_ci#define APFM_OFF				BIT(9)
75862306a36Sopenharmony_ci#define APFM_RSM				BIT(10)
75962306a36Sopenharmony_ci#define AFSM_HSUS				BIT(11)
76062306a36Sopenharmony_ci#define AFSM_PCIE				BIT(12)
76162306a36Sopenharmony_ci#define APDM_MAC				BIT(13)
76262306a36Sopenharmony_ci#define APDM_HOST				BIT(14)
76362306a36Sopenharmony_ci#define APDM_HPDN				BIT(15)
76462306a36Sopenharmony_ci#define RDY_MACON				BIT(16)
76562306a36Sopenharmony_ci#define SUS_HOST				BIT(17)
76662306a36Sopenharmony_ci#define ROP_ALD					BIT(20)
76762306a36Sopenharmony_ci#define ROP_PWR					BIT(21)
76862306a36Sopenharmony_ci#define ROP_SPS					BIT(22)
76962306a36Sopenharmony_ci#define SOP_MRST				BIT(25)
77062306a36Sopenharmony_ci#define SOP_FUSE				BIT(26)
77162306a36Sopenharmony_ci#define SOP_ABG					BIT(27)
77262306a36Sopenharmony_ci#define SOP_AMB					BIT(28)
77362306a36Sopenharmony_ci#define SOP_RCK					BIT(29)
77462306a36Sopenharmony_ci#define SOP_A8M					BIT(30)
77562306a36Sopenharmony_ci#define XOP_BTCK				BIT(31)
77662306a36Sopenharmony_ci
77762306a36Sopenharmony_ci/* SYS_CLKR */
77862306a36Sopenharmony_ci#define ANAD16V_EN				BIT(0)
77962306a36Sopenharmony_ci#define ANA8M					BIT(1)
78062306a36Sopenharmony_ci#define MACSLP					BIT(4)
78162306a36Sopenharmony_ci#define LOADER_CLK_EN				BIT(5)
78262306a36Sopenharmony_ci#define _80M_SSC_DIS				BIT(7)
78362306a36Sopenharmony_ci#define _80M_SSC_EN_HO				BIT(8)
78462306a36Sopenharmony_ci#define PHY_SSC_RSTB				BIT(9)
78562306a36Sopenharmony_ci#define SEC_CLK_EN				BIT(10)
78662306a36Sopenharmony_ci#define MAC_CLK_EN				BIT(11)
78762306a36Sopenharmony_ci#define SYS_CLK_EN				BIT(12)
78862306a36Sopenharmony_ci#define RING_CLK_EN				BIT(13)
78962306a36Sopenharmony_ci
79062306a36Sopenharmony_ci
79162306a36Sopenharmony_ci/* 9346CR */
79262306a36Sopenharmony_ci#define	BOOT_FROM_EEPROM			BIT(4)
79362306a36Sopenharmony_ci#define	EEPROM_EN				BIT(5)
79462306a36Sopenharmony_ci
79562306a36Sopenharmony_ci/* AFE_MISC */
79662306a36Sopenharmony_ci#define AFE_BGEN				BIT(0)
79762306a36Sopenharmony_ci#define AFE_MBEN				BIT(1)
79862306a36Sopenharmony_ci#define MAC_ID_EN				BIT(7)
79962306a36Sopenharmony_ci
80062306a36Sopenharmony_ci/* RSV_CTRL */
80162306a36Sopenharmony_ci#define WLOCK_ALL				BIT(0)
80262306a36Sopenharmony_ci#define WLOCK_00				BIT(1)
80362306a36Sopenharmony_ci#define WLOCK_04				BIT(2)
80462306a36Sopenharmony_ci#define WLOCK_08				BIT(3)
80562306a36Sopenharmony_ci#define WLOCK_40				BIT(4)
80662306a36Sopenharmony_ci#define R_DIS_PRST_0				BIT(5)
80762306a36Sopenharmony_ci#define R_DIS_PRST_1				BIT(6)
80862306a36Sopenharmony_ci#define LOCK_ALL_EN				BIT(7)
80962306a36Sopenharmony_ci
81062306a36Sopenharmony_ci/* RF_CTRL */
81162306a36Sopenharmony_ci#define RF_EN					BIT(0)
81262306a36Sopenharmony_ci#define RF_RSTB					BIT(1)
81362306a36Sopenharmony_ci#define RF_SDMRSTB				BIT(2)
81462306a36Sopenharmony_ci
81562306a36Sopenharmony_ci
81662306a36Sopenharmony_ci
81762306a36Sopenharmony_ci/* LDOA15_CTRL */
81862306a36Sopenharmony_ci#define LDA15_EN				BIT(0)
81962306a36Sopenharmony_ci#define LDA15_STBY				BIT(1)
82062306a36Sopenharmony_ci#define LDA15_OBUF				BIT(2)
82162306a36Sopenharmony_ci#define LDA15_REG_VOS				BIT(3)
82262306a36Sopenharmony_ci#define _LDA15_VOADJ(x)				(((x) & 0x7) << 4)
82362306a36Sopenharmony_ci
82462306a36Sopenharmony_ci
82562306a36Sopenharmony_ci
82662306a36Sopenharmony_ci/* LDOV12D_CTRL */
82762306a36Sopenharmony_ci#define LDV12_EN				BIT(0)
82862306a36Sopenharmony_ci#define LDV12_SDBY				BIT(1)
82962306a36Sopenharmony_ci#define LPLDO_HSM				BIT(2)
83062306a36Sopenharmony_ci#define LPLDO_LSM_DIS				BIT(3)
83162306a36Sopenharmony_ci#define _LDV12_VADJ(x)				(((x) & 0xF) << 4)
83262306a36Sopenharmony_ci
83362306a36Sopenharmony_ci
83462306a36Sopenharmony_ci/* AFE_XTAL_CTRL */
83562306a36Sopenharmony_ci#define XTAL_EN					BIT(0)
83662306a36Sopenharmony_ci#define XTAL_BSEL				BIT(1)
83762306a36Sopenharmony_ci#define _XTAL_BOSC(x)				(((x) & 0x3) << 2)
83862306a36Sopenharmony_ci#define _XTAL_CADJ(x)				(((x) & 0xF) << 4)
83962306a36Sopenharmony_ci#define XTAL_GATE_USB				BIT(8)
84062306a36Sopenharmony_ci#define _XTAL_USB_DRV(x)			(((x) & 0x3) << 9)
84162306a36Sopenharmony_ci#define XTAL_GATE_AFE				BIT(11)
84262306a36Sopenharmony_ci#define _XTAL_AFE_DRV(x)			(((x) & 0x3) << 12)
84362306a36Sopenharmony_ci#define XTAL_RF_GATE				BIT(14)
84462306a36Sopenharmony_ci#define _XTAL_RF_DRV(x)				(((x) & 0x3) << 15)
84562306a36Sopenharmony_ci#define XTAL_GATE_DIG				BIT(17)
84662306a36Sopenharmony_ci#define _XTAL_DIG_DRV(x)			(((x) & 0x3) << 18)
84762306a36Sopenharmony_ci#define XTAL_BT_GATE				BIT(20)
84862306a36Sopenharmony_ci#define _XTAL_BT_DRV(x)				(((x) & 0x3) << 21)
84962306a36Sopenharmony_ci#define _XTAL_GPIO(x)				(((x) & 0x7) << 23)
85062306a36Sopenharmony_ci
85162306a36Sopenharmony_ci
85262306a36Sopenharmony_ci#define CKDLY_AFE				BIT(26)
85362306a36Sopenharmony_ci#define CKDLY_USB				BIT(27)
85462306a36Sopenharmony_ci#define CKDLY_DIG				BIT(28)
85562306a36Sopenharmony_ci#define CKDLY_BT				BIT(29)
85662306a36Sopenharmony_ci
85762306a36Sopenharmony_ci
85862306a36Sopenharmony_ci/* AFE_PLL_CTRL */
85962306a36Sopenharmony_ci#define APLL_EN					BIT(0)
86062306a36Sopenharmony_ci#define APLL_320_EN				BIT(1)
86162306a36Sopenharmony_ci#define APLL_FREF_SEL				BIT(2)
86262306a36Sopenharmony_ci#define APLL_EDGE_SEL				BIT(3)
86362306a36Sopenharmony_ci#define APLL_WDOGB				BIT(4)
86462306a36Sopenharmony_ci#define APLL_LPFEN				BIT(5)
86562306a36Sopenharmony_ci
86662306a36Sopenharmony_ci#define APLL_REF_CLK_13MHZ			0x1
86762306a36Sopenharmony_ci#define APLL_REF_CLK_19_2MHZ			0x2
86862306a36Sopenharmony_ci#define APLL_REF_CLK_20MHZ			0x3
86962306a36Sopenharmony_ci#define APLL_REF_CLK_25MHZ			0x4
87062306a36Sopenharmony_ci#define APLL_REF_CLK_26MHZ			0x5
87162306a36Sopenharmony_ci#define APLL_REF_CLK_38_4MHZ			0x6
87262306a36Sopenharmony_ci#define APLL_REF_CLK_40MHZ			0x7
87362306a36Sopenharmony_ci
87462306a36Sopenharmony_ci#define APLL_320EN				BIT(14)
87562306a36Sopenharmony_ci#define APLL_80EN				BIT(15)
87662306a36Sopenharmony_ci#define APLL_1MEN				BIT(24)
87762306a36Sopenharmony_ci
87862306a36Sopenharmony_ci
87962306a36Sopenharmony_ci/* EFUSE_CTRL */
88062306a36Sopenharmony_ci#define ALD_EN					BIT(18)
88162306a36Sopenharmony_ci#define EF_PD					BIT(19)
88262306a36Sopenharmony_ci#define EF_FLAG					BIT(31)
88362306a36Sopenharmony_ci
88462306a36Sopenharmony_ci/* EFUSE_TEST  */
88562306a36Sopenharmony_ci#define EF_TRPT					BIT(7)
88662306a36Sopenharmony_ci#define LDOE25_EN				BIT(31)
88762306a36Sopenharmony_ci
88862306a36Sopenharmony_ci/* MCUFWDL  */
88962306a36Sopenharmony_ci#define MCUFWDL_EN				BIT(0)
89062306a36Sopenharmony_ci#define MCUFWDL_RDY				BIT(1)
89162306a36Sopenharmony_ci#define FWDL_CHKSUM_RPT				BIT(2)
89262306a36Sopenharmony_ci#define MACINI_RDY				BIT(3)
89362306a36Sopenharmony_ci#define BBINI_RDY				BIT(4)
89462306a36Sopenharmony_ci#define RFINI_RDY				BIT(5)
89562306a36Sopenharmony_ci#define WINTINI_RDY				BIT(6)
89662306a36Sopenharmony_ci#define MAC1_WINTINI_RDY			BIT(11)
89762306a36Sopenharmony_ci#define CPRST					BIT(23)
89862306a36Sopenharmony_ci
89962306a36Sopenharmony_ci/*  REG_SYS_CFG */
90062306a36Sopenharmony_ci#define XCLK_VLD				BIT(0)
90162306a36Sopenharmony_ci#define ACLK_VLD				BIT(1)
90262306a36Sopenharmony_ci#define UCLK_VLD				BIT(2)
90362306a36Sopenharmony_ci#define PCLK_VLD				BIT(3)
90462306a36Sopenharmony_ci#define PCIRSTB					BIT(4)
90562306a36Sopenharmony_ci#define V15_VLD					BIT(5)
90662306a36Sopenharmony_ci#define TRP_B15V_EN				BIT(7)
90762306a36Sopenharmony_ci#define SIC_IDLE				BIT(8)
90862306a36Sopenharmony_ci#define BD_MAC2					BIT(9)
90962306a36Sopenharmony_ci#define BD_MAC1					BIT(10)
91062306a36Sopenharmony_ci#define IC_MACPHY_MODE				BIT(11)
91162306a36Sopenharmony_ci#define PAD_HWPD_IDN				BIT(22)
91262306a36Sopenharmony_ci#define TRP_VAUX_EN				BIT(23)
91362306a36Sopenharmony_ci#define TRP_BT_EN				BIT(24)
91462306a36Sopenharmony_ci#define BD_PKG_SEL				BIT(25)
91562306a36Sopenharmony_ci#define BD_HCI_SEL				BIT(26)
91662306a36Sopenharmony_ci#define TYPE_ID					BIT(27)
91762306a36Sopenharmony_ci
91862306a36Sopenharmony_ci/* LLT_INIT */
91962306a36Sopenharmony_ci#define _LLT_NO_ACTIVE				0x0
92062306a36Sopenharmony_ci#define _LLT_WRITE_ACCESS			0x1
92162306a36Sopenharmony_ci#define _LLT_READ_ACCESS			0x2
92262306a36Sopenharmony_ci
92362306a36Sopenharmony_ci#define _LLT_INIT_DATA(x)			((x) & 0xFF)
92462306a36Sopenharmony_ci#define _LLT_INIT_ADDR(x)			(((x) & 0xFF) << 8)
92562306a36Sopenharmony_ci#define _LLT_OP(x)				(((x) & 0x3) << 30)
92662306a36Sopenharmony_ci#define _LLT_OP_VALUE(x)			(((x) >> 30) & 0x3)
92762306a36Sopenharmony_ci
92862306a36Sopenharmony_ci
92962306a36Sopenharmony_ci/* ----------------------------------------------------- */
93062306a36Sopenharmony_ci/*	0x0400h ~ 0x047Fh	Protocol Configuration	 */
93162306a36Sopenharmony_ci/* ----------------------------------------------------- */
93262306a36Sopenharmony_ci#define	RETRY_LIMIT_SHORT_SHIFT			8
93362306a36Sopenharmony_ci#define	RETRY_LIMIT_LONG_SHIFT			0
93462306a36Sopenharmony_ci
93562306a36Sopenharmony_ci
93662306a36Sopenharmony_ci/* ----------------------------------------------------- */
93762306a36Sopenharmony_ci/*	0x0500h ~ 0x05FFh	EDCA Configuration */
93862306a36Sopenharmony_ci/* ----------------------------------------------------- */
93962306a36Sopenharmony_ci/* EDCA setting */
94062306a36Sopenharmony_ci#define AC_PARAM_TXOP_LIMIT_OFFSET		16
94162306a36Sopenharmony_ci#define AC_PARAM_ECW_MAX_OFFSET			12
94262306a36Sopenharmony_ci#define AC_PARAM_ECW_MIN_OFFSET			8
94362306a36Sopenharmony_ci#define AC_PARAM_AIFS_OFFSET			0
94462306a36Sopenharmony_ci
94562306a36Sopenharmony_ci/* ACMHWCTRL */
94662306a36Sopenharmony_ci#define	ACMHW_HWEN				BIT(0)
94762306a36Sopenharmony_ci#define	ACMHW_BEQEN				BIT(1)
94862306a36Sopenharmony_ci#define	ACMHW_VIQEN				BIT(2)
94962306a36Sopenharmony_ci#define	ACMHW_VOQEN				BIT(3)
95062306a36Sopenharmony_ci
95162306a36Sopenharmony_ci/* ----------------------------------------------------- */
95262306a36Sopenharmony_ci/*	0x0600h ~ 0x07FFh	WMAC Configuration */
95362306a36Sopenharmony_ci/* ----------------------------------------------------- */
95462306a36Sopenharmony_ci
95562306a36Sopenharmony_ci/* TCR */
95662306a36Sopenharmony_ci#define TSFRST					BIT(0)
95762306a36Sopenharmony_ci#define DIS_GCLK				BIT(1)
95862306a36Sopenharmony_ci#define PAD_SEL					BIT(2)
95962306a36Sopenharmony_ci#define PWR_ST					BIT(6)
96062306a36Sopenharmony_ci#define PWRBIT_OW_EN				BIT(7)
96162306a36Sopenharmony_ci#define ACRC					BIT(8)
96262306a36Sopenharmony_ci#define CFENDFORM				BIT(9)
96362306a36Sopenharmony_ci#define ICV					BIT(10)
96462306a36Sopenharmony_ci
96562306a36Sopenharmony_ci/* SECCFG */
96662306a36Sopenharmony_ci#define	SCR_TXUSEDK				BIT(0)
96762306a36Sopenharmony_ci#define	SCR_RXUSEDK				BIT(1)
96862306a36Sopenharmony_ci#define	SCR_TXENCENABLE				BIT(2)
96962306a36Sopenharmony_ci#define	SCR_RXENCENABLE				BIT(3)
97062306a36Sopenharmony_ci#define	SCR_SKBYA2				BIT(4)
97162306a36Sopenharmony_ci#define	SCR_NOSKMC				BIT(5)
97262306a36Sopenharmony_ci#define SCR_TXBCUSEDK				BIT(6)
97362306a36Sopenharmony_ci#define SCR_RXBCUSEDK				BIT(7)
97462306a36Sopenharmony_ci
97562306a36Sopenharmony_ci/* General definitions */
97662306a36Sopenharmony_ci#define LAST_ENTRY_OF_TX_PKT_BUFFER		255
97762306a36Sopenharmony_ci#define LAST_ENTRY_OF_TX_PKT_BUFFER_DUAL_MAC	127
97862306a36Sopenharmony_ci
97962306a36Sopenharmony_ci#define POLLING_LLT_THRESHOLD			20
98062306a36Sopenharmony_ci#define POLLING_READY_TIMEOUT_COUNT		1000
98162306a36Sopenharmony_ci
98262306a36Sopenharmony_ci/* Min Spacing related settings. */
98362306a36Sopenharmony_ci#define	MAX_MSS_DENSITY_2T			0x13
98462306a36Sopenharmony_ci#define	MAX_MSS_DENSITY_1T			0x0A
98562306a36Sopenharmony_ci
98662306a36Sopenharmony_ci
98762306a36Sopenharmony_ci/* BB-PHY register PMAC 0x100 PHY 0x800 - 0xEFF */
98862306a36Sopenharmony_ci/* 1. PMAC duplicate register due to connection: */
98962306a36Sopenharmony_ci/*    RF_Mode, TRxRN, NumOf L-STF */
99062306a36Sopenharmony_ci/* 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00 */
99162306a36Sopenharmony_ci/* 3. RF register 0x00-2E */
99262306a36Sopenharmony_ci/* 4. Bit Mask for BB/RF register */
99362306a36Sopenharmony_ci/* 5. Other defintion for BB/RF R/W */
99462306a36Sopenharmony_ci
99562306a36Sopenharmony_ci/* 3. Page8(0x800) */
99662306a36Sopenharmony_ci#define	RFPGA0_RFMOD				0x800
99762306a36Sopenharmony_ci
99862306a36Sopenharmony_ci#define	RFPGA0_TXINFO				0x804
99962306a36Sopenharmony_ci#define	RFPGA0_PSDFUNCTION			0x808
100062306a36Sopenharmony_ci
100162306a36Sopenharmony_ci#define	RFPGA0_TXGAINSTAGE			0x80c
100262306a36Sopenharmony_ci
100362306a36Sopenharmony_ci#define	RFPGA0_RFTIMING1			0x810
100462306a36Sopenharmony_ci#define	RFPGA0_RFTIMING2			0x814
100562306a36Sopenharmony_ci
100662306a36Sopenharmony_ci#define	RFPGA0_XA_HSSIPARAMETER1		0x820
100762306a36Sopenharmony_ci#define	RFPGA0_XA_HSSIPARAMETER2		0x824
100862306a36Sopenharmony_ci#define	RFPGA0_XB_HSSIPARAMETER1		0x828
100962306a36Sopenharmony_ci#define	RFPGA0_XB_HSSIPARAMETER2		0x82c
101062306a36Sopenharmony_ci
101162306a36Sopenharmony_ci#define	RFPGA0_XA_LSSIPARAMETER			0x840
101262306a36Sopenharmony_ci#define	RFPGA0_XB_LSSIPARAMETER			0x844
101362306a36Sopenharmony_ci
101462306a36Sopenharmony_ci#define	RFPGA0_RFWAKEUPPARAMETER		0x850
101562306a36Sopenharmony_ci#define	RFPGA0_RFSLEEPUPPARAMETER		0x854
101662306a36Sopenharmony_ci
101762306a36Sopenharmony_ci#define	RFPGA0_XAB_SWITCHCONTROL		0x858
101862306a36Sopenharmony_ci#define	RFPGA0_XCD_SWITCHCONTROL		0x85c
101962306a36Sopenharmony_ci
102062306a36Sopenharmony_ci#define	RFPGA0_XA_RFINTERFACEOE			0x860
102162306a36Sopenharmony_ci#define	RFPGA0_XB_RFINTERFACEOE			0x864
102262306a36Sopenharmony_ci
102362306a36Sopenharmony_ci#define	RFPGA0_XAB_RFINTERFACESW		0x870
102462306a36Sopenharmony_ci#define	RFPGA0_XCD_RFINTERFACESW		0x874
102562306a36Sopenharmony_ci
102662306a36Sopenharmony_ci#define	RFPGA0_XAB_RFPARAMETER			0x878
102762306a36Sopenharmony_ci#define	RFPGA0_XCD_RFPARAMETER			0x87c
102862306a36Sopenharmony_ci
102962306a36Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER1			0x880
103062306a36Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER2			0x884
103162306a36Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER3			0x888
103262306a36Sopenharmony_ci#define	RFPGA0_ADDALLOCKEN			0x888
103362306a36Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER4			0x88c
103462306a36Sopenharmony_ci
103562306a36Sopenharmony_ci#define	RFPGA0_XA_LSSIREADBACK			0x8a0
103662306a36Sopenharmony_ci#define	RFPGA0_XB_LSSIREADBACK			0x8a4
103762306a36Sopenharmony_ci#define	RFPGA0_XC_LSSIREADBACK			0x8a8
103862306a36Sopenharmony_ci#define	RFPGA0_XD_LSSIREADBACK			0x8ac
103962306a36Sopenharmony_ci
104062306a36Sopenharmony_ci#define	RFPGA0_PSDREPORT			0x8b4
104162306a36Sopenharmony_ci#define	TRANSCEIVERA_HSPI_READBACK		0x8b8
104262306a36Sopenharmony_ci#define	TRANSCEIVERB_HSPI_READBACK		0x8bc
104362306a36Sopenharmony_ci#define	RFPGA0_XAB_RFINTERFACERB		0x8e0
104462306a36Sopenharmony_ci#define	RFPGA0_XCD_RFINTERFACERB		0x8e4
104562306a36Sopenharmony_ci
104662306a36Sopenharmony_ci/* 4. Page9(0x900) */
104762306a36Sopenharmony_ci#define	RFPGA1_RFMOD				0x900
104862306a36Sopenharmony_ci
104962306a36Sopenharmony_ci#define	RFPGA1_TXBLOCK				0x904
105062306a36Sopenharmony_ci#define	RFPGA1_DEBUGSELECT			0x908
105162306a36Sopenharmony_ci#define	RFPGA1_TXINFO				0x90c
105262306a36Sopenharmony_ci
105362306a36Sopenharmony_ci/* 5. PageA(0xA00)  */
105462306a36Sopenharmony_ci#define	RCCK0_SYSTEM				0xa00
105562306a36Sopenharmony_ci
105662306a36Sopenharmony_ci#define	RCCK0_AFESSTTING			0xa04
105762306a36Sopenharmony_ci#define	RCCK0_CCA				0xa08
105862306a36Sopenharmony_ci
105962306a36Sopenharmony_ci#define	RCCK0_RXAGC1				0xa0c
106062306a36Sopenharmony_ci#define	RCCK0_RXAGC2				0xa10
106162306a36Sopenharmony_ci
106262306a36Sopenharmony_ci#define	RCCK0_RXHP				0xa14
106362306a36Sopenharmony_ci
106462306a36Sopenharmony_ci#define	RCCK0_DSPPARAMETER1			0xa18
106562306a36Sopenharmony_ci#define	RCCK0_DSPPARAMETER2			0xa1c
106662306a36Sopenharmony_ci
106762306a36Sopenharmony_ci#define	RCCK0_TXFILTER1				0xa20
106862306a36Sopenharmony_ci#define	RCCK0_TXFILTER2				0xa24
106962306a36Sopenharmony_ci#define	RCCK0_DEBUGPORT				0xa28
107062306a36Sopenharmony_ci#define	RCCK0_FALSEALARMREPORT			0xa2c
107162306a36Sopenharmony_ci#define	RCCK0_TRSSIREPORT			0xa50
107262306a36Sopenharmony_ci#define	RCCK0_RXREPORT				0xa54
107362306a36Sopenharmony_ci#define	RCCK0_FACOUNTERLOWER			0xa5c
107462306a36Sopenharmony_ci#define	RCCK0_FACOUNTERUPPER			0xa58
107562306a36Sopenharmony_ci
107662306a36Sopenharmony_ci/* 6. PageC(0xC00) */
107762306a36Sopenharmony_ci#define	ROFDM0_LSTF				0xc00
107862306a36Sopenharmony_ci
107962306a36Sopenharmony_ci#define	ROFDM0_TRXPATHENABLE			0xc04
108062306a36Sopenharmony_ci#define	ROFDM0_TRMUXPAR				0xc08
108162306a36Sopenharmony_ci#define	ROFDM0_TRSWISOLATION			0xc0c
108262306a36Sopenharmony_ci
108362306a36Sopenharmony_ci#define	ROFDM0_XARXAFE				0xc10
108462306a36Sopenharmony_ci#define	ROFDM0_XARXIQIMBALANCE			0xc14
108562306a36Sopenharmony_ci#define	ROFDM0_XBRXAFE				0xc18
108662306a36Sopenharmony_ci#define	ROFDM0_XBRXIQIMBALANCE			0xc1c
108762306a36Sopenharmony_ci#define	ROFDM0_XCRXAFE				0xc20
108862306a36Sopenharmony_ci#define	ROFDM0_XCRXIQIMBALANCE			0xc24
108962306a36Sopenharmony_ci#define	ROFDM0_XDRXAFE				0xc28
109062306a36Sopenharmony_ci#define	ROFDM0_XDRXIQIMBALANCE			0xc2c
109162306a36Sopenharmony_ci
109262306a36Sopenharmony_ci#define	ROFDM0_RXDETECTOR1			0xc30
109362306a36Sopenharmony_ci#define	ROFDM0_RXDETECTOR2			0xc34
109462306a36Sopenharmony_ci#define	ROFDM0_RXDETECTOR3			0xc38
109562306a36Sopenharmony_ci#define	ROFDM0_RXDETECTOR4			0xc3c
109662306a36Sopenharmony_ci
109762306a36Sopenharmony_ci#define	ROFDM0_RXDSP				0xc40
109862306a36Sopenharmony_ci#define	ROFDM0_CFOANDDAGC			0xc44
109962306a36Sopenharmony_ci#define	ROFDM0_CCADROPTHRESHOLD			0xc48
110062306a36Sopenharmony_ci#define	ROFDM0_ECCATHRESHOLD			0xc4c
110162306a36Sopenharmony_ci
110262306a36Sopenharmony_ci#define	ROFDM0_XAAGCCORE1			0xc50
110362306a36Sopenharmony_ci#define	ROFDM0_XAAGCCORE2			0xc54
110462306a36Sopenharmony_ci#define	ROFDM0_XBAGCCORE1			0xc58
110562306a36Sopenharmony_ci#define	ROFDM0_XBAGCCORE2			0xc5c
110662306a36Sopenharmony_ci#define	ROFDM0_XCAGCCORE1			0xc60
110762306a36Sopenharmony_ci#define	ROFDM0_XCAGCCORE2			0xc64
110862306a36Sopenharmony_ci#define	ROFDM0_XDAGCCORE1			0xc68
110962306a36Sopenharmony_ci#define	ROFDM0_XDAGCCORE2			0xc6c
111062306a36Sopenharmony_ci
111162306a36Sopenharmony_ci#define	ROFDM0_AGCPARAMETER1			0xc70
111262306a36Sopenharmony_ci#define	ROFDM0_AGCPARAMETER2			0xc74
111362306a36Sopenharmony_ci#define	ROFDM0_AGCRSSITABLE			0xc78
111462306a36Sopenharmony_ci#define	ROFDM0_HTSTFAGC				0xc7c
111562306a36Sopenharmony_ci
111662306a36Sopenharmony_ci#define	ROFDM0_XATXIQIMBALANCE			0xc80
111762306a36Sopenharmony_ci#define	ROFDM0_XATXAFE				0xc84
111862306a36Sopenharmony_ci#define	ROFDM0_XBTXIQIMBALANCE			0xc88
111962306a36Sopenharmony_ci#define	ROFDM0_XBTXAFE				0xc8c
112062306a36Sopenharmony_ci#define	ROFDM0_XCTXIQIMBALANCE			0xc90
112162306a36Sopenharmony_ci#define	ROFDM0_XCTXAFE				0xc94
112262306a36Sopenharmony_ci#define	ROFDM0_XDTXIQIMBALANCE			0xc98
112362306a36Sopenharmony_ci#define	ROFDM0_XDTXAFE				0xc9c
112462306a36Sopenharmony_ci
112562306a36Sopenharmony_ci#define	ROFDM0_RXHPPARAMETER			0xce0
112662306a36Sopenharmony_ci#define	ROFDM0_TXPSEUDONOISEWGT			0xce4
112762306a36Sopenharmony_ci#define	ROFDM0_FRAMESYNC			0xcf0
112862306a36Sopenharmony_ci#define	ROFDM0_DFSREPORT			0xcf4
112962306a36Sopenharmony_ci#define	ROFDM0_TXCOEFF1				0xca4
113062306a36Sopenharmony_ci#define	ROFDM0_TXCOEFF2				0xca8
113162306a36Sopenharmony_ci#define	ROFDM0_TXCOEFF3				0xcac
113262306a36Sopenharmony_ci#define	ROFDM0_TXCOEFF4				0xcb0
113362306a36Sopenharmony_ci#define	ROFDM0_TXCOEFF5				0xcb4
113462306a36Sopenharmony_ci#define	ROFDM0_TXCOEFF6				0xcb8
113562306a36Sopenharmony_ci
113662306a36Sopenharmony_ci/* 7. PageD(0xD00) */
113762306a36Sopenharmony_ci#define	ROFDM1_LSTF				0xd00
113862306a36Sopenharmony_ci#define	ROFDM1_TRXPATHENABLE			0xd04
113962306a36Sopenharmony_ci
114062306a36Sopenharmony_ci#define	ROFDM1_CFO				0xd08
114162306a36Sopenharmony_ci#define	ROFDM1_CSI1				0xd10
114262306a36Sopenharmony_ci#define	ROFDM1_SBD				0xd14
114362306a36Sopenharmony_ci#define	ROFDM1_CSI2				0xd18
114462306a36Sopenharmony_ci#define	ROFDM1_CFOTRACKING			0xd2c
114562306a36Sopenharmony_ci#define	ROFDM1_TRXMESAURE1			0xd34
114662306a36Sopenharmony_ci#define	ROFDM1_INTFDET				0xd3c
114762306a36Sopenharmony_ci#define	ROFDM1_PSEUDONOISESTATEAB		0xd50
114862306a36Sopenharmony_ci#define	ROFDM1_PSEUDONOISESTATECD		0xd54
114962306a36Sopenharmony_ci#define	ROFDM1_RXPSEUDONOISEWGT			0xd58
115062306a36Sopenharmony_ci
115162306a36Sopenharmony_ci#define	ROFDM_PHYCOUNTER1			0xda0
115262306a36Sopenharmony_ci#define	ROFDM_PHYCOUNTER2			0xda4
115362306a36Sopenharmony_ci#define	ROFDM_PHYCOUNTER3			0xda8
115462306a36Sopenharmony_ci
115562306a36Sopenharmony_ci#define	ROFDM_SHORTCFOAB			0xdac
115662306a36Sopenharmony_ci#define	ROFDM_SHORTCFOCD			0xdb0
115762306a36Sopenharmony_ci#define	ROFDM_LONGCFOAB				0xdb4
115862306a36Sopenharmony_ci#define	ROFDM_LONGCFOCD				0xdb8
115962306a36Sopenharmony_ci#define	ROFDM_TAILCFOAB				0xdbc
116062306a36Sopenharmony_ci#define	ROFDM_TAILCFOCD				0xdc0
116162306a36Sopenharmony_ci#define	ROFDM_PWMEASURE1			0xdc4
116262306a36Sopenharmony_ci#define	ROFDM_PWMEASURE2			0xdc8
116362306a36Sopenharmony_ci#define	ROFDM_BWREPORT				0xdcc
116462306a36Sopenharmony_ci#define	ROFDM_AGCREPORT				0xdd0
116562306a36Sopenharmony_ci#define	ROFDM_RXSNR				0xdd4
116662306a36Sopenharmony_ci#define	ROFDM_RXEVMCSI				0xdd8
116762306a36Sopenharmony_ci#define	ROFDM_SIGREPORT				0xddc
116862306a36Sopenharmony_ci
116962306a36Sopenharmony_ci/* 8. PageE(0xE00) */
117062306a36Sopenharmony_ci#define	RTXAGC_A_RATE18_06			0xe00
117162306a36Sopenharmony_ci#define	RTXAGC_A_RATE54_24			0xe04
117262306a36Sopenharmony_ci#define	RTXAGC_A_CCK1_MCS32			0xe08
117362306a36Sopenharmony_ci#define	RTXAGC_A_MCS03_MCS00			0xe10
117462306a36Sopenharmony_ci#define	RTXAGC_A_MCS07_MCS04			0xe14
117562306a36Sopenharmony_ci#define	RTXAGC_A_MCS11_MCS08			0xe18
117662306a36Sopenharmony_ci#define	RTXAGC_A_MCS15_MCS12			0xe1c
117762306a36Sopenharmony_ci
117862306a36Sopenharmony_ci#define	RTXAGC_B_RATE18_06			0x830
117962306a36Sopenharmony_ci#define	RTXAGC_B_RATE54_24			0x834
118062306a36Sopenharmony_ci#define	RTXAGC_B_CCK1_55_MCS32			0x838
118162306a36Sopenharmony_ci#define	RTXAGC_B_MCS03_MCS00			0x83c
118262306a36Sopenharmony_ci#define	RTXAGC_B_MCS07_MCS04			0x848
118362306a36Sopenharmony_ci#define	RTXAGC_B_MCS11_MCS08			0x84c
118462306a36Sopenharmony_ci#define	RTXAGC_B_MCS15_MCS12			0x868
118562306a36Sopenharmony_ci#define	RTXAGC_B_CCK11_A_CCK2_11		0x86c
118662306a36Sopenharmony_ci
118762306a36Sopenharmony_ci/* RL6052 Register definition */
118862306a36Sopenharmony_ci#define	RF_AC					0x00
118962306a36Sopenharmony_ci
119062306a36Sopenharmony_ci#define	RF_IQADJ_G1				0x01
119162306a36Sopenharmony_ci#define	RF_IQADJ_G2				0x02
119262306a36Sopenharmony_ci#define	RF_POW_TRSW				0x05
119362306a36Sopenharmony_ci
119462306a36Sopenharmony_ci#define	RF_GAIN_RX				0x06
119562306a36Sopenharmony_ci#define	RF_GAIN_TX				0x07
119662306a36Sopenharmony_ci
119762306a36Sopenharmony_ci#define	RF_TXM_IDAC				0x08
119862306a36Sopenharmony_ci#define	RF_BS_IQGEN				0x0F
119962306a36Sopenharmony_ci
120062306a36Sopenharmony_ci#define	RF_MODE1				0x10
120162306a36Sopenharmony_ci#define	RF_MODE2				0x11
120262306a36Sopenharmony_ci
120362306a36Sopenharmony_ci#define	RF_RX_AGC_HP				0x12
120462306a36Sopenharmony_ci#define	RF_TX_AGC				0x13
120562306a36Sopenharmony_ci#define	RF_BIAS					0x14
120662306a36Sopenharmony_ci#define	RF_IPA					0x15
120762306a36Sopenharmony_ci#define	RF_POW_ABILITY				0x17
120862306a36Sopenharmony_ci#define	RF_MODE_AG				0x18
120962306a36Sopenharmony_ci#define	rfchannel				0x18
121062306a36Sopenharmony_ci#define	RF_CHNLBW				0x18
121162306a36Sopenharmony_ci#define	RF_TOP					0x19
121262306a36Sopenharmony_ci
121362306a36Sopenharmony_ci#define	RF_RX_G1				0x1A
121462306a36Sopenharmony_ci#define	RF_RX_G2				0x1B
121562306a36Sopenharmony_ci
121662306a36Sopenharmony_ci#define	RF_RX_BB2				0x1C
121762306a36Sopenharmony_ci#define	RF_RX_BB1				0x1D
121862306a36Sopenharmony_ci
121962306a36Sopenharmony_ci#define	RF_RCK1					0x1E
122062306a36Sopenharmony_ci#define	RF_RCK2					0x1F
122162306a36Sopenharmony_ci
122262306a36Sopenharmony_ci#define	RF_TX_G1				0x20
122362306a36Sopenharmony_ci#define	RF_TX_G2				0x21
122462306a36Sopenharmony_ci#define	RF_TX_G3				0x22
122562306a36Sopenharmony_ci
122662306a36Sopenharmony_ci#define	RF_TX_BB1				0x23
122762306a36Sopenharmony_ci
122862306a36Sopenharmony_ci#define	RF_T_METER				0x42
122962306a36Sopenharmony_ci
123062306a36Sopenharmony_ci#define	RF_SYN_G1				0x25
123162306a36Sopenharmony_ci#define	RF_SYN_G2				0x26
123262306a36Sopenharmony_ci#define	RF_SYN_G3				0x27
123362306a36Sopenharmony_ci#define	RF_SYN_G4				0x28
123462306a36Sopenharmony_ci#define	RF_SYN_G5				0x29
123562306a36Sopenharmony_ci#define	RF_SYN_G6				0x2A
123662306a36Sopenharmony_ci#define	RF_SYN_G7				0x2B
123762306a36Sopenharmony_ci#define	RF_SYN_G8				0x2C
123862306a36Sopenharmony_ci
123962306a36Sopenharmony_ci#define	RF_RCK_OS				0x30
124062306a36Sopenharmony_ci
124162306a36Sopenharmony_ci#define	RF_TXPA_G1				0x31
124262306a36Sopenharmony_ci#define	RF_TXPA_G2				0x32
124362306a36Sopenharmony_ci#define	RF_TXPA_G3				0x33
124462306a36Sopenharmony_ci
124562306a36Sopenharmony_ci/* Bit Mask */
124662306a36Sopenharmony_ci
124762306a36Sopenharmony_ci/* 2. Page8(0x800) */
124862306a36Sopenharmony_ci#define	BRFMOD					0x1
124962306a36Sopenharmony_ci#define	BCCKTXSC				0x30
125062306a36Sopenharmony_ci#define	BCCKEN					0x1000000
125162306a36Sopenharmony_ci#define	BOFDMEN					0x2000000
125262306a36Sopenharmony_ci
125362306a36Sopenharmony_ci#define	B3WIREDATALENGTH			0x800
125462306a36Sopenharmony_ci#define	B3WIREADDRESSLENGTH			0x400
125562306a36Sopenharmony_ci
125662306a36Sopenharmony_ci#define	BRFSI_RFENV				0x10
125762306a36Sopenharmony_ci
125862306a36Sopenharmony_ci#define	BLSSIREADADDRESS			0x7f800000
125962306a36Sopenharmony_ci#define	BLSSIREADEDGE				0x80000000
126062306a36Sopenharmony_ci#define	BLSSIREADBACKDATA			0xfffff
126162306a36Sopenharmony_ci/* 4. PageA(0xA00) */
126262306a36Sopenharmony_ci#define BCCKSIDEBAND				0x10
126362306a36Sopenharmony_ci
126462306a36Sopenharmony_ci/* Other Definition */
126562306a36Sopenharmony_ci#define	BBYTE0					0x1
126662306a36Sopenharmony_ci#define	BBYTE1					0x2
126762306a36Sopenharmony_ci#define	BBYTE2					0x4
126862306a36Sopenharmony_ci#define	BBYTE3					0x8
126962306a36Sopenharmony_ci#define	BWORD0					0x3
127062306a36Sopenharmony_ci#define	BWORD1					0xc
127162306a36Sopenharmony_ci#define	BDWORD					0xf
127262306a36Sopenharmony_ci
127362306a36Sopenharmony_ci#endif
1274