xref: /freebsd/sys/dev/rtwn/rtl8723b/r23b_reg.h (revision 551b7c5e12bfea623a47edf97ad5689732a1233f)
1 /*
2  * Copyright (c) 2026 Ahmad Khalifa <vexeduxr@FreeBSD.org>
3  *
4  * SPDX-License-Identifier: BSD-2-Clause
5  */
6 
7 #ifndef R23B_REG_H
8 #define R23B_REG_H
9 
10 #define R23B_BTCOEX_TABLE(i)	(0x6c0 + (i) * 4)
11 #define R23B_GNT_BT		0x764
12 #define R23B_ANT_SEL		0x948
13 
14 /* Bits for R92C_EFUSE_TEST. */
15 #define R23B_EFUSE_TEST_SEL_M		0x300
16 #define R23B_EFUSE_TEST_SEL_S		8
17 #define R23B_EFUSE_TEST_SEL_WIFI	0
18 #define R23B_EFUSE_TEST_SEL_BT0		1
19 #define R23B_EFUSE_TEST_SEL_BT1		2
20 #define R23B_EFUSE_TEST_SEL_BT2		3
21 #define R23B_EFUSE_TEST_PGMEN		0x800
22 
23 /* Bits for R92C_PWR_DATA. */
24 #define R23B_PWR_DATA_RFE_CTRL_EN	0x800
25 
26 /* Bits for R92C_LEDCFG0. */
27 #define R23B_LEDCFG0_DPDT_SEL_EN	0x800000
28 
29 /* Bits for R92C_LEDCFG2. */
30 #define R23B_LEDCFG2_LED_SW_CTRL	0x20
31 #define R23B_LEDCFG2_LED_DISABLE	0x04
32 #define R23B_LEDCFG2_LED_M		0x7f
33 
34 /* Bits for R88E_BB_PAD_CTRL. */
35 #define R23B_BB_PAD_CTRL_DPDT_SEL_DATA	0x1
36 
37 /* Bits for R92C_RXDMA_AGG_PG_TH. */
38 #define R23B_RXDMA_AGG_PG_TH_EN		0x80000000
39 #define R23B_RXDMA_AGG_PG_TH_SIZE_M	0xf
40 #define R23B_RXDMA_AGG_PG_TH_SIZE_S	0
41 #define R23B_RXDMA_AGG_PG_TH_TIME_M	0xff00
42 #define R23B_RXDMA_AGG_PG_TH_TIME_S	8
43 
44 /* Bits for R92C_FWHW_TXQ_CTRL. */
45 #define R23B_FWHW_TXQ_CTRL_ACK_MGNT	0x1000
46 
47 /* Bits for R92C_WMAC_TRXPTCL_CTL. */
48 #define R23B_WMAC_TRXPTCL_CTL_HT40	0x80
49 #define R23B_WMAC_TRXPTCL_CTL_VHT80	0x100
50 
51 /* Bits for R23B_ANT_SEL. */
52 #define R23B_ANT_SEL_S0	0x000
53 #define R23B_ANT_SEL_S1	0x280
54 
55 /*
56  * RF (6052) registers.
57  */
58 #define R23B_RF_S0S1	0xb0
59 
60 /* Bits for R92C_RF_CHNLBW. */
61 #define R23B_RF_CHNLBW_BW40	0x00400
62 
63 #endif
64