diff --git a/target/linux/ramips/dts/mt7621_mofinetwork_mofi5500-5gxelte.dts b/target/linux/ramips/dts/mt7621_mofinetwork_mofi5500-5gxelte.dts new file mode 100644 index 00000000000..b7279d500be --- /dev/null +++ b/target/linux/ramips/dts/mt7621_mofinetwork_mofi5500-5gxelte.dts @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "mofinetwork,mofi5500-5gxelte", "mediatek,mt7621-soc"; + model = "MoFi Network MOFI5500-5GXeLTE"; + + aliases { + label-mac-device = &wifi0; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: led-0 { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led-1 { + function = LED_FUNCTION_MOBILE; + color = ; + function-enumerator = <1>; // Case says Module #1 + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led-2 { + function = LED_FUNCTION_MOBILE; + color = ; + function-enumerator = <2>; // Case says Module #2 + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_internet: led-3 { + function = LED_FUNCTION_WAN_ONLINE; + color = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +ðphy4 { + /delete-property/ interrupts; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000 0>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006 0>; + nvmem-cell-names = "mac-address"; +}; + +&i2c { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi0: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <2400000 2500000>; + + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>; + nvmem-cell-names = "eeprom", "mac-address"; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; + }; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + 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>; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; + reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; + reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_e006: macaddr@e006 { + compatible = "mac-base"; + reg = <0xe006 0x6>; + #nvmem-cell-cells = <1>; + }; + + }; + + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1ab0000>; + }; + + partition@1b00000 { + label = "Recovery"; + reg = <0x1b00000 0x500000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index f957033db38..bd0b6f0e11a 100755 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2094,6 +2094,18 @@ define Device/mikrotik_routerboard-m33g endef TARGET_DEVICES += mikrotik_routerboard-m33g +define Device/mofinetwork_mofi5500-5gxelte + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 27656k + DEVICE_VENDOR := MoFi Network + DEVICE_MODEL := MOFI5500-5GXeLTE + DEVICE_PACKAGES := kmod-usb3 kmod-mmc-mtk kmod-mt7615-firmware \ + kmod-usb-net-qmi-wwan kmod-usb-net-cdc-mbim + SUPPORTED_DEVICES += mofi5500 # Needed in order to flash through Mofi stock firmware +endef +TARGET_DEVICES += mofinetwork_mofi5500-5gxelte + define Device/mqmaker_witi $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 1542eed8f62..e268a089a57 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -164,6 +164,9 @@ mikrotik,routerboard-m11g) ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssi3" "wlan0" "60" "100" ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "green:rssi4" "wlan0" "80" "100" ;; +mofinetwork,mofi5500-5gxelte) + ucidef_set_led_netdev "internet" "Internet" "green:wan-online" "wan" + ;; mtc,wr1201) ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "br-lan" ;;