[PATCH] ramips: add support for Ubiquiti UniFi 6 Lite

Adrian Schmutzler mail at adrianschmutzler.de
Sat Jan 2 15:19:27 EST 2021


Hi David,

a few minor comments below.

> +&spi0 {
> +	status = "okay";
> +
> +	flash at 0 {
> +		compatible = "mx25l25635f", "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <50000000>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "u-boot";
> +				reg = <0x0 0x60000>;
> +				read-only;
> +			};
> +
> +			partition at 60000 {
> +				label = "u-boot-env";
> +				reg = <0x60000 0x10000>;
> +				read-only;
> +			};
> +
> +			factory: partition at 70000 {
> +				label = "factory";
> +				reg = <0x70000 0x40000>;
> +				read-only;
> +			};
> +
> +			eeprom: partition at 80000 {

Wrong offset in node name, also below.

> +				label = "eeprom";
> +				reg = <0xb0000 0x10000>;
> +				read-only;
> +			};
> +
> +			partition at 90000 {
> +				label = "bs";
> +				reg = <0xc0000 0x10000>;
> +			};
> +
> +			partition at a0000 {
> +				label = "cfg";
> +				reg = <0xd0000 0x100000>;
> +				read-only;
> +			};
> +
> +			partition at 1a0000 {
> +				compatible = "denx,fit";
> +				label = "firmware";
> +				reg = <0x1d0000 0xf10000>;
> +			};
> +
> +			partition at 10d0000 {
> +				label = "kernel1";
> +				reg = <0x10e0000 0xf10000>;

Partitioning ends at 0x1ff0000 and not at 0x2000000?

> +			};
> +		};
> +	};
> +};
> +
> +&wlan_2g {
> +	mtd-mac-address = <&eeprom 0x0>;
> +};
> +
> +&wlan_5g {
> +	mediatek,mtd-eeprom = <&factory 0x20000>;
> +	mtd-mac-address = <&eeprom 0x6>;
> +};

[...]

> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -1139,6 +1139,16 @@ define Device/ubnt_unifi-nanohd  endef
> TARGET_DEVICES += ubnt_unifi-nanohd
> 
> +define Device/ubnt_unifi-6-lite

"unifi-6" should be before "unifi-nanohd"?

> +  $(Device/dsa-migration)
> +  DEVICE_VENDOR := Ubiquiti
> +  DEVICE_MODEL := UniFi 6 Lite
> +  DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915e
> +  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword
> +$$(DEVICE_DTS)).dtb
> +  IMAGE_SIZE := 15424k
> +endef
> +TARGET_DEVICES += ubnt_unifi-6-lite
> +
>  define Device/unielec_u7621-06-16m
>    $(Device/dsa-migration)
>    $(Device/uimage-lzma-loader)
> diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> index bca4cc23dc..cf8b9671f0 100755
> --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> @@ -29,7 +29,8 @@ ramips_setup_interfaces()
>  	tplink,re350-v1|\
>  	tplink,re500-v1|\
>  	tplink,re650-v1|\
> -	ubnt,unifi-nanohd)
> +	ubnt,unifi-nanohd|\
> +	ubnt,unifi-6-lite)

Alphabetic sorting, see above.

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.openwrt.org/pipermail/openwrt-devel/attachments/20210102/ee152432/attachment.sig>


More information about the openwrt-devel mailing list