ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4029-gl-b1300.dts
index 6e087ba024f9da77bba77dde3bd569d7fd957127..13ed26d5d6082e984517e0dcb77d9632909ed442 100644 (file)
@@ -17,6 +17,7 @@
 #include "qcom-ipq4019.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/soc/qcom,tcsr.h>
 
 / {
@@ -28,6 +29,7 @@
                led-failsafe = &power;
                led-running = &power;
                led-upgrade = &power;
+               label-mac-device = &swport4;
        };
 
        memory {
                        status = "okay";
                };
 
-               ess-psgmii@98000 {
-                       status = "okay";
-               };
-
                tcsr@1949000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1949000 0x100>;
                watchdog@b017000 {
                        status = "okay";
                };
-
-               ess-switch@c000000 {
-                       status = "okay";
-                       switch_lan_bmp = <0x18>;
-                       switch_wan_bmp = <0x20>;
-               };
-
-               edma@c080000 {
-                       status = "okay";
-               };
        };
 
        keys {
                compatible = "gpio-leds";
 
                power: power {
-                       label = "green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
                };
 
                wlan {
-                       label = "green:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
                };
        };
                                label = "ART";
                                reg = <0x170000 0x10000>;
                                read-only;
-                               compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
 
-                               precal_art_1000: precal@1000 {
-                                       reg = <0x1000 0x2f20>;
-                               };
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_gmac0: macaddr@0 {
+                                               compatible = "mac-base";
+                                               reg = <0x0 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       macaddr_gmac1: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
 
-                               precal_art_5000: precal@5000 {
-                                       reg = <0x5000 0x2f20>;
+                                       precal_art_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_art_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
                                };
                        };
 
        status = "okay";
 };
 
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport3 {
+       status = "okay";
+
+       label = "lan2";
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac0 2>;
+};
+
+&swport4 {
+       status = "okay";
+
+       label = "lan1";
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac0 0>;
+};
+
+&swport5 {
+       status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac1>;
+};
+
 &wifi0 {
        status = "okay";
        nvmem-cell-names = "pre-calibration";