-/dts-v1/;
-
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,whr-300hp2", "ralink,mt7620a-soc";
compatible = "gpio-leds";
power {
- label = "whr-300hp2:red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wifi {
- label = "whr-300hp2:green:wifi";
+ label = "green:wifi";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power2 {
- label = "whr-300hp2:green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wifi2 {
- label = "whr-300hp2:orange:wifi";
+ label = "orange:wifi";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
internet {
- label = "whr-300hp2:green:internet";
+ label = "green:internet";
gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
};
router {
- label = "whr-300hp2:green:router";
+ label = "green:router";
gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
};
router2 {
- label = "whr-300hp2:orange:router";
+ label = "orange:router";
gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
};
};
read-only;
};
- factory: partition@40000 {
+ partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
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>;
+ };
+ };
};
partition@50000 {
ðernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
- mtd-mac-address = <&factory 0x4>;
- mediatek,portmap = "llllw";
-};
-&gsw {
- mediatek,port4 = "ephy";
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+
+ mediatek,portmap = "llllw";
};
&wmac {
- ralink,mtd-eeprom = <&factory 0x0>;
- 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";
};