ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-cs-w3-wd1200g-eup.dts
index dea5c2dc36d51e77d88a556c696fc96c873721db..c388ceca27b90056bf292d8898929c0003eabe9b 100644 (file)
@@ -3,6 +3,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>
 
 / {
                compatible = "gpio-leds";
 
                led_status_red: status_red {
-                       label = "red:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
                };
 
                led_status_green: status_green {
-                       label = "green:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
                };
 
                led_status_blue: status_blue {
-                       label = "blue:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
                };
        };
                                reg = <0x00170000 0x00010000>;
                                read-only;
 
-                               compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
 
-                               macaddr_art_0: macaddr@0 {
-                                       reg = <0x0 0x6>;
-                               };
+                                       macaddr_art_0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
 
-                               macaddr_art_6: macaddr@6 {
-                                       reg = <0x6 0x6>;
-                               };
+                                       macaddr_art_6: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
 
-                               precal_art_1000: precal@1000 {
-                                       reg = <0x1000 0x2f20>;
-                               };
+                                       precal_art_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
 
-                               precal_art_5000: precal@5000 {
-                                       reg = <0x5000 0x2f20>;
+                                       precal_art_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
                                };
                        };
 
        status = "okay";
 };
 
+&gmac {
+       status = "okay";
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport2 {
+       status = "okay";
+       label = "lan3";
+};
+
+&swport3 {
+       status = "okay";
+       label = "lan2";
+};
+
+&swport4 {
+       status = "okay";
+       label = "lan1";
+};
+
+&swport5 {
+       status = "okay";
+       label = "wan";
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ethphy0 {
+       status = "disabled";
+};
+
 &wifi0 {
        status = "okay";
        qcom,ath10k-calibration-variant = "ezviz-cs-w3-wd1200g-eup";