ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_lenovo_newifi-y1s.dts
index 007e0e69e81a8b9bc194b3dbcfe0d327fc561c90..254472f72cfe0737ef2db548cc5e6c4ec8b04621 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7620a_lenovo_newifi-y1.dtsi"
 
 / {
@@ -11,6 +9,7 @@
                led-failsafe = &led_power_blue;
                led-running = &led_power_blue;
                led-upgrade = &led_power_blue;
+               label-mac-device = &ethernet;
        };
 
        gpio_export {
                compatible = "gpio-leds";
 
                power1 {
-                       label = "newifi-y1s:yellow:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_YELLOW>;
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
                led_power_blue: power2 {
-                       label = "newifi-y1s:blue:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wlan1 {
-                       label = "newifi-y1s:yellow:wifi";
+                       label = "yellow:wifi";
                        gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
 
                wlan2 {
-                       label = "newifi-y1s:blue:wifi";
+                       label = "blue:wifi";
                        gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
                };
 
                usb1 {
-                       label = "newifi-y1s:yellow:usb";
+                       function = LED_FUNCTION_USB;
+                       color = <LED_COLOR_ID_YELLOW>;
                        gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
                };
 
                usb2 {
-                       label = "newifi-y1s:blue:usb";
+                       function = LED_FUNCTION_USB;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
                };
 
                internet {
-                       label = "newifi-y1s:blue:internet";
+                       label = "blue:internet";
                        gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &ethernet {
-       status = "okay";
-       mtd-mac-address = <&factory 0x4>;
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
+
        mediatek,portmap = "wllll";
 
        port@4 {
 };
 
 &gsw {
-       mediatek,port4 = "gmac";
+       mediatek,port4-gmac;
+       mediatek,ephy-base = /bits/ 8 <8>;
+#include <dt-bindings/leds/common.h>
+
 };