-/dts-v1/;
-
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
compatible = "gpio-leds";
led_power: power {
- label = "dch-m225:green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
default-state = "on";
};
status {
- label = "dch-m225:red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
};
};
};
};
-&gpio0 {
- status = "okay";
-};
-
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
- m25p80@0 {
+ flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
read-only;
};
- factory: partition@34000 {
+ partition@34000 {
label = "factory";
reg = <0x34000 0x4000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x200>;
+ };
+
+ macaddr_factory_4: macaddr@4 {
+ reg = <0x4 0x6>;
+ };
+ };
};
- nvram: partition@38000 {
+ partition@38000 {
label = "nvram";
reg = <0x38000 0x8000>;
read-only;
&state_default {
gpio {
- ralink,group = "wdt", "rgmii1";
- ralink,function = "gpio";
+ groups = "wdt", "rgmii1";
+ function = "gpio";
};
gpio_i2s {
- ralink,group = "uartf";
- ralink,function = "gpio i2s";
+ groups = "uartf";
+ function = "gpio i2s";
};
};
ðernet {
- mtd-mac-address = <&factory 0x4>;
-};
-
-&gsw {
- ralink,port4 = "ephy";
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
};
&wmac {
- ralink,mtd-eeprom = <&factory 0>;
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
};