diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts new file mode 100644 index 0000000000..7a70ed9166 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "jcg,jhr-ac945m", "mediatek,mt7621-soc"; + model = "JCG JHR-AC945M"; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <80000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + +&state_default { + gpio { + ralink,group = "jtag", "wdt"; + ralink,function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 45b6fb1a2f..baceba5bd9 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -445,6 +445,18 @@ define Device/jcg_jhr-ac876m endef TARGET_DEVICES += jcg_jhr-ac876m +define Device/jcg_jhr-ac945m + IMAGE_SIZE := 16064k + IMAGES += factory.bin + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ + jcg-header 91.1 + JCG_MAXSIZE := 16064k + DEVICE_VENDOR := JCG + DEVICE_MODEL := JHR-AC945M + DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 wpad-openssl +endef +TARGET_DEVICES += jcg_jhr-ac945m + define Device/jcg_y2 IMAGE_SIZE := 16064k IMAGES += factory.bin @@ -461,7 +473,8 @@ define Device/jdcloud_re-sp-01b IMAGE_SIZE := 27328k DEVICE_VENDOR := JDCloud DEVICE_MODEL := RE-SP-01B - DEVICE_PACKAGES := kmod-fs-ext4 kmod-mt7603 kmod-mt7615e kmod-sdhci-mt7620 kmod-usb3 wpad-openssl + DEVICE_PACKAGES := kmod-fs-ext4 kmod-mt7603 kmod-mt7615e kmod-sdhci-mt7620 \ + kmod-usb3 wpad-openssl endef TARGET_DEVICES += jdcloud_re-sp-01b 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 de8a1e544d..4da6ad5904 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 @@ -14,6 +14,7 @@ ramips_setup_interfaces() d-team,pbr-m1|\ firefly,firewrt|\ jcg,jhr-ac876m|\ + jcg,jhr-ac945m|\ mediatek,ap-mt7621a-v60|\ mediatek,mt7621-eval-board|\ mqmaker,witi|\ @@ -272,6 +273,7 @@ ramips_setup_macs() label_mac=$(mtd_get_mac_binary factory 0x4) wan_mac=$label_mac ;; + jcg,jhr-ac945m|\ jcg,y2|\ zbtlink,zbt-we1326) wan_mac=$(mtd_get_mac_binary factory 0xe006)