Problems adding LED's to a new ralink device

Hi all,

i'm working on support for the TP-LINK MR-6400-v3.

So far, the most is working, expect of the LED's.

I have used the source code from the original firmware provided by TP-Link to figure out the GPIO PIN's, and validated them via /sys/class/gpio ...

I added them to the dst, /sys/class/leds stays empty.

Here is the relvant part of the dst

/ {
	compatible = "tplink,tl-mr6400-v3", "mediatek,mt7628an-soc";
	model = "TP-Link TL-MR6400 v3";

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

	keys {
		compatible = "gpio-keys-polled";
		poll-interval = <20>;

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

		rfkill {
			label = "rfkill";
			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RFKILL>;
		};
	};

	leds {
		compatible = "gpio-leds";

		led_power: power {
			label = "tl-mr6400-v3:green:power";
			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
		};

		wan {
			label = "tl-mr6400-v3:green:wan";
			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
			trigger-sources = <&ehci_port1>, <&ohci_port1>;
			linux,default-trigger = "usbport";
		};

		wlan {
			label = "tl-mr6400-v3:green:wlan";
			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
		};

		lan {
			label = "tl-mr6400-v3:green:lan";
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		};

		signal1 {
			label = "tl-mr6400-v3:green:signal1";
			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
		};

		signal2 {
			label = "tl-mr6400-v3:green:signal2";
			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
		};

		signal3 {
			label = "tl-mr6400-v3:green:signal3";
			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
		};	
	};
};

Is there any way to debug the led creation and find out why this does not work?

1 Like

Found the issue: I had a typo in the DTS and used the same GPIO PIN twice

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.