openwrt / mt76

mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
744 stars 341 forks source link

supporting multiple leds #714

Closed frank-w closed 1 year ago

frank-w commented 1 year ago

Hi,

i have a mt7986a board (Bananapi-R3) which has 2 wifi-phys (2g4,5g). and leds connected to the responding pins

shematic: https://drive.google.com/file/d/1mxKb8CBbnzfNSd_4esmcX_NovxaXjEb8/view

lower part of first page...WF2G_LED (GPIO1) / WF5G_LED (GPIO2)

both phys are registered, but only 1 led is visible in sysfs (mt76_phy0). this can be set to on, but not to off (brightness 0)

init: https://elixir.bootlin.com/linux/v6.0.11/source/drivers/net/wireless/mediatek/mt76/mt7915/init.c#L1099 init seems to be done only for phy 0 (tried to replace 0 by dev->phy.band_idx in mt7915_led_set_config) https://elixir.bootlin.com/linux/v6.0.11/source/drivers/net/wireless/mediatek/mt76/mt7915/init.c#L207

and added some debug-prints, but it seems the function is not called at all :(

one problem (not for the missing missing call, but multi-led-support itself) seems to be data-structure allow only 1 led https://elixir.bootlin.com/linux/v6.0.11/source/drivers/net/wireless/mediatek/mt76/mt76.h#L786

led initialization itself (which creates the sysfs entry i see) seems to happen in mac80211.c mt76_led_init...but of course only for 1 led.

maybe you can help here to drive multiple leds, so i can see which phy is active. when should led lighten up? in normal setup (both phy in AP-Mode with hostapd running) does not bring the led(s) up (maybe traffic related? maybe additional options needed?). tried generating some traffic (downloading file without antennas ~160kbit/s) over 2g interface, but no led blinks (maybe needs a specific throughput?)

also tried to set gpio manually and got this

root@bpi-r3:~# cat /sys/kernel/debug/pinctrl/1001f000.pinctrl-pinctrl_moore/gpio-ranges
GPIO ranges handled:
0: pinctrl_moore GPIOS [411 - 510] PINS [0 - 99]
root@bpi-r3:~# 
root@bpi-r3:~# 
root@bpi-r3:~# GPIO_NO=$((411+2))
root@bpi-r3:~# 
root@bpi-r3:~# echo $GPIO_NO
413
root@bpi-r3:~# echo $GPIO_NO > /sys/class/gpio/export
[  159.463639] mt7986a-pinctrl 1001f000.pinctrl: pin WF5G_LED already requested by 18000000.wifi; cannot claim for pinctrl_moo3
[  159.475305] mt7986a-pinctrl 1001f000.pinctrl: pin-2 (pinctrl_moore:413) status -22

because i have mapped the gpio already in my dts...but how to use it if mt76 driver does not take care of it?

https://github.com/frank-w/BPI-R2-4.14/blob/6.1-r3/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts#L347 https://elixir.bootlin.com/linux/v6.0.11/source/drivers/pinctrl/mediatek/pinctrl-mt7986.c#L749 https://elixir.bootlin.com/linux/v6.0.11/source/drivers/pinctrl/mediatek/pinctrl-mt7986.c#L428

regards Frank

ryderlee1110 commented 1 year ago

Can you help to test these changes? Just built pass without testing.

https://pastebin.mozilla.org/LWUeUWzH/raw https://pastebin.mozilla.org/mU59hqee/raw

frank-w commented 1 year ago

Hi,wrote with lorenzo yesterday gave me similar patches on mt76-next: https://github.com/LorenzoBianconi/wireless-drivers-next/commits/mt76-devel

These also converting dev-leds to phy-leds,but can try yours too...which base do yours have?

ryderlee1110 commented 1 year ago

ah you can use his series. I can send mt7986 part based on his change if that works.

frank-w commented 1 year ago

with the patches from lorenzo both leds go on when interface goes active, and i see sysfs-entry for both phy-leds...so far as expected. but they don't go off when i put interface to down, stop hostapd or "poweroff" the board...similar to my sysfs-test with phy0 before (can switch on, but not off). so this bug is not introduced by lorenzos patches

maybe anyone here has an idea why this happens

LorenzoBianconi commented 1 year ago

with the patches from lorenzo both leds go on when interface goes active,

and i see sysfs-entry for both phy-leds...so far as expected. but they don't go off when i put interface to down, stop hostapd or "poweroff" the board...similar to my sysfs-test with phy0 before (can switch on, but not off). so this bug is not introduced by lorenzos patches

maybe anyone here has an idea why this happens

— Reply to this email directly, view it on GitHub https://github.com/openwrt/mt76/issues/714#issuecomment-1339646666, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOA2CO2TOSUBEITVV6ARY3WL5TN7ANCNFSM6AAAAAASTMWSFM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Hi Frank and Ryder,

I updated my led series according to the patches shared by Ryder (the code is available here [0]). wlan2g led is working properly now (it is blinking according to mac80211 configuration). wlan5g is not working yet (it is blinking steady).

@ryder: can you please take a look at mt7915 patch [1]?

Regards, Lorenzo

[0] https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76-devel [1] https://github.com/LorenzoBianconi/wireless-drivers-next/commit/069932639ccfb26f55a81fc4df01a3298fbb773d

-- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep

frank-w commented 1 year ago

hi lorenzo and ryder,

tested latest version on mt7986:

seems to be ignored

ryderlee1110 commented 1 year ago

@frank-w Can you test this?


--- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
@@ -1055,6 +1055,7 @@ enum offs_rev {
 #define MT_LED_CTRL(_n)                        MT_LED_PHYS(0x00 + ((_n) * 4))
 #define MT_LED_CTRL_KICK               BIT(7)
+#define MT_LED_CTRL_BAND               BIT(4)
 #define MT_LED_CTRL_BLINK_MODE         BIT(2)
 #define MT_LED_CTRL_POLARITY           BIT(1)

 #define MT_LED_TX_BLINK(_n)            MT_LED_PHYS(0x10 + ((_n) * 4))
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
index 37ed32b9974c..18265465348b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -67,6 +67,8 @@ static void mt7915_led_set_config(struct led_classdev *led_cdev,
        val = MT_LED_CTRL_BLINK_MODE | MT_LED_CTRL_KICK;
        if (mphy->led.al)
                val |= MT_LED_CTRL_POLARITY;
+       if (mphy->band_idx)
+               val |= MT_LED_CTRL_BAND;

        mt76_wr(dev, MT_LED_CTRL(mphy->band_idx), val);
        mt76_clear(dev, MT_LED_CTRL(mphy->band_idx), MT_LED_CTRL_KICK)
frank-w commented 1 year ago

with patch above traffic indication for 5g works too :)

so we only have the missing off-state-issue left

LorenzoBianconi commented 1 year ago

@frank-w https://github.com/frank-w Can you test this?

--- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h @@ -1055,6 +1055,7 @@ enum offs_rev {

define MT_LED_CTRL(_n) MT_LED_PHYS(0x00 + ((_n) * 4))

define MT_LED_CTRL_KICK BIT(7)

define MT_LED_CTRL_BLINK_MODE BIT(2)

+#define MT_LED_CTRL_BAND BIT(4)

define MT_LED_CTRL_POLARITY BIT(1)

define MT_LED_TX_BLINK(_n) MT_LED_PHYS(0x10 + ((_n) * 4))

diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c index 37ed32b9974c..18265465348b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c @@ -67,6 +67,8 @@ static void mt7996_led_set_config(struct led_classdev *led_cdev, val = MT_LED_CTRL_BLINK_MODE | MT_LED_CTRL_KICK; if (mphy->led.al) val |= MT_LED_CTRL_POLARITY;

-

 if (mphy->band_idx)

-

         val |= MT_LED_CTRL_BAND;

 mt76_wr(dev, MT_LED_CTRL(mphy->band_idx), val);
 mt76_clear(dev, MT_LED_CTRL(mphy->band_idx), MT_LED_CTRL_KICK)

— Reply to this email directly, view it on GitHub https://github.com/openwrt/mt76/issues/714#issuecomment-1339860223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOA2COXINOOPVJCY6UXM53WL6GWJANCNFSM6AAAAAASTMWSFM . You are receiving this because you commented.Message ID: @.***>

I can confirm both leds work for me applying this patch. This is my updated branch: https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76-devel

@Frank: can you please confirm it? @Ryder: I can fold mt7996 support in my series if you share the code.

Regards, Lorenzo

-- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep

frank-w commented 1 year ago

Have already tested ryders patch on top of your last version...works except led-off (interface down,hostapd/connection terminated,poweroff/sysfs). Would be nice if we can fix this too.

LorenzoBianconi commented 1 year ago

Have already tested ryders patch on top of your last version...works except led-off (interface down,hostapd/connection terminated,poweroff/sysfs). Would be nice if we can fix this too.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

I think the mac is controlling the led according to the transmitted packet (register MT_TMAC_TCR0, mask MT_TMAC_TCR0_TX_BLINK). @ryder: is it possible to overwrite/avoid this behaviour?

Regards, Lorenzo

-- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep

ryderlee1110 commented 1 year ago

I'm thinking switching blink mode to pwm mode (need more tests) as there's no way to turn LED off under blink mode.

@LorenzoBianconi @frank-w Can you test this change? I think we can go with / PWM mode / for all scenarios and get rid off "blink mode" configuration.

define MT_LED_CTRL_POLARITY     BIT(1)
#define MT_LED_CTRL_REPLAY      BIT(0)

#define MT_LED_STATUS_0(_n)         MT_LED_PHYS(0x20 + ((_n) * 8))
#define MT_LED_STATUS_1(_n)         MT_LED_PHYS(0x24 + ((_n) * 8))
#define MT_LED_STATUS_OFF       GENMASK(31, 24)
#define MT_LED_STATUS_ON        GENMASK(23, 16)
#define MT_LED_STATUS_DURATION      GENMASK(15, 0)

static void mt7915_led_set_config(struct led_classdev *led_cdev,
                  u8 delay_on, u8 delay_off)
{
    struct mt7915_dev *dev;
    struct mt76_phy *mphy;
    u32 val;

    mphy = container_of(led_cdev, struct mt76_phy, led.cdev);
    dev = container_of(mphy, struct mt7915_dev, mphy);

    /* select TX blink mode, 2: only data frames */
    if (delay_on || (delay_off != 0xff))  /* blink mode */
        mt76_rmw_field(dev, MT_TMAC_TCR0(mphy->band_idx), MT_TMAC_TCR0_TX_BLINK, 2);

    /* enable LED */
    mt76_wr(dev, MT_LED_EN(mphy->band_idx), 1);

    if (!delay_on && delay_off == 0xff) {
        /* set PWM mode */
        val = FIELD_PREP(MT_LED_STATUS_DURATION, 0xffff) |
              FIELD_PREP(MT_LED_STATUS_OFF, delay_off) |
              FIELD_PREP(MT_LED_STATUS_ON, delay_on);
        mt76_wr(dev, MT_LED_STATUS_0(mphy->band_idx), val);
        mt76_wr(dev, MT_LED_STATUS_1(mphy->band_idx), val);
    } else { /* blink mode */
        /* set LED Tx blink on/off time */
        val = FIELD_PREP(MT_LED_TX_BLINK_ON_MASK, delay_on) |
              FIELD_PREP(MT_LED_TX_BLINK_OFF_MASK, delay_off);
        mt76_wr(dev, MT_LED_TX_BLINK(mphy->band_idx), val);
    }

    /* control LED */
    val = MT_LED_CTRL_KICK;
    if (mphy->led.al)
        val |= MT_LED_CTRL_POLARITY;
    if (mphy->band_idx)
        val |= MT_LED_CTRL_BAND;
    if (delay_on && (delay_off != 0xff)) /* blink mode */
        val |= MT_LED_CTRL_BLINK_MODE;
    else /* PWM mode */
        val |= MT_LED_CTRL_REPLAY;

    mt76_wr(dev, MT_LED_CTRL(mphy->band_idx), val);
    mt76_clear(dev, MT_LED_CTRL(mphy->band_idx), MT_LED_CTRL_KICK);
}

@LorenzoBianconi I think you missed MT_LED_CTRL_BAND (bit4) of mt7615 as well https://github.com/LorenzoBianconi/wireless-drivers-next/commit/d178262a6a97c00a6d766f9dfd3788be7ead2fa8

frank-w commented 1 year ago

do we want to use led or leds? imho led makes more sense as we drive only one led at this position, so i have changed leds struct in mt76_phy (mt76.h) to "led", but need to change other occurences too, before able to test. or i change it in the mt7915_led_set_config here to first test and then we refactore it afterwards

ryderlee1110 commented 1 year ago

You can use leds as his series does. This is just my local version.

LorenzoBianconi commented 1 year ago

I'm thinking switching blink mode to pwm mode as there's no way to turn LED off under blink mode.

ack, I agree, I tested it and it seems to be working fine (all modes).

@Frank can you please test my latest mt76-devl branch?

@Ryder: do you want to add mt7996 too?

Regards, Lorenzo

@LorenzoBianconi @frank-w Can you test this change? I think we can go with / set PWM mode / for all scenario and get rid off all "blink settings" ( that is, drop if (delay_on/ delay_off) check )

define MT_LED_STATUS_0(_n) MT_LED_PHYS(0x20 + ((_n) * 8))

define MT_LED_STATUS_1(_n) MT_LED_PHYS(0x24 + ((_n) * 8))

define MT_LED_STATUS_OFF GENMASK(31, 24)

define MT_LED_STATUS_ON GENMASK(23, 16)

define MT_LED_STATUS_DURATION GENMASK(15, 0)

static void mt7915_led_set_config(struct led_classdev led_cdev, u8 delay_on, u8 delay_off) { struct mt7915_dev dev; struct mt76_phy *mphy; u32 val;

mphy = container_of(led_cdev, struct mt76_phy, led.cdev); dev = container_of(mphy, struct mt7915_dev, mphy);

/ select TX blink mode, 2: only data frames / if (delay_on && (delay_off != 0xff)) mt76_rmw_field(dev, MT_TMAC_TCR0(mphy->band_idx), MT_TMAC_TCR0_TX_BLINK, 2);

/ enable LED / mt76_wr(dev, MT_LED_EN(mphy->band_idx), 1);

if (!delay_on && delay_off == 0xff) { / set PWM mode / val = FIELD_PREP(MT_LED_STATUS_DURATION, 0xffff) | FIELD_PREP(MT_LED_STATUS_OFF, delay_off) | FIELD_PREP(MT_LED_STATUS_ON, delay_on); mt76_wr(dev, MT_LED_STATUS_0(mphy->band_idx), val); mt76_wr(dev, MT_LED_STATUS_1(mphy->band_idx), val); } else { / set LED Tx blink on/off time / val = FIELD_PREP(MT_LED_TX_BLINK_ON_MASK, delay_on) | FIELD_PREP(MT_LED_TX_BLINK_OFF_MASK, delay_off); mt76_wr(dev, MT_LED_TX_BLINK(mphy->band_idx), val); }

/ control LED / val = MT_LED_CTRL_KICK; if (mphy->led.al) val |= MT_LED_CTRL_POLARITY;

if (delay_on && (delay_off != 0xff)) val |= MT_LED_CTRL_BLINK_MODE;

mt76_wr(dev, MT_LED_CTRL(mphy->band_idx), val); mt76_clear(dev, MT_LED_CTRL(mphy->band_idx), MT_LED_CTRL_KICK); }

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

-- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep

frank-w commented 1 year ago

i have added ryders patch directly, everytime i use your branch i need to many other patches to get my board itself working again and there is no simple rebase possible.

i have pushed my current state (last change not yet tested, but compiled and on card - ready to test when i'm finished wih work)

https://github.com/frank-w/BPI-R2-4.14/commits/6.1-r3-mt76devel2

if you have not added other changes we should have same state in mt76

also splitted out mt7996 changes so that i can apply changes to 6.1 (where this chip is not there yet)

LorenzoBianconi commented 1 year ago

Il giorno mer 7 dic 2022 alle ore 10:42 Frank Wunderlich @.***> ha scritto:

i have added ryders patch directly, everytime i use your branch i need to many other patches to get my board itself working again and there is no simple rebase possible.

i have pushed my current state (last change not yet tested, but compiled and on card - ready to test when i'm finished wih work)

https://github.com/frank-w/BPI-R2-4.14/commits/6.1-r3-mt76devel2

if you have not added other changes we should have same state in mt76

actually we can get rid of tx blink mode and just rely on pwm mode. Can you please try this version? It works fine for me.

https://github.com/LorenzoBianconi/wireless-drivers-next/commit/a4d784681eaadd4709149b489d0c51f70f8484f6

We just need to set active low in dts (but this is not related to the patch).

Regards, Lorenzo

also splitted out mt7996 changes so that i can apply changes to 6.1 (where this chip is not there yet)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

-- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep

frank commented 1 year ago

I'm thinking switching blink mode to pwm mode as there's no way to turn LED off under blink mode. ack, I agree, I tested it and it seems to be working fine (all modes). @frank can you please test my latest mt76-devl branch? @ryder: do you want to add mt7996 too? Regards, Lorenzo

I am not the frank you're looking for image

frank-w commented 1 year ago

@LorenzoBianconi can you point me to necessary dts-changes? in my dts i have only a group defined which is handled by pinctrl driver

        wf_led_pins: wf-led-pins {
                mux {
                        function = "led";
                        groups = "wifi_led";
                };
        };

made again rebase with my patches on your last state

https://github.com/frank-w/BPI-R2-4.14/commits/6.1-r3-mt76devel3

my dts is arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts there

LorenzoBianconi commented 1 year ago

@LorenzoBianconi can you point me to necessary dts-changes? in my dts i have only a group defined which is handled by pinctrl driver

        wf_led_pins: wf-led-pins {
                mux {
                        function = "led";
                        groups = "wifi_led";
                };
        };

made again rebase with my patches on your last state

does it work properly?

https://github.com/frank-w/BPI-R2-4.14/commits/6.1-r3-mt76devel3

my dts is arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts there

I think you would need to add something like in mt7986a-bananapi-bpi-r3.dts

`

&wmac { ...

led {
    led-active-low;
};

}; `

but you can even enable it through debugfs.. echo 1 > /sys/kernel/debug/ieee80211/phy0/mt76/led_active_low

frank-w commented 1 year ago

i see leds blinking, but they are not on by starting interface which i guess came from not low_active.

sysfs does not work for me

root@bpi-r3:~# echo 1 > /sys/kernel/debug/ieee80211/phy0/mt76/led_active_low
-bash: /sys/kernel/debug/ieee80211/phy0/mt76/led_active_low: Permission denied

root@bpi-r3:~# ls /sys/kernel/debug/ieee80211/phy0/mt76/
eeprom        fw_util_wm     muru_stats     rx-queues     xmit-queues
fw_debug_bin  hw-queues      napi_threaded  sys_recovery
fw_debug_wa   implicit_txbf  regidx         twt_stats
fw_debug_wm   led_pin        regval         tx_stats
fw_util_wa    muru_debug     rf_regval      txpower_sku

@ryderlee1110 can you tell me exact syntax to define mt76leds as low-active?

on poweroff they go to static on

LorenzoBianconi commented 1 year ago

i see leds blinking, but they are not on by starting interface which i guess came from not low_active.

sysfs does not work for me

root@bpi-r3:~# echo 1 > /sys/kernel/debug/ieee80211/phy0/mt76/led_active_low
-bash: /sys/kernel/debug/ieee80211/phy0/mt76/led_active_low: Permission denied

root@bpi-r3:~# ls /sys/kernel/debug/ieee80211/phy0/mt76/
eeprom        fw_util_wm     muru_stats     rx-queues     xmit-queues
fw_debug_bin  hw-queues      napi_threaded  sys_recovery
fw_debug_wa   implicit_txbf  regidx         twt_stats
fw_debug_wm   led_pin        regval         tx_stats
fw_util_wa    muru_debug     rf_regval      txpower_sku

@ryderlee1110 can you tell me exact syntax to define mt76leds as low-active?

on poweroff they go to static on

@frank-w can you please try to add this patch? Doing so polarity is fine for me.

frank-w commented 1 year ago

tried this, seems only working for 2g-led...5g is blinking but with base state off like it looks

on poweroff 2g-led stays on, and 5g off

LorenzoBianconi commented 1 year ago

tried this, seems only working for 2g-led...5g is blinking but with base state off like it looks

on poweroff 2g-led stays on, and 5g off

ack, right. Can you please try to add this simple patch?

frank-w commented 1 year ago

thanks now it looks great...on when interface active/hostapd running, blinking on traffic of the right phy, off when interface goes down and also on poweroff :)

good job +1

frank-w commented 1 year ago

"backported" (basicly remove mt7996 from first 2 patches) to 6.1:

https://github.com/frank-w/BPI-R2-4.14/commits/6.1-r3

ryderlee1110 commented 1 year ago

we can close this ticket.

lukjod commented 1 year ago

Any chance to add this support for Asus rt-ax53u

LorenzoBianconi commented 1 year ago

Any chance to add this support for Asus rt-ax53u

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

I think it is running mt7915, so it should be already supported.

lukjod commented 1 year ago

Besides lan leds and power led 2 wlan leds and usb led are not supported AFAIK

LorenzoBianconi commented 1 year ago

Besides lan leds and power led 2 wlan leds and usb led are not supported AFAIK

— Reply to this email directly, view it on GitHub https://github.com/openwrt/mt76/issues/714#issuecomment-1345614895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOA2COG6EKAN6RARHLSRILWMYHL5ANCNFSM6AAAAAASTMWSFM . You are receiving this because you were mentioned.Message ID: @.***>

What is the mt76 version you are running? You need to run the latest version (nbd updated the OpenWrt package Makefile yesterday I think) and enable mt76 leds afair.

frank-w commented 1 year ago

Have you defined the led pinctrl in your dts?

Working Example from my r3:

https://github.com/frank-w/BPI-R2-4.14/blob/6.1-r3/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts#L347

https://elixir.bootlin.com/linux/v6.0.11/source/drivers/pinctrl/mediatek/pinctrl-mt7986.c#L749

https://elixir.bootlin.com/linux/v6.0.11/source/drivers/pinctrl/mediatek/pinctrl-mt7986.c#L641

lukjod commented 1 year ago

I'm on SNAPSHOT r21438-8327e0fb72, which files shoud I change to make it work after install? is this that file: kmod-mt7915e | 5.10.156+2022-12-09-7fae1de1-5

rozhuk-im commented 1 year ago

Besides lan leds and power led 2 wlan leds and usb led are not supported AFAIK

All leds supported https://github.com/openwrt/openwrt/pull/10400 except two WiFi leds.

frank-w commented 1 year ago

Have you got it working for your device? Have not found technical information which Wifi chip is used on this device.

Btw. you have to enable mac80211_leds too.

Znevna commented 1 year ago

AX53U has an MT7915e chip. This was the change required: https://github.com/openwrt/openwrt/issues/11068#issuecomment-1358143040