Skip to contentSkip to conversation

Add R8A7794/SILK board PCI USB DT support

PATCH New Sergei Shtylyov 2 participants 9 messages Sep 12, 2015 – Oct 13, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add R8A7794/SILK board PCI USB DT support

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150911v2-v4.2' tag. Here we add PCI USB device tree support for the R8A7794-based SILK board.

[1/2] ARM: shmobile: r8a7794: add internal PCI bridge nodes [2/2] ARM: shmobile: silk: enable internal PCI

WBR, Sergei

#1 lore raw

PATCH 1/2 ARM: shmobile: r8a7794: add internal PCI bridge nodes

Add device nodes for the R8A7794 internal PCI bridge devices.

---
 arch/arm/boot/dts/r8a7794.dtsi |   42 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
arch/arm/boot/dts/r8a7794.dtsi +42 -0
Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
@@ -648,6 +648,48 @@
 		status = "disabled";
 	};
 
+	pci0: pci at ee090000 {
+		compatible = "renesas,pci-r8a7794";
+		device_type = "pci";
+		reg = <0 0xee090000 0 0xc00>,
+		      <0 0xee080000 0 0x1100>;
+		interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7794_CLK_EHCI>;
+		power-domains = <&cpg_clocks>;
+		status = "disabled";
+
+		bus-range = <0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		#interrupt-cells = <1>;
+		ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
+		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-r8a7794";
+		device_type = "pci";
+		reg = <0 0xee0d0000 0 0xc00>,
+		      <0 0xee0c0000 0 0x1100>;
+		interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7794_CLK_EHCI>;
+		power-domains = <&cpg_clocks>;
+		status = "disabled";
+
+		bus-range = <1 1>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		#interrupt-cells = <1>;
+		ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
+		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>;
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;
#2 lore raw

PATCH 2/2 ARM: shmobile: silk: 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/r8a7794-silk.dts |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/r8a7794-silk.dts +22 -0
Index: renesas/arch/arm/boot/dts/r8a7794-silk.dts
===================================================================
@@ -80,6 +80,16 @@
 		renesas,groups = "vin0_data8", "vin0_clk";
 		renesas,function = "vin0";
 	};
+
+	usb0_pins: usb0 {
+		renesas,groups = "usb0";
+		renesas,function = "usb0";
+	};
+
+	usb1_pins: usb1 {
+		renesas,groups = "usb1";
+		renesas,function = "usb1";
+	};
 };
 
 &scif2 {
@@ -188,3 +198,15 @@
 		};
 	};
 };
+
+&pci0 {
+	status = "okay";
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+};
+
+&pci1 {
+	status = "okay";
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+};
#3 lore raw

cover Add R8A7794/SILK board PCI USB DT support

In reply to Sergei Shtylyov
Quoted 3 lines · Sergei Shtylyov

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150911v2-v4.2' tag. Here we add PCI USB device tree support for the R8A7794-based SILK board.

Oops, forgot to say that the patches need the 'pci-rcar-gen2' driver patch
posted yesterday in order to work.

WBR, Sergei

#4 lore raw

cover Add R8A7794/SILK board PCI USB DT support

Hi Sergei,

Quoted 8 lines · Sergei Shtylyov
Quoted 3 lines · Sergei Shtylyov

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150911v2-v4.2' tag. Here we add PCI USB device tree support for the R8A7794-based SILK board.

Oops, forgot to say that the patches need the 'pci-rcar-gen2' driver
patch posted yesterday in order to work.

Am I correct in thinking that patch has been accepted and that therefore I can now pick up this series?

#5 lore raw

cover Add R8A7794/SILK board PCI USB DT support

Hello.

Quoted 11 lines · Simon Horman
Quoted 8 lines · Sergei Shtylyov
Quoted 4 lines

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150911v2-v4.2' tag. Here we add PCI USB device tree support for the R8A7794-based SILK board.

Oops, forgot to say that the patches need the 'pci-rcar-gen2' driver
patch posted yesterday in order to work.

Am I correct in thinking that patch has been accepted and that therefore I can now pick up this series?

Yes, it's been merged by Linus already.

MBR, Sergei

#6 lore raw

cover Add R8A7794/SILK board PCI USB DT support

Quoted 10 lines · Sergei Shtylyov

Hello.

Quoted 5 lines · Simon Horman
Quoted 5 lines · Sergei Shtylyov
Quoted 4 lines

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150911v2-v4.2' tag. Here we add PCI USB device tree support for the R8A7794-based SILK board.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Oops, forgot to say that the patches need the 'pci-rcar-gen2' driver
patch posted yesterday in order to work.

Am I correct in thinking that patch has been accepted and that therefore I can now pick up this series?

Yes, it's been merged by Linus already.

Thanks, I have queued-up this series.

#7 lore raw

PATCH 1/1 ARM: shmobile: porter: enable internal PCI and USB PHY

In reply to Sergei Shtylyov

Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to them and also enable USB PHY device for the Porter board. We have to enable everything in one patch since EHCI/OHCI devices are already linked to the USB PHY device.

---
This patch is against 'renesas-devel-20151012-v4.3-rc5' tag of Simon Horman's 'renesas.git' repo.

 arch/arm/boot/dts/r8a7791-porter.dts |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm/boot/dts/r8a7791-porter.dts +28 -0
Index: renesas/arch/arm/boot/dts/r8a7791-porter.dts
===================================================================
@@ -120,6 +120,16 @@
 		renesas,function = "i2c2";
 	};
 
+	usb0_pins: usb0 {
+		renesas,groups = "usb0";
+		renesas,function = "usb0";
+	};
+
+	usb1_pins: usb1 {
+		renesas,groups = "usb1";
+		renesas,function = "usb1";
+	};
+
 	vin0_pins: vin0 {
 		renesas,groups = "vin0_data8", "vin0_clk";
 		renesas,function = "vin0";
@@ -245,6 +255,24 @@
 	};
 };
 
+&pci0 {
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
+&pci1 {
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+};
+
 &pcie_bus_clk {
 	status = "okay";
 };
#8 lore raw

PATCH 1/1 ARM: shmobile: porter: enable internal PCI and USB PHY

Quoted 6 lines · Sergei Shtylyov

Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to them and also enable USB PHY device for the Porter board. We have to enable everything in one patch since EHCI/OHCI devices are already linked to the USB PHY device.

Thanks, I have queued this up for v4.4.