ZBT WE826-T2 Missing led configuration

I installed latest firmware for my ZBT WE826-T2 but it doesn't own WAN and LAN leds configuration, they lack inside /sys/class/leds/. How can I add them?

Are you on 19.07? If so, does it work on a 21.02 snapshot? Did it work before and if so with which version?

I didn't tried 21.02 snapshot but only 19.07.5 and 19.07.6 and all have the same problem.

Do try one please, that's where things might be fixed, that or master.

The same way I described this here: MT7688 - disabling ethernet LEDs and controlling discretly - #3 by AndrewZ

I installed last snapshot but also this haven't LAN led configuration:

How can I manually add them?

Looking at @AndrewZ's link you'll have to build your own image, since you need to patch the DTS.

1 Like

Hi AndrewZ, I tried to modify my .dtsi but every single change make lost also the only three working leds. Can you take a look at my file please? Is this:

#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_power;
		led-running = &led_power;
		led-upgrade = &led_power;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	leds {
		compatible = "gpio-leds";

		led_power: power {
			label = "green:power";
			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};

		usb {
			label = "green:usb";
			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>;
			linux,default-trigger = "usbport";
		};

		air {
			label = "green:wifi";
			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
		};
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};
};

&gpio1 {
	status = "okay";
};

&gpio3 {
	status = "okay";
};

&sdhci {
	status = "okay";
};

&ehci {
	status = "okay";
};

&ohci {
	status = "okay";
};

&ethernet {
	mtd-mac-address = <&factory 0x4>;

	mediatek,portmap = "llllw";
};

&wmac {
	ralink,mtd-eeprom = <&factory 0x0>;
};

&state_default {
	default {
		groups = "i2c", "uartf", "wled", "spi refclk", "pa";
		function = "gpio";
	};
};

&pcie {
	status = "okay";
};

What exactly are you trying to add? Please give a single example.

This is the working mt7620a_zbtlink_zbt-we826.dtsi for the ZBT WE826:

#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_power;
		led-running = &led_power;
		led-upgrade = &led_power;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	leds {
		compatible = "gpio-leds";

		led_power: power {
			label = "green:power";
			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};

		usb {
			label = "green:usb";
			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
			trigger-sources = <&ohci_port1>, <&ehci_port1>;
			linux,default-trigger = "usbport";
		};

		air {
			label = "green:wifi";
			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
		};

		lan4 {
			label = "green:lan4";
			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
		};

		lan3 {
			label = "green:lan3";
			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
		};

		lan2 {
			label = "green:lan2";
			gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
		};

		lan1 {
			label = "green:lan1";
			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
		};

		wan {
			label = "green:wan";
			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
		};
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};
};

&gpio0 {
	status = "okay";
};

&gpio1 {
	status = "okay";
};

&gpio2 {
	status = "okay";
};

&gpio3 {
	status = "okay";
};

&sdhci {
	status = "okay";
};

&ehci {
	status = "okay";
};

&ohci {
	status = "okay";
};

&ethernet {
	mtd-mac-address = <&factory 0x4>;

	mediatek,portmap = "llllw";
};

&wmac {
	ralink,mtd-eeprom = <&factory 0x0>;
};

&state_default {
	default {
		groups = "ephy", "i2c", "uartf", "wled", "spi refclk", "pa";
		function = "gpio";
	};
};

&pcie {
	status = "okay";
};