-/dts-v1/;
-
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
- label-mac-device = ðernet;
- };
-
- chosen {
- bootargs = "console=ttyS0,57600";
+ label-mac-device = &gmac0;
};
leds {
compatible = "gpio-leds";
work {
- label = "xy-c5:green:work";
- gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ label = "green:work";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_sys: sys {
- label = "xy-c5:green:sys";
- gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ label = "green:sys";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
};
reset {
label = "reset";
- gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
+ broken-flash-reset;
partitions {
compatible = "fixed-partitions";
status = "okay";
};
-ðernet {
- mtd-mac-address = <&factory 0x4>;
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+ status = "okay";
+ label = "wan";
+ phy-handle = <ðphy4>;
+
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+};
+
+&mdio {
+ ethphy4: ethernet-phy@4 {
+ reg = <4>;
+ };
};
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "uart3", "wdt";
- ralink,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";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "wdt";
+ function = "gpio";
+ };
+};
+
+&factory {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_4: macaddr@4 {
+ reg = <0x4 0x6>;
};
};