ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-fritzrepeater-1200.dts
index fd6c5d9aa06f5df33501767681cc9bbdd651f755..7d683cdf652dbd6129c99be9a25a7a75f70d6d05 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>
 
 / {
                        pinctrl-0 = <&mdio_pins>;
                        pinctrl-names = "default";
 
-                       /delete-node/ ethernet-phy@1;
-                       /delete-node/ ethernet-phy@2;
-                       /delete-node/ ethernet-phy@3;
-                       /delete-node/ ethernet-phy@4;
-                       /delete-node/ psgmii-phy@5;
+                       ethphy: ethernet-phy@0 {
+                               reg = <0x0>;
+                       };
                };
 
                tcsr@1949000 {
                watchdog@b017000 {
                        status = "okay";
                };
-
-               ess-switch@c000000 {
-                       switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
-                       switch_lan_bmp = <0x0>; /* lan port bitmap */
-                       switch_wan_bmp = <0x10>; /* wan port bitmap */
-               };
-
-               edma@c080000 {
-                       status = "okay";
-                       phy-mode = "rgmii-rxid";
-                       qcom,num_gmac = <1>;
-                       qcom,single-phy;
-               };
        };
 
        key {
                compatible = "gpio-leds";
 
                power_red: power_red {
-                       label = "red:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
                };
 
                power_green: power_green {
-                       label = "green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
                };
 
                power_yellow {
-                       label = "yellow:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_YELLOW>;
                        gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
                };
        };
        qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200";
 };
 
-&gmac0 {
-       qcom,phy_mdio_addr = <0>;
-       qcom,poll_required = <1>;
-       vlan_tag = <0 0x20>;
+&gmac {
+       status = "okay";
+};
+
+&switch {
+       status = "okay";
+
+       /delete-property/ psgmii-ethphy;
+};
+
+&swport5 {
+       status = "okay";
+
+       label = "lan";
+       phy-handle = <&ethphy>;
+       phy-mode = "rgmii-id";
+};
+
+&ethphy1 {
+       status = "disabled";
+};
+
+&ethphy2 {
+       status = "disabled";
+};
+
+&ethphy3 {
+       status = "disabled";
+};
+
+&ethphy4 {
+       status = "disabled";
+};
+
+&psgmiiphy {
+       status = "disabled";
 };