Skip to contentSkip to conversation

powerpc/mpc85xx:Add initial device tree support of T104x

PATCH Superseded Prabhakar Kushwaha 5 participants 9 messages Sep 11, 2013 – Sep 18, 2013

Subsystems (2)

v1 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mpc85xx:Add initial device tree support of T104x

The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 PA processor cores with high-performance data path acceleration architecture and network peripheral interfaces required for networking & telecommunications.

T1042 personality is a reduced personality of T1040 without Integrated 8-port Gigabit Ethernet switch.

The T1040/T1042 SoC includes the following function and features:

- Four e5500 cores, each with a private 256 KB L2 cache
- 256 KB shared L3 CoreNet platform cache (CPC)
- Interconnect CoreNet platform
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration for the following functions:
- Packet parsing, classification, and distribution
- Queue management for scheduling, packet sequencing, and congestion management
- Cryptography Acceleration (SEC 5.0)
- RegEx Pattern Matching Acceleration (PME 2.2)
- IEEE Std 1588 support
- Hardware buffer management for buffer allocation and deallocation
- Ethernet interfaces
- Integrated 8-port Gigabit Ethernet switch (T1040 only)
- Four 1 Gbps Ethernet controllers
- Two RGMII interfaces or one RGMII and one MII interfaces
- High speed peripheral interfaces
- Four PCI Express 2.0 controllers running at up to 5 GHz
- Two SATA controllers supporting 1.5 and 3.0 Gb/s operation
- Upto two QSGMII interface
- Upto six SGMII interface supporting 1000 Mbps
- One SGMII interface supporting upto 2500 Mbps
- Additional peripheral interfaces
- Two USB 2.0 controllers with integrated PHY
- SD/eSDHC/eMMC
- eSPI controller
- Four I2C controllers
- Four UARTs
- Four GPIO controllers
- Integrated flash controller (IFC)
- Change this to LCD/ HDMI interface (DIU) with 12 bit dual data rate
- TDM interface
- Multicore programmable interrupt controller (PIC)
- Two 8-channel DMA engines
- Single source clocking implementation
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)

---
Based upon git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

TODO: Add noded for ethernet

 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi |  116 ++++++++
 arch/powerpc/boot/dts/fsl/t1042si-post.dtsi |  430 +++++++++++++++++++++++++++
 arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi  |  111 +++++++
 3 files changed, 657 insertions(+)
 create mode 100644 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
 create mode 100644 arch/powerpc/boot/dts/fsl/t1042si-post.dtsi
 create mode 100644 arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi
arch/powerpc/boot/dts/fsl/t1040si-post.dtsi new file +116 -0
new file mode 100644
index 0000000..6ef27fe
@@ -0,0 +1,116 @@
+/*
+ * T1040 Silicon/SoC Device Tree Source (post include)
+ *
+ * Copyright 2013 Freescale Semiconductor Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Freescale Semiconductor nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/include/ "t1042si-post.dtsi"
+
+&pci0 {
+	compatible = "fsl,t1040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+};
+
+&pci1 {
+	compatible = "fsl,t1040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+};
+
+&pci2 {
+	compatible = "fsl,t1040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+};
+
+&pci3 {
+	compatible = "fsl,t1040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+};
+
+&dcsr {
+	dcsr-epu@0 {
+		compatible = "fsl,t1040-dcsr-epu", "fsl,dcsr-epu";
+	};
+	dcsr-npc {
+		compatible = "fsl,t1040-dcsr-cnpc", "fsl,dcsr-cnpc";
+	};
+	dcsr-dpaa@9000 {
+		compatible = "fsl,t1040-dcsr-dpaa", "fsl,dcsr-dpaa";
+	};
+	dcsr-ocn@11000 {
+		compatible = "fsl,t1040-dcsr-ocn", "fsl,dcsr-ocn";
+	};
+	dcsr-nal@18000 {
+		compatible = "fsl,t1040-dcsr-nal", "fsl,dcsr-nal";
+	};
+	dcsr-rcpm@22000 {
+		compatible = "fsl,t1040-dcsr-rcpm", "fsl,dcsr-rcpm";
+	};
+	dcsr-snpc@30000 {
+		compatible = "fsl,t1040-dcsr-snpc", "fsl,dcsr-snpc";
+	};
+	dcsr-snpc@31000 {
+		compatible = "fsl,t1040-dcsr-snpc", "fsl,dcsr-snpc";
+	};
+};
+
+&soc {
+
+	cpc: l3-cache-controller@10000 {
+		compatible = "fsl,t1040-l3-cache-controller", "cache";
+	};
+
+	guts: global-utilities@e0000 {
+		compatible = "fsl,t1040-device-config", "fsl,qoriq-device-config-2.0";
+	};
+
+	clockgen: global-utilities@e1000 {
+		compatible = "fsl,t1040-clockgen", "fsl,qoriq-clockgen-2.0",
+				   "fixed-clock";
+	};
+
+	rcpm: global-utilities@e2000 {
+		compatible = "fsl,t1040-rcpm", "fsl,qoriq-rcpm-2.0";
+	};
+
+	sfp: sfp@e8000 {
+		compatible = "fsl,t1040-sfp";
+	};
+
+	serdes: serdes@ea000 {
+		compatible = "fsl,t1040-serdes";
+		reg	   = <0xea000 0x4000>;
+	};
+
+	sdhc@114000 {
+		compatible = "fsl,t1040-esdhc", "fsl,esdhc";
+		sdhci,auto-cmd12;
+	};
+
+	l2switch@800000 {
+		/* TODO */
+	};
+};
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +430 -0

430 lines not on this page · raw message

arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi new file +111 -0

111 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 48 lines · Prabhakar Kushwaha

The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 PA processor cores with high-performance data path acceleration architecture and network peripheral interfaces required for networking & telecommunications.

T1042 personality is a reduced personality of T1040 without Integrated 8-port Gigabit Ethernet switch.

The T1040/T1042 SoC includes the following function and features:

- Four e5500 cores, each with a private 256 KB L2 cache
- 256 KB shared L3 CoreNet platform cache (CPC)
- Interconnect CoreNet platform
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration for the following functions:
- Packet parsing, classification, and distribution
- Queue management for scheduling, packet sequencing, and congestion management
- Cryptography Acceleration (SEC 5.0)
- RegEx Pattern Matching Acceleration (PME 2.2)
- IEEE Std 1588 support
- Hardware buffer management for buffer allocation and deallocation
- Ethernet interfaces
- Integrated 8-port Gigabit Ethernet switch (T1040 only)
- Four 1 Gbps Ethernet controllers
- Two RGMII interfaces or one RGMII and one MII interfaces
- High speed peripheral interfaces
- Four PCI Express 2.0 controllers running at up to 5 GHz
- Two SATA controllers supporting 1.5 and 3.0 Gb/s operation
- Upto two QSGMII interface
- Upto six SGMII interface supporting 1000 Mbps
- One SGMII interface supporting upto 2500 Mbps
- Additional peripheral interfaces
- Two USB 2.0 controllers with integrated PHY
- SD/eSDHC/eMMC
- eSPI controller
- Four I2C controllers
- Four UARTs
- Four GPIO controllers
- Integrated flash controller (IFC)
- Change this to LCD/ HDMI interface (DIU) with 12 bit dual data rate
- TDM interface
- Multicore programmable interrupt controller (PIC)
- Two 8-channel DMA engines
- Single source clocking implementation
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)

Quoted 6 lines

---
Based upon git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

Everything in there has already been pulled by Linus, so there's no reason to use that tree as a base right now.

Quoted 1 line

+/include/ "t1042si-post.dtsi"

[snip]

arch/powerpc/boot/dts/fsl/t1040si-post.dtsi line 111

Quoted 9 lines
arch/powerpc/boot/dts/fsl/t1040si-post.dtsi new file +9 -0
+	serdes: serdes@ea000 {
+		compatible = "fsl,t1040-serdes";
+		reg	   = <0xea000 0x4000>;
+	};
+
+	sdhc@114000 {
+		compatible = "fsl,t1040-esdhc", "fsl,esdhc";
+		sdhci,auto-cmd12;
+	};

Why does sdhci,auto-cmd12 need to be specified here? It's already in t1042si-post.dtsi which you've included. Likewise with reg on the serdes node.

I also question the need to define separate t1040 compatible values for all of these, if the only difference is whether the onboard switch is enabled or not.

Quoted 17 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +17 -0
+	clockgen: global-utilities@e1000 {
+		compatible = "fsl,t1042-clockgen", "fsl,qoriq-clockgen-2.0",
+				   "fixed-clock";
+		reg = <0xe1000 0x1000>;
+		clock-output-names = "sysclk";
+		#clock-cells = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pll0: pll0@800 {
+			#clock-cells = <1>;
+			reg = <0x800>;
+			compatible = "fsl,core-pll-clock";
+			clocks = <&clockgen>;
+			clock-output-names = "pll0", "pll0-div2", "pll0-div4";
+		};
+		pll1: pll1@820 {

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 310

Quoted 10 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +10 -0
+			#clock-cells = <1>;
+			reg = <0x820>;
+			compatible = "fsl,core-pll-clock";
+			clocks = <&clockgen>;
+			clock-output-names = "pll1", "pll1-div2", "pll1-div4";
+		};
+		mux0: mux0@0 {
+			#clock-cells = <0>;
+			reg = <0x0>;
+			compatible = "fsl,core-mux-clock";

Please update the clock stuff based on
http://patchwork.ozlabs.org/patch/274134/

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 374

Quoted 11 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +11 -0
+/include/ "qoriq-dma-0.dtsi"
+	dma@100300 {
+		fsl,iommu-parent = <&pamu0>;
+		fsl,liodn-reg = <&guts 0x580>; /* DMA1LIODNR */
+	};
+
+/include/ "qoriq-dma-1.dtsi"
+	dma@101300 {
+		fsl,iommu-parent = <&pamu0>;
+		fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
+	};

These are elo3:
http://patchwork.ozlabs.org/patch/271238/

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 417

Quoted 5 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +5 -0
+	display@180000 {
+                compatible = "fsl,diu", "fsl,t1042-diu";
+                reg = <0x180000 1000>;
+                interrupts = <74 2 0 0>;
+        };

More specific compatibles come first.

-Scott

#2 lore raw

dGhhbmtzIFNjb3R0IGZvciByZXZpZXcuDQoNClBsZWFzZSBmaW5kIG15IHJlcGx5IGluLWxpbmVk Lg0KDQpSZWdhcmRzLA0KUHJhYmhha2FyDQoNCj4gLS0tLS1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BvciBjaGFuZ2UgY29kZSBhcyBwZXIgdjkgdmVyc2lvbi4gDQo+IA0KPiA+ICsJZGlzcGxh eUAxODAwMDAgew0KPiA+ICsgICAgICAgICAgICAgICAgY29tcGF0aWJsZSA9ICJmc2wsZGl1Iiwg ImZzbCx0MTA0Mi1kaXUiOw0KPiA+ICsgICAgICAgICAgICAgICAgcmVnID0gPDB4MTgwMDAwIDEw MDA+Ow0KPiA+ICsgICAgICAgICAgICAgICAgaW50ZXJydXB0cyA9IDw3NCAyIDAgMD47DQo+ID4g KyAgICAgICAgfTsNCj4gDQo+IE1vcmUgc3BlY2lmaWMgY29tcGF0aWJsZXMgY29tZSBmaXJzdC4N Cj4gDQoNClN1cmUuDQoNClJlZ2FyZHMsDQpQcmFiaGFrYXINCg==

#3 lore raw
Quoted 6 lines · On Fri, 2013-09-13 at 02:30 -0500, Kushwaha Prabhakar-B32579 wrote:
Quoted 4 lines

I also question the need to define separate t1040 compatible values for all of these, if the only difference is whether the onboard switch is enabled or not.

so should I use T104x as compatible field. and in T1040 device tree add extra node for l2 switch.

No, because we don't know if there will be (e.g) a t1043 that is different. Just use t1040 as the canonical name.

Quoted 6 lines
Quoted 3 lines

Please update the clock stuff based on
http://patchwork.ozlabs.org/patch/274134/

this patch is still under discussion. May I have to wait for the final patch. or may I rebase on v4.

You can wait for the final patch, or you can update based on the current state of the discussion, and be ready to update again if anything changes.

Quoted 15 lines
Quoted 6 lines
Quoted 6 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +6 -0
+/include/ "qoriq-dma-0.dtsi"
+	dma@100300 {
+		fsl,iommu-parent = <&pamu0>;
+		fsl,liodn-reg = <&guts 0x580>; /* DMA1LIODNR */
+	};
+
Quoted 8 lines

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 374

Quoted 5 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +5 -0
+/include/ "qoriq-dma-1.dtsi"
+	dma@101300 {
+		fsl,iommu-parent = <&pamu0>;
+		fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
+	};

These are elo3:
http://patchwork.ozlabs.org/patch/271238/

Quoted 2 lines

This patch is still under discussion.
I am not sure, I should wait for final patch or change code as per v9 version.

I think that patch is pretty well settled at this point. Just make it a prerequisite for this patch.

-Scott

#4 lore raw

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogV29vZCBTY290dC1CMDc0 MjENCj4gU2VudDogVHVlc2RheSwgU2VwdGVtYmVyIDE3LCAyMDEzIDI6NDkgQU0NCj4gVG86IEt1 c2h3YWhhIFByYWJoYWthci1CMzI1NzkNCj4gQ2M6IFdvb2QgU2NvdHQtQjA3NDIxOyBsaW51eHBw Yy1kZXZAbGlzdHMub3psYWJzLm9yZzsNCj4gZ2FsYWtAa2VybmVsLmNyYXNoaW5nLm9yZzsgQWdn cndhbCBQb29uYW0tQjEwODEyOyBKYWluIFByaXlhbmthLUIzMjE2NzsNCj4gU2V0aGkgVmFydW4t QjE2Mzk1DQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0hdIHBvd2VycGMvbXBjODV4eDpBZGQgaW5pdGlh bCBkZXZpY2UgdHJlZSBzdXBwb3J0IG9mDQo+IFQxMDR4DQo+IA0KPiBPbiBGcmksIDIwMTMtMDkt MTMgYXQgMDI6MzAgLTA1MDAsIEt1c2h3YWhhIFByYWJoYWthci1CMzI1Nzkgd3JvdGU6DQo+ID4g PiBJIGFsc28gcXVlc3Rpb24gdGhlIG5lZWQgdG8gZGVmaW5lIHNlcGFyYXRlIHQxMDQwIGNvbXBh dGlibGUgdmFsdWVzDQo+ID4gPiBmb3IgYWxsIG9mIHRoZXNlLCBpZiB0aGUgb25seSBkaWZmZXJl bmNlIGlzIHdoZXRoZXIgdGhlIG9uYm9hcmQNCj4gPiA+IHN3aXRjaCBpcyBlbmFibGVkIG9yIG5v dC4NCj4gPiA+DQo+ID4NCj4gPiBzbyBzaG91bGQgSSB1c2UgVDEwNHggYXMgY29tcGF0aWJsZSBm aWVsZC4gYW5kIGluIFQxMDQwIGRldmljZSB0cmVlIGFkZA0KPiBleHRyYSBub2RlIGZvciBsMiBz d2l0Y2guDQoNCkkgYW0gdXNpbmcgVDEwNDIgYXMgYmFzZSBkdHMgYW5kIFQxMDQwIGluY2x1ZGVz IFQxMDQwICsgbDJzd2l0Y2guIA0KDQpzbyBpZiBJIHVzZSBUMTA0MiBpbiBjb21wYXRpYmxlLiBJ dCB3aWxsIGdpdmUgd3JvbmcgZmllbGQgZm9yIHNvbWVvbmUgd29ya2luZyBvbiBUMTA0MFFEUy4N Cg0KYmVzdCBzb2x1dGlvbiBzaG91bGQgYmUgdG8gaGF2ZSANCiBhKSBoYXZlIFQxMDQyIGluIGNv bXBhdGlibGUgZmllbGQuDQogYikgVDEwNDAgZHRzIG92ZXJyaWRlIFQxMDQyIHRvIHQxMDQwIGlu IGNvbXBhdGlibGUgZmllbGQuDQppdCB3aWxsIGdpdmUgY29ycmVjdCBwaWN0dXJlDQoNCg0KUmVn YXJkcywNClByYWJoYWthcg0KDQo=

#5 lore raw
Quoted 17 lines · On Mon, 2013-09-16 at 21:11 -0500, Kushwaha Prabhakar-B32579 wrote:
Quoted 17 lines

-----Original Message-----
From: Wood Scott-B07421
Sent: Tuesday, September 17, 2013 2:49 AM
To: Kushwaha Prabhakar-B32579
Cc: Wood Scott-B07421; [email protected]; [email protected]; Aggrwal Poonam-B10812; Jain Priyanka-B32167; Sethi Varun-B16395
Subject: Re: [PATCH] powerpc/mpc85xx:Add initial device tree support of T104x

Quoted 5 lines · On Fri, 2013-09-13 at 02:30 -0500, Kushwaha Prabhakar-B32579 wrote:
Quoted 4 lines

I also question the need to define separate t1040 compatible values for all of these, if the only difference is whether the onboard switch is enabled or not.

Quoted 6 lines
Quoted 2 lines
Quoted 1 line

so should I use T104x as compatible field. and in T1040 device tree add

extra node for l2 switch.

I am using T1042 as base dts and T1040 includes T1040 + l2switch.

so if I use T1042 in compatible. It will give wrong field for someone working on T1040QDS.

What is wrong about it? It is compatible, right?

-Scott

#6 lore raw
In reply to Prabhakar Kushwaha
Quoted 57 lines · Prabhakar Kushwaha

The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 PA processor cores with high-performance data path acceleration architecture and network peripheral interfaces required for networking & telecommunications.

T1042 personality is a reduced personality of T1040 without Integrated 8-port Gigabit Ethernet switch.

The T1040/T1042 SoC includes the following function and features:

- Four e5500 cores, each with a private 256 KB L2 cache
- 256 KB shared L3 CoreNet platform cache (CPC)
- Interconnect CoreNet platform
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration for the following functions:
- Packet parsing, classification, and distribution
- Queue management for scheduling, packet sequencing, and congestion management
- Cryptography Acceleration (SEC 5.0)
- RegEx Pattern Matching Acceleration (PME 2.2)
- IEEE Std 1588 support
- Hardware buffer management for buffer allocation and deallocation
- Ethernet interfaces
- Integrated 8-port Gigabit Ethernet switch (T1040 only)
- Four 1 Gbps Ethernet controllers
- Two RGMII interfaces or one RGMII and one MII interfaces
- High speed peripheral interfaces
- Four PCI Express 2.0 controllers running at up to 5 GHz
- Two SATA controllers supporting 1.5 and 3.0 Gb/s operation
- Upto two QSGMII interface
- Upto six SGMII interface supporting 1000 Mbps
- One SGMII interface supporting upto 2500 Mbps
- Additional peripheral interfaces
- Two USB 2.0 controllers with integrated PHY
- SD/eSDHC/eMMC
- eSPI controller
- Four I2C controllers
- Four UARTs
- Four GPIO controllers
- Integrated flash controller (IFC)
- Change this to LCD/ HDMI interface (DIU) with 12 bit dual data rate
- TDM interface
- Multicore programmable interrupt controller (PIC)
- Two 8-channel DMA engines
- Single source clocking implementation
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)

---
Based upon git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

TODO: Add noded for ethernet

Quoted 8 lines
 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi |  116 ++++++++
 arch/powerpc/boot/dts/fsl/t1042si-post.dtsi |  430 +++++++++++++++++++++++++++
 arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi  |  111 +++++++
 3 files changed, 657 insertions(+)
 create mode 100644 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
 create mode 100644 arch/powerpc/boot/dts/fsl/t1042si-post.dtsi
 create mode 100644 arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi

I am currently working on a design bases on the p2041 but my issue seems to be generic to all the QorIQ dtsi files since the structure is exactly the same, so I pick the opportunity that such a file is submitted to the mailing-list to raise it.

DISCLAIMER: I am no DTS expert, so there may be a way to achieve what I want to I have not seen.

My understanding is that the SOC-NAMEsi-post.dtsi and SOC-NAMEsi-pre.dtsi are files that describe the SoC internals. They will be maintained when new drivers are merged or changed and therefore they should be used by all boards using the SoCs. Can someone confirm this or am I already wrong (since there are on Freescale boards that use them in mainline) ?

[snip]

Quoted 95 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +95 -0
+
+&pci0 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0x0 0xff>;
+	interrupts = <20 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <20 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 40 1 0 0
+			0000 0 0 2 &mpic 1 1 0 0
+			0000 0 0 3 &mpic 2 1 0 0
+			0000 0 0 4 &mpic 3 1 0 0
+			>;
+	};
+};
+
+&pci1 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0 0xff>;
+	interrupts = <21 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <21 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 41 1 0 0
+			0000 0 0 2 &mpic 5 1 0 0
+			0000 0 0 3 &mpic 6 1 0 0
+			0000 0 0 4 &mpic 7 1 0 0
+			>;
+	};
+};
+
+&pci2 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0x0 0xff>;
+	interrupts = <22 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <22 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 42 1 0 0
+			0000 0 0 2 &mpic 9 1 0 0
+			0000 0 0 3 &mpic 10 1 0 0
+			0000 0 0 4 &mpic 11 1 0 0
+			>;
+	};
+};
+
+&pci3 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0x0 0xff>;
+	interrupts = <23 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <23 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 145

Quoted 10 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +10 -0
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 43 1 0 0
+			0000 0 0 2 &mpic 0 1 0 0
+			0000 0 0 3 &mpic 4 1 0 0
+			0000 0 0 4 &mpic 8 1 0 0
+			>;
+	};
+};
+

The above 4 nodes have the consequence that it will then be mandatory that a board support .dts file that would like to inlcude the SOC-NAMEsi-post.dtsi defines the pci0, pci1, pci2, pci3 aliases.

Now it is possible that a board does not implement pci1 for instance. So its .dts file would ideally not define a node for it, and thus not define the respective alias. However, this triggers this dtc compile error (which is correct):

Quoted 6 lines

[chlongv1@chber1-10533x linux-km]$ make kmp204x.dtb
DTC arch/powerpc/boot/kmp204x.dtb
Error: arch/powerpc/boot/dts/fsl/p2041si-post.dtsi:98.2-3 label or path, 'pci1', not found FATAL ERROR: Syntax error parsing input tree
make[1]: *** [arch/powerpc/boot/kmp204x.dtb] Error 1
make: *** [kmp204x.dtb] Error 2

The solution I have found is to define a "dummy" disabled node so that I can define the alias, but I am not really happy about this:

Quoted 3 lines
	pci1: pcie@ffe201000 {
		status = "disabled";
	};

I am here missing something obvious or shouldn't it be possible that such .dtsi files allow not to define unused/unnecessary nodes ?

Valentin

#7 lore raw
Quoted 2 lines · Valentin Longchamp
Quoted 1 line · Prabhakar Kushwaha

The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 =

PA

Quoted 1 line
Quoted 1 line

processor cores with high-performance data path acceleration =

architecture

Quoted 1 line
Quoted 1 line

and network peripheral interfaces required for networking & =

telecommunications.

Quoted 2 lines
Quoted 2 lines

=20
T1042 personality is a reduced personality of T1040 without =

Integrated 8-port

Quoted 8 lines
Quoted 8 lines

Gigabit Ethernet switch.
=20
The T1040/T1042 SoC includes the following function and features:
=20
- Four e5500 cores, each with a private 256 KB L2 cache
- 256 KB shared L3 CoreNet platform cache (CPC)
- Interconnect CoreNet platform
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and =

interleaving

Quoted 2 lines
Quoted 2 lines

support
- Data Path Acceleration Architecture (DPAA) incorporating =

acceleration

Quoted 3 lines
Quoted 3 lines

for the following functions:
- Packet parsing, classification, and distribution
- Queue management for scheduling, packet sequencing, and =

congestion

Quoted 5 lines
Quoted 5 lines

management
- Cryptography Acceleration (SEC 5.0)
- RegEx Pattern Matching Acceleration (PME 2.2)
- IEEE Std 1588 support
- Hardware buffer management for buffer allocation and =

deallocation

Quoted 11 lines
Quoted 11 lines

- Ethernet interfaces
- Integrated 8-port Gigabit Ethernet switch (T1040 only)
- Four 1 Gbps Ethernet controllers
- Two RGMII interfaces or one RGMII and one MII interfaces
- High speed peripheral interfaces
- Four PCI Express 2.0 controllers running at up to 5 GHz
- Two SATA controllers supporting 1.5 and 3.0 Gb/s operation
- Upto two QSGMII interface
- Upto six SGMII interface supporting 1000 Mbps
- One SGMII interface supporting upto 2500 Mbps
- Additional peripheral interfaces

Quoted 8 lines
Quoted 8 lines

- Two USB 2.0 controllers with integrated PHY
- SD/eSDHC/eMMC
- eSPI controller
- Four I2C controllers
- Four UARTs
- Four GPIO controllers
- Integrated flash controller (IFC)
- Change this to LCD/ HDMI interface (DIU) with 12 bit dual data =

rate

Quoted 5 lines
Quoted 5 lines

- TDM interface
- Multicore programmable interrupt controller (PIC)
- Two 8-channel DMA engines
- Single source clocking implementation
- Deep Sleep power implementaion (wakeup from =

GPIO/Timer/Ethernet/USB)

Quoted 7 lines
Quoted 7 lines

=20

---
Based upon =

git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

Quoted 5 lines
Quoted 5 lines

=20
TODO: Add noded for ethernet
=20

arch/powerpc/boot/dts/fsl/t1040si-post.dtsi |  116 ++++++++
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi |  430 =

+++++++++++++++++++++++++++

Quoted 8 lines
Quoted 6 lines

arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi | 111 +++++++

3 files changed, 657 insertions(+)

create mode 100644 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/t1042si-post.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi =20

=20
I am currently working on a design bases on the p2041 but my issue =

seems to be

Quoted 1 line

generic to all the QorIQ dtsi files since the structure is exactly the =

same, so

Quoted 1 line

I pick the opportunity that such a file is submitted to the =

mailing-list to

Quoted 3 lines

raise it.
=20
DISCLAIMER: I am no DTS expert, so there may be a way to achieve what =

I want to

Quoted 3 lines

I have not seen.
=20
My understanding is that the SOC-NAMEsi-post.dtsi and =

SOC-NAMEsi-pre.dtsi are

Quoted 1 line

files that describe the SoC internals. They will be maintained when =

new drivers

Quoted 1 line

are merged or changed and therefore they should be used by all boards =

using the

Quoted 1 line

SoCs. Can someone confirm this or am I already wrong (since there are =

on

Quoted 1 line

Freescale boards that use them in mainline) ?

That is the intent. of the SOC*.dtsi files. =20

Quoted 6 lines

=20
[snip]
=20

arch/powerpc/boot/dts/fsl/t1040si-post.dtsi

Quoted 3 lines
arch/powerpc/boot/dts/fsl/t1040si-post.dtsi new file +3 -0
+
+&pci0 {
+	compatible =3D "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", =

"fsl,qoriq-pcie";

Quoted 18 lines
Quoted 18 lines
(quoted diff) +18 -0
+	device_type =3D "pci";
+	#size-cells =3D <2>;
+	#address-cells =3D <3>;
+	bus-range =3D <0x0 0xff>;
+	interrupts =3D <20 2 0 0>;
+	fsl,iommu-parent =3D <&pamu0>;
+	pcie@0 {
+		reg =3D <0 0 0 0 0>;
+		#interrupt-cells =3D <1>;
+		#size-cells =3D <2>;
+		#address-cells =3D <3>;
+		device_type =3D "pci";
+		interrupts =3D <20 2 0 0>;
+		interrupt-map-mask =3D <0xf800 0 0 7>;
+		interrupt-map =3D <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 40 1 0 0
+			0000 0 0 2 &mpic 1 1 0 0
Quoted 8 lines

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi

Quoted 8 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +8 -0
+			0000 0 0 3 &mpic 2 1 0 0
+			0000 0 0 4 &mpic 3 1 0 0
+			>;
+	};
+};
+
+&pci1 {
+	compatible =3D "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", =

"fsl,qoriq-pcie";

Quoted 18 lines
Quoted 18 lines
(quoted diff) +18 -0
+	device_type =3D "pci";
+	#size-cells =3D <2>;
+	#address-cells =3D <3>;
+	bus-range =3D <0 0xff>;
+	interrupts =3D <21 2 0 0>;
+	fsl,iommu-parent =3D <&pamu0>;
+	pcie@0 {
+		reg =3D <0 0 0 0 0>;
+		#interrupt-cells =3D <1>;
+		#size-cells =3D <2>;
+		#address-cells =3D <3>;
+		device_type =3D "pci";
+		interrupts =3D <21 2 0 0>;
+		interrupt-map-mask =3D <0xf800 0 0 7>;
+		interrupt-map =3D <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 41 1 0 0
+			0000 0 0 2 &mpic 5 1 0 0
Quoted 8 lines

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi

Quoted 8 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +8 -0
+			0000 0 0 3 &mpic 6 1 0 0
+			0000 0 0 4 &mpic 7 1 0 0
+			>;
+	};
+};
+
+&pci2 {
+	compatible =3D "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", =

"fsl,qoriq-pcie";

Quoted 18 lines
Quoted 18 lines
(quoted diff) +18 -0
+	device_type =3D "pci";
+	#size-cells =3D <2>;
+	#address-cells =3D <3>;
+	bus-range =3D <0x0 0xff>;
+	interrupts =3D <22 2 0 0>;
+	fsl,iommu-parent =3D <&pamu0>;
+	pcie@0 {
+		reg =3D <0 0 0 0 0>;
+		#interrupt-cells =3D <1>;
+		#size-cells =3D <2>;
+		#address-cells =3D <3>;
+		device_type =3D "pci";
+		interrupts =3D <22 2 0 0>;
+		interrupt-map-mask =3D <0xf800 0 0 7>;
+		interrupt-map =3D <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 42 1 0 0
+			0000 0 0 2 &mpic 9 1 0 0
Quoted 8 lines

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi

Quoted 8 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +8 -0
+			0000 0 0 3 &mpic 10 1 0 0
+			0000 0 0 4 &mpic 11 1 0 0
+			>;
+	};
+};
+
+&pci3 {
+	compatible =3D "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", =

"fsl,qoriq-pcie";

Quoted 18 lines
Quoted 18 lines
(quoted diff) +18 -0
+	device_type =3D "pci";
+	#size-cells =3D <2>;
+	#address-cells =3D <3>;
+	bus-range =3D <0x0 0xff>;
+	interrupts =3D <23 2 0 0>;
+	fsl,iommu-parent =3D <&pamu0>;
+	pcie@0 {
+		reg =3D <0 0 0 0 0>;
+		#interrupt-cells =3D <1>;
+		#size-cells =3D <2>;
+		#address-cells =3D <3>;
+		device_type =3D "pci";
+		interrupts =3D <23 2 0 0>;
+		interrupt-map-mask =3D <0xf800 0 0 7>;
+		interrupt-map =3D <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 43 1 0 0
+			0000 0 0 2 &mpic 0 1 0 0
Quoted 8 lines

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 145

Quoted 6 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +6 -0
+			0000 0 0 3 &mpic 4 1 0 0
+			0000 0 0 4 &mpic 8 1 0 0
+			>;
+	};
+};
+

=20
The above 4 nodes have the consequence that it will then be mandatory =

that a

Quoted 1 line

board support .dts file that would like to inlcude the =

SOC-NAMEsi-post.dtsi

Quoted 3 lines

defines the pci0, pci1, pci2, pci3 aliases.
=20
Now it is possible that a board does not implement pci1 for instance. =

So its

Quoted 1 line

.dts file would ideally not define a node for it, and thus not define =

the

Quoted 1 line

respective alias. However, this triggers this dtc compile error (which =

is correct):

Quoted 4 lines

=20

Quoted 3 lines

[chlongv1@chber1-10533x linux-km]$ make kmp204x.dtb
DTC arch/powerpc/boot/kmp204x.dtb
Error: arch/powerpc/boot/dts/fsl/p2041si-post.dtsi:98.2-3 label or =

path, 'pci1', not found

Quoted 5 lines
Quoted 3 lines

FATAL ERROR: Syntax error parsing input tree make[1]: *** [arch/powerpc/boot/kmp204x.dtb] Error 1
make: *** [kmp204x.dtb] Error 2

=20
The solution I have found is to define a "dummy" disabled node so that =

I can

Quoted 7 lines

define the alias, but I am not really happy about this:
=20

Quoted 3 lines
	pci1: pcie@ffe201000 {
		status =3D "disabled";
	};

=20
I am here missing something obvious or shouldn't it be possible that =

such .dtsi

Quoted 1 line

files allow not to define unused/unnecessary nodes ?

Isn't this correct, that you are disabling the PCIe1 interface on the = SoC for your board?

- k=

#8 lore raw
Quoted 126 lines · Kumar Gala
Quoted 125 lines · Valentin Longchamp
Quoted 95 lines · Prabhakar Kushwaha
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +95 -0
+
+&pci0 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0x0 0xff>;
+	interrupts = <20 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <20 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 40 1 0 0
+			0000 0 0 2 &mpic 1 1 0 0
+			0000 0 0 3 &mpic 2 1 0 0
+			0000 0 0 4 &mpic 3 1 0 0
+			>;
+	};
+};
+
+&pci1 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0 0xff>;
+	interrupts = <21 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <21 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 41 1 0 0
+			0000 0 0 2 &mpic 5 1 0 0
+			0000 0 0 3 &mpic 6 1 0 0
+			0000 0 0 4 &mpic 7 1 0 0
+			>;
+	};
+};
+
+&pci2 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0x0 0xff>;
+	interrupts = <22 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <22 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 42 1 0 0
+			0000 0 0 2 &mpic 9 1 0 0
+			0000 0 0 3 &mpic 10 1 0 0
+			0000 0 0 4 &mpic 11 1 0 0
+			>;
+	};
+};
+
+&pci3 {
+	compatible = "fsl,t1042-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie";
+	device_type = "pci";
+	#size-cells = <2>;
+	#address-cells = <3>;
+	bus-range = <0x0 0xff>;
+	interrupts = <23 2 0 0>;
+	fsl,iommu-parent = <&pamu0>;
+	pcie@0 {
+		reg = <0 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		interrupts = <23 2 0 0>;
+		interrupt-map-mask = <0xf800 0 0 7>;

arch/powerpc/boot/dts/fsl/t1042si-post.dtsi line 145

Quoted 10 lines
arch/powerpc/boot/dts/fsl/t1042si-post.dtsi new file +10 -0
+		interrupt-map = <
+			/* IDSEL 0x0 */
+			0000 0 0 1 &mpic 43 1 0 0
+			0000 0 0 2 &mpic 0 1 0 0
+			0000 0 0 3 &mpic 4 1 0 0
+			0000 0 0 4 &mpic 8 1 0 0
+			>;
+	};
+};
+

The above 4 nodes have the consequence that it will then be mandatory that a board support .dts file that would like to inlcude the SOC-NAMEsi-post.dtsi defines the pci0, pci1, pci2, pci3 aliases.

Now it is possible that a board does not implement pci1 for instance. So its .dts file would ideally not define a node for it, and thus not define the respective alias. However, this triggers this dtc compile error (which is correct):

Quoted 6 lines

[chlongv1@chber1-10533x linux-km]$ make kmp204x.dtb
DTC arch/powerpc/boot/kmp204x.dtb
Error: arch/powerpc/boot/dts/fsl/p2041si-post.dtsi:98.2-3 label or path, 'pci1', not found FATAL ERROR: Syntax error parsing input tree
make[1]: *** [arch/powerpc/boot/kmp204x.dtb] Error 1
make: *** [kmp204x.dtb] Error 2

The solution I have found is to define a "dummy" disabled node so that I can define the alias, but I am not really happy about this:

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
	pci1: pcie@ffe201000 {
		status = "disabled";
	};

I am here missing something obvious or shouldn't it be possible that such .dtsi files allow not to define unused/unnecessary nodes ?

Isn't this correct, that you are disabling the PCIe1 interface on the SoC for your board?

Yes it is correct. So this confirms that a board .dts file must disable all not used interfaces/peripherals with such a "disabled" node.

I just wanted to be sure that this was the correct way of doing things and that I had not missed a "better" way (where you don't need to define such "disabled" nodes in .dts files).

Valentin