[PATCH v3 0/5] arm64: dts: r8a7795: Add HSUSB device node and enable channel 0 of USB2.0

STALE3643d

8 messages, 3 authors, 2016-08-11 · open the first message on its own page

[PATCH v3 0/5] arm64: dts: r8a7795: Add HSUSB device node and enable channel 0 of USB2.0

From: Yoshihiro Shimoda <hidden>
Date: 2016-07-21 10:46:56

This patch is based on the renesas.git / renesas-devel-20160718-v4.7-rc7 tag.

Changes from v2:
 - rebase on renesas.git / renesas-devel-20160718-v4.7-rc7.
  - maybe the panic issue disappears on the tree. but, if still happens,
    please try the following patch:
    https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=c14f8a4032efa73d9c4e155add47c19252b3bdf4
 - remove the redundant instruction in patch 4.
 - add a new patch that enables HSUSB driver as kernel module on the defconfig.

Changes from v1:
 - fix compatible string of hsusb in patch 1.
 - fix patch 2 for "make dtbs W=1" warning.

Yoshihiro Shimoda (5):
  arm64: dts: r8a7795: Add HSUSB device node
  arm64: dts: salvator-x: enable usb2_phy of channel 0
  arm64: dts: salvator-x: enable USB 2.0 Host channel 0
  arm64: dts: salvator-x: enable HSUSB
  arm64: defconfig: Add Renesas R-Car HSUSB driver support as module

 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 36 ++++++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a7795.dtsi           | 17 ++++++++++
 arch/arm64/configs/defconfig                       |  2 ++
 3 files changed, 55 insertions(+)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[PATCH v3 1/5] arm64: dts: r8a7795: Add HSUSB device node

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-07-21 10:46:57

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 99953ca..6f0a4ad 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -1224,6 +1224,23 @@
 			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
 			status = "disabled";
 		};
+
+		hsusb: usb@e6590000 {
+			compatible = "renesas,usbhs-r8a7795",
+				     "renesas,rcar-gen3-usbhs";
+			reg = <0 0xe6590000 0 0x100>;
+			interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 704>;
+			dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
+			       <&usb_dmac1 0>, <&usb_dmac1 1>;
+			dma-names = "ch0", "ch1", "ch2", "ch3";
+			renesas,buswait = <11>;
+			phys = <&usb2_phy0>;
+			phy-names = "usb";
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		pciec0: pcie@fe000000 {
 			compatible = "renesas,pcie-r8a7795";
 			reg = <0 0xfe000000 0 0x80000>;
-- 
1.9.1

[PATCH v3 2/5] arm64: dts: salvator-x: enable usb2_phy of channel 0

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-07-21 10:46:58

This patch also adds a regulator node for USB2.0 to handle VBUS on/off
by the phy-rcar-gen3-usb2 driver.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 98f0263..8c8bfdc 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -110,6 +110,17 @@
 			  1800000 0>;
 	};
 
+	vbus0_usb2: regulator-vbus0-usb2 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "USB20_VBUS0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	audio_clkout: audio_clkout {
 		/*
 		 * This is same as <&rcar_sound 0>
@@ -193,6 +204,11 @@
 		function = "audio_clk";
 	};
 
+	usb0_pins: usb0 {
+		groups = "usb0";
+		function = "usb0";
+	};
+
 	usb1_pins: usb1 {
 		groups = "usb1";
 		function = "usb1";
@@ -369,6 +385,14 @@
 	status = "okay";
 };
 
+&usb2_phy0 {
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+
+	vbus-supply = <&vbus0_usb2>;
+	status = "okay";
+};
+
 &usb2_phy1 {
 	pinctrl-0 = <&usb1_pins>;
 	pinctrl-names = "default";
-- 
1.9.1

[PATCH v3 3/5] arm64: dts: salvator-x: enable USB 2.0 Host channel 0

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-07-21 10:46:59

We have to set SW15 to pin 2-3 side on the board before we use CN9
as USB host or peripheral.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 8c8bfdc..c0e6e8f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -407,6 +407,10 @@
 	status = "okay";
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &ehci1 {
 	status = "okay";
 };
@@ -415,6 +419,10 @@
 	status = "okay";
 };
 
+&ohci0 {
+	status = "okay";
+};
+
 &ohci1 {
 	status = "okay";
 };
-- 
1.9.1

[PATCH v3 4/5] arm64: dts: salvator-x: enable HSUSB

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-07-21 10:47:00

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index c0e6e8f..4332ec7 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -431,6 +431,10 @@
 	status = "okay";
 };
 
+&hsusb {
+	status = "okay";
+};
+
 &pcie_bus_clk {
 	clock-frequency = <100000000>;
 	status = "okay";
-- 
1.9.1

[PATCH v3 5/5] arm64: defconfig: Add Renesas R-Car HSUSB driver support as module

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-07-21 10:47:01

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/arm64/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index aa47366..9d23ff9 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -232,6 +232,7 @@ CONFIG_USB_EHCI_MSM=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_RENESAS_USBHS=m
 CONFIG_USB_STORAGE=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_CHIPIDEA=y
@@ -242,6 +243,7 @@ CONFIG_USB_HSIC_USB3503=y
 CONFIG_USB_MSM_OTG=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_RENESAS_USBHS_UDC=m
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK_MINORS=32
 CONFIG_MMC_ARMMMCI=y
-- 
1.9.1

Re: [PATCH v3 0/5] arm64: dts: r8a7795: Add HSUSB device node and enable channel 0 of USB2.0

From: Simon Horman <horms@verge.net.au>
Date: 2016-08-10 08:45:39

Hi Shimoda-san,

On Thu, Jul 21, 2016 at 07:46:56PM +0900, Yoshihiro Shimoda wrote:
This patch is based on the renesas.git / renesas-devel-20160718-v4.7-rc7 tag.

Changes from v2:
 - rebase on renesas.git / renesas-devel-20160718-v4.7-rc7.
  - maybe the panic issue disappears on the tree. but, if still happens,
    please try the following patch:
    https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=c14f8a4032efa73d9c4e155add47c19252b3bdf4
 - remove the redundant instruction in patch 4.
 - add a new patch that enables HSUSB driver as kernel module on the defconfig.
Sorry for not attending to this earlier.
In your opinion are these patches ready to merge?

RE: [PATCH v3 0/5] arm64: dts: r8a7795: Add HSUSB device node and enable channel 0 of USB2.0

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-08-11 02:15:40

Hi Simon-san,
From: Simon Horman [mailto:horms@verge.net.au]
Sent: Wednesday, August 10, 2016 5:46 PM

Hi Shimoda-san,

On Thu, Jul 21, 2016 at 07:46:56PM +0900, Yoshihiro Shimoda wrote:
quoted
This patch is based on the renesas.git / renesas-devel-20160718-v4.7-rc7 tag.

Changes from v2:
 - rebase on renesas.git / renesas-devel-20160718-v4.7-rc7.
  - maybe the panic issue disappears on the tree. but, if still happens,
    please try the following patch:
https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=c14f8a4032efa73d9c4e155add47c19252
b3bdf4
quoted
 - remove the redundant instruction in patch 4.
 - add a new patch that enables HSUSB driver as kernel module on the defconfig.
Sorry for not attending to this earlier.
In your opinion are these patches ready to merge?
Yes. Since the following patch had been merged in v4.8-rc1, the panic issue disappears.
https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=c14f8a4032efa73d9c4e155add47c19252
b3bdf4
Best regards,
Yoshihiro Shimoda
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help