]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
authorTimur Tabi <timur@freescale.com>
Thu, 15 Sep 2011 18:04:13 +0000 (13:04 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 12 Oct 2011 04:47:24 +0000 (23:47 -0500)
Standarize and document the FPGA nodes used on Freescale QorIQ reference
boards.  There are different kinds of FPGAs used on the boards, but
only two are currently standard: "pixis", "ngpixis", and "qixis".  Although
there are minor differences among the boards that have one kind of FPGA, most
of the functionality is the same, so it makes sense to create common
compatibility strings.

We also need to update the P1022DS platform file, because the compatible
string for its PIXIS node has changed.  This means that older kernels are
not compatible with newer device trees.  This is not a real problem, however,
since that particular function doesn't work anyway.  When the DIU is active,
the PIXIS is in "indirect mode", and so cannot be accessed as a memory-mapped
device.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Documentation/devicetree/bindings/powerpc/fsl/board.txt
arch/powerpc/boot/dts/p1022ds.dts
arch/powerpc/boot/dts/p2020ds.dts
arch/powerpc/boot/dts/p3041ds.dts
arch/powerpc/boot/dts/p4080ds.dts
arch/powerpc/boot/dts/p5020ds.dts
arch/powerpc/platforms/85xx/p1022_ds.c

index 39e941515a36ee18ab3ca59d0b71e4e4ae93c53c..380914e965e084c7f6f61e1444eac87bcef3dc81 100644 (file)
@@ -1,3 +1,8 @@
+Freescale Reference Board Bindings
+
+This document describes device tree bindings for various devices that
+exist on some Freescale reference boards.
+
 * Board Control and Status (BCSR)
 
 Required properties:
@@ -12,25 +17,26 @@ Example:
                reg = <f8000000 8000>;
        };
 
-* Freescale on board FPGA
+* Freescale on-board FPGA
 
 This is the memory-mapped registers for on board FPGA.
 
 Required properities:
-- compatible : should be "fsl,fpga-pixis".
-- reg : should contain the address and the length of the FPPGA register
-  set.
+- compatible: should be a board-specific string followed by a string
+  indicating the type of FPGA.  Example:
+       "fsl,<board>-fpga", "fsl,fpga-pixis"
+- reg: should contain the address and the length of the FPGA register set.
 - interrupt-parent: should specify phandle for the interrupt controller.
-- interrupts : should specify event (wakeup) IRQ.
+- interrupts: should specify event (wakeup) IRQ.
 
-Example (MPC8610HPCD):
+Example (P1022DS):
 
-       board-control@e8000000 {
-               compatible = "fsl,fpga-pixis";
-               reg = <0xe8000000 32>;
-               interrupt-parent = <&mpic>;
-               interrupts = <8 8>;
-       };
+        board-control@3,0 {
+                compatible = "fsl,p1022ds-fpga", "fsl,fpga-ngpixis";
+                reg = <3 0 0x30>;
+                interrupt-parent = <&mpic>;
+                interrupts = <8 8 0 0>;
+        };
 
 * Freescale BCSR GPIO banks
 
index 1be9743ab5e085e93e346c22aa7b7a0369e9099c..b9b8719a6204d9a6a9f374b455493b94c2f7554c 100644 (file)
                };
 
                board-control@3,0 {
-                       compatible = "fsl,p1022ds-pixis";
+                       compatible = "fsl,p1022ds-fpga", "fsl,fpga-ngpixis";
                        reg = <3 0 0x30>;
                        interrupt-parent = <&mpic>;
                        /*
index dae403100f2f8f798c2e81f02e4355d494efe57c..66f03d6477b2804cb1774f33ac833e0359d73619 100644 (file)
                        };
                };
 
+               board-control@3,0 {
+                       compatible = "fsl,p2020ds-fpga", "fsl,fpga-ngpixis";
+                       reg = <0x3 0x0 0x30>;
+               };
+
                nand@4,0 {
                        compatible = "fsl,elbc-fcm-nand";
                        reg = <0x4 0x0 0x40000>;
index 69cae674f39663bf2361aed0f7c2eed1386d83b9..961a74cd1e95627955a93fbbcafca0b6065f6d8d 100644 (file)
                };
 
                board-control@3,0 {
-                       compatible = "fsl,p3041ds-pixis";
-                       reg = <3 0 0x20>;
+                       compatible = "fsl,p3041ds-fpga", "fsl,fpga-ngpixis";
+                       reg = <3 0 0x30>;
                };
        };
 
index eb11098bb687c421d33fdc238bec31a59b018c13..ccd53aff0e9a3f8c224c4d9dfa1bbfd8138d14d8 100644 (file)
 
        localbus@ffe124000 {
                reg = <0xf 0xfe124000 0 0x1000>;
-               ranges = <0 0 0xf 0xe8000000 0x08000000>;
+               ranges = <0 0 0xf 0xe8000000 0x08000000
+                         3 0 0xf 0xffdf0000 0x00008000>;
 
                flash@0,0 {
                        compatible = "cfi-flash";
                        bank-width = <2>;
                        device-width = <2>;
                };
+
+               board-control@3,0 {
+                       compatible = "fsl,p4080ds-fpga", "fsl,fpga-ngpixis";
+                       reg = <3 0 0x30>;
+               };
        };
 
        pci0: pcie@ffe200000 {
index 8366e2fd2fbafc6c946bbb94d8c91122f1210469..ca4d592c91d1943e3df9f97e0a447fd1263479ff 100644 (file)
                };
 
                board-control@3,0 {
-                       compatible = "fsl,p5020ds-pixis";
-                       reg = <3 0 0x20>;
+                       compatible = "fsl,p5020ds-fpga", "fsl,fpga-ngpixis";
+                       reg = <3 0 0x30>;
                };
        };
 
index 266b3aadfe5e2671d9ab11d1100dfcfcef52829b..6a0b9731b25988488c20dccd8c460e2b9b29e3cc 100644 (file)
@@ -128,17 +128,20 @@ static void p1022ds_set_gamma_table(int monitor_port, char *gamma_table_base)
  */
 static void p1022ds_set_monitor_port(int monitor_port)
 {
-       struct device_node *pixis_node;
+       struct device_node *np;
        void __iomem *pixis;
        u8 __iomem *brdcfg1;
 
-       pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
-       if (!pixis_node) {
+       np = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-fpga");
+       if (!np)
+               /* older device trees used "fsl,p1022ds-pixis" */
+               np = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
+       if (!np) {
                pr_err("p1022ds: missing ngPIXIS node\n");
                return;
        }
 
-       pixis = of_iomap(pixis_node, 0);
+       pixis = of_iomap(np, 0);
        if (!pixis) {
                pr_err("p1022ds: could not map ngPIXIS registers\n");
                return;