-/dts-v1/;
-
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
- };
-
- chosen {
- bootargs = "console=ttyS0,57600";
+ label-mac-device = &gmac0;
};
leds {
compatible = "gpio-leds";
led_power: power {
- label = "wr1201:green:power";
- gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+ label = "green:power";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
usb {
- label = "wr1201:green:usb";
- gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+ label = "green:usb";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
eth_link {
- label = "wr1201:green:eth_link";
- gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
+ label = "green:eth_link";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
};
wps {
- label = "wr1201:green:wps";
- gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ label = "green:wps";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};
keys {
- compatible = "gpio-keys-polled";
- poll-interval = <20>;
+ compatible = "gpio-keys";
reset {
label = "reset";
- gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
ðernet {
- mtd-mac-address = <&factory 0x4>;
+ pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+};
+
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+ };
+ };
};
&sdhci {
};
};
+&state_default {
+ gpio {
+ groups = "rgmii2";
+ function = "gpio";
+ };
+};
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "rgmii2";
- ralink,function = "gpio";
- };
+&factory {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_4: macaddr@4 {
+ reg = <0x4 0x6>;
};
};