mt76: add led support to mt76x0e driver
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 mt76: add led support to mt76x0e driver
Move mt76x02 led support in mt76x02-lib module in order to add tpt led trigger to mt76x0e driver
Tested-by LGA1150 <[email protected]>
Signed-off-by Lorenzo Bianconi <[email protected]>
--- .../net/wireless/mediatek/mt76/mt76x02_regs.h | 23 ++++++++ .../net/wireless/mediatek/mt76/mt76x02_util.c | 59 +++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76x2/mcu.h | 23 -------- .../wireless/mediatek/mt76/mt76x2/pci_init.c | 54 ----------------- 4 files changed, 82 insertions(+), 77 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x02_regs.h +23 -0
@@ -230,6 +230,29 @@#define MT_COM_REG2 0x0738#define MT_COM_REG3 0x073C +#define MT_LED_CTRL 0x0770 +#define MT_LED_CTRL_REPLAY (_n) BIT(0 + (8 * (_n))) +#define MT_LED_CTRL_POLARITY (_n) BIT(1 + (8 * (_n))) +#define MT_LED_CTRL_TX_BLINK_MODE (_n) BIT(2 + (8 * (_n))) +#define MT_LED_CTRL_KICK (_n) BIT(7 + (8 * (_n))) + +#define MT_LED_TX_BLINK_0 0x0774 +#define MT_LED_TX_BLINK_1 0x0778 + +#define MT_LED_S0_BASE 0x077C +#define MT_LED_S0 (_n) (MT_LED_S0_BASE + 8 * (_n)) +#define MT_LED_S1_BASE 0x0780 +#define MT_LED_S1 (_n) (MT_LED_S1_BASE + 8 * (_n)) +#define MT_LED_STATUS_OFF_MASK GENMASK(31, 24) +#define MT_LED_STATUS_OFF (_v) (((_v) << __ffs(MT_LED_STATUS_OFF_MASK)) & \ + MT_LED_STATUS_OFF_MASK) +#define MT_LED_STATUS_ON_MASK GENMASK(23, 16) +#define MT_LED_STATUS_ON (_v) (((_v) << __ffs(MT_LED_STATUS_ON_MASK)) & \ + MT_LED_STATUS_ON_MASK) +#define MT_LED_STATUS_DURATION_MASK GENMASK(15, 8) +#define MT_LED_STATUS_DURATION (_v) (((_v) << __ffs(MT_LED_STATUS_DURATION_MASK)) & \ + MT_LED_STATUS_DURATION_MASK) +#define MT_FCE_PSE_CTRL 0x0800#define MT_FCE_PARAMETERS 0x0804#define MT_FCE_CSO 0x0808
drivers/net/wireless/mediatek/mt76/mt76x02_util.c +59 -0
71 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt76x2/mcu.h +0 -23
@@ -26,29 +26,6 @@#define MT_MCU_PCIE_REMAP_BASE2 0x0744#define MT_MCU_PCIE_REMAP_BASE3 0x0748 -#define MT_LED_CTRL 0x0770 -#define MT_LED_CTRL_REPLAY (_n) BIT(0 + (8 * (_n))) -#define MT_LED_CTRL_POLARITY (_n) BIT(1 + (8 * (_n))) -#define MT_LED_CTRL_TX_BLINK_MODE (_n) BIT(2 + (8 * (_n))) -#define MT_LED_CTRL_KICK (_n) BIT(7 + (8 * (_n))) - -#define MT_LED_TX_BLINK_0 0x0774 -#define MT_LED_TX_BLINK_1 0x0778 - -#define MT_LED_S0_BASE 0x077C -#define MT_LED_S0 (_n) (MT_LED_S0_BASE + 8 * (_n)) -#define MT_LED_S1_BASE 0x0780 -#define MT_LED_S1 (_n) (MT_LED_S1_BASE + 8 * (_n)) -#define MT_LED_STATUS_OFF_MASK GENMASK(31, 24) -#define MT_LED_STATUS_OFF (_v) (((_v) << __ffs(MT_LED_STATUS_OFF_MASK)) & \ - MT_LED_STATUS_OFF_MASK) -#define MT_LED_STATUS_ON_MASK GENMASK(23, 16) -#define MT_LED_STATUS_ON (_v) (((_v) << __ffs(MT_LED_STATUS_ON_MASK)) & \ - MT_LED_STATUS_ON_MASK) -#define MT_LED_STATUS_DURATION_MASK GENMASK(15, 8) -#define MT_LED_STATUS_DURATION (_v) (((_v) << __ffs(MT_LED_STATUS_DURATION_MASK)) & \ - MT_LED_STATUS_DURATION_MASK) -#define MT_MCU_ROM_PATCH_OFFSET 0x80000#define MT_MCU_ROM_PATCH_ADDR 0x90000
drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c +0 -54
66 lines not on this page · raw message
Signature · 1 line
2.20.1