ipq806x: convert to using qca8k
[openwrt/staging/blogic.git] / target / linux / ipq806x / files-4.9 / arch / arm / boot / dts / qcom-ipq8065-nbg6817.dts
index 5fe14da2681688f6f0eca1615ae6feb1760cbd60..f1609e638c232e2c6cbabf215c5e1a1797edc170 100644 (file)
                        pinctrl-0 = <&mdio0_pins>;
                        pinctrl-names = "default";
 
-                       phy0: ethernet-phy@0 {
-                               device_type = "ethernet-phy";
+                       phy_port1: phy@0 {
                                reg = <0>;
-                               qca,ar8327-initvals = <
-                                       0x00004 0x7600000   /* PAD0_MODE */
-                                       0x00008 0x1000000   /* PAD5_MODE */
-                                       0x0000c 0x80        /* PAD6_MODE */
-                                       0x000e4 0xaa545     /* MAC_POWER_SEL */
-                                       0x000e0 0xc74164de  /* SGMII_CTRL */
-                                       0x0007c 0x4e        /* PORT0_STATUS */
-                                       0x00094 0x4e        /* PORT6_STATUS */
-                                       0x00970 0x1e864443  /* QM_PORT0_CTRL0 */
-                                       0x00974 0x000001c6  /* QM_PORT0_CTRL1 */
-                                       0x00978 0x19008643  /* QM_PORT1_CTRL0 */
-                                       0x0097c 0x000001c6  /* QM_PORT1_CTRL1 */
-                                       0x00980 0x19008643  /* QM_PORT2_CTRL0 */
-                                       0x00984 0x000001c6  /* QM_PORT2_CTRL1 */
-                                       0x00988 0x19008643  /* QM_PORT3_CTRL0 */
-                                       0x0098c 0x000001c6  /* QM_PORT3_CTRL1 */
-                                       0x00990 0x19008643  /* QM_PORT4_CTRL0 */
-                                       0x00994 0x000001c6  /* QM_PORT4_CTRL1 */
-                                       0x00998 0x1e864443  /* QM_PORT5_CTRL0 */
-                                       0x0099c 0x000001c6  /* QM_PORT5_CTRL1 */
-                                       0x009a0 0x1e864443  /* QM_PORT6_CTRL0 */
-                                       0x009a4 0x000001c6  /* QM_PORT6_CTRL1 */
-                                       >;
                        };
 
-                       phy4: ethernet-phy@4 {
-                               device_type = "ethernet-phy";
+                       phy_port2: phy@1 {
+                               reg = <1>;
+                       };
+
+                       phy_port3: phy@2 {
+                               reg = <2>;
+                       };
+
+                       phy_port4: phy@3 {
+                               reg = <3>;
+                       };
+
+                       phy_port5: phy@4 {
                                reg = <4>;
-                               qca,ar8327-initvals = <
-                                       0x000e4 0x6a545     /* MAC_POWER_SEL */
-                                       0x0000c 0x80        /* PAD6_MODE */
-                                       >;
                        };
+
+                       switch0@16 {
+                               compatible = "qca,qca8337";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               reg = <16>;
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       port@0 {
+                                               reg = <0>;
+                                               label = "cpu";
+                                               ethernet = <&gmac1>;
+                                               phy-mode = "rgmii";
+
+                                               fixed-link {
+                                                       speed = <1000>;
+                                                       full-duplex;
+                                               };
+                                       };
+
+                                       port@1 {
+                                               reg = <1>;
+                                               label = "lan1";
+                                               phy-handle = <&phy_port1>;
+                                       };
+
+                                       port@2 {
+                                               reg = <2>;
+                                               label = "lan2";
+                                               phy-handle = <&phy_port2>;
+                                       };
+
+                                       port@3 {
+                                               reg = <3>;
+                                               label = "lan3";
+                                               phy-handle = <&phy_port3>;
+                                       };
+
+                                       port@4 {
+                                               reg = <4>;
+                                               label = "lan4";
+                                               phy-handle = <&phy_port4>;
+                                       };
+
+                                       port@5 {
+                                               reg = <5>;
+                                               label = "wan";
+                                               phy-handle = <&phy_port5>;
+                                       };
+
+                                       /*
+                                        * Disabled until DSA supports multiple CPUs,
+                                        * otherwise it causes undefined behavior.
+                                        *
+                                        * port@6 {
+                                        *      reg = <6>;
+                                        *      label = "cpu";
+                                        *      ethernet = <&gmac2>;
+                                        *      phy-mode = "sgmii";
+                                        *
+                                        *      fixed-link {
+                                        *              speed = <1000>;
+                                        *              full-duplex;
+                                        *      };
+                                        * };
+                                        */
+                               };
+                       };              
                };
 
                gmac1: ethernet@37200000 {