openwrt / mt76

mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
732 stars 336 forks source link

Load correct EEPROM based on PA LNA Type #845

Open Rondom opened 8 months ago

Rondom commented 8 months ago

Different EEPROM files are required to achieve best performance depending on the power amplifier (PA) and low noise amplifier (LNA) type which, as far as I understand, can be ePAeLNA, iPAiLNA, iPAeLNA or ePAiLNA, where e and i stand for internal and external respectively.

In case no EEPROM is available via NVMEM, we need to load the correct EEPROM file from the file system. So, provided, that there is no better way, we would probably need a property in device-tree to specify the PA/LNA type so that the fitting EEPROM file can be loaded.

DragonBluep commented 3 months ago

You can use "mediatek,eeprom-data" property.

Rondom commented 2 months ago

I had considered that but it will take precedence over NVMEM if I remember it correctly. For the use case where it is meant as a fallback in case NVMEM is damaged or missing, a behaviour that is the other way around is desirable.