Skip to content

Commit 92ce288

Browse files
committed
Merge branch 'mtk_eth_soc-firmware'
Daniel Golle says: ==================== net: ethernet: mtk_eth_soc: use WO firmware for MT7981 In order to support wireless offloading on MT7981 we need to load the appropriate firmware. Recognize MT7981 by introducing a new DT compatible and load mt7981_wo.bin if it is set. Changes since v1: * retain alphabetic order in dt-bindings ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 99e5aca + 86ce0d0 commit 92ce288

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ properties:
2020
items:
2121
- enum:
2222
- mediatek,mt7622-wed
23+
- mediatek,mt7981-wed
2324
- mediatek,mt7986-wed
2425
- const: syscon
2526

drivers/net/ethernet/mediatek/mtk_wed_mcu.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,11 @@ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)
326326
wo->hw->index + 1);
327327

328328
/* load firmware */
329-
fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0;
329+
if (of_device_is_compatible(wo->hw->node, "mediatek,mt7981-wed"))
330+
fw_name = MT7981_FIRMWARE_WO;
331+
else
332+
fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0;
333+
330334
ret = request_firmware(&fw, fw_name, wo->hw->dev);
331335
if (ret)
332336
return ret;
@@ -386,5 +390,6 @@ int mtk_wed_mcu_init(struct mtk_wed_wo *wo)
386390
100, MTK_FW_DL_TIMEOUT);
387391
}
388392

393+
MODULE_FIRMWARE(MT7981_FIRMWARE_WO);
389394
MODULE_FIRMWARE(MT7986_FIRMWARE_WO0);
390395
MODULE_FIRMWARE(MT7986_FIRMWARE_WO1);

drivers/net/ethernet/mediatek/mtk_wed_wo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ enum mtk_wed_dummy_cr_idx {
8888
MTK_WED_DUMMY_CR_WO_STATUS,
8989
};
9090

91+
#define MT7981_FIRMWARE_WO "mediatek/mt7981_wo.bin"
9192
#define MT7986_FIRMWARE_WO0 "mediatek/mt7986_wo_0.bin"
9293
#define MT7986_FIRMWARE_WO1 "mediatek/mt7986_wo_1.bin"
9394

0 commit comments

Comments
 (0)