ramips: add support for RAISECOM MSG1500 Z.00 (#8385)

Hardware:
  SoC: MediaTek MT7621AT
  Flash: SPI NOR 16MB
  RAM: DDR3 64MB
  2.4GHz: MT7603EN bgn 2x2
  5GHz: MT7612EN nac 2x2
  Ethernet: 1 x WAN and 4 x LAN
  USB: 1 x 3.0
  Button: Reset, WPS

Note: the flash memory capacity is only 64MB.
      You may need to uncheck some options to ensure normal startup.

Signed-off-by: LINGJP <lonelyjskj@gmail.com>
This commit is contained in:
Liam Luo 2021-12-05 18:21:56 +08:00 committed by GitHub
parent 37828c4b47
commit 549eea3251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 171 additions and 0 deletions

View File

@ -0,0 +1,160 @@
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "raisecom,msg1500-z-00", "mediatek,mt7621-soc";
model = "RAISECOM MSG1500 Z.00";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-upgrade = &led_wps;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
internet {
label = "blue:internet";
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_wps: wps {
label = "blue:wps";
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
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>;
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 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&pcie1 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
};
};
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x8004>;
};
};
};
&state_default {
gpio {
groups = "jtag", "wdt";
function = "gpio";
};
};

View File

@ -1253,6 +1253,16 @@ define Device/raisecom_msg1500-x-00
endef
TARGET_DEVICES += raisecom_msg1500-x-00
define Device/raisecom_msg1500-z-00
$(Device/dsa-migration)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := RAISECOM
DEVICE_MODEL := MSG1500
DEVICE_VARIANT := Z.00
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3
endef
TARGET_DEVICES += raisecom_msg1500-z-00
define Device/samknows_whitebox-v8
$(Device/dsa-migration)
IMAGE_SIZE := 16064k

View File

@ -25,6 +25,7 @@ d-team,newifi-d2)
;;
d-team,pbr-m1|\
jcg,y2|\
raisecom,msg1500-z-00|\
xzwifi,creativebox-v1)
ucidef_set_led_netdev "internet" "internet" "blue:internet" "wan"
;;