[OpenWrt-Devel] [PATCH v3] ramips: add support for Asus RT-N10P V3 / RT-N11P B1 / RT-N12 VP B1

Chuanhong Guo gch981213 at gmail.com
Tue Apr 14 22:41:13 EDT 2020


Hi!

some comments below:
On Tue, Apr 14, 2020 at 10:16 PM Ernst Spielmann <endspiel at disroot.org> wrote:
> [...]
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               led_power: power {
> +                       label = "rt-n11p_b1:green:power";
> +                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;

you need to rebase this commit again due to recent kernel bump for
ramips/mt76x8.
Specifically, GPIO references in dts are changed. Previous <&gpioX Y> should be
changed to <&gpio (X*32+Y)>. e.g. the above line should be changed to:
<&gpio 37 GPIO_ACTIVE_LOW>;

> +               };
> +
> +               wlan {
> +                       label = "rt-n11p_b1:green:wlan";
> +                       gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               wan {
> +                       label = "rt-n11p_b1:green:wan";
> +                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               lan {
> +                       label = "rt-n11p_b1:green:lan";
> +                       gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
> +               };
> +       };
> +
> +       keys {

Could you try interrupt-driven gpio-keys instead?
just change the following line:

> +               compatible = "gpio-keys-polled";

to: compatible = "gpio-keys";

> +               poll-interval = <20>;

and remove this poll-interval line.

> +
> +               reset {
> +                       label = "reset";
> +                       gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
> +                       linux,code = <KEY_RESTART>;
> +               };
> +       };
> +};
> +
> +&spi0 {
> +       status = "okay";
> +
> +       m25p80 at 0 {
> +               compatible = "jedec,spi-nor";
> +               reg = <0>;
> +               spi-max-frequency = <10000000>;

Could you try if a higher spi-max-frequency works?
40MHz is usually fine for most devices.

> +
> +               partitions {
> [...]
> diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
> index e2890c98e6..36aa296fb8 100644
> --- a/target/linux/ramips/image/mt76x8.mk
> +++ b/target/linux/ramips/image/mt76x8.mk
> @@ -213,6 +213,30 @@ define Device/rakwireless_rak633
>  endef
>  TARGET_DEVICES += rakwireless_rak633
>
> +define Device/asus_rt-n10p_v3
> +  IMAGE_SIZE := 7872k
> +  DEVICE_VENDOR := Asus
> +  DEVICE_MODEL := RT-N10P V3

There's a dedicated DEVICE_VARIANT field available for device version.
you could split this DEVICE_MODEL and use DEVICE_VARIANT for
version numbers like V3/B1.

> +  SUPPORTED_DEVICES += rt-n10p_v3
> +endef
> +TARGET_DEVICES += asus_rt-n10p_v3
> +
> +define Device/asus_rt-n11p_b1
> +  IMAGE_SIZE := 7872k
> +  DEVICE_VENDOR := Asus
> +  DEVICE_MODEL := RT-N11P B1
> +  SUPPORTED_DEVICES += rt-n11p_b1
> +endef
> +TARGET_DEVICES += asus_rt-n11p_b1
> +
> +define Device/asus_rt-n12_vp_b1
> +  IMAGE_SIZE := 7872k
> +  DEVICE_VENDOR := Asus
> +  DEVICE_MODEL := RT-N12 VP B1
> +  SUPPORTED_DEVICES += rt-n12_vp_b1
> +endef
> +TARGET_DEVICES += asus_rt-n12_vp_b1
> +
>  define Device/skylab_skw92a
>    IMAGE_SIZE := 16064k
>    DEVICE_VENDOR := Skylab
> [...]

-- 
Regards,
Chuanhong Guo

_______________________________________________
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