#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
leds {
compatible = "gpio-leds";
- wlan {
- label = "blue:wlan";
+ led_wlan: wlan {
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 5 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>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x200>;
+ };
+
+ macaddr_factory_28: macaddr@28 {
+ reg = <0x28 0x6>;
+ };
+ };
};
firmware: partition@50000 {
- compatible = "denx,uimage";
+ compatible = "openwrt,uimage", "denx,uimage";
label = "firmware";
+ openwrt,ih-magic = <0x12291000>;
/* reg property is set based on flash size in DTS files */
};
};
};
&wmac {
- ralink,mtd-eeprom = <&factory 0x0>;
-
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
&ohci {
status = "okay";
};
-
-&factory {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_factory_28: macaddr@28 {
- reg = <0x28 0x6>;
- };
-};