1*6c92544dSBjoern A. Zeeb /* SPDX-License-Identifier: ISC */ 2*6c92544dSBjoern A. Zeeb 3*6c92544dSBjoern A. Zeeb #ifndef __MT7603_EEPROM_H 4*6c92544dSBjoern A. Zeeb #define __MT7603_EEPROM_H 5*6c92544dSBjoern A. Zeeb 6*6c92544dSBjoern A. Zeeb #include "mt7603.h" 7*6c92544dSBjoern A. Zeeb 8*6c92544dSBjoern A. Zeeb enum mt7603_eeprom_field { 9*6c92544dSBjoern A. Zeeb MT_EE_CHIP_ID = 0x000, 10*6c92544dSBjoern A. Zeeb MT_EE_VERSION = 0x002, 11*6c92544dSBjoern A. Zeeb MT_EE_MAC_ADDR = 0x004, 12*6c92544dSBjoern A. Zeeb MT_EE_NIC_CONF_0 = 0x034, 13*6c92544dSBjoern A. Zeeb MT_EE_NIC_CONF_1 = 0x036, 14*6c92544dSBjoern A. Zeeb MT_EE_NIC_CONF_2 = 0x042, 15*6c92544dSBjoern A. Zeeb 16*6c92544dSBjoern A. Zeeb MT_EE_XTAL_TRIM_1 = 0x03a, 17*6c92544dSBjoern A. Zeeb 18*6c92544dSBjoern A. Zeeb MT_EE_RSSI_OFFSET_2G = 0x046, 19*6c92544dSBjoern A. Zeeb MT_EE_WIFI_RF_SETTING = 0x048, 20*6c92544dSBjoern A. Zeeb MT_EE_RSSI_OFFSET_5G = 0x04a, 21*6c92544dSBjoern A. Zeeb 22*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_DELTA_BW40 = 0x050, 23*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_DELTA_BW80 = 0x052, 24*6c92544dSBjoern A. Zeeb 25*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_EXT_PA_5G = 0x054, 26*6c92544dSBjoern A. Zeeb 27*6c92544dSBjoern A. Zeeb MT_EE_TEMP_SENSOR_CAL = 0x055, 28*6c92544dSBjoern A. Zeeb 29*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_0_START_2G = 0x056, 30*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_1_START_2G = 0x05c, 31*6c92544dSBjoern A. Zeeb 32*6c92544dSBjoern A. Zeeb /* used as byte arrays */ 33*6c92544dSBjoern A. Zeeb #define MT_TX_POWER_GROUP_SIZE_5G 5 34*6c92544dSBjoern A. Zeeb #define MT_TX_POWER_GROUPS_5G 6 35*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_0_START_5G = 0x062, 36*6c92544dSBjoern A. Zeeb 37*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_0_GRP3_TX_POWER_DELTA = 0x074, 38*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE = 0x076, 39*6c92544dSBjoern A. Zeeb 40*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_1_START_5G = 0x080, 41*6c92544dSBjoern A. Zeeb 42*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_CCK = 0x0a0, 43*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_OFDM_2G_6M = 0x0a2, 44*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_OFDM_2G_24M = 0x0a4, 45*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_OFDM_2G_54M = 0x0a6, 46*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_HT_BPSK_QPSK = 0x0a8, 47*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_HT_16_64_QAM = 0x0aa, 48*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_HT_64_QAM = 0x0ac, 49*6c92544dSBjoern A. Zeeb 50*6c92544dSBjoern A. Zeeb MT_EE_ELAN_RX_MODE_GAIN = 0x0c0, 51*6c92544dSBjoern A. Zeeb MT_EE_ELAN_RX_MODE_NF = 0x0c1, 52*6c92544dSBjoern A. Zeeb MT_EE_ELAN_RX_MODE_P1DB = 0x0c2, 53*6c92544dSBjoern A. Zeeb 54*6c92544dSBjoern A. Zeeb MT_EE_ELAN_BYPASS_MODE_GAIN = 0x0c3, 55*6c92544dSBjoern A. Zeeb MT_EE_ELAN_BYPASS_MODE_NF = 0x0c4, 56*6c92544dSBjoern A. Zeeb MT_EE_ELAN_BYPASS_MODE_P1DB = 0x0c5, 57*6c92544dSBjoern A. Zeeb 58*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_NEG_6_7 = 0x0c6, 59*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_NEG_4_5 = 0x0c8, 60*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_NEG_2_3 = 0x0ca, 61*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_NEG_0_1 = 0x0cc, 62*6c92544dSBjoern A. Zeeb 63*6c92544dSBjoern A. Zeeb MT_EE_REF_STEP_24G = 0x0ce, 64*6c92544dSBjoern A. Zeeb 65*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_PLUS_1_2 = 0x0d0, 66*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_PLUS_3_4 = 0x0d2, 67*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_PLUS_5_6 = 0x0d4, 68*6c92544dSBjoern A. Zeeb MT_EE_STEP_NUM_PLUS_7 = 0x0d6, 69*6c92544dSBjoern A. Zeeb 70*6c92544dSBjoern A. Zeeb MT_EE_CP_FT_VERSION = 0x0f0, 71*6c92544dSBjoern A. Zeeb 72*6c92544dSBjoern A. Zeeb MT_EE_TX_POWER_TSSI_OFF = 0x0f2, 73*6c92544dSBjoern A. Zeeb 74*6c92544dSBjoern A. Zeeb MT_EE_XTAL_FREQ_OFFSET = 0x0f4, 75*6c92544dSBjoern A. Zeeb MT_EE_XTAL_TRIM_2_COMP = 0x0f5, 76*6c92544dSBjoern A. Zeeb MT_EE_XTAL_TRIM_3_COMP = 0x0f6, 77*6c92544dSBjoern A. Zeeb MT_EE_XTAL_WF_RFCAL = 0x0f7, 78*6c92544dSBjoern A. Zeeb 79*6c92544dSBjoern A. Zeeb __MT_EE_MAX 80*6c92544dSBjoern A. Zeeb }; 81*6c92544dSBjoern A. Zeeb 82*6c92544dSBjoern A. Zeeb enum mt7603_eeprom_source { 83*6c92544dSBjoern A. Zeeb MT_EE_SRC_PROM, 84*6c92544dSBjoern A. Zeeb MT_EE_SRC_EFUSE, 85*6c92544dSBjoern A. Zeeb MT_EE_SRC_FLASH, 86*6c92544dSBjoern A. Zeeb }; 87*6c92544dSBjoern A. Zeeb 88*6c92544dSBjoern A. Zeeb #define MT_EE_NIC_CONF_0_RX_PATH GENMASK(3, 0) 89*6c92544dSBjoern A. Zeeb #define MT_EE_NIC_CONF_0_TX_PATH GENMASK(7, 4) 90*6c92544dSBjoern A. Zeeb 91*6c92544dSBjoern A. Zeeb #endif 92