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 d8b9e7ef13bee3afb862f205a1e4469e2dfcccb0..c388ceca27b90056bf292d8898929c0003eabe9b 100644 (file)
@@ -1,8 +1,9 @@
-// SPDX-License-Identifier: GPL-2.0 OR MIT
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
 
 #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>
 
 / {
                        reset-delay-us = <5000>;
                };
 
-               ess-psgmii@98000 {
-                       status = "okay";
-               };
-
                tcsr@1949000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1949000 0x100>;
                watchdog@b017000 {
                        status = "okay";
                };
-
-               ess-switch@c000000 {
-                       status = "okay";
-               };
-
-               edma@c080000 {
-                       status = "okay";
-               };
        };
 
        leds {
                compatible = "gpio-leds";
 
                led_status_red: status_red {
-                       label = "cs-w3-wd1200g-eup:red:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
                };
 
                led_status_green: status_green {
-                       label = "cs-w3-wd1200g-eup:green:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
                };
 
                led_status_blue: status_blue {
-                       label = "cs-w3-wd1200g-eup:blue:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
                };
        };
                                label = "ART";
                                reg = <0x00170000 0x00010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_art_0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+
+                                       macaddr_art_6: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
+
+                                       precal_art_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_art_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
+                               };
                        };
 
                        partition9@580000 {
        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";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "ezviz-cs-w3-wd1200g-eup";
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };