Skip to content

wifi: mt76: mt7925: LED support for USB adapters

Josef Schlehofer linux-arm-kernel linux-mediatek linux-wireless lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2wifi: mt76: allow LEDs with only brightness_set_blockingdrivers/net/wireless/mediatek/mt76/mac80211.c+10 -20 replies
2/2wifi: mt76: mt7925: add LED support for USB adaptersdrivers/net/wireless/mediatek/mt76/mt7925/init.c drivers/net/wireless/mediatek/mt76/mt7925/mcu.c drivers/net/wireless/mediatek/mt76/mt7925/regs.h +1 more+63 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchDevin Wittmayer
SeriesT-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH wireless-next 0/2] wifi: mt76: mt7925: LED support for USB adapters

MT7925 USB adapters such as the NETGEAR A9000 have a status LED on GPIO 8 of the chip. MediaTek's Windows driver asks the firmware to switch it with UNI command 0x2a, but the firmware in linux-firmware does not act on that command [1].

This series drives the pin from the host instead. The layout of the CBTOP GPIO block comes from the coda headers in MediaTek's gen4m driver for MT6639, which uses the same CBTOP register map as MT7925. The first patch lets the mt76 core register an LED that only provides brightness_set_blocking, which a USB driver needs. The second patch adds the LED to mt7925.

Tested on a Turris Omnia with an A9000 and firmware 20231227 over several days. The LED follows the throughput trigger and manual brightness changes, and turns off when the radio goes down.

Sean, JB, is it fine to drive these GPIO registers from the host, or does the firmware rely on GPIO 8 staying in its default function?

[1] https://lore.kernel.org/linux-wireless/[email protected]/

Josef Schlehofer (2):
wifi: mt76: allow LEDs with only brightness_set_blocking
wifi: mt76: mt7925: add LED support for USB adapters

 drivers/net/wireless/mediatek/mt76/mac80211.c | 12 ++++-
 .../net/wireless/mediatek/mt76/mt7925/init.c  | 51 +++++++++++++++++++
 .../net/wireless/mediatek/mt76/mt7925/mcu.c   |  2 +
 .../net/wireless/mediatek/mt76/mt7925/regs.h  |  8 +++
 drivers/net/wireless/mediatek/mt76/mt792x.h   |  2 +
 5 files changed, 73 insertions(+), 2 deletions(-)

base-commit: 991a73f4909f1348ffb4b38765cdb522a775e4c2

Signature · 1 line
2.54.0 (Apple Git-157)