I'm porting OpenWrt to ZTE ZXHN H367N. It has Ralink RT5392L chip connected via PCI bus. If I understood correctly, it should work with the kmod-rt2800-pci driver, but I'm getting this:
The original firmware contains module rt5390.ko which appears to try to load the file RT5392_PCIe_2T2R_ALC_V1_4.bin, but it's a 512-byte file which doesn't look like a typical Ralink firmware/EEPROM image. (It also appears that it could work without any files since there's the string saying " WIFI 2.4G(RT5392) Not Calibrated Use default" in the driver.)
The device also has a partition called WIFI but it's mostly empty, except for a few bytes at the beginning. Another file is RT2860AP.dat, but it's 2KiB textual configuration, not the firmware.
All in all, the ZTE's original firmware doesn't appear to be uploading some kind of firmware to the chip, and I'm stuck here trying to make it work, so I'd appreciate any help.
But it's eeprom data (calibration data for specific pcie card). Don't confuse with firmware. If i'm not mistaken firmware for your card exist in package rt2800-pci-firmware.
Vendor's rt5390.ko have compiled in both firmware and eeprom.
Open source driver search eeprom data in flash partition and fallback to request file if failed.
In file rt2x00eeprom.c:
static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev)
{
const struct firmware *ee;
const char *ee_name;
int retval;
if (!rt2800lib_read_eeprom_mtd(rt2x00dev))
return 0;
ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev);
if (!ee_name && test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags)) {
rt2x00_err(rt2x00dev, "Required EEPROM name is missing.");
return -EINVAL;
}
if (!ee_name)
return 0;
rt2x00_info(rt2x00dev, "Loading EEPROM data from '%s'.\n", ee_name);
retval = request_firmware(&ee, ee_name, rt2x00dev->dev);
if (retval) {
rt2x00_err(rt2x00dev, "Failed to request EEPROM.\n");
return retval;
}
if (!ee || !ee->size || !ee->data) {
rt2x00_err(rt2x00dev, "Failed to read EEPROM file.\n");
retval = -ENOENT;
goto err_exit;
}
if (ee->size != rt2x00dev->ops->eeprom_size) {
rt2x00_err(rt2x00dev,
"EEPROM file size is invalid, it should be %d bytes\n",
rt2x00dev->ops->eeprom_size);
retval = -EINVAL;
goto err_release_ee;
}
rt2x00dev->eeprom_file = ee;
return 0;
err_release_ee:
release_firmware(ee);
err_exit:
return retval;
}
you can see this logic. In your log no messages for reading eeprom from external file. So I think that for your board reading eeprom from mtd partition is configure wrong. In rt2x00eeprom.c you can see that driver search property "ralink,mtd-eeprom". As example see files in target/linux/ramips/dts,