[OpenWrt-Devel] [PATCH] ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2

Adrian Schmutzler mail at adrianschmutzler.de
Tue Aug 13 13:20:57 EDT 2019


> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On Behalf Of Paul Fertser
> Sent: Dienstag, 13. August 2019 18:59
> To: John Crispin <john at phrozen.org>
> Cc: Paul Fertser <fercerpav at gmail.com>; openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2
> 

Hi,

just some comments without deeper review:

> diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mir3gv2.dts b/target/linux/ramips/dts/mt7621_xiaomi_mir3gv2.dts
> new file mode 100644
> index 0000000000..81f6d20ae8
> --- /dev/null
> +++ b/target/linux/ramips/dts/mt7621_xiaomi_mir3gv2.dts
> @@ -0,0 +1,147 @@
> +/dts-v1/;
> +
> +#include "mt7621.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +
> +/ {
> +	compatible = "xiaomi,mir3gv2", "mediatek,mt7621-soc";
> +	model = "Xiaomi Mi Router 3G v2";

Please separate the version with a minus, so "xiaomi,mir3g-v2" for compatible and "xiaomi_mir3g-v2" for device node in .mk file. (Update 02_network, too ...)

> +	button {
> +		compatible = "gpio-keys-polled";
> +		poll-interval = <20>;

Try "gpio-keys" here and remove poll-interval ...

> +&ethernet {
> +	mtd-mac-address = <&factory 0xe000>;

Is there also a second MAC address for WAN in 0xe006 or somewhere else nearby? Can the WAN MAC address be read somewhere else from flash?
I would like to avoid setting wan_mac by the default case in 02_network.

> +define Device/xiaomi_mir3gv2
> +  MTK_SOC := mt7621
> +  IMAGE_SIZE := 14848k
> +  DEVICE_VENDOR := Xiaomi
> +  DEVICE_MODEL := Mi router 3G v2

Capitalize "router". Despite, use DEVICE_VARIANT, so:

+  DEVICE_MODEL := Mi Router 3G
+  DEVICE_VARIANT := v2

> +  SUPPORTED_DEVICES += mir3gv2

Drop this line.

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190813/32c1632c/attachment.sig>
-------------- next part --------------
_______________________________________________
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