-/dts-v1/;
-
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
led-upgrade = &led_power;
};
- chosen {
- bootargs = "console=ttyS0,57600";
- };
-
leds {
compatible = "gpio-leds";
wifi {
- label = "re6500:orange:wifi";
- gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ label = "orange:wifi";
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
led_power: power {
- label = "re6500:white:power";
- gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ label = "white:power";
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
};
keys {
- compatible = "gpio-keys-polled";
- poll-interval = <20>;
+ compatible = "gpio-keys";
wps {
label = "wps";
- gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
- gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RESTART>;
};
};
&spi0 {
status = "okay";
- m25p80@0 {
+ flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
};
};
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "uart2", "uart3", "rgmii2";
- ralink,function = "gpio";
- };
+&state_default {
+ gpio {
+ groups = "i2c", "uart2";
+ function = "gpio";
};
};
};
};
-ðernet {
- mtd-mac-address = <&factory 0x2e>;
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_2e>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+ status = "okay";
+ label = "lan1";
+ phy-handle = <ðphy0>;
+
+ nvmem-cells = <&macaddr_factory_2e>;
+ nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+ ethphy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
};
&xhci {
status = "disabled";
};
+
+&factory {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_2e: macaddr@2e {
+ reg = <0x2e 0x6>;
+ };
+};