ipq806x: convert each device to DSA implementation
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-vr2600v.dts
index 79b22ff0c361401dcc2d1222386fe37b93f75999..4fddf5e90a42f0f7d0c6c11ffde16d96753e2d63 100644 (file)
@@ -1,4 +1,4 @@
-#include "qcom-ipq8064-v2.0.dtsi"
+#include "qcom-ipq8064-v2.0-smb208.dtsi"
 
 #include <dt-bindings/input/input.h>
 
 
                cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
-               W25Q128@0 {
+               flash@0 {
                        compatible = "jedec,spi-nor";
                        #address-cells = <1>;
                        #size-cells = <1>;
                        spi-max-frequency = <50000000>;
                        reg = <0>;
 
-                       SBL1@0 {
-                               label = "SBL1";
-                               reg = <0x0 0x20000>;
-                               read-only;
-                       };
-
-                       MIBIB@20000 {
-                               label = "MIBIB";
-                               reg = <0x20000 0x20000>;
-                               read-only;
-                       };
-
-                       SBL2@40000 {
-                               label = "SBL2";
-                               reg = <0x40000 0x40000>;
-                               read-only;
-                       };
-
-                       SBL3@80000 {
-                               label = "SBL3";
-                               reg = <0x80000 0x80000>;
-                               read-only;
-                       };
-
-                       DDRCONFIG@100000 {
-                               label = "DDRCONFIG";
-                               reg = <0x100000 0x10000>;
-                               read-only;
-                       };
-
-                       SSD@110000 {
-                               label = "SSD";
-                               reg = <0x110000 0x10000>;
-                               read-only;
-                       };
-
-                       TZ@120000 {
-                               label = "TZ";
-                               reg = <0x120000 0x80000>;
-                               read-only;
-                       };
-
-                       RPM@1a0000 {
-                               label = "RPM";
-                               reg = <0x1a0000 0x80000>;
-                               read-only;
-                       };
-
-                       APPSBL@220000 {
-                               label = "APPSBL";
-                               reg = <0x220000 0x80000>;
-                               read-only;
-                       };
-
-                       APPSBLENV@2a0000 {
-                               label = "APPSBLENV";
-                               reg = <0x2a0000 0x40000>;
-                               read-only;
-                       };
-
-                       OLDART@2e0000 {
-                               label = "OLDART";
-                               reg = <0x2e0000 0x40000>;
-                               read-only;
+                       partitions {
+                               compatible = "fixed-partitions";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               partition@0 {
+                                       label = "SBL1";
+                                       reg = <0x0 0x20000>;
+                                       read-only;
+                               };
+
+                               partition@20000 {
+                                       label = "MIBIB";
+                                       reg = <0x20000 0x20000>;
+                                       read-only;
+                               };
+
+                               partition@40000 {
+                                       label = "SBL2";
+                                       reg = <0x40000 0x40000>;
+                                       read-only;
+                               };
+
+                               partition@80000 {
+                                       label = "SBL3";
+                                       reg = <0x80000 0x80000>;
+                                       read-only;
+                               };
+
+                               partition@100000 {
+                                       label = "DDRCONFIG";
+                                       reg = <0x100000 0x10000>;
+                                       read-only;
+                               };
+
+                               partition@110000 {
+                                       label = "SSD";
+                                       reg = <0x110000 0x10000>;
+                                       read-only;
+                               };
+
+                               partition@120000 {
+                                       label = "TZ";
+                                       reg = <0x120000 0x80000>;
+                                       read-only;
+                               };
+
+                               partition@1a0000 {
+                                       label = "RPM";
+                                       reg = <0x1a0000 0x80000>;
+                                       read-only;
+                               };
+
+                               partition@220000 {
+                                       label = "APPSBL";
+                                       reg = <0x220000 0x80000>;
+                                       read-only;
+                               };
+
+                               partition@2a0000 {
+                                       label = "APPSBLENV";
+                                       reg = <0x2a0000 0x40000>;
+                                       read-only;
+                               };
+
+                               partition@2e0000 {
+                                       label = "OLDART";
+                                       reg = <0x2e0000 0x40000>;
+                                       read-only;
+                               };
+
+                               partition@320000 {
+                                       label = "firmware";
+                                       reg = <0x320000 0xc60000>;
+                                       compatible = "openwrt,uimage";
+                                       openwrt,offset = <512>; /* account for pad-extra 512 */
+                               };
+
+                               /* hole 0xf80000 - 0xfaf100 */
+
+                               partition@faf100 {
+                                       label = "default-mac";
+                                       reg = <0xfaf100 0x00200>;
+                                       read-only;
+
+                                       compatible = "nvmem-cells";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_defaultmac_0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+                               };
+
+                               partition@fc0000 {
+                                       label = "ART";
+                                       reg = <0xfc0000 0x40000>;
+                                       read-only;
+
+                                       compatible = "nvmem-cells";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       precal_ART_1000: precal@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_ART_5000: precal@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
+                               };
                        };
+               };
+       };
+};
 
-                       kernel@320000 {
-                               label = "kernel";
-                               reg = <0x320000 0x300000>;
-                       };
+&hs_phy_0 {
+       status = "okay";
+};
 
-                       rootfs@620000 {
-                               label = "rootfs";
-                               reg = <0x620000 0x960000>;
-                       };
+&ss_phy_0 {
+       status = "okay";
+};
 
-                       defaultmac: default-mac@0xfaf100 {
-                               label = "default-mac";
-                               reg = <0xfaf100 0x00200>;
-                               read-only;
-                       };
+&usb3_0 {
+       status = "okay";
+};
 
-                       ART@fc0000 {
-                               label = "ART";
-                               reg = <0xfc0000 0x40000>;
-                               read-only;
-                       };
-               };
-       };
+&hs_phy_1 {
+       status = "okay";
 };
 
-&usb3_0 {
+&ss_phy_1 {
        status = "okay";
 };
 
 
 &pcie0 {
        status = "okay";
+
+       bridge@0,0 {
+               reg = <0x00000000 0 0 0 0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               ranges;
+
+               wifi@1,0 {
+                       compatible = "pci168c,0040";
+                       reg = <0x00010000 0 0 0 0>;
+
+                       nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_1000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
+                       mac-address-increment = <(-1)>;
+               };
+       };
 };
 
 &pcie1 {
        status = "okay";
        max-link-speed = <1>;
+
+       bridge@0,0 {
+               reg = <0x00000000 0 0 0 0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               ranges;
+
+               wifi@1,0 {
+                       compatible = "pci168c,0040";
+                       reg = <0x00010000 0 0 0 0>;
+
+                       nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_5000>;
+                       nvmem-cell-names = "mac-address", "pre-calibration";
+               };
+       };
 };
 
 &mdio0 {
        pinctrl-0 = <&mdio0_pins>;
        pinctrl-names = "default";
 
-       phy0: ethernet-phy@0 {
-               reg = <0>;
-               qca,ar8327-initvals = <
-                       0x00004 0x7600000   /* PAD0_MODE */
-                       0x00008 0x1000000   /* PAD5_MODE */
-                       0x0000c 0x80        /* PAD6_MODE */
-                       0x000e4 0x6a545     /* MAC_POWER_SEL */
-                       0x000e0 0xc74164de  /* SGMII_CTRL */
-                       0x0007c 0x4e        /* PORT0_STATUS */
-                       0x00094 0x4e        /* PORT6_STATUS */
-                       >;
-       };
+       switch@10 {
+               compatible = "qca,qca8337";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x10>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               label = "cpu";
+                               ethernet = <&gmac1>;
+                               phy-mode = "rgmii";
+                               tx-internal-delay-ps = <1000>;
+                               rx-internal-delay-ps = <1000>;
+
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               label = "lan4";
+                               phy-mode = "internal";
+                               phy-handle = <&phy_port1>;
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               label = "lan3";
+                               phy-mode = "internal";
+                               phy-handle = <&phy_port2>;
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               label = "lan2";
+                               phy-mode = "internal";
+                               phy-handle = <&phy_port3>;
+                       };
 
-       phy4: ethernet-phy@4 {
-               reg = <4>;
+                       port@4 {
+                               reg = <4>;
+                               label = "lan1";
+                               phy-mode = "internal";
+                               phy-handle = <&phy_port4>;
+                       };
+
+                       port@5 {
+                               reg = <5>;
+                               label = "wan";
+                               phy-mode = "internal";
+                               phy-handle = <&phy_port5>;
+                       };
+
+                       /*
+                       port@6 {
+                               reg = <0>;
+                               label = "cpu";
+                               ethernet = <&gmac2>;
+                               phy-mode = "rgmii";
+
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                                       pause;
+                                       asym-pause;
+                               };
+                       };
+                       */
+               };
+
+               mdio {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       phy_port1: phy@0 {
+                               reg = <0>;
+                       };
+
+                       phy_port2: phy@1 {
+                               reg = <1>;
+                       };
+
+                       phy_port3: phy@2 {
+                               reg = <2>;
+                       };
+
+                       phy_port4: phy@3 {
+                               reg = <3>;
+                       };
+
+                       phy_port5: phy@4 {
+                               reg = <4>;
+                       };
+               };
        };
 };
 
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
-       mtd-mac-address = <&defaultmac 0>;
+       nvmem-cells = <&macaddr_defaultmac_0>;
+       nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
 
        fixed-link {
        phy-mode = "sgmii";
        qcom,id = <2>;
 
-       mtd-mac-address = <&defaultmac 0>;
+       nvmem-cells = <&macaddr_defaultmac_0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;