Omega2S+. How to disable Ethernet LED on the GPIO43?



  • Hello all!

    I have a little question.

    How to use Omega2S+'s GPIO43 as an usual GPIO? By default it is used as the Ethernet activity indicator, and I haven't found any way to disable it.

    I've tried to remove the kmod-ledtrig-netdev package, and it didn't solved the problem.

    In system/config/leds there is no another LED , but just omega2p:amber:system LED, which is apparently not the one that I'm trying to find.

    Thanks in advance!



  • @Artem-Reznikov said in Omega2S+. How to disable Ethernet LED on the GPIO43?:

    I've tried to remove the kmod-ledtrig-netdev package, and it didn't solved the problem.

    kmod-ledtrig-netdev is to make a generic GPIO show network activity. However, the ethernet activity LED signal on GPIO43 is a MT7688 hardware feature, no kernel code involved.

    In system/config/leds there is no another LED , but just omega2p:amber:system LED, which is apparently not the one that I'm trying to find.

    As it is a MT7688 hardware feature, you need to configure it at that level. The omega2-ctrl utility has a option to change this - I never used it myself but I guess it should do the trick:

    omega2-ctrl gpiomux set ephy gpio
    

    To understand the underlying mechanisms, have a look at the MT7688 datasheet, page 62, GPIO2_MODE register. This is where you can switch the mode for the LED pins.

    The …AN_MODE bits are relevant, because the Chip in the Omega2S is the MT7688AN (the datasheet, obviously largely copyied&pasted, talks about MT7628, the near identical predecessor of the MT7688).

    In case omega2-ctrl should not work, you could also use devmem to change these bits directly from the command line (provided that utility is included in the current OnionOS build, I'm not sure about that):

    devmem 0x10000064 32 0x05550555
    

    This will make all the LED pins work as GPIOs.

    There's one caveat: using these pins as GPIOs is the reset state of the MT7688 (see datasheet). Which means that some code in the bootloader and/or Linux actually explicitly changes the mode to make GPIO43 show ethernet activity.
    Now, as we don't know what code is responsible and when it is called, it could be that these bits are not only changed during startup, but repeatedly during operation, for example when initializing network (/etc/init.d/network restart etc…).

    So I personally would not use GPIO43 for a hardware function that could cause real-world problems in case it suddenly receives ethernet activity flicker...


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.