mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: add external EEPROM support for mt799x chipsets
For the MT7992 and MT7990 chipsets, efuse mode is not supported because there is insufficient space in the efuse to store the calibration data. Therefore, an additional on-chip EEPROM is added to address this limitation. Co-developed-by: Elwin Huang <[email protected]> Signed-off-by: Elwin Huang <[email protected]> Co-developed-by: Shayne Chen <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Signed-off-by: StanleyYP Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
d62f5a0d1d
commit
8831fa78cb
+17
-3
@@ -85,6 +85,7 @@
|
||||
|
||||
#define MT7996_EEPROM_SIZE 7680
|
||||
#define MT7996_EEPROM_BLOCK_SIZE 16
|
||||
#define MT7996_EXT_EEPROM_BLOCK_SIZE 1024
|
||||
#define MT7996_TOKEN_SIZE 16384
|
||||
#define MT7996_HW_TOKEN_SIZE 8192
|
||||
|
||||
@@ -169,6 +170,13 @@ enum mt7996_fem_type {
|
||||
MT7996_FEM_MIX,
|
||||
};
|
||||
|
||||
enum mt7996_eeprom_mode {
|
||||
EEPROM_MODE_DEFAULT_BIN,
|
||||
EEPROM_MODE_EFUSE,
|
||||
EEPROM_MODE_FLASH,
|
||||
EEPROM_MODE_EXT,
|
||||
};
|
||||
|
||||
enum mt7996_txq_id {
|
||||
MT7996_TXQ_FWDL = 16,
|
||||
MT7996_TXQ_MCU_WM,
|
||||
@@ -441,7 +449,7 @@ struct mt7996_dev {
|
||||
|
||||
u32 hw_pattern;
|
||||
|
||||
bool flash_mode:1;
|
||||
u8 eeprom_mode;
|
||||
bool has_eht:1;
|
||||
|
||||
struct {
|
||||
@@ -736,8 +744,9 @@ int mt7996_mcu_set_fixed_rate_ctrl(struct mt7996_dev *dev,
|
||||
int mt7996_mcu_set_fixed_field(struct mt7996_dev *dev, struct mt7996_sta *msta,
|
||||
void *data, u8 link_id, u32 field);
|
||||
int mt7996_mcu_set_eeprom(struct mt7996_dev *dev);
|
||||
int mt7996_mcu_get_eeprom(struct mt7996_dev *dev, u32 offset, u8 *buf, u32 buf_len);
|
||||
int mt7996_mcu_get_eeprom_free_block(struct mt7996_dev *dev, u8 *block_num);
|
||||
int mt7996_mcu_get_eeprom(struct mt7996_dev *dev, u32 offset, u8 *buf, u32 buf_len,
|
||||
enum mt7996_eeprom_mode mode);
|
||||
int mt7996_mcu_get_efuse_free_block(struct mt7996_dev *dev, u8 *block_num);
|
||||
int mt7996_mcu_get_chip_config(struct mt7996_dev *dev, u32 *cap);
|
||||
int mt7996_mcu_set_ser(struct mt7996_dev *dev, u8 action, u8 set, u8 band);
|
||||
int mt7996_mcu_set_txbf(struct mt7996_dev *dev, u8 action);
|
||||
@@ -835,6 +844,11 @@ static inline bool mt7996_has_wa(struct mt7996_dev *dev)
|
||||
return !is_mt7990(&dev->mt76);
|
||||
}
|
||||
|
||||
static inline bool mt7996_has_ext_eeprom(struct mt7996_dev *dev)
|
||||
{
|
||||
return !is_mt7996(&dev->mt76);
|
||||
}
|
||||
|
||||
void mt7996_mac_init(struct mt7996_dev *dev);
|
||||
u32 mt7996_mac_wtbl_lmac_addr(struct mt7996_dev *dev, u16 wcid, u8 dw);
|
||||
bool mt7996_mac_wtbl_update(struct mt7996_dev *dev, int idx, u32 mask);
|
||||
|
||||
Reference in New Issue
Block a user