ramips: add support for Northbound Networks Zodiac GX zodiac
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 19 Aug 2019 03:05:06 +0000 (03:05 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Wed, 21 Aug 2019 03:57:53 +0000 (03:57 +0000)
Hardware spec

 - MT7621A dual-core 880MHz
 - 16MB Flash
 - 256MB RAM
 - 5 GbE ports

OEM firmware is based on OpenWrt and it accepts sysupgrade.bin image
just fine.

Vendor device page: https://northboundnetworks.com/products/zodiac-gx

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/mt7621_northbound-networks_zodiac-gx.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk

index c0de9d4e50839fad5f34d3759aa62a12dfbf8c59..8dd75860c5fb2b1a5e0df7999dbd358cc0eedc65 100755 (executable)
@@ -395,6 +395,10 @@ ramips_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0"
                ;;
+       northbound-networks,zodiac-gx)
+               ucidef_add_switch "switch0" \
+                       "0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0"
+               ;;
        netgear,r6120)
                ucidef_add_switch "switch0" \
                        "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
diff --git a/target/linux/ramips/dts/mt7621_northbound-networks_zodiac-gx.dts b/target/linux/ramips/dts/mt7621_northbound-networks_zodiac-gx.dts
new file mode 100644 (file)
index 0000000..3baf460
--- /dev/null
@@ -0,0 +1,94 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "northbound-networks,zodiac-gx", "mediatek,mt7621-soc";
+       model = "Northbound Networks Zodiac GX";
+
+       aliases {
+               led-boot = &led_status;
+               led-failsafe = &led_status;
+               led-running = &led_status;
+               led-upgrade = &led_status;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,57600";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_status: status {
+                       label = "zodiac:green:status";
+                       gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+};
+
+&spi0 {
+       status = "okay";
+
+       m25p80@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>;
+                       };
+               };
+       };
+};
+
+&ethernet {
+       mtd-mac-address = <&factory 0xe000>;
+};
+
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "wdt", "rgmii2", "jtag", "mdio";
+                       ralink,function = "gpio";
+               };
+       };
+};
index d32feb7eabec5919a5cc8a03a09e7678bb4936de..ac4c0cff0c0c365e903531569c2baa0e255c3777 100644 (file)
@@ -464,6 +464,17 @@ define Device/netis_wf-2881
 endef
 TARGET_DEVICES += netis_wf-2881
 
+# OEM firmware requires that sysupgrade firmware has "zodiac-gx" in the
+# SUPPORTED_DEVICES list.
+define Device/northbound-networks_zodiac-gx
+  MTK_SOC := mt7621
+  IMAGE_SIZE := 16064k
+  DEVICE_VENDOR := Northbound Networks
+  DEVICE_MODEL := Zodiac GX
+  SUPPORTED_DEVICES += zodiac-gx
+endef
+TARGET_DEVICES += northbound-networks_zodiac-gx
+
 define Device/phicomm_k2p
   MTK_SOC := mt7621
   IMAGE_SIZE := 15744k