xref: /openbmc/linux/drivers/net/wireless/realtek/rtw89/rtw8852b.h (revision 9695dc2e4be90315471ea4c672836929f5c403fe)
108484e1fSPing-Ke Shih /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
208484e1fSPing-Ke Shih /* Copyright(c) 2019-2022  Realtek Corporation
308484e1fSPing-Ke Shih  */
408484e1fSPing-Ke Shih 
508484e1fSPing-Ke Shih #ifndef __RTW89_8852B_H__
608484e1fSPing-Ke Shih #define __RTW89_8852B_H__
708484e1fSPing-Ke Shih 
808484e1fSPing-Ke Shih #include "core.h"
908484e1fSPing-Ke Shih 
1008484e1fSPing-Ke Shih #define RF_PATH_NUM_8852B 2
1108484e1fSPing-Ke Shih #define BB_PATH_NUM_8852B 2
1208484e1fSPing-Ke Shih 
13132dc4feSPing-Ke Shih struct rtw8852b_u_efuse {
14132dc4feSPing-Ke Shih 	u8 rsvd[0x88];
15132dc4feSPing-Ke Shih 	u8 mac_addr[ETH_ALEN];
16132dc4feSPing-Ke Shih };
17132dc4feSPing-Ke Shih 
18132dc4feSPing-Ke Shih struct rtw8852b_e_efuse {
19132dc4feSPing-Ke Shih 	u8 mac_addr[ETH_ALEN];
20132dc4feSPing-Ke Shih };
21132dc4feSPing-Ke Shih 
22132dc4feSPing-Ke Shih struct rtw8852b_tssi_offset {
23132dc4feSPing-Ke Shih 	u8 cck_tssi[TSSI_CCK_CH_GROUP_NUM];
24132dc4feSPing-Ke Shih 	u8 bw40_tssi[TSSI_MCS_2G_CH_GROUP_NUM];
25132dc4feSPing-Ke Shih 	u8 rsvd[7];
26132dc4feSPing-Ke Shih 	u8 bw40_1s_tssi_5g[TSSI_MCS_5G_CH_GROUP_NUM];
27132dc4feSPing-Ke Shih } __packed;
28132dc4feSPing-Ke Shih 
29132dc4feSPing-Ke Shih struct rtw8852b_efuse {
30132dc4feSPing-Ke Shih 	u8 rsvd[0x210];
31132dc4feSPing-Ke Shih 	struct rtw8852b_tssi_offset path_a_tssi;
32132dc4feSPing-Ke Shih 	u8 rsvd1[10];
33132dc4feSPing-Ke Shih 	struct rtw8852b_tssi_offset path_b_tssi;
34132dc4feSPing-Ke Shih 	u8 rsvd2[94];
35132dc4feSPing-Ke Shih 	u8 channel_plan;
36132dc4feSPing-Ke Shih 	u8 xtal_k;
37132dc4feSPing-Ke Shih 	u8 rsvd3;
38132dc4feSPing-Ke Shih 	u8 iqk_lck;
39132dc4feSPing-Ke Shih 	u8 rsvd4[5];
40132dc4feSPing-Ke Shih 	u8 reg_setting:2;
41132dc4feSPing-Ke Shih 	u8 tx_diversity:1;
42132dc4feSPing-Ke Shih 	u8 rx_diversity:2;
43132dc4feSPing-Ke Shih 	u8 ac_mode:1;
44132dc4feSPing-Ke Shih 	u8 module_type:2;
45132dc4feSPing-Ke Shih 	u8 rsvd5;
46132dc4feSPing-Ke Shih 	u8 shared_ant:1;
47132dc4feSPing-Ke Shih 	u8 coex_type:3;
48132dc4feSPing-Ke Shih 	u8 ant_iso:1;
49132dc4feSPing-Ke Shih 	u8 radio_on_off:1;
50132dc4feSPing-Ke Shih 	u8 rsvd6:2;
51132dc4feSPing-Ke Shih 	u8 eeprom_version;
52132dc4feSPing-Ke Shih 	u8 customer_id;
53132dc4feSPing-Ke Shih 	u8 tx_bb_swing_2g;
54132dc4feSPing-Ke Shih 	u8 tx_bb_swing_5g;
55132dc4feSPing-Ke Shih 	u8 tx_cali_pwr_trk_mode;
56132dc4feSPing-Ke Shih 	u8 trx_path_selection;
57132dc4feSPing-Ke Shih 	u8 rfe_type;
58132dc4feSPing-Ke Shih 	u8 country_code[2];
59132dc4feSPing-Ke Shih 	u8 rsvd7[3];
60132dc4feSPing-Ke Shih 	u8 path_a_therm;
61132dc4feSPing-Ke Shih 	u8 path_b_therm;
62132dc4feSPing-Ke Shih 	u8 rsvd8[2];
63132dc4feSPing-Ke Shih 	u8 rx_gain_2g_ofdm;
64132dc4feSPing-Ke Shih 	u8 rsvd9;
65132dc4feSPing-Ke Shih 	u8 rx_gain_2g_cck;
66132dc4feSPing-Ke Shih 	u8 rsvd10;
67132dc4feSPing-Ke Shih 	u8 rx_gain_5g_low;
68132dc4feSPing-Ke Shih 	u8 rsvd11;
69132dc4feSPing-Ke Shih 	u8 rx_gain_5g_mid;
70132dc4feSPing-Ke Shih 	u8 rsvd12;
71132dc4feSPing-Ke Shih 	u8 rx_gain_5g_high;
72132dc4feSPing-Ke Shih 	u8 rsvd13[35];
73132dc4feSPing-Ke Shih 	u8 path_a_cck_pwr_idx[6];
74132dc4feSPing-Ke Shih 	u8 path_a_bw40_1tx_pwr_idx[5];
75132dc4feSPing-Ke Shih 	u8 path_a_ofdm_1tx_pwr_idx_diff:4;
76132dc4feSPing-Ke Shih 	u8 path_a_bw20_1tx_pwr_idx_diff:4;
77132dc4feSPing-Ke Shih 	u8 path_a_bw20_2tx_pwr_idx_diff:4;
78132dc4feSPing-Ke Shih 	u8 path_a_bw40_2tx_pwr_idx_diff:4;
79132dc4feSPing-Ke Shih 	u8 path_a_cck_2tx_pwr_idx_diff:4;
80132dc4feSPing-Ke Shih 	u8 path_a_ofdm_2tx_pwr_idx_diff:4;
81132dc4feSPing-Ke Shih 	u8 rsvd14[0xf2];
82132dc4feSPing-Ke Shih 	union {
83132dc4feSPing-Ke Shih 		struct rtw8852b_u_efuse u;
84132dc4feSPing-Ke Shih 		struct rtw8852b_e_efuse e;
85132dc4feSPing-Ke Shih 	};
86132dc4feSPing-Ke Shih } __packed;
87132dc4feSPing-Ke Shih 
88*9695dc2eSPing-Ke Shih extern const struct rtw89_chip_info rtw8852b_chip_info;
89*9695dc2eSPing-Ke Shih 
9008484e1fSPing-Ke Shih #endif
91