Spectrum SAX1V1K (Askey RT5010W) OpenWrt Support

congrats on the success!

lol yeah, i was too tired when i wrote that. fixed now

Hi everyone, my router is working fine after flashing openwrt except the wan led. they are doing something pretty much the opposite of the regular lan port. the green one stays on when no cable is plugged in, turns off when the cable is plugged in. the yellow one stays on no matter what. I am using a snapshot compiled by myself. tried the v24 rc5 downloaded from openwrt.org, it has the same problem. checked a couple commits in github such as this one: generic: 6.1: backport LED fixes for qca808x PHY, seems to me the QCA808x LED was not supported/had problem before. I assume it has been fixed but unfortunately other problem arised. any advice on how to track down this issue? Thanks.

1 Like

btw thanks for taking the time to document your procedure. it was clever to use reverse ssh, and over the wan port so as to not need to configure a router to join the lan.

hey @Ansuel,
i think you are the expert on all things QCA.
maybe you can chip in?

It seems to me it's a problem down to the qca8081 driver level after tested with the following settings without success.
in Openwrt, add led support at {build_dir}/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds:

spectrum,sax1v1k)
	ucidef_set_led_netdev "wan-port-link-green" "WAN-PORT-LINK-GREEN" "90000.mdio-1:1c:green:wan" "wan" "tx rx link_2500"
	ucidef_set_led_netdev "wan-port-link-yellow" "WAN-PORT-LINK-YELLOW" "90000.mdio-1:1c:yellow:wan" "wan" "tx rx link_10 link_100 link_1000"
	;;

and here {build_dir}/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts

	qca8081: ethernet-phy@28 {
		compatible = "ethernet-phy-id004d.d101";
		reg = <28>;
		reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
		reset-deassert-us = <10000>;
		
		leds {
			#address-cells = <1>;
			#size-cells = <0>;

			led@0 {
				reg = <0>;
				color = <LED_COLOR_ID_GREEN>;
				function = LED_FUNCTION_WAN;
				default-state = "keep";
			};

			led@1 {
				reg = <1>;
				color = <LED_COLOR_ID_YELLOW>;
				function = LED_FUNCTION_WAN;
				default-state = "keep";
			};
		};
	};

same problem, no blinking, any ideas?

Ok, further test shows both LED blinks after adding the settings in DTS and 01_leds files. The problem is the LED status is inverted, meaning they light up without cable plugged in, and either one of them goes off when the cable is plugged in, depends on the connection speed. I guess the qca8081 LEDs are wired in a way opposite of the driver's default setting, such active_high becomes active_low. Any sugguestions to make this right?

Maybe @robimarko can help you. There was a similar case on Mikrotik RB5009UG a while ago.

You can simply add the active-low property in DT

yes, it works! will put everything together and post here.

Edit: here's the final changes in file:

{build_dir}/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds
spectrum,sax1v1k)
	ucidef_set_led_netdev "wan-port-link-yellow" "WAN-PORT-LINK-YELLOW" "90000.mdio-1:1c:yellow:wan" "wan" "tx rx link_10 link_100 link_1000 link_2500"

and file:

{build_dir}/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts
	qca8081: ethernet-phy@28 {
		compatible = "ethernet-phy-id004d.d101";
		reg = <28>;
		reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
		reset-deassert-us = <10000>;
		
		leds {
			#address-cells = <1>;
			#size-cells = <0>;

			led@0 {
				reg = <0>;
				color = <LED_COLOR_ID_YELLOW>;
				function = LED_FUNCTION_WAN;
				default-state = "keep";
				active-low;
			};

			led@1 {
				reg = <1>;
				color = <LED_COLOR_ID_GREEN>;
				function = LED_FUNCTION_WAN;
				default-state = "keep";
				active-low;
			};
		};
	};

a pull request has been created. hopefully it will be merged.

thanks to @robimarko and everyone else pointing me to the right direction.

3 Likes

Updated pull request @robimarko