diff --git a/package/boot/uboot-tools/uboot-envtools/files/ramips b/package/boot/uboot-tools/uboot-envtools/files/ramips index 3ec3da6988..db551d1860 100644 --- a/package/boot/uboot-tools/uboot-envtools/files/ramips +++ b/package/boot/uboot-tools/uboot-envtools/files/ramips @@ -30,6 +30,7 @@ alfa-network,ax1800rm|\ allnet,all0256n-4m|\ allnet,all0256n-8m|\ allnet,all5002|\ +asiarf,ap7621-004-v3|\ yuncore,ax820) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-004-v3.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-004-v3.dts new file mode 100755 index 0000000000..376c3461f4 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-004-v3.dts @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +/ { + compatible = "asiarf,ap7621-004-v3", "mediatek,mt7621-soc"; + model = "AsiaRF AP7621-004 v3"; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&sdhci { + status = "okay"; + non-removable; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + compatible = "denx,uimage"; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + +&gmac0 { + status = "okay"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_factory_e000>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_factory_e006>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; + +}; + +&state_default { + gpio { + groups = "wdt", "jtag"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 4c9947a518..720b90cc50 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -366,6 +366,17 @@ define Device/asiarf_ap7621-001 endef TARGET_DEVICES += asiarf_ap7621-001 +define Device/asiarf_ap7621-004-v3 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + DEVICE_VENDOR := AsiaRF + DEVICE_MODEL := AP7621-004 + DEVICE_VARIANT := v3 + IMAGE_SIZE := 16000k + DEVICE_PACKAGES := kmod-mmc-mtk kmod-usb3 +endef +TARGET_DEVICES += asiarf_ap7621-004-v3 + define Device/asiarf_ap7621-nv1 $(Device/dsa-migration) $(Device/uimage-lzma-loader)