ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-pa1200.dts
index 4e08dd39d0740af7b77973ebe9445a05f7082eeb..f23b58a3f44d9d12e277c068718db4ac20e52f65 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";
-               };
-
                tcsr@194b000 {
                        /* select hostmode */
                        compatible = "qcom,tcsr";
                led-failsafe = &led_status_yellow;
                led-running = &led_status_cyan;
                led-upgrade = &led_status_yellow;
+               label-mac-device = &swport5;
        };
 
        leds {
                compatible = "gpio-leds";
 
                led_status_cyan: status_cyan {
-                       label = "cyan:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_CYAN>;
                        gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_purple: status_purple {
-                       label = "purple:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_PURPLE>;
                        gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_yellow: status_yellow {
-                       label = "yellow:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_YELLOW>;
                        gpios = <&tlmm 2 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>;
+                                       };
+                               };
+                       };
+               };
        };
 };
 
        status = "okay";
 };
 
+&mdio {
+       status = "okay";
+};
+
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+};
+
+&swport4 {
+       status = "okay";
+       label = "ethernet2";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac1>;
+};
+
+&swport5 {
+       status = "okay";
+       label = "ethernet1";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_gmac0>;
+};
+
 &wifi0 {
        status = "okay";
        qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
+
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_1000>;
 };
 
 &wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
+
+       nvmem-cell-names = "pre-calibration";
+       nvmem-cells = <&precal_art_5000>;
 };