mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt792x: fix mt7925u USB WFSYS reset handling
mt7925u uses different reset/status registers from mt7921u. Reusing the
mt7921u register set causes the WFSYS reset to fail.
Add a chip-specific descriptor in mt792xu_wfsys_reset() to select the
correct registers and fix mt7925u failing to initialize after a warm
reboot.
Fixes: d28e1a48952e ("wifi: mt76: mt792x: introduce mt792x-usb module")
Cc: [email protected]
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -392,6 +392,10 @@
|
||||
#define MT_CBTOP_RGU_WF_SUBSYS_RST MT_CBTOP_RGU(0x600)
|
||||
#define MT_CBTOP_RGU_WF_SUBSYS_RST_WF_WHOLE_PATH BIT(0)
|
||||
|
||||
#define MT7925_CBTOP_RGU_WF_SUBSYS_RST 0x70028600
|
||||
#define MT7925_WFSYS_INIT_DONE_ADDR 0x184c1604
|
||||
#define MT7925_WFSYS_INIT_DONE 0x00001d1e
|
||||
|
||||
#define MT_HW_BOUND 0x70010020
|
||||
#define MT_HW_CHIPID 0x70010200
|
||||
#define MT_HW_REV 0x70010204
|
||||
|
||||
+12
-1
@@ -224,6 +224,15 @@ static const struct mt792xu_wfsys_desc mt7921_wfsys_desc = {
|
||||
.need_status_sel = true,
|
||||
};
|
||||
|
||||
static const struct mt792xu_wfsys_desc mt7925_wfsys_desc = {
|
||||
.rst_reg = MT7925_CBTOP_RGU_WF_SUBSYS_RST,
|
||||
.done_reg = MT7925_WFSYS_INIT_DONE_ADDR,
|
||||
.done_mask = U32_MAX,
|
||||
.done_val = MT7925_WFSYS_INIT_DONE,
|
||||
.delay_ms = 20,
|
||||
.need_status_sel = false,
|
||||
};
|
||||
|
||||
int mt792xu_dma_init(struct mt792x_dev *dev, bool resume)
|
||||
{
|
||||
int err;
|
||||
@@ -254,7 +263,9 @@ EXPORT_SYMBOL_GPL(mt792xu_dma_init);
|
||||
|
||||
int mt792xu_wfsys_reset(struct mt792x_dev *dev)
|
||||
{
|
||||
const struct mt792xu_wfsys_desc *desc = &mt7921_wfsys_desc;
|
||||
const struct mt792xu_wfsys_desc *desc = is_mt7925(&dev->mt76) ?
|
||||
&mt7925_wfsys_desc :
|
||||
&mt7921_wfsys_desc;
|
||||
u32 val;
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user