ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-a62.dts
index 279050fa158f6a14970f12480866de2af3a8af6f..39a52a7c489796002dd6cdc320a4015e1d6f0380 100644 (file)
@@ -6,6 +6,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>
 
 / {
                        status = "okay";
                };
 
-               mdio@90000 {
-                       status = "okay";
-               };
-
-               ess-psgmii@98000 {
-                       status = "okay";
-               };
-
                tcsr@194b000 {
                        /* select hostmode */
                        compatible = "qcom,tcsr";
                watchdog@b017000 {
                        status = "okay";
                };
-
-               ess-switch@c000000 {
-                       switch_lan_bmp = <0x10>;
-                       switch_wan_bmp = <0x20>;
-
-                       status = "okay";
-               };
-
-               edma@c080000 {
-                       status = "okay";
-               };
        };
 
        keys {
                led-failsafe = &led_status_green;
                led-running = &led_status_green;
                led-upgrade = &led_status_green;
+               label-mac-device = &swport4;
        };
 
        leds {
                compatible = "gpio-leds";
 
                status_red {
-                       label = "red:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_green: status_green {
-                       label = "green:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
                };
 
                status_blue {
-                       label = "blue:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
                        gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
                };
        };
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <24000000>;
+
                /* partitions are passed via bootloader */
+               partitions {
+                       partition-art {
+                               label = "0:ART";
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_gmac0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+
+                                       macaddr_gmac1: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
+
+                                       precal_art_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_art_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
+
+                                       precal_art_9000: precal@9000 {
+                                               reg = <0x9000 0x2f20>;
+                                       };
+                               };
+                       };
+               };
        };
 };
 
        status = "okay";
 };
 
-&gmac0 {
-       qcom,phy_mdio_addr = <3>;
-       qcom,poll_required = <1>;
-       qcom,forced_speed = <1000>;
-       qcom,forced_duplex = <1>;
-       vlan_tag = <1 0x10>;
-};
-
 &usb2_hs_phy {
        status = "okay";
 };
                        reg = <0x00010000 0 0 0 0>;
                        qcom,ath10k-calibration-variant = "OM-A62";
                        ieee80211-freq-limit = <5170000 5350000>;
+
+                       nvmem-cell-names = "pre-calibration";
+                       nvmem-cells = <&precal_art_9000>;
                };
        };
 };
 
+&mdio {
+       status = "okay";
+};
+
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport4 {
+       status = "okay";
+       label = "ethernet1";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac0>;
+};
+
+&swport5 {
+       status = "okay";
+       label = "ethernet2";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac1>;
+};
+
 &wifi0 {
        status = "okay";
        qcom,ath10k-calibration-variant = "OM-A62";
+
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "OM-A62";
        ieee80211-freq-limit = <5470000 5875000>;
+
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };