public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
* [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743
@ 2018-03-09  9:57 Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 1/4] usb: host: xhci-plat: Add r8a7743 support Fabrizio Castro
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fabrizio Castro @ 2018-03-09  9:57 UTC (permalink / raw)
  To: cip-dev

Dear All,

this series adds XHCI support to r8a7743.
The only patch that hasn't been backported is:
"usb: host: xhci-plat: Add r8a7743 support"

The reason for the new commit is that the backporting of the generic
compatible string for R-Car Gen2 would have brought along a few
unnecessary bits and pieces, a new commit seemed to address the goal
more reliably.

Thanks,

Fabrizio Castro (3):
  usb: host: xhci-plat: Add r8a7743 support
  dt-bindings: usb-xhci: Document r8a7743 support
  ARM: dts: r8a7743: Add xhci support to SoC dtsi

Simon Horman (1):
  ARM: shmobile: enable XHCI_RCAR in defconfig

 Documentation/devicetree/bindings/usb/usb-xhci.txt |  4 ++--
 arch/arm/boot/dts/r8a7743.dtsi                     | 18 ++++++++++++++++++
 arch/arm/configs/shmobile_defconfig                |  2 ++
 drivers/usb/host/xhci-plat.c                       |  7 +++++--
 4 files changed, 27 insertions(+), 4 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [cip-dev] [PATCH 1/4] usb: host: xhci-plat: Add r8a7743 support
  2018-03-09  9:57 [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Fabrizio Castro
@ 2018-03-09  9:57 ` Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 2/4] dt-bindings: usb-xhci: Document " Fabrizio Castro
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fabrizio Castro @ 2018-03-09  9:57 UTC (permalink / raw)
  To: cip-dev

This patch adds xhci r8a7743 driver support.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
---
 drivers/usb/host/xhci-plat.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 7afd607..8e6ec16 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -53,7 +53,8 @@ static int xhci_plat_setup(struct usb_hcd *hcd)
 	int ret;
 
 	if (of_device_is_compatible(of_node, "renesas,xhci-r8a7790") ||
-	    of_device_is_compatible(of_node, "renesas,xhci-r8a7791")) {
+	    of_device_is_compatible(of_node, "renesas,xhci-r8a7791") ||
+	    of_device_is_compatible(of_node, "renesas,xhci-r8a7743")) {
 		ret = xhci_rcar_init_quirk(hcd);
 		if (ret)
 			return ret;
@@ -67,7 +68,8 @@ static int xhci_plat_start(struct usb_hcd *hcd)
 	struct device_node *of_node = hcd->self.controller->of_node;
 
 	if (of_device_is_compatible(of_node, "renesas,xhci-r8a7790") ||
-	    of_device_is_compatible(of_node, "renesas,xhci-r8a7791"))
+	    of_device_is_compatible(of_node, "renesas,xhci-r8a7791") ||
+	    of_device_is_compatible(of_node, "renesas,xhci-r8a7743"))
 		xhci_rcar_start(hcd);
 
 	return xhci_run(hcd);
@@ -267,6 +269,7 @@ static const struct of_device_id usb_xhci_of_match[] = {
 	{ .compatible = "xhci-platform" },
 	{ .compatible = "marvell,armada-375-xhci"},
 	{ .compatible = "marvell,armada-380-xhci"},
+	{ .compatible = "renesas,xhci-r8a7743"},
 	{ .compatible = "renesas,xhci-r8a7790"},
 	{ .compatible = "renesas,xhci-r8a7791"},
 	{ },
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [cip-dev] [PATCH 2/4] dt-bindings: usb-xhci: Document r8a7743 support
  2018-03-09  9:57 [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 1/4] usb: host: xhci-plat: Add r8a7743 support Fabrizio Castro
@ 2018-03-09  9:57 ` Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 3/4] ARM: dts: r8a7743: Add xhci support to SoC dtsi Fabrizio Castro
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fabrizio Castro @ 2018-03-09  9:57 UTC (permalink / raw)
  To: cip-dev

Document r8a7743 xhci support. The driver will use the fallback
compatible string "renesas,rcar-gen2-xhci", therefore no driver
change is needed.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5fd29937dec4b64aa91a3207742cd8c720cd0595)
(removed "renesas,rcar-gen2-xhci" fallback compatible string)
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
index 86f67f0..fce0320 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -3,8 +3,8 @@ USB xHCI controllers
 Required properties:
   - compatible: should be one of "generic-xhci",
     "marvell,armada-375-xhci", "marvell,armada-380-xhci",
-    "renesas,xhci-r8a7790", "renesas,xhci-r8a7791" (deprecated:
-    "xhci-platform").
+    "renesas,xhci-r8a7790", "renesas,xhci-r8a7791", "renesas,xhci-r8a7743"
+    (deprecated: "xhci-platform").
   - reg: should contain address and length of the standard XHCI
     register set for the device.
   - interrupts: one XHCI interrupt should be described here.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [cip-dev] [PATCH 3/4] ARM: dts: r8a7743: Add xhci support to SoC dtsi
  2018-03-09  9:57 [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 1/4] usb: host: xhci-plat: Add r8a7743 support Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 2/4] dt-bindings: usb-xhci: Document " Fabrizio Castro
@ 2018-03-09  9:57 ` Fabrizio Castro
  2018-03-09  9:57 ` [cip-dev] [PATCH 4/4] ARM: shmobile: enable XHCI_RCAR in defconfig Fabrizio Castro
  2018-04-10 18:04 ` [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Ben Hutchings
  4 siblings, 0 replies; 6+ messages in thread
From: Fabrizio Castro @ 2018-03-09  9:57 UTC (permalink / raw)
  To: cip-dev

Add node for xhci. Boards DT files will enable it if needed.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b6d3b649441936621c87b79bff8dd436e2397e3c)
(modified clocks and power-domains properties, removed resets property)
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm/boot/dts/r8a7743.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index a6f953b..822757e 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -843,6 +843,24 @@
 			status = "disabled";
 		};
 
+		/*
+		 * pci1 and xhci share the same phy, therefore only one of them
+		 * can be active at any one time. If both of them are enabled,
+		 * a race condition will determine who'll control the phy.
+		 * A firmware file is needed by the xhci driver in order for
+		 * USB 3.0 to work properly.
+		 */
+		xhci: usb at ee000000 {
+			compatible = "renesas,xhci-r8a7743";
+			reg = <0 0xee000000 0 0xc00>;
+			interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp3_clks R8A7743_CLK_SSUSB>;
+			power-domains = <&cpg_clocks>;
+			phys = <&usb2 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
 		clocks {
 			#address-cells = <2>;
 			#size-cells = <2>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [cip-dev] [PATCH 4/4] ARM: shmobile: enable XHCI_RCAR in defconfig
  2018-03-09  9:57 [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Fabrizio Castro
                   ` (2 preceding siblings ...)
  2018-03-09  9:57 ` [cip-dev] [PATCH 3/4] ARM: dts: r8a7743: Add xhci support to SoC dtsi Fabrizio Castro
@ 2018-03-09  9:57 ` Fabrizio Castro
  2018-04-10 18:04 ` [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Ben Hutchings
  4 siblings, 0 replies; 6+ messages in thread
From: Fabrizio Castro @ 2018-03-09  9:57 UTC (permalink / raw)
  To: cip-dev

From: Simon Horman <horms+renesas@verge.net.au>

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ae6b99bc6928d13856172f287ee21be2eac39673)
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 arch/arm/configs/shmobile_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index 2e79332..30a3424 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -162,6 +162,8 @@ CONFIG_SND_SOC_RSRC_CARD=y
 CONFIG_SND_SOC_AK4642=y
 CONFIG_SND_SOC_WM8978=y
 CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_RCAR=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_R8A66597_HCD=y
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743
  2018-03-09  9:57 [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Fabrizio Castro
                   ` (3 preceding siblings ...)
  2018-03-09  9:57 ` [cip-dev] [PATCH 4/4] ARM: shmobile: enable XHCI_RCAR in defconfig Fabrizio Castro
@ 2018-04-10 18:04 ` Ben Hutchings
  4 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2018-04-10 18:04 UTC (permalink / raw)
  To: cip-dev

On Fri, 2018-03-09 at 09:57 +0000, Fabrizio Castro wrote:
> Dear All,
> 
> this series adds XHCI support to r8a7743.
> The only patch that hasn't been backported is:
> "usb: host: xhci-plat: Add r8a7743 support"
> 
> The reason for the new commit is that the backporting of the generic
> compatible string for R-Car Gen2 would have brought along a few
> unnecessary bits and pieces, a new commit seemed to address the goal
> more reliably.

That seems reasonable.  I've applied this series, thanks.

Ben.

> Thanks,
> 
> Fabrizio Castro (3):
> ? usb: host: xhci-plat: Add r8a7743 support
> ? dt-bindings: usb-xhci: Document r8a7743 support
> ? ARM: dts: r8a7743: Add xhci support to SoC dtsi
> 
> Simon Horman (1):
> ? ARM: shmobile: enable XHCI_RCAR in defconfig
> 
> ?Documentation/devicetree/bindings/usb/usb-xhci.txt |??4 ++--
> ?arch/arm/boot/dts/r8a7743.dtsi?????????????????????| 18 ++++++++++++++++++
> ?arch/arm/configs/shmobile_defconfig????????????????|??2 ++
> ?drivers/usb/host/xhci-plat.c???????????????????????|??7 +++++--
> ?4 files changed, 27 insertions(+), 4 deletions(-)
> 
-- 
Ben Hutchings
Software Developer, Codethink Ltd.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-10 18:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09  9:57 [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Fabrizio Castro
2018-03-09  9:57 ` [cip-dev] [PATCH 1/4] usb: host: xhci-plat: Add r8a7743 support Fabrizio Castro
2018-03-09  9:57 ` [cip-dev] [PATCH 2/4] dt-bindings: usb-xhci: Document " Fabrizio Castro
2018-03-09  9:57 ` [cip-dev] [PATCH 3/4] ARM: dts: r8a7743: Add xhci support to SoC dtsi Fabrizio Castro
2018-03-09  9:57 ` [cip-dev] [PATCH 4/4] ARM: shmobile: enable XHCI_RCAR in defconfig Fabrizio Castro
2018-04-10 18:04 ` [cip-dev] [PATCH 0/4] Add XHCI support to r8a7743 Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox