diff mbox

powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards

Message ID 1314644999-16955-1-git-send-email-timur@freescale.com (mailing list archive)
State Superseded
Delegated to: Kumar Gala
Headers show

Commit Message

Timur Tabi Aug. 29, 2011, 7:09 p.m. UTC
Standarize and document the FPGA nodes used on Freescale QorIQ reference
boards.  There are three kinds of FPGAs used on the boards: pixis, qixis, and
cpld.  Although their 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.

Signed-off-by: Timur Tabi <timur@freescale.com>
---

Changes for other Freescale boards will be made in future patches.

 .../devicetree/bindings/powerpc/fsl/board.txt      |   30 ++++++++++++--------
 arch/powerpc/boot/dts/p1010rdb.dts                 |   10 ++----
 arch/powerpc/boot/dts/p1020rdb.dts                 |    7 ++++-
 arch/powerpc/boot/dts/p1022ds.dts                  |    2 +-
 arch/powerpc/boot/dts/p2020ds.dts                  |    5 +++
 arch/powerpc/boot/dts/p2020rdb.dts                 |    4 ++
 arch/powerpc/boot/dts/p2040rdb.dts                 |    8 ++++-
 arch/powerpc/boot/dts/p3041ds.dts                  |    4 +-
 arch/powerpc/boot/dts/p4080ds.dts                  |    8 ++++-
 arch/powerpc/boot/dts/p5020ds.dts                  |    4 +-
 10 files changed, 55 insertions(+), 27 deletions(-)

Comments

Kumar Gala Aug. 31, 2011, 2:26 a.m. UTC | #1
On Aug 29, 2011, at 2:09 PM, Timur Tabi wrote:

> Standarize and document the FPGA nodes used on Freescale QorIQ reference
> boards.  There are three kinds of FPGAs used on the boards: pixis, qixis, and
> cpld.  Although their 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.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> 
> Changes for other Freescale boards will be made in future patches.
> 
> .../devicetree/bindings/powerpc/fsl/board.txt      |   30 ++++++++++++--------
> arch/powerpc/boot/dts/p1010rdb.dts                 |   10 ++----
> arch/powerpc/boot/dts/p1020rdb.dts                 |    7 ++++-
> arch/powerpc/boot/dts/p1022ds.dts                  |    2 +-
> arch/powerpc/boot/dts/p2020ds.dts                  |    5 +++
> arch/powerpc/boot/dts/p2020rdb.dts                 |    4 ++
> arch/powerpc/boot/dts/p2040rdb.dts                 |    8 ++++-
> arch/powerpc/boot/dts/p3041ds.dts                  |    4 +-
> arch/powerpc/boot/dts/p4080ds.dts                  |    8 ++++-
> arch/powerpc/boot/dts/p5020ds.dts                  |    4 +-
> 10 files changed, 55 insertions(+), 27 deletions(-)

Do we really want the generic "fsl,fpga-cpld" & "fsl,fpga-pixis"?  This seems to vague.  Also you need "pixis" on MPC8544DS, MPC8572DS, MPC8536DS.

Also fpga-cpld makes no sense if we keep this.  You are either a CPLD or FPGA not both.

- k
Tabi Timur-B04825 Aug. 31, 2011, 2:51 a.m. UTC | #2
Kumar Gala wrote:
> Do we really want the generic "fsl,fpga-cpld"&  "fsl,fpga-pixis"?  This seems to vague.

Yes, the PIXIS is generally register compatible across all boards.  There 
may be some minor differences, but the OCM driver can work with all PIXIS 
boards that have an PIXIS.

>  Also you need "pixis" on MPC8544DS, MPC8572DS, MPC8536DS.

Ok.

> Also fpga-cpld makes no sense if we keep this.  You are either a CPLD or FPGA not both.

Then I don't understand what the CPLD is.
Kumar Gala Aug. 31, 2011, 2:54 a.m. UTC | #3
On Aug 30, 2011, at 9:51 PM, Tabi Timur-B04825 wrote:

> Kumar Gala wrote:
>> Do we really want the generic "fsl,fpga-cpld"&  "fsl,fpga-pixis"?  This seems to vague.
> 
> Yes, the PIXIS is generally register compatible across all boards.  There 
> may be some minor differences, but the OCM driver can work with all PIXIS 
> boards that have an PIXIS.

Is this true?  Don't we have pixis and ngpixis in u-boot?

>> Also you need "pixis" on MPC8544DS, MPC8572DS, MPC8536DS.
> 
> Ok.
> 
>> Also fpga-cpld makes no sense if we keep this.  You are either a CPLD or FPGA not both.
> 
> Then I don't understand what the CPLD is.

http://en.wikipedia.org/wiki/Complex_programmable_logic_device

- k
Tabi Timur-B04825 Aug. 31, 2011, 3:01 a.m. UTC | #4
Kumar Gala wrote:
>
> On Aug 30, 2011, at 9:51 PM, Tabi Timur-B04825 wrote:
>
>> Kumar Gala wrote:
>>> Do we really want the generic "fsl,fpga-cpld"&   "fsl,fpga-pixis"?  This seems to vague.
>>
>> Yes, the PIXIS is generally register compatible across all boards.  There
>> may be some minor differences, but the OCM driver can work with all PIXIS
>> boards that have an PIXIS.
>
> Is this true?  Don't we have pixis and ngpixis in u-boot?

I forgot about that.  Well, everything I said is true about the ngpixis, 
so I guess I should use "ngpixis" instead of just "pixis" here.  I'll have 
to check if the old pixis can be used this way.

>
>>> Also you need "pixis" on MPC8544DS, MPC8572DS, MPC8536DS.
>>
>> Ok.
>>
>>> Also fpga-cpld makes no sense if we keep this.  You are either a CPLD or FPGA not both.
>>
>> Then I don't understand what the CPLD is.
>
> http://en.wikipedia.org/wiki/Complex_programmable_logic_device

Ok, I get it now.  Is there a name for the CPLD we use on these chips? 
I'm having a hard time getting proper documentation on the CPLD.  York 
expressed similar frustration.

Perhaps these should be called board-control devices.  How about

	fsl,boardcontrol-cpld
	fsl,boardcontrol-ngpixis
	fsl,boardcontrol-qixis
Kumar Gala Aug. 31, 2011, 3:05 a.m. UTC | #5
On Aug 30, 2011, at 10:01 PM, Tabi Timur-B04825 wrote:

> Kumar Gala wrote:
>> 
>> On Aug 30, 2011, at 9:51 PM, Tabi Timur-B04825 wrote:
>> 
>>> Kumar Gala wrote:
>>>> Do we really want the generic "fsl,fpga-cpld"&   "fsl,fpga-pixis"?  This seems to vague.
>>> 
>>> Yes, the PIXIS is generally register compatible across all boards.  There
>>> may be some minor differences, but the OCM driver can work with all PIXIS
>>> boards that have an PIXIS.
>> 
>> Is this true?  Don't we have pixis and ngpixis in u-boot?
> 
> I forgot about that.  Well, everything I said is true about the ngpixis, 
> so I guess I should use "ngpixis" instead of just "pixis" here.  I'll have 
> to check if the old pixis can be used this way.
> 
>> 
>>>> Also you need "pixis" on MPC8544DS, MPC8572DS, MPC8536DS.
>>> 
>>> Ok.
>>> 
>>>> Also fpga-cpld makes no sense if we keep this.  You are either a CPLD or FPGA not both.
>>> 
>>> Then I don't understand what the CPLD is.
>> 
>> http://en.wikipedia.org/wiki/Complex_programmable_logic_device
> 
> Ok, I get it now.  Is there a name for the CPLD we use on these chips? 
> I'm having a hard time getting proper documentation on the CPLD.  York 
> expressed similar frustration.
> 
> Perhaps these should be called board-control devices.  How about
> 
> 	fsl,boardcontrol-cpld
> 	fsl,boardcontrol-ngpixis
> 	fsl,boardcontrol-qixis

For the CPLD based boards I think:

<BOARDNAME>-cpld is best as there isn't really much consistent right now.

- k
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
index 39e9415..ba46a7a 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
@@ -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>-pixis", "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-pixis", "fsl,fpga-pixis";
+		 reg = <3 0 0x30>;
+		 interrupt-parent = <&mpic>;
+		 interrupts = <8 8 0 0>;
+	 };
 
 * Freescale BCSR GPIO banks
 
diff --git a/arch/powerpc/boot/dts/p1010rdb.dts b/arch/powerpc/boot/dts/p1010rdb.dts
index 6b33b73..7769e40 100644
--- a/arch/powerpc/boot/dts/p1010rdb.dts
+++ b/arch/powerpc/boot/dts/p1010rdb.dts
@@ -116,13 +116,9 @@ 
 			};
 		};
 
-		cpld@3,0 {
-			#address-cells = <1>;
-			#size-cells = <1>;
-			compatible = "fsl,p1010rdb-cpld";
-			reg = <0x3 0x0 0x0000020>;
-			bank-width = <1>;
-			device-width = <1>;
+		board-control@3,0 {
+			compatible = "fsl,p1010rdb-cpld", "fsl,fpga-cpld";
+			reg = <0x3 0x0 0x20>;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/p1020rdb.dts b/arch/powerpc/boot/dts/p1020rdb.dts
index d6a8ae4..982d3ea 100644
--- a/arch/powerpc/boot/dts/p1020rdb.dts
+++ b/arch/powerpc/boot/dts/p1020rdb.dts
@@ -34,7 +34,8 @@ 
 		/* NOR, NAND Flashes and Vitesse 5 port L2 switch */
 		ranges = <0x0 0x0 0x0 0xef000000 0x01000000
 			  0x1 0x0 0x0 0xffa00000 0x00040000
-			  0x2 0x0 0x0 0xffb00000 0x00020000>;
+			  0x2 0x0 0x0 0xffb00000 0x00020000
+			  0x3 0x0 0x0 0xffdf0000 0x00008000>;
 
 		nor@0,0 {
 			#address-cells = <1>;
@@ -138,6 +139,10 @@ 
 			reg = <0x2 0x0 0x20000>;
 		};
 
+		board-control@3,0 {
+			compatible = "fsl,p1020rdb-cpld", "fsl,fpga-cpld";
+			reg = <0x3 0x0 0x20>;
+		};
 	};
 
 	soc@ffe00000 {
diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts
index 1be9743..97a0b87 100644
--- a/arch/powerpc/boot/dts/p1022ds.dts
+++ b/arch/powerpc/boot/dts/p1022ds.dts
@@ -150,7 +150,7 @@ 
 		};
 
 		board-control@3,0 {
-			compatible = "fsl,p1022ds-pixis";
+			compatible = "fsl,p1022ds-pixis", "fsl,fpga-pixis";
 			reg = <3 0 0x30>;
 			interrupt-parent = <&mpic>;
 			/*
diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/p2020ds.dts
index dae4031..d1e52f3 100644
--- a/arch/powerpc/boot/dts/p2020ds.dts
+++ b/arch/powerpc/boot/dts/p2020ds.dts
@@ -118,6 +118,11 @@ 
 			};
 		};
 
+		board-control@3,0 {
+			compatible = "fsl,p2020ds-pixis", "fsl,fpga-pixis";
+			reg = <0x3 0x0 0x30>;
+		};
+
 		nand@4,0 {
 			compatible = "fsl,elbc-fcm-nand";
 			reg = <0x4 0x0 0x40000>;
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/p2020rdb.dts
index 1d7a05f..1bf9b8c 100644
--- a/arch/powerpc/boot/dts/p2020rdb.dts
+++ b/arch/powerpc/boot/dts/p2020rdb.dts
@@ -138,6 +138,10 @@ 
 			reg = <0x2 0x0 0x20000>;
 		};
 
+		board-control@3,0 {
+			compatible = "fsl,p2020rdb-cpld", "fsl,fpga-cpld";
+			reg = <0x3 0x0 0x20>;
+		};
 	};
 
 	soc@ffe00000 {
diff --git a/arch/powerpc/boot/dts/p2040rdb.dts b/arch/powerpc/boot/dts/p2040rdb.dts
index 7d84e39..1c72d65 100644
--- a/arch/powerpc/boot/dts/p2040rdb.dts
+++ b/arch/powerpc/boot/dts/p2040rdb.dts
@@ -109,7 +109,8 @@ 
 
 	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";
@@ -117,6 +118,11 @@ 
 			bank-width = <2>;
 			device-width = <2>;
 		};
+
+		board-control@3,0 {
+			compatible = "fsl,p2040rdb-cpld", "fsl,fpga-cpld";
+			reg = <3 0 0x20>;
+		};
 	};
 
 	pci0: pcie@ffe200000 {
diff --git a/arch/powerpc/boot/dts/p3041ds.dts b/arch/powerpc/boot/dts/p3041ds.dts
index 69cae67..92937ce 100644
--- a/arch/powerpc/boot/dts/p3041ds.dts
+++ b/arch/powerpc/boot/dts/p3041ds.dts
@@ -147,8 +147,8 @@ 
 		};
 
 		board-control@3,0 {
-			compatible = "fsl,p3041ds-pixis";
-			reg = <3 0 0x20>;
+			compatible = "fsl,p3041ds-pixis", "fsl,fpga-pixis";
+			reg = <3 0 0x30>;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/p4080ds.dts b/arch/powerpc/boot/dts/p4080ds.dts
index eb11098..a26cf15 100644
--- a/arch/powerpc/boot/dts/p4080ds.dts
+++ b/arch/powerpc/boot/dts/p4080ds.dts
@@ -108,7 +108,8 @@ 
 
 	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";
@@ -116,6 +117,11 @@ 
 			bank-width = <2>;
 			device-width = <2>;
 		};
+
+		board-control@3,0 {
+			compatible = "fsl,p4080ds-pixis", "fsl,fpga-pixis";
+			reg = <3 0 0x30>;
+		};
 	};
 
 	pci0: pcie@ffe200000 {
diff --git a/arch/powerpc/boot/dts/p5020ds.dts b/arch/powerpc/boot/dts/p5020ds.dts
index 8366e2f..b959986 100644
--- a/arch/powerpc/boot/dts/p5020ds.dts
+++ b/arch/powerpc/boot/dts/p5020ds.dts
@@ -147,8 +147,8 @@ 
 		};
 
 		board-control@3,0 {
-			compatible = "fsl,p5020ds-pixis";
-			reg = <3 0 0x20>;
+			compatible = "fsl,p5020ds-pixis", "fsl,fpga-pixis";
+			reg = <3 0 0x30>;
 		};
 	};