xref: /linux/drivers/net/wireless/realtek/rtw88/rtw8814a.h (revision 1a9239bb4253f9076b5b4b2a1a4e8d7defd77a95)
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2025  Realtek Corporation
3  */
4 
5 #ifndef __RTW8814A_H__
6 #define __RTW8814A_H__
7 
8 struct rtw8814au_efuse {
9 	u8 vid[2];			/* 0xd0 */
10 	u8 pid[2];			/* 0xd2 */
11 	u8 res[4];			/* 0xd4 */
12 	u8 mac_addr[ETH_ALEN];		/* 0xd8 */
13 } __packed;
14 
15 struct rtw8814ae_efuse {
16 	u8 mac_addr[ETH_ALEN];		/* 0xd0 */
17 	u8 vid[2];			/* 0xd6 */
18 	u8 did[2];			/* 0xd8 */
19 	u8 svid[2];			/* 0xda */
20 	u8 smid[2];			/* 0xdc */
21 } __packed;
22 
23 struct rtw8814a_efuse {
24 	__le16 rtl_id;
25 	u8 res0[0x0c];
26 	u8 usb_mode;			/* 0x0e */
27 	u8 res1;
28 
29 	/* power index for four RF paths */
30 	struct rtw_txpwr_idx txpwr_idx_table[4];
31 
32 	u8 channel_plan;		/* 0xb8 */
33 	u8 xtal_k;			/* 0xb9 */
34 	u8 thermal_meter;		/* 0xba */
35 	u8 iqk_lck;			/* 0xbb */
36 	u8 pa_type;			/* 0xbc */
37 	u8 lna_type_2g[2];		/* 0xbd */
38 	u8 lna_type_5g[2];		/* 0xbf */
39 	u8 rf_board_option;		/* 0xc1 */
40 	u8 res2;
41 	u8 rf_bt_setting;		/* 0xc3 */
42 	u8 eeprom_version;		/* 0xc4 */
43 	u8 eeprom_customer_id;		/* 0xc5 */
44 	u8 tx_bb_swing_setting_2g;	/* 0xc6 */
45 	u8 tx_bb_swing_setting_5g;	/* 0xc7 */
46 	u8 res3;
47 	u8 trx_antenna_option;		/* 0xc9 */
48 	u8 rfe_option;			/* 0xca */
49 	u8 country_code[2];		/* 0xcb */
50 	u8 res4[3];
51 	union {
52 		struct rtw8814au_efuse u;
53 		struct rtw8814ae_efuse e;
54 	};
55 	u8 res5[0x122];			/* 0xde */
56 } __packed;
57 
58 static_assert(sizeof(struct rtw8814a_efuse) == 512);
59 
60 extern const struct rtw_chip_info rtw8814a_hw_spec;
61 
62 #endif
63