mpc85xx: convert TL-WDR4900 v1 to simpleImage
[openwrt/staging/blogic.git] / target / linux / mpc85xx / files / arch / powerpc / boot / dts / tl-wdr4900-v1.dts
index 0d79dc0db22fa9240fa2bf8f0ed83221ba0c2ad8..f9fdfc646527d2b8aa48b10e6e35b9aa0c9f5209 100644 (file)
 
 / {
        model = "TP-Link TL-WDR4900 v1";
-       compatible = "tp-link,TL-WDR4900v1";
+       compatible = "tplink,tl-wdr4900-v1";
 
        chosen {
                bootargs = "console=ttyS0,115200";
 /*
-               linux,stdout-path = "/soc@ffe00000/serial@4500";
+               stdout-path = "/soc@ffe00000/serial@4500";
 */
        };
 
        aliases {
                spi0 = &spi0;
+               led-boot = &system_green;
+               led-failsafe = &system_green;
+               led-running = &system_green;
+               led-upgrade = &system_green;
        };
 
        memory {
 
                spi0: spi@7000 {
                        flash@0 {
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                compatible = "jedec,spi-nor";
                                reg = <0>;
                                spi-max-frequency = <25000000>;
 
-                               u-boot@0 {
-                                       reg = <0x0 0x0050000>;
-                                       label = "u-boot";
-                                       read-only;
-                               };
-
-                               dtb@50000 {
-                                       reg = <0x00050000 0x00010000>;
-                                       label = "dtb";
-                                       read-only;
-                               };
-
-                               kernel@60000 {
-                                       reg = <0x00060000 0x002a0000>;
-                                       label = "kernel";
-                               };
-
-                               rootfs@300000 {
-                                       reg = <0x00300000 0x00ce0000>;
-                                       label = "rootfs";
-                               };
-
-                               config: config@fe0000 {
-                                       reg = <0x00fe0000 0x00010000>;
-                                       label = "config";
-                                       read-only;
-                               };
-
-                               caldata@ff0000 {
-                                       reg = <0x00ff0000 0x00010000>;
-                                       label = "caldata";
-                                       read-only;
-                               };
-
-                               firmware@60000 {
-                                       reg = <0x00060000 0x00f80000>;
-                                       label = "firmware";
+                               partitions {
+                                       compatible = "fixed-partitions";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       partition@0 {
+                                               reg = <0x0 0x0050000>;
+                                               label = "u-boot";
+                                               read-only;
+                                       };
+
+                                       partition@50000 {
+                                               reg = <0x00050000 0x00010000>;
+                                               label = "dtb";
+                                               read-only;
+                                       };
+
+                                       partition@60000 {
+                                               compatible = "tplink,firmware";
+                                               reg = <0x00060000 0x00f80000>;
+                                               label = "firmware";
+                                       };
+
+                                       config: partition@fe0000 {
+                                               reg = <0x00fe0000 0x00010000>;
+                                               label = "config";
+                                               read-only;
+                                       };
+
+                                       partition@ff0000 {
+                                               reg = <0x00ff0000 0x00010000>;
+                                               label = "caldata";
+                                               read-only;
+                                       };
                                };
                        };
                };
 
-               gpio0: gpio-controller@f000 {
+               gpio0: gpio-controller@fc00 {
                };
 
                usb@22000 {
                enet0: ethernet@b0000 {
                        phy-handle = <&phy0>;
                        phy-connection-type = "rgmii-id";
-                       mtd-mac-address = <&config 0x14c>;
+                       mtd-mac-address = <&config 0x144>;
                };
 
                enet1: ethernet@b1000 {
                can1: can@1d000 {
                        status = "disabled";
                };
+
+               ptp_clock@b0e00 {
+                       compatible = "fsl,etsec-ptp";
+                       reg = <0xb0e00 0xb0>;
+                       interrupts = <68 2 0 0 69 2 0 0 70 2 0 0>;
+                       fsl,cksel       = <1>;
+                       fsl,tclk-period = <5>;
+                       fsl,tmr-prsc    = <2>;
+                       fsl,tmr-add     = <0xcccccccd>;
+                       fsl,tmr-fiper1  = <0x3b9ac9fb>; /* 1PPS */
+                       fsl,tmr-fiper2  = <0x00018696>;
+                       fsl,max-adj     = <249999999>;
+               };
        };
 
        pci0: pcie@ffe09000 {
        leds {
                compatible = "gpio-leds";
 
-               system {
+               system_green: system {
                        gpios = <&gpio0 2 1>; /* active low */
                        label = "tp-link:blue:system";
                };
 };
 
 /include/ "fsl/p1010si-post.dtsi"
+
+/ {
+       cpus {
+               PowerPC,P1010@0 {
+                       bus-frequency = <399999996>;
+                       timebase-frequency = <49999999>;
+                       clock-frequency = <799999992>;
+               };
+       };
+
+       memory {
+               reg = <0x0 0x0 0x0 0x8000000>;
+       };
+
+       soc@ffe00000 {
+               bus-frequency = <399999996>;
+
+               serial@4600 {
+                       clock-frequency = <399999996>;
+               };
+
+               serial@4500 {
+                       clock-frequency = <399999996>;
+               };
+
+               pic@40000 {
+                       clock-frequency = <399999996>;
+               };
+       };
+};
+
+/*
+ * The TL-WDR4900 v1 uses the NXP (Freescale) P1014 SoC which is closely
+ * related to the P1010.
+ *
+ * NXP QP1010FS.pdf "QorIQ P1010 and P1014 Communications Processors"
+ * datasheet states that the P1014 does not include the accelerated crypto
+ * module (CAAM/SEC4) which is present in the P1010.
+ *
+ * NXP Appliation Note AN4938 Rev. 2 implies that some P1014 may contain the
+ * SEC4 module, but states that SoCs with System Version Register values
+ * 0x80F10110 or 0x80F10120 do not have the security feature.
+ *
+ * All v1.3 TL-WDR4900 tested have SVR == 0x80F10110 which AN4938 describes
+ * as: core rev 1.0, "P1014 (without security)".
+ *
+ * The SVR value is reported by uboot on the serial console.
+ */
+
+/ {
+       soc: soc@ffe00000 {
+               /delete-node/ crypto@30000; /* Pulled in by p1010si-post */
+       };
+};