Skip to contentSkip to conversation

Add R8A7791/Koelsch/Henninger board PCI DT support

PATCH Superseded Sergei Shtylyov 3 participants 9 messages May 19, 2014 – Jun 28, 2014

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add R8A7791/Koelsch/Henninger board PCI DT support

Hello.

Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-rc5-20140517' tag. Here we add internal PCI support for the R8A7791-based Koelsch and Henninger boards for the sake of getting USB EHCI/OHCI working...

[1/3] ARM: shmobile: r8a7791: add internal PCI bridge nodes [2/3] ARM: shmobile: koelsch: enable internal PCI [3/3] ARM: shmobile: henninger: enable internal PCI

WBR, Sergei

#1 lore raw

PATCH v2 1/3 ARM: shmobile: r8a7791: add internal PCI bridge nodes

Add device nodes for the R8A7791 internal PCI bridge devices.

---
Changes in version 2:
- added interrupt-related properties to the PCI device nodes;
- refreshed the patch.

 arch/arm/boot/dts/r8a7791.dtsi |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +36 -0
Index: renesas/arch/arm/boot/dts/r8a7791.dtsi
===================================================================
@@ -880,4 +880,40 @@
 		#size-cells = <0>;
 		status = "disabled";
 	};
+
+	pci0: pci at ee090000 {
+		compatible = "renesas,pci-r8a7791";
+		clocks = <&mstp7_clks R8A7791_CLK_EHCI>;
+		reg = <0x0 0xee090000 0x0 0xc00>,
+		      <0x0 0xee080000 0x0 0x1100>;
+		interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+
+		bus-range = <0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0xff00 0 0 0x7>;
+		interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+			      	 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+			      	 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
+	};
+
+	pci1: pci at ee0d0000 {
+		compatible = "renesas,pci-r8a7791";
+		clocks = <&mstp7_clks R8A7791_CLK_EHCI>;
+		reg = <0x0 0xee0d0000 0x0 0xc00>,
+		      <0x0 0xee0c0000 0x0 0x1100>;
+		interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+
+		bus-range = <1 1>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0xff00 0 0 0x7>;
+		interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
+			      	 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
+			      	 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
+	};
 };
#2 lore raw

PATCH v2 1/3 ARM: shmobile: r8a7791: add internal PCI bridge nodes

arch/arm/boot/dts/r8a7791.dtsi line 899

Quoted 4 lines · On Tuesday 20 May 2014 01:52:05 Sergei Shtylyov wrote:
arch/arm/boot/dts/r8a7791.dtsi +4 -0
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;

Are there only internal devices on this PCI host?

If there are slots, the map should normally list all four interrupts per slot in some way.

Arnd

#3 lore raw

PATCH v2 1/3 ARM: shmobile: r8a7791: add internal PCI bridge nodes

Hello.

Quoted 6 lines · Arnd Bergmann

arch/arm/boot/dts/r8a7791.dtsi line 899

Quoted 4 lines
arch/arm/boot/dts/r8a7791.dtsi +4 -0
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;

Are there only internal devices on this PCI host?

Yes, and all populated device slots are listed.

Quoted 1 line

Arnd

WBR, Sergei

#4 lore raw

PATCH v2 2/3 ARM: shmobile: koelsch: enable internal PCI

In reply to Sergei Shtylyov

Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to them.

---
Changes in version 2:
- refreshed the patch.

 arch/arm/boot/dts/r8a7791-koelsch.dts |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/r8a7791-koelsch.dts +22 -0
Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
===================================================================
@@ -293,6 +293,16 @@
 				 "msiof0_tx";
 		renesas,function = "msiof0";
 	};
+
+	usb0_pins: usb0 {
+		renesas,groups = "usb0";
+		renesas,function = "usb0";
+	};
+
+	usb1_pins: usb1 {
+		renesas,groups = "usb1";
+		renesas,function = "usb1";
+	};
 };
 
 &ether {
@@ -408,3 +418,15 @@
 		spi-cpha;
 	};
 };
+
+&pci0 {
+	status = "okay";
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+};
+
+&pci1 {
+	status = "okay";
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+};
#5 lore raw

PATCH v2 3/3 ARM: shmobile: henninger: enable internal PCI

In reply to Sergei Shtylyov

Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to them.

---
 arch/arm/boot/dts/r8a7791-henninger.dts |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/r8a7791-henninger.dts +22 -0
Index: renesas/arch/arm/boot/dts/r8a7791-henninger.dts
===================================================================
@@ -120,6 +120,16 @@
 				 "msiof0_tx";
 		renesas,function = "msiof0";
 	};
+
+	usb0_pins: usb0 {
+		renesas,groups = "usb0";
+		renesas,function = "usb0";
+	};
+
+	usb1_pins: usb1 {
+		renesas,groups = "usb1";
+		renesas,function = "usb1";
+	};
 };
 
 &scif0 {
@@ -217,3 +227,15 @@
 		spi-cpha;
 	};
 };
+
+&pci0 {
+	status = "okay";
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+};
+
+&pci1 {
+	status = "okay";
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+};
#6 lore raw

v2 cover Add R8A7791/Koelsch/Henninger board PCI DT support

In reply to Sergei Shtylyov

Hello.

Quoted 4 lines · Sergei Shtylyov

Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-rc5-20140517' tag. Here we add internal PCI support for the R8A7791-based Koelsch and Henninger boards for the sake of getting USB EHCI/OHCI working...

Forgot to mention that it depends on the internal PCI bridge device tree
support reposted just before these patches...

Quoted 3 lines

[1/3] ARM: shmobile: r8a7791: add internal PCI bridge nodes [2/3] ARM: shmobile: koelsch: enable internal PCI [3/3] ARM: shmobile: henninger: enable internal PCI

WBR, Sergei

#7 lore raw

v2 cover Add R8A7791/Koelsch/Henninger board PCI DT support

Quoted 4 lines · Sergei Shtylyov

Hello.

On 05/20/2014 01:48 AM, Sergei Shtylyov wrote:

Quoted 11 lines
Quoted 4 lines

Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-rc5-20140517' tag. Here we add internal PCI support for the R8A7791-based Koelsch and Henninger boards for the sake of getting USB EHCI/OHCI working...

Forgot to mention that it depends on the internal PCI bridge device tree
support reposted just before these patches...

Quoted 3 lines

[1/3] ARM: shmobile: r8a7791: add internal PCI bridge nodes [2/3] ARM: shmobile: koelsch: enable internal PCI [3/3] ARM: shmobile: henninger: enable internal PCI

Thanks, please repost these patches when the device tree support

#8 lore raw

v2 cover Add R8A7791/Koelsch/Henninger board PCI DT support

Hello.

Quoted 5 lines · Simon Horman
Quoted 4 lines
Quoted 4 lines

Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-rc5-20140517' tag. Here we add internal PCI support for the R8A7791-based Koelsch and Henninger boards for the sake of getting USB EHCI/OHCI working...

Quoted 8 lines
Quoted 6 lines

Forgot to mention that it depends on the internal PCI bridge device tree
support reposted just before these patches...

Quoted 3 lines

[1/3] ARM: shmobile: r8a7791: add internal PCI bridge nodes [2/3] ARM: shmobile: koelsch: enable internal PCI [3/3] ARM: shmobile: henninger: enable internal PCI

Thanks, please repost these patches when the device tree support

Where did you get that old stuff? The current version of this patchset is
4, not 2!

WBR, Sergei