MT7975DN + MT7905DAN with 10 dB less power than propietary drivers
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 888
- Forks
- 436
- PR merge metrics
- No merged PRs in 30d
Description
First of all, to put in context, this issue is mainly regarding the OpenWRT portability to an unidentified device, as it is shown in this post
The SoC is MT7621AT and the wifi chips: MT7975DN + MT7905DAN, which both seems to work in both bands. Examining the PCB, the 7905 appears to be the one that connects to the SoC directly and the 7975 is placed in cascade as a second stage and feeds the 4 antennas (to have a datasheet or at least an spec of this chips would be great...). As I understand, I should install the driver kmod-mt7915e to put this to work.
I successfully ported OpenWRT (23.05.2) by adding in :
define Device/MediaTek_mt7621-RB-1
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 15744k
DEVICE_VENDOR := MediaTek
DEVICE_MODEL := RB-1
DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools
endef
TARGET_DEVICES += MediaTek_mt7621-RB-1
Then, the .dts file is currently:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "mediatek,rb-1", "mediatek,mt7621-soc", "mediatek,mt7621-rfb-ax-nor", "mt7621-rfb-ax-nor";
model = "MediaTek RB-1";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
button-wps {
label = "wps";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_WPS_BUTTON>;
};
button-reset {
label = "reset";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: right-green {
label = "green:right";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
left-orange {
label = "orange:left";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Bootloader";
reg = <0x000000000000 0x000000040000>;
read-only;
};
partition@40000 {
label = "BootConfig";
reg = <0x000000040000 0x000000050000>;
read-only;
};
config: partition@50000 {
label = "Factory";
reg = <0x000000050000 0x000000060000>;
read-only;
};
permanent_config: partition@60000 {
label = "permanent_config";
reg = <0x000000060000 0x0000000e0000>;
read-only;
};
partition@0e0000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x0000000e0000 0x000001000000>;
};
};
};
};
&pcie {
status = "okay";
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&config 0x0>;
nvmem-cells = <&macaddr_config_8>;
nvmem-cell-names = "mac-address";
mediatek,disable-radar-background;
/*
mediatek,eeprom-data = <0x79150000 0xbf1c95ce 0x18a3bf1c 0x96ce18a3
0x791514c3 0x80000002 0x791514c3 0x98ec0001
0x791614c3 0x80000002 0x791614c3 0xa0ec0001
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000080 0x00000000
0x00010080 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x1c300006 0x0000af07 0x00dc0000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0xf2b99493 0x73a9f12f
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x24240008 0x00281500 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x0001fdfe 0xfdfdf9f8 0x0001fdfe 0xfdfdf9f8
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x0000e4e4 0xeeeefafa
0x06061616 0xdfdfe7e7 0xf3f3fbfb 0x03030b0b
0x2525c6c6 0xc2c200c2 0xc200c200 0x00008281
0x8585c2c2 0x81008281 0x8585c200 0x00c28100
0x85828785 0xc28700c2 0x81818582 0x8785c287
0x00c28100 0x85828785 0xc28700c2 0x81008582
0x8785c287 0x00c28100 0x85828785 0xc487c2c2
0x00c100c3 0xc3c300c1 0x8381c383 0xc3c300c1
0x83810083 0xc2c2c0c2 0x82818484 0x0000c300
0xc3c300c1 0x83818683 0xc386c3c3 0x00c18381
0x8683c286 0xc2c281c0 0x84828684 0xc386c3c3
0x00c18381 0x8683c386 0xc3c300c1 0x83818683
0xc386c3c3 0x00c18381 0x86830286 0x00222202
0x02000022 0x22020000 0xdddddddd 0xdddddddd
0xbbddbbbb 0xccccbbcc 0xbbbb0000 0x00000000
0x00000000 0x00000000 0x00000000 0x4c006458
0x7c704c00 0x64587c70 0x4c006458 0x7c704c00
0x64587c70 0x88888888 0x03032203 0x22222222
0x22220022 0x03032203 0x22222222 0x22220022
0x03032203 0x22222222 0x22220022 0x03032203
0x22222222 0x22220022 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x55555555 0x55555555 0x44554444 0x44444444
0x44443333 0x22332222 0x11111111 0x11111111>;
*/
};
};
&gmac0 {
nvmem-cells = <&macaddr_config_8>;
nvmem-cell-names = "mac-address";
};
&gmac1 {
status = "okay";
label = "wan";
phy-handle = <ðphy4>;
nvmem-cells = <&macaddr_config_8>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
&mdio {
ethphy4: ethernet-phy@4 {
reg = <4>;
};
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@1 {
status = "disabled";
label = "lan3";
}; // No tiene conector este puerto
port@3 {
status = "disabled";
label = "lan4";
}; // No tiene conector este puerto
};
};
&state_default {
gpio {
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};
&config {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_config_8: macaddr@8 {
reg = <0x8 0x6>;
};
};
The mediatek,eeprom-data is commented, later I will refer to what I tried with this. So, by mediatek,mtd-eeprom = <&config 0x0> which aims to "Factory" partition, the MTK driver seems to be finding EEPROM data to put the WiFi to work.
The issue goes about that, with OEM firmware, based on LEDE 17 and propietary drivers (accesed to failsafe mode and then changed the password), the WiFi power at "100%" (does not indicate it in dBm) has way much power that the device with OpenWRT at its maximum (declared 22 dBm, and being measured on 5 GHz band and different channels with the same client).
OEM:
mtcwireless.wlan_24g.txpower='100'
mtcwireless.wlan_5g.txpower='100'
OpenWRT:
Where I am having -70 dBm with OpenWRT, I get -60 dBm or better with OEM firmware.
So my assumption is that this difference could be reduced by:
1) Modifiying the my76 driver
2) Modifiying the EEPROM
Then first of all I started to understand if the EEPROM data on both firmwares is the same. In the case of the OEM firmware I find a way by using iwpriv, in which for both radios shows exactly the same:
mtc@WR1819M:~# iwpriv rax0 e2p
rax0 e2p:
[0x0000]:7915 [0x0002]:0000 [0x0004]:BF1C [0x0006]:95CE
[0x0008]:18A3 [0x000A]:BF1C [0x000C]:96CE [0x000E]:18A3
[0x0010]:7915 [0x0012]:14C3 [0x0014]:8000 [0x0016]:0002
[0x0018]:7915 [0x001A]:14C3 [0x001C]:98EC [0x001E]:0001
[0x0020]:7916 [0x0022]:14C3 [0x0024]:8000 [0x0026]:0002
[0x0028]:7916 [0x002A]:14C3 [0x002C]:A0EC [0x002E]:0001
[0x0030]:0000 [0x0032]:0000 [0x0034]:0000 [0x0036]:0000
[0x0038]:0000 [0x003A]:0000 [0x003C]:0000 [0x003E]:0000
[0x0040]:0000 [0x0042]:0000 [0x0044]:0000 [0x0046]:0000
[0x0048]:0000 [0x004A]:0080 [0x004C]:0000 [0x004E]:0000
[0x0050]:0001 [0x0052]:0080 [0x0054]:0000 [0x0056]:0000
[0x0058]:0000 [0x005A]:0000 [0x005C]:0000 [0x005E]:0000
[0x0060]:0000 [0x0062]:0000 [0x0064]:0000 [0x0066]:0000
[0x0068]:0000 [0x006A]:0000 [0x006C]:0000 [0x006E]:0000
[0x0070]:1C30 [0x0072]:0006 [0x0074]:0000 [0x0076]:AF07
[0x0078]:00DC [0x007A]:0000 [0x007C]:0000 [0x007E]:0000
[0x0080]:0000 [0x0082]:0000 [0x0084]:0000 [0x0086]:0000
[0x0088]:0000 [0x008A]:0000 [0x008C]:0000 [0x008E]:0000
[0x0090]:0000 [0x0092]:0000 [0x0094]:0000 [0x0096]:0000
[0x0098]:0000 [0x009A]:0000 [0x009C]:0000 [0x009E]:0000
[0x00A0]:0000 [0x00A2]:0000 [0x00A4]:0000 [0x00A6]:0000
[0x00A8]:F2B9 [0x00AA]:9493 [0x00AC]:73A9 [0x00AE]:F12F
[0x00B0]:0000 [0x00B2]:0000 [0x00B4]:0000 [0x00B6]:0000
[0x00B8]:0000 [0x00BA]:0000 [0x00BC]:0000 [0x00BE]:0000
[0x00C0]:0000 [0x00C2]:0000 [0x00C4]:0000 [0x00C6]:0000
[0x00C8]:0000 [0x00CA]:0000 [0x00CC]:0000 [0x00CE]:0000
[0x00D0]:0000 [0x00D2]:0000 [0x00D4]:0000 [0x00D6]:0000
[0x00D8]:0000 [0x00DA]:0000 [0x00DC]:0000 [0x00DE]:0000
[0x00E0]:0000 [0x00E2]:0000 [0x00E4]:0000 [0x00E6]:0000
[0x00E8]:0000 [0x00EA]:0000 [0x00EC]:0000 [0x00EE]:0000
[0x00F0]:0000 [0x00F2]:0000 [0x00F4]:0000 [0x00F6]:0000
[0x00F8]:0000 [0x00FA]:0000 [0x00FC]:0000 [0x00FE]:0000
[0x0100]:0000 [0x0102]:0000 [0x0104]:0000 [0x0106]:0000
[0x0108]:0000 [0x010A]:0000 [0x010C]:0000 [0x010E]:0000
[0x0110]:0000 [0x0112]:0000 [0x0114]:0000 [0x0116]:0000
[0x0118]:0000 [0x011A]:0000 [0x011C]:0000 [0x011E]:0000
[0x0120]:0000 [0x0122]:0000 [0x0124]:0000 [0x0126]:0000
[0x0128]:0000 [0x012A]:0000 [0x012C]:0000 [0x012E]:0000
[0x0130]:0000 [0x0132]:0000 [0x0134]:0000 [0x0136]:0000
[0x0138]:0000 [0x013A]:0000 [0x013C]:0000 [0x013E]:0000
[0x0140]:0000 [0x0142]:0000 [0x0144]:0000 [0x0146]:0000
[0x0148]:0000 [0x014A]:0000 [0x014C]:0000 [0x014E]:0000
[0x0150]:0000 [0x0152]:0000 [0x0154]:0000 [0x0156]:0000
[0x0158]:0000 [0x015A]:0000 [0x015C]:0000 [0x015E]:0000
[0x0160]:0000 [0x0162]:0000 [0x0164]:0000 [0x0166]:0000
[0x0168]:0000 [0x016A]:0000 [0x016C]:0000 [0x016E]:0000
[0x0170]:0000 [0x0172]:0000 [0x0174]:0000 [0x0176]:0000
[0x0178]:0000 [0x017A]:0000 [0x017C]:0000 [0x017E]:0000
[0x0180]:0000 [0x0182]:0000 [0x0184]:0000 [0x0186]:0000
[0x0188]:0000 [0x018A]:0000 [0x018C]:0000 [0x018E]:0000
[0x0190]:2424 [0x0192]:0008 [0x0194]:0028 [0x0196]:1500
[0x0198]:0000 [0x019A]:0000 [0x019C]:0000 [0x019E]:0000
[0x01A0]:0000 [0x01A2]:0000 [0x01A4]:0000 [0x01A6]:0000
[0x01A8]:0000 [0x01AA]:0000 [0x01AC]:0000 [0x01AE]:0000
[0x01B0]:0000 [0x01B2]:0000 [0x01B4]:0000 [0x01B6]:0000
[0x01B8]:0000 [0x01BA]:0000 [0x01BC]:0000 [0x01BE]:0000
[0x01C0]:0000 [0x01C2]:0000 [0x01C4]:0000 [0x01C6]:0000
[0x01C8]:0000 [0x01CA]:0000 [0x01CC]:0000 [0x01CE]:0000
[0x01D0]:0001 [0x01D2]:FDFE [0x01D4]:FDFD [0x01D6]:F9F8
[0x01D8]:0001 [0x01DA]:FDFE [0x01DC]:FDFD [0x01DE]:F9F8
[0x01E0]:0000 [0x01E2]:0000 [0x01E4]:0000 [0x01E6]:0000
[0x01E8]:0000 [0x01EA]:0000 [0x01EC]:0000 [0x01EE]:0000
[0x01F0]:0000 [0x01F2]:0000 [0x01F4]:0000 [0x01F6]:0000
[0x01F8]:0000 [0x01FA]:0000 [0x01FC]:0000 [0x01FE]:0000
[0x0200]:0000 [0x0202]:0000 [0x0204]:0000 [0x0206]:0000
[0x0208]:0000 [0x020A]:0000 [0x020C]:0000 [0x020E]:0000
[0x0210]:0000 [0x0212]:0000 [0x0214]:0000 [0x0216]:0000
[0x0218]:0000 [0x021A]:0000 [0x021C]:0000 [0x021E]:0000
[0x0220]:0000 [0x0222]:0000 [0x0224]:0000 [0x0226]:0000
[0x0228]:0000 [0x022A]:0000 [0x022C]:0000 [0x022E]:0000
[0x0230]:0000 [0x0232]:0000 [0x0234]:0000 [0x0236]:0000
[0x0238]:0000 [0x023A]:E4E4 [0x023C]:EEEE [0x023E]:FAFA
[0x0240]:0606 [0x0242]:1616 [0x0244]:DFDF [0x0246]:E7E7
[0x0248]:F3F3 [0x024A]:FBFB [0x024C]:0303 [0x024E]:0B0B
[0x0250]:2525 [0x0252]:C6C6 [0x0254]:C2C2 [0x0256]:00C2
[0x0258]:C200 [0x025A]:C200 [0x025C]:0000 [0x025E]:8281
[0x0260]:8585 [0x0262]:C2C2 [0x0264]:8100 [0x0266]:8281
[0x0268]:8585 [0x026A]:C200 [0x026C]:00C2 [0x026E]:8100
[0x0270]:8582 [0x0272]:8785 [0x0274]:C287 [0x0276]:00C2
[0x0278]:8181 [0x027A]:8582 [0x027C]:8785 [0x027E]:C287
[0x0280]:00C2 [0x0282]:8100 [0x0284]:8582 [0x0286]:8785
[0x0288]:C287 [0x028A]:00C2 [0x028C]:8100 [0x028E]:8582
[0x0290]:8785 [0x0292]:C287 [0x0294]:00C2 [0x0296]:8100
[0x0298]:8582 [0x029A]:8785 [0x029C]:C487 [0x029E]:C2C2
[0x02A0]:00C1 [0x02A2]:00C3 [0x02A4]:C3C3 [0x02A6]:00C1
[0x02A8]:8381 [0x02AA]:C383 [0x02AC]:C3C3 [0x02AE]:00C1
[0x02B0]:8381 [0x02B2]:0083 [0x02B4]:C2C2 [0x02B6]:C0C2
[0x02B8]:8281 [0x02BA]:8484 [0x02BC]:0000 [0x02BE]:C300
[0x02C0]:C3C3 [0x02C2]:00C1 [0x02C4]:8381 [0x02C6]:8683
[0x02C8]:C386 [0x02CA]:C3C3 [0x02CC]:00C1 [0x02CE]:8381
[0x02D0]:8683 [0x02D2]:C286 [0x02D4]:C2C2 [0x02D6]:81C0
[0x02D8]:8482 [0x02DA]:8684 [0x02DC]:C386 [0x02DE]:C3C3
[0x02E0]:00C1 [0x02E2]:8381 [0x02E4]:8683 [0x02E6]:C386
[0x02E8]:C3C3 [0x02EA]:00C1 [0x02EC]:8381 [0x02EE]:8683
[0x02F0]:C386 [0x02F2]:C3C3 [0x02F4]:00C1 [0x02F6]:8381
[0x02F8]:8683 [0x02FA]:0286 [0x02FC]:0022 [0x02FE]:2202
[0x0300]:0200 [0x0302]:0022 [0x0304]:2202 [0x0306]:0000
[0x0308]:DDDD [0x030A]:DDDD [0x030C]:DDDD [0x030E]:DDDD
[0x0310]:BBDD [0x0312]:BBBB [0x0314]:CCCC [0x0316]:BBCC
[0x0318]:BBBB [0x031A]:0000 [0x031C]:0000 [0x031E]:0000
[0x0320]:0000 [0x0322]:0000 [0x0324]:0000 [0x0326]:0000
[0x0328]:0000 [0x032A]:0000 [0x032C]:4C00 [0x032E]:6458
[0x0330]:7C70 [0x0332]:4C00 [0x0334]:6458 [0x0336]:7C70
[0x0338]:4C00 [0x033A]:6458 [0x033C]:7C70 [0x033E]:4C00
[0x0340]:6458 [0x0342]:7C70 [0x0344]:8888 [0x0346]:8888
[0x0348]:0303 [0x034A]:2203 [0x034C]:2222 [0x034E]:2222
[0x0350]:2222 [0x0352]:0022 [0x0354]:0303 [0x0356]:2203
[0x0358]:2222 [0x035A]:2222 [0x035C]:2222 [0x035E]:0022
[0x0360]:0303 [0x0362]:2203 [0x0364]:2222 [0x0366]:2222
[0x0368]:2222 [0x036A]:0022 [0x036C]:0303 [0x036E]:2203
[0x0370]:2222 [0x0372]:2222 [0x0374]:2222 [0x0376]:0022
[0x0378]:0000 [0x037A]:0000 [0x037C]:0000 [0x037E]:0000
[0x0380]:0000 [0x0382]:0000 [0x0384]:0000 [0x0386]:0000
[0x0388]:0000 [0x038A]:0000 [0x038C]:0000 [0x038E]:0000
[0x0390]:0000 [0x0392]:0000 [0x0394]:0000 [0x0396]:0000
[0x0398]:0000 [0x039A]:0000 [0x039C]:0000 [0x039E]:0000
[0x03A0]:0000 [0x03A2]:0000 [0x03A4]:0000 [0x03A6]:0000
[0x03A8]:0000 [0x03AA]:0000 [0x03AC]:0000 [0x03AE]:0000
[0x03B0]:0000 [0x03B2]:0000 [0x03B4]:0000 [0x03B6]:0000
[0x03B8]:0000 [0x03BA]:0000 [0x03BC]:0000 [0x03BE]:0000
[0x03C0]:0000 [0x03C2]:0000 [0x03C4]:0000 [0x03C6]:0000
[0x03C8]:0000 [0x03CA]:0000 [0x03CC]:0000 [0x03CE]:0000
[0x03D0]:0000 [0x03D2]:0000 [0x03D4]:0000 [0x03D6]:0000
[0x03D8]:0000 [0x03DA]:0000 [0x03DC]:0000 [0x03DE]:0000
[0x03E0]:5555 [0x03E2]:5555 [0x03E4]:5555 [0x03E6]:5555
[0x03E8]:4455 [0x03EA]:4444 [0x03EC]:4444 [0x03EE]:4444
[0x03F0]:4444 [0x03F2]:3333 [0x03F4]:2233 [0x03F6]:2222
[0x03F8]:1111 [0x03FA]:1111 [0x03FC]:1111 [0x03FE]:1111
Where we can reorder this to be similar to which we will obtain in OpenWRT:
7915 0000 BF1C 95CE 18A3 BF1C 96CE 18A3
7915 14C3 8000 0002 7915 14C3 98EC 0001
7916 14C3 8000 0002 7916 14C3 A0EC 0001
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0080 0000 0000
0001 0080 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
1C30 0006 0000 AF07 00DC 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 F2B9 9493 73A9 F12F
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
2424 0008 0028 1500 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0001 FDFE FDFD F9F8 0001 FDFE FDFD F9F8
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 E4E4 EEEE FAFA
0606 1616 DFDF E7E7 F3F3 FBFB 0303 0B0B
2525 C6C6 C2C2 00C2 C200 C200 0000 8281
8585 C2C2 8100 8281 8585 C200 00C2 8100
8582 8785 C287 00C2 8181 8582 8785 C287
00C2 8100 8582 8785 C287 00C2 8100 8582
8785 C287 00C2 8100 8582 8785 C487 C2C2
00C1 00C3 C3C3 00C1 8381 C383 C3C3 00C1
8381 0083 C2C2 C0C2 8281 8484 0000 C300
C3C3 00C1 8381 8683 C386 C3C3 00C1 8381
8683 C286 C2C2 81C0 8482 8684 C386 C3C3
00C1 8381 8683 C386 C3C3 00C1 8381 8683
C386 C3C3 00C1 8381 8683 0286 0022 2202
0200 0022 2202 0000 DDDD DDDD DDDD DDDD
BBDD BBBB CCCC BBCC BBBB 0000 0000 0000
0000 0000 0000 0000 0000 0000 4C00 6458
7C70 4C00 6458 7C70 4C00 6458 7C70 4C00
6458 7C70 8888 8888 0303 2203 2222 2222
2222 0022 0303 2203 2222 2222 2222 0022
0303 2203 2222 2222 2222 0022 0303 2203
2222 2222 2222 0022 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
5555 5555 5555 5555 4455 4444 4444 4444
4444 3333 2233 2222 1111 1111 1111 1111
While, in OpenWRT we get:
root@Paicorp-Simplemesh:/sys/kernel/debug/ieee80211/phy1/mt76# hexdump eeprom
0000000 7915 0000 bf1c 78ce b0f0 bf1c 79ce b0f0
0000010 7915 14c3 8000 0002 7915 14c3 90ec 0001
0000020 7916 14c3 8000 0002 6d8c a950 3087 0001
0000030 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0000 0000 0000 0000 0080 0000 0000
0000050 0001 0080 0000 0000 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000070 3430 0000 0000 ac06 00dc 0000 0000 0000
0000080 0000 0000 0000 0000 0000 0000 0000 0000
*
00000a0 0000 0000 0000 0000 ac0a 7785 5449 03e6
00000b0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000190 2424 0008 0028 1500 0000 0000 0000 0000
00001a0 0000 0000 0000 0000 0000 0000 0000 0000
*
00001d0 0001 fdfe fdfd f9f8 0001 fdfe fdfd f9f8
00001e0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000230 0000 0000 0000 0000 0000 e4e4 eeee fafa
0000240 0606 1616 dfdf e7e7 f3f3 fbfb 0303 0b0b
0000250 2525 c6c6 c2c2 00c2 c200 c200 0000 8281
0000260 8585 c2c2 8100 8281 8585 c200 00c2 8100
0000270 8582 8785 c287 00c2 8181 8582 8785 c287
0000280 00c2 8100 8582 8785 c287 00c2 8100 8582
0000290 8785 c287 00c2 8100 8582 8785 c487 c2c2
00002a0 00c1 00c3 c3c3 00c1 8381 c383 c3c3 00c1
00002b0 8381 0083 c2c2 c0c2 8281 8484 0000 c300
00002c0 c3c3 00c1 8381 8683 c386 c3c3 00c1 8381
00002d0 8683 c286 c2c2 81c0 8482 8684 c386 c3c3
00002e0 00c1 8381 8683 c386 c3c3 00c1 8381 8683
00002f0 c386 c3c3 00c1 8381 8683 0286 0022 2202
0000300 0200 0022 2202 0000 dddd dddd dddd dddd
0000310 bbdd bbbb cccc bbcc bbbb 0000 0000 0000
0000320 0000 0000 0000 0000 0000 0000 4c00 6458
0000330 7c70 4c00 6458 7c70 4c00 6458 7c70 4c00
0000340 6458 7c70 8888 8888 0303 2203 2222 2222
0000350 2222 0022 0303 2203 2222 2222 2222 0022
0000360 0303 2203 2222 2222 2222 0022 0303 2203
0000370 2222 2222 2222 0022 0000 0000 0000 0000
0000380 0000 0000 0000 0000 0000 0000 0000 0000
*
00003e0 5555 5555 5555 5555 4455 4444 4444 4444
00003f0 4444 3333 2233 2222 1111 1111 1111 1111
0000400 3311 3333 3333 3333 3333 4444 4444 4444
0000410 1111 1111 1111 1111 0011 0000 0000 1100
0000420 1111 0000 9900 9999 aaaa 99aa 9999 9999
0000430 0099 0000 0000 aa00 aaaa bbbb bbbb bbbb
0000440 4208 5151 7464 4308 5151 7664 4208 5151
0000450 7664 4308 5252 7766 4308 5252 7665 4308
0000460 5252 7665 4308 5353 7766 4308 5757 7c69
0000470 4208 5050 7362 4208 5050 7362 4208 5050
0000480 7362 4208 5050 7463 4308 5252 7765 4308
0000490 5252 7765 4408 5354 7968 4308 5656 7b68
00004a0 4308 5151 7564 4208 5151 7563 4308 5151
00004b0 7564 4308 5151 7665 4408 5252 7865 4308
00004c0 5151 7563 4408 5555 7a68 4408 5656 7c69
00004d0 4208 5151 7664 4208 5151 7664 4208 5151
00004e0 7664 4208 5151 7664 4308 5252 7765 4308
00004f0 5252 7765 4408 5555 7a68 4308 5656 7c69
0000500 8888 8888 8888 8888 8888 8888 8888 8888
*
0000520 0000 0000 0000 0000 0000 0000 0000 0000
*
00007b0 0000 0000 0000 0000 0000 0000 2600 0025
00007c0 0000 0000 0000 0000 0000 0000 8800 9000
00007d0 9000 8800 0000 0000 0000 0000 0000 0000
00007e0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000800 0000 97da 3254 0011 0087 97ca 4354 0032
0000810 0086 a8cc 4365 0022 0076 76b9 3343 0010
0000820 0076 0c0c 0c0c 0f0d 0d0f 0000 0000 0300
0000830 0000 0000 0000 0000 0000 0000 0000 0000
*
00008c0 8582 8584 0000 0000 0000 0000 0000 0000
00008d0 e800 0000 0000 0000 0000 0000 0000 0000
00008e0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000900 c143 c143 c143 c143 ccc0 ca40 c940 c942
0000910 cbbe cbbe cbbd cac0 cdbe ccbe cdbe cbc0
0000920 cac1 cac1 cac1 c9c1 cec0 cc40 cc40 cb42
0000930 cb41 ccbe cb41 cbc1 cd40 cbc0 cac0 c9c0
0000940 c9c0 c9c0 c9c0 c940 0000 0000 0000 0000
0000950 cd41 cd41 cd41 cd41 0000 0000 0000 0000
0000960 d2c0 d040 d0c0 d040 d1c0 d1c0 d1c0 d1c0
0000970 d2c0 d1c0 d1c0 d1c0 d2c0 d2c0 d240 d1c0
0000980 d4c0 d340 d2c0 d240 d340 d340 d242 d540
0000990 d340 d0c2 cf42 cec2 d042 d042 cec4 cf42
00009a0 ac02 0000 0100 00c0 84ba 0084 0000 0000
00009b0 5746 4fba fe48 a10a 1818 1818 1818 1818
00009c0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000a00 4b00 6358 7a70 4b00 6358 7a70 4b00 6358
0000a10 7a70 4b00 6358 7a70 0000 0000 4708 5947
0000a20 7869 4908 5949 7a6d 4908 5a49 796d 4808
0000a30 5948 786c 4808 5848 786a 4808 5848 786a
0000a40 4808 5848 786c 4a08 5b4a 796d 4708 5947
0000a50 7a69 4808 5948 796b 4808 5948 7a6c 4808
0000a60 5848 796c 4808 5748 7768 4808 5748 7768
0000a70 4808 5748 776a 4a08 5a4a 776a 4608 5946
0000a80 7969 4808 5848 796b 4808 5848 7a6c 4808
0000a90 5948 796c 4808 5748 7768 4808 5748 7768
0000aa0 4908 5849 7a6d 4b08 5c4b 776c 4708 5a47
0000ab0 7b6a 4908 5a49 7c6e 4908 5a49 7c6e 4908
0000ac0 5b49 7c6e 4908 5949 7a6a 4908 5949 7a6a
0000ad0 4a08 5a4a 7d6f 4b08 5c4b 7b6e 0000 0000
0000ae0 0000 0000 0000 0000 0000 0000 0000 0000
0000af0 0000 0000 0000 0000 0000 0000 0100 fdff
0000b00 fbfc fd00 fdfe fbfc 0000 0001 fdff 0000
0000b10 0001 fdff fd00 fdfe fbfc 0100 fefe fdfd
0000b20 fd00 fefe fffe fd00 fefe fffe fd00 fefe
0000b30 fffe fd00 fefe fefe 0100 fbfe f8f9 fd00
0000b40 fbfe f7f9 fd00 fcfe f7f9 fd00 fcfe f8f9
0000b50 fc00 fcfe f9f9 0100 ff00 fcfe fd00 ffff
0000b60 00ff fd00 feff 00ff fd00 ffff feff fd00
0000b70 feff fefe 0004 f6fa f5f6 f1f1 0004 f6fa
0000b80 f5f6 f1f1 0002 f9fc f8f8 f1f2 0002 f9fc
0000b90 f8f8 f1f2 0003 f8fc f9f9 f5f5 0003 f8fc
0000ba0 f9f9 f5f5 0003 f9fb fafa f7f7 0003 f9fb
0000bb0 fafa f7f7 0003 f9fc fbfb f9f8 0003 f9fc
0000bc0 fbfb f9f8 0002 fbfd fcfc f8f8 0002 fbfd
0000bd0 fcfc f8f8 0002 fbfd fdfd faf9 0002 fbfd
0000be0 fdfd faf9 0001 fdfe fdfd f9f8 0001 fdfe
0000bf0 fdfd f9f8 0004 f8fc f8fa f2f2 0004 f8fc
0000c00 f8fa f2f2 0002 f8fb f5f7 edee 0002 f8fb
0000c10 f5f7 edee 0003 f9fc f9fb f5f4 0003 f9fc
0000c20 f9fb f5f4 0003 f9fb fafc f7f6 0003 f9fb
0000c30 fafc f7f6 0004 f6fa f6f8 f3f3 0004 f6fa
0000c40 f6f8 f3f3 0004 f6fb f5f7 f2f1 0004 f6fb
0000c50 f5f7 f2f1 0004 f7fb f7f8 f4f3 0004 f7fb
0000c60 f7f8 f4f3 0001 f9fc f8f9 f3f2 0001 f9fc
0000c70 f8f9 f3f2 0005 f7fb f7f9 f2f2 0005 f7fb
0000c80 f7f9 f2f2 0004 f8fc f5f6 ecee 0004 f8fc
0000c90 f5f6 ecee 0003 f8fb f4f7 eeed 0003 f8fb
0000ca0 f4f7 eeed 0003 f8fb f4f7 efee 0003 f8fb
0000cb0 f4f7 efee 0003 f8fb f6f7 edee 0003 f8fb
0000cc0 f6f7 edee 0003 f8fb f5f8 eeef 0003 f8fb
0000cd0 f5f8 eeef 0003 f9fc f6f8 f1f1 0003 f9fc
0000ce0 f6f8 f1f1 0002 fafd f8fa f3f2 0002 fafd
0000cf0 f8fa f3f2 0001 fcfd fdfd f6f7 0001 fcfd
0000d00 fdfd f6f7 0002 f9fc f7f8 eff0 0002 f9fc
0000d10 f7f8 eff0 0002 fbfd f9f9 eff1 0002 fbfd
0000d20 f9f9 eff1 0002 fbfc faf9 f3f4 0002 fbfc
0000d30 faf9 f3f4 0001 fbfd fafa f2f2 0001 fbfd
0000d40 fafa f2f2 0000 fbfd fafb f4f3 0000 fbfd
0000d50 fafb f4f3 0001 fcfd fbfb f5f6 0001 fcfd
0000d60 fbfb f5f6 0000 fcfd fcfc f5f7 0000 fcfd
0000d70 fcfc f5f7 0000 0000 0000 0000 0000 0000
0000d80 e8de 00f4 d90c ede1 01f5 1109 0000 0000
0000d90 0001 f9fc f8f9 f3f2 0001 f9fc f8f9 f3f2
0000da0 0002 fafd f8fa f3f2 0002 fafd f8fa f3f2
0000db0 0000 fcfd fcfc f5f7 0000 fcfd fcfc f5f7
0000dc0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000e00
It is obvious that it is not the same
What I have tried after that? Since I discovered that if the driver does not find EEPROM data with mediatek,mtd-eeprom it searches a file in /lib/firmware/mediatek/mt7915_eeprom_dbdc.bin I commented that line and tried several EEPROM files. I produced a .bin from the dump obtained with iwpriv from the OEM firmware which is here: eeprom_factory_OEM.zip. Also tried an EEPROM obtained of an Archer Ax23 which is running OpenWRT, by the same way, this command did it: sed 's/ //g' eeprom_in_text.txt | xxd -r -p > eeprom.bin.
I also verified that the EEPROM obtained from OpenWRT with the WiFi working taking EEPROM from the "Factory" partition works apparently in the same quality when I use that file on firmware in /lib/firmware/mediatek/
With the EEPROM obtained from the OEM firmware, the WiFi admits a maximum configuration of 30 dBm but in the reality it simply does not work.. With the Ax23's EEPROM, the maximum power allowed by configuration is 26 dBm, the WiFi "works" but really worse than before (even less range than before). I also tried to write the EEPROM in the .dts to check if that makes a difference with the mediatek,eeprom-data option (which is commented in the .dts i shared here previously) and that did not work, the EEPROM is not being found.
Since I really do not have precise knowledge of all about this, I don't know what is DBDC (I supose something regarding dual band and sharing the same EEPROM or not for both bands or both radios), I don't have access to any documentation of the 7915 EEPROM to know what are the meaning of all of these registers (not only its name, also the explanation of what it is precisely), why in code the registed addresses are indicated with three hex digits and not four, among other things... I'm running out of ideas on how to continue.
EDIT: I will test the performance in latest OpenWRT to check at least in a recent driver version, and see if there are differences.
Any comments to help me continue exploring possibilities will be deeply appreciated.
If you made it this far, thank you very much for reading me.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the posted device-tree definition and compare the OEM and OpenWrt EEPROM data, especially the mediatek,mtd-eeprom configuration and the commented mediatek,eeprom-data. Then inspect the mt76 driver’s handling of EEPROM and transmit power. Done requires identifying whether the power difference comes from the driver or EEPROM and providing a reproducible correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- embedded-iot, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100