[OpenWrt-Devel] [PATCH] Support for Edimax EW-7476RPC

Cezary Jackiewicz cezary.jackiewicz at gmail.com
Sun May 26 09:35:10 EDT 2019


Dnia 2019-05-26, o godz. 09:44:59
Birger Koblitz <mail at birger-koblitz.de> napisał(a):

Hi,
yes, it works, but see my comments. 
This is almost identical device (EW-7476RPC and EW-7478C, also: RE11, RE11S),
so you can use dtsi to share common code. 

>          wnce2001|\
>          zbt-cpe102|\
>          zorlik,zl5900v2|\
> +       edimax,ew-7476rpc|\
> +       edimax,ew-7478ac|\
>          zte-q7)

Alphabetical order...


> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +
> +/ {
> +       compatible = "edimax,ew-7476ac", "ralink,mt7620a-soc";

edimax,ew-7478ac

> +       keys {
> +                compatible = "gpio-keys";
> +
> +                reset_wps {
> +                        label = "reset_wps";
> +                        gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
> +                        linux,code = <KEY_RESTART>;
> +                };

There is also a switch

		switch_high {
			label = "switch high";
			gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
			linux,code = <BTN_0>;
			linux,input-type = <EV_SW>;
		};

		switch_off {
			label = "switch off";
			gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
			linux,code = <BTN_1>;
			linux,input-type = <EV_SW>;
		};


> +       };
> +
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               led_power: power {
> +                       label = "ew-7478ac:green:power";
> +                       gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
> +               };
> +               internet {
> +                       label = "ew-7478ac:green:internet";
> +                       gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
> +               };

lan, not internet.

               lan {
                       label = "ew-7478ac:green:lan";
                       gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
              };

> +               wlan2g {
> +                       label = "ew-7478ac:blue:wlan2g";
> +                       gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
> +                       linux,default-trigger = "phy1tpt";
> +               };
> +               wlan5g {
> +                       label = "ew-7478ac:blue:wlan5g";
> +                       gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;
> +                       linux,default-trigger = "phy0tpt";
> +               };

And there is more led: 

		wps {
			label = "ew-7478ac:green:wps";
			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
		};

		crossband {
			label = "ew-7478ac:green:crossband";
			gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
		};

> +&ehci {
> +       status = "okay";
> +};
> +
> +&ohci {
> +       status = "okay";
> +};

Drop this. No usb.

> +define Device/edimax_ew-7478ac
> +  DTS := EW-7478AC
> +  DEVICE_TITLE := Edimax EW-7478AC
> +  BLOCKSIZE := 64k

BLOCKSIZE := 4k

See erasesize:

root at OpenWrt:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "u-boot-env"
mtd2: 00010000 00001000 "factory"
mtd3: 00020000 00001000 "cimage"
mtd4: 00790000 00001000 "firmware"
mtd5: 00182ef3 00001000 "kernel"
mtd6: 0060d10d 00001000 "rootfs"
mtd7: 0041a000 00001000 "rootfs_data"



-- 
Pozdrawiam,
 Cezary Jackiewicz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list