Support for tp-link ec220-g5

ec220-g5 has the same hardware as the archer c5 v4, but has one less lan port

1 Like

William, thx!!!

Hello, friends!

Here are some photos of the internals of tis router. As you can see in the photo, there is a chip MT 7612EN from Mediatek inside.

G5 is the same as C5.
C5 is waiting for approval to be included in openwrt...
As soon as it is included, G5 can be easily ported from DTS.

Ok, I cought a bootlog from serial console: https://gist.github.com/nickbash11/67d3c63edff2906080f71bd971056eb8

this router can use the archer c5 v4 firmware as made in this post
But led GPIOs are not the same, I only found wlan5g, lan and wan leds, where is wlan2g and wps no idea.

target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts

	leds {
		compatible = "gpio-leds";

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

		wlan2g {
			label = "orange:wlan2g";
			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "phy1tpt";
		};

		wlan5g {
			label = "green:wlan5g";
			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "phy0tpt";
		};

		lan {
			label = "green:lan";
			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
		};
	};

So I applied the wan led for wlan2g because I don't need wan anyway. If someone knows how to find wlan2g gpio please tell.

First tests of wlan2g shows an ugly speed, it's about 15Mbit/s. For wlan5g I don't have any other device with 5Ggz to tests.

Wan have green and orange colors. Here the full led dts:

        gpio-leds {
                compatible = "gpio-leds";

                led_power: power {
                        label = "green:power";
                        gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
                        default-state = "keep";
                };
                lan {
                        label = "green:lan";
                        gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
                };
                wan {
                        label = "green:wan";
                        gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
                };
                wan_orange {
                        label = "orange:wan";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                };
                wlan2g {
                        label = "green:wlan2g";
                        gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
                };
                wlan5g {
                        label = "green:wlan5g";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
                wps {
                        label = "green:wps";
                        gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
                };
        };

The 2g problem is known... C5 have the same problem... It is related to the amplifier used by the chip that is not fully supported (LNA)... 5g works fine with mt76 driver...

Wrong. Any of these records below cause all leds are turned off:

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

                wlan2g {
                        label = "green:wlan2g";
                        gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
                };
                wps {
                        label = "green:wps";
                        gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
                };

Ideas ?

Verify if pin control is correct:

&pinctrl {
        state_default: pinctrl0 {
                gpio {
                        ralink,group = "i2c", "uartf", "ephy", "rgmii2", "nd_sd";
                        ralink,function = "gpio";
                };
        };
};

gpio 2 must be turned on too:

&gpio2 {
        status = "okay";
};
&pinctrl {
        state_default: pinctrl0 {
                gpio {
                        ralink,group = "i2c", "uartf", "ephy", "rgmii2", "nd_sd";
                        ralink,function = "gpio";
                };
        };
};

I do not quite understand, where I need to input those lines?

In DTS. Follow the C5 DTS... the pinctrl have changed a bit...

Ok, there is no any mention about the &pinctrl section in the file ./target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts it is only &gpio2, I added it... then tried and got the same, e.g. turned off all leds.

Then I decided to check it by hands via GPIO export, and 2, 13 GPIOs are have status busy:

# cd /sys/class/gpio
# GPIO=2
# echo $GPIO > export
ash: write error: Resource busy

2 and 13 GPIOs were not in the DTS file at that moment.

Sorry... the DTS uses only the state_default in pinmux.
Include the sd pins to the gpio as follow (the leds are connected to those pins in G5):

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

Hello, what about LEDs? Were you able to enable them?

No, nothing helps

Hello All, I have a TPLink EC220-G5 router and am wanting to use nordvpn with it. Any suggestions as this router doesnt give me option to load an OVPN file to it like my last ASUS router did.Switched services and they require me to use this roouter. ugh.

Thanks

  1. If, as mentioned here, the tp-link ec220-G5 uses the same hardware as this Archer C5 V4 could I simply download and install the images for https://openwrt.org/toh/tp-link/archer_c5_v4

  2. I have the tp-link ec220-G5 ver:2.0, will it be the same hardware or not??

  3. I've seen here that the C4 V4 has wifi speed issues.
    If I ran 100Mbit/s up&down internet on it, with 5Ghz-WLAN would I be fine? Would I get full speeds?

Also noticed this: https://github.com/openwrt/openwrt/pull/4327
Is Giga Switch to do with Ethernet? Will Ethernet not work with OpenWRT currently?
Or Does it work fine?

PS I found this:

Hi, did you try to install open wrt on this device?

I did not, sorry