Adding Openwrt support for Wavlink WL-WN575A4

I have successfully ported Openwrt to the Wavlink WL-WN575A4 repeater.
Manufacturer Homepage:
https://www.wavlink.com/en_us/product/WL-WN575A4.html

The Device is not to be confused with the WL-WN575A3 which is a completely different device. I wonder how they come up with those device names...

Technical Data:

  • MT7620a SoC
  • MT7612e Wifi
  • 64MB RAM w9751g6kb-25
  • 8MB spi-flash w25q64c

The device has 3 LEDs which are used as rssi-LEDs.
It also has 2 buttons:

  • a WPS button (on GPIO 22 according to the original firmware)
  • a factory-reset-button (GPIO unknown)

I did not manage to get the buttons working, because openwrt doesn't let me export GPIO 22. Could be because this GPIO should be used for MDIO according to the datasheet. As I don't use WPS anyway it doesn't matter for me.

When pressing the factory-reset-button on startup u-boot goes into tftp-download-mode.

On the bottom-right of the PCB is a serial connector with pinout (left to right): VCC, GND, TX, RX.

Also there is an open telnet-server on port 2323 using username "admin2860" with the password set on the web interface.

I used the following dts-file:

#include "mt7620a.dtsi"

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

/ {
	compatible = "wavlink,wl-wn575a4", "ralink,mt7620a-soc";
	model = "Wavlink WL-WN575A4";

//	keys {
//		compatible = "gpio-keys";

//		wps {
//			label = "wps";
//			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
//			linux,code = <KEY_WPS_BUTTON>;
//		};
//	};


	leds {
		compatible = "gpio-leds";

		wifi-high {
			label = "blue:wifi-high";
			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
		};

		wifi-med {
			label = "orange:wifi-med";
			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
		};

		wifi-low {
			label = "red:wifi-low";
			gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
		};
	};
};

&spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <24000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x0 0x30000>;
				read-only;
			};

			partition@30000 {
				label = "config";
				reg = <0x30000 0x10000>;
				read-only;
			};

			factory: partition@40000 {
				label = "factory";
				reg = <0x40000 0x10000>;
				read-only;
			};

			partition@50000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x50000 0x7b0000>;
			};
		};
	};
};

&state_default {
	gpio {
		groups = "i2c", "uartf";
		function = "gpio";
	};
};

&ethernet {
	pinctrl-names = "default";
	pinctrl-0 = <&ephy_pins>;

	mtd-mac-address = <&factory 0x28>;

	mediatek,portmap = "llllw";
};

&pcie {
	status = "okay";
};

&pcie0 {
	mt76@0,0 {
		compatible = "pci0,0";
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 6000000>;
	};
};

&wmac {
	pinctrl-names = "default";
	pinctrl-0 = <&pa_pins>;

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

I don't think this device needs to be included in the official repository because it seems to be out of sale.

The process for adding a new device was pretty straight-forward and the documentation ist good.

BTW the factory-partition contains the string # Generated by uci2dat.

3 Likes

Great work!

I don't think a device not being for sale is an issue. You'll see lots of people trying to find aftermarket firmware once they realise the vendor doesn't support the hardware anymore. So definitely worth submitting it I'd say.

3 Likes

Sorry for my bad English.

Thank you very much for your work.
I have a WN575A4 bought this Christmas from amazon. https://www.amazon.es/gp/product/B07F1T33DC.
For now it works without problems, good coverage. Since you've ported openwrt I'll try it out soon.
I want to learn how to port openwrt to a router (NuCom WR744G Plus) that has a mt7621 and I think it can be useful to start with. Any recommendation? Thanks greetings

1 Like

Please open a new topic for your NuCom WR744G Plus.