improving mt7620 support i've noticed duplicate TX_SW_CFG entry for RT6352 chip:
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392) ||
rt2x00_rt(rt2x00dev, RT6352)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
} else if (rt2x00_rt(rt2x00dev, RT5592)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00000000);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
} else if (rt2x00_rt(rt2x00dev, RT6352)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
rt2800_register_write(rt2x00dev, MIMO_PS_CFG, 0x00000002);
rt2800_register_write(rt2x00dev, TX_PIN_CFG, 0x00150F0F);
and got info that this redundant entry should be removed. after removing RT6352 from first TX_SW_CFG* group the device seem to work fine at first but the TX rate stays as low as 81 or 90 Mbps - similar issue i get with patched CC or DD image.
i've also tried to set RT6352 TX_SW_* entries to 404 and 80606, even tried the sum of the two - no go, 90 Mbps TX rate.
with both RT6352 TX_SW_* entries i get better TX rates (from 81-90 increased to 162-180 Mbps) and better effective throughput in both directions while using LEDE. (in openwrt this makes no difference, either CC or DD).
i wonder what is going on in the driver, does it constantly keeps switching between the two values (404->401, 80606->C0000) and is there a way to stabilize tx switch?