devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support
@ 2019-03-06  9:07 Biju Das
  2019-03-06  9:07 ` [PATCH 1/9] dt-bindings: usb: hd3ss3220 device tree binding document Biju Das
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Biju Das @ 2019-03-06  9:07 UTC (permalink / raw)
  To: Rob Herring, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	Mark Rutland
  Cc: Biju Das, linux-usb, devicetree, Simon Horman, Yoshihiro Shimoda,
	Geert Uytterhoeven, Chris Paterson, Fabrizio Castro,
	linux-renesas-soc

This series adds USB 3.0 support for the CAT874 platform, including a
new driver for the TI HD3SS3220 USB Type-C DRP port controller.

This patch series supports:
1) Host hotplug operation
2) Device hot plug operation
3) USB type-C data_role switch 
   (Tested with 2 RZ/G2E boards connected with a Type-C cable)

This patchset is based on usb_next and renesas-devel-20190304-v5.0 branch.

Biju Das (9):
  dt-bindings: usb: hd3ss3220 device tree binding document
  dt-bindings: usb: renesas_usb3: add extcon support
  usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller
  usb: gadget: udc: renesas_usb3: use extcon framework to receive
    connect/disconnect
  arm64: defconfig: enable TYPEC_HD3SS3220 config option
  arm64: renesas_defconfig: Enable TYPEC_HD3SS3220 config option
  arm64: dts: renesas: r8a774c0-cat874: enable USB3.0 host/peripheral
    device node
  arm64: dts: renesas: r8a774c0-cat874: Enable TI HD3SS3220 support
  arm64: dts: renesas: r8a774c0-cat874: Enable extcon support

 .../devicetree/bindings/usb/renesas_usb3.txt       |   2 +
 .../devicetree/bindings/usb/ti,hd3ss3220.txt       |  15 ++
 arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts    |  31 +++
 arch/arm64/configs/defconfig                       |   2 +
 arch/arm64/configs/renesas_defconfig               |   2 +
 drivers/usb/gadget/udc/renesas_usb3.c              | 115 +++++++--
 drivers/usb/typec/Kconfig                          |  10 +
 drivers/usb/typec/Makefile                         |   1 +
 drivers/usb/typec/hd3ss3220.c                      | 284 +++++++++++++++++++++
 9 files changed, 446 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
 create mode 100644 drivers/usb/typec/hd3ss3220.c

-- 
2.7.4

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

* [PATCH 1/9] dt-bindings: usb: hd3ss3220 device tree binding document
  2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
@ 2019-03-06  9:07 ` Biju Das
  2019-03-06  9:07 ` [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support Biju Das
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2019-03-06  9:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	linux-usb, devicetree, Simon Horman, Yoshihiro Shimoda,
	Geert Uytterhoeven, Chris Paterson, Fabrizio Castro,
	linux-renesas-soc

Add device tree binding document for TI HD3SS3220 Type-C DRP port
controller driver.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt

diff --git a/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
new file mode 100644
index 0000000..1fcf6f6
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
@@ -0,0 +1,15 @@
+TI HD3SS3220 TypeC DRP Port Controller.
+
+Required properties:
+ - compatible: Must be "ti,hd3ss3220".
+ - reg: I2C slave address, must be 0x47 or 0x67 based on ADDR pin.
+ - interrupts: <a b> where a is the interrupt number and b represents an
+   encoding of the sense and level information for the interrupt.
+
+Example:
+hd3ss3220@47 {
+	compatible = "ti,hd3ss3220";
+	reg = <0x47>;
+	interrupt-parent = <&gpio6>;
+	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+};
-- 
2.7.4

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

* [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support
  2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
  2019-03-06  9:07 ` [PATCH 1/9] dt-bindings: usb: hd3ss3220 device tree binding document Biju Das
@ 2019-03-06  9:07 ` Biju Das
  2019-03-27 23:28   ` Rob Herring
  2019-03-06  9:07 ` [PATCH 7/9] arm64: dts: renesas: r8a774c0-cat874: enable USB3.0 host/peripheral device node Biju Das
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Biju Das @ 2019-03-06  9:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	linux-usb, devicetree, Simon Horman, Yoshihiro Shimoda,
	Geert Uytterhoeven, Chris Paterson, Fabrizio Castro,
	linux-renesas-soc

Add support for renesas_usb3 to receive connect and disconnect notification
using extcon framework.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 Documentation/devicetree/bindings/usb/renesas_usb3.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/renesas_usb3.txt b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
index d366555..ae35674 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
@@ -21,6 +21,8 @@ Required properties:
 Optional properties:
   - phys: phandle + phy specifier pair
   - phy-names: must be "usb"
+  - extcon: phandle for the extcon device renesas usb3 uses to detect
+	    connect/disconnect events.
 
 Example of R-Car H3 ES1.x:
 	usb3_peri0: usb@ee020000 {
-- 
2.7.4

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

* [PATCH 7/9] arm64: dts: renesas: r8a774c0-cat874: enable USB3.0 host/peripheral device node
  2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
  2019-03-06  9:07 ` [PATCH 1/9] dt-bindings: usb: hd3ss3220 device tree binding document Biju Das
  2019-03-06  9:07 ` [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support Biju Das
@ 2019-03-06  9:07 ` Biju Das
  2019-03-06  9:07 ` [PATCH 8/9] arm64: dts: renesas: r8a774c0-cat874: Enable TI HD3SS3220 support Biju Das
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2019-03-06  9:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	Simon Horman, Yoshihiro Shimoda, Magnus Damm, linux-renesas-soc,
	devicetree, Geert Uytterhoeven, Chris Paterson, Fabrizio Castro

This patch enables USB3.0 host/peripheral device node for r8a774c0
cat874 board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
This patch depends on commit 35ed6229c0f0d079f2
("usb: gadget: udc: renesas_usb3: Add bindings for r8a774c0")
---
 arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
index 959919a..73b51e2 100644
--- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
@@ -124,6 +124,11 @@
 		function = "sdhi0";
 		power-source = <1800>;
 	};
+
+	usb30_pins: usb30 {
+		groups = "usb30", "usb30_id";
+		function = "usb30";
+	};
 };
 
 &scif2 {
@@ -146,3 +151,16 @@
 	sd-uhs-sdr104;
 	status = "okay";
 };
+
+&usb3_peri0 {
+	companion = <&xhci0>;
+
+	status = "okay";
+};
+
+&xhci0 {
+	pinctrl-0 = <&usb30_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
-- 
2.7.4

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

* [PATCH 8/9] arm64: dts: renesas: r8a774c0-cat874: Enable TI HD3SS3220 support
  2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
                   ` (2 preceding siblings ...)
  2019-03-06  9:07 ` [PATCH 7/9] arm64: dts: renesas: r8a774c0-cat874: enable USB3.0 host/peripheral device node Biju Das
@ 2019-03-06  9:07 ` Biju Das
  2019-03-06  9:07 ` [PATCH 9/9] arm64: dts: renesas: r8a774c0-cat874: Enable extcon support Biju Das
  2019-03-06 13:09 ` [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Simon Horman
  5 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2019-03-06  9:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	Simon Horman, Yoshihiro Shimoda, Magnus Damm, linux-renesas-soc,
	devicetree, Geert Uytterhoeven, Chris Paterson, Fabrizio Castro

This patch enables TI HD3SS3220 device on r8a774c0 cat874 board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
index 73b51e2..2a4631d 100644
--- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
@@ -80,6 +80,18 @@
 	clock-frequency = <48000000>;
 };
 
+&i2c0 {
+	status = "okay";
+	clock-frequency = <100000>;
+
+	hd3ss3220@47 {
+		compatible = "ti,hd3ss3220";
+		reg = <0x47>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
 &i2c1 {
 	pinctrl-0 = <&i2c1_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [PATCH 9/9] arm64: dts: renesas: r8a774c0-cat874: Enable extcon support
  2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
                   ` (3 preceding siblings ...)
  2019-03-06  9:07 ` [PATCH 8/9] arm64: dts: renesas: r8a774c0-cat874: Enable TI HD3SS3220 support Biju Das
@ 2019-03-06  9:07 ` Biju Das
  2019-03-06 13:09 ` [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Simon Horman
  5 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2019-03-06  9:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	Simon Horman, Yoshihiro Shimoda, Magnus Damm, linux-renesas-soc,
	devicetree, Geert Uytterhoeven, Chris Paterson, Fabrizio Castro

This patch enables extcon framework support to receive connect and
disconnect notification.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
index 2a4631d..1a78254 100644
--- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
@@ -84,7 +84,7 @@
 	status = "okay";
 	clock-frequency = <100000>;
 
-	hd3ss3220@47 {
+	hd3ss3220: hd3ss3220@47 {
 		compatible = "ti,hd3ss3220";
 		reg = <0x47>;
 		interrupt-parent = <&gpio6>;
@@ -166,6 +166,7 @@
 
 &usb3_peri0 {
 	companion = <&xhci0>;
+	extcon = <&hd3ss3220>;
 
 	status = "okay";
 };
-- 
2.7.4

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

* Re: [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support
  2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
                   ` (4 preceding siblings ...)
  2019-03-06  9:07 ` [PATCH 9/9] arm64: dts: renesas: r8a774c0-cat874: Enable extcon support Biju Das
@ 2019-03-06 13:09 ` Simon Horman
  5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2019-03-06 13:09 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	Mark Rutland, linux-usb, devicetree, Yoshihiro Shimoda,
	Geert Uytterhoeven, Chris Paterson, Fabrizio Castro,
	linux-renesas-soc

On Wed, Mar 06, 2019 at 09:07:17AM +0000, Biju Das wrote:
> This series adds USB 3.0 support for the CAT874 platform, including a
> new driver for the TI HD3SS3220 USB Type-C DRP port controller.
> 
> This patch series supports:
> 1) Host hotplug operation
> 2) Device hot plug operation
> 3) USB type-C data_role switch 
>    (Tested with 2 RZ/G2E boards connected with a Type-C cable)
> 
> This patchset is based on usb_next and renesas-devel-20190304-v5.0 branch.
> 
> Biju Das (9):
>   dt-bindings: usb: hd3ss3220 device tree binding document
>   dt-bindings: usb: renesas_usb3: add extcon support
>   usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller
>   usb: gadget: udc: renesas_usb3: use extcon framework to receive
>     connect/disconnect

Hi Biju,

I am marking the patches below as deffered pending acceptance of
the dt-bindings patches above.

>   arm64: defconfig: enable TYPEC_HD3SS3220 config option
>   arm64: renesas_defconfig: Enable TYPEC_HD3SS3220 config option
>   arm64: dts: renesas: r8a774c0-cat874: enable USB3.0 host/peripheral
>     device node
>   arm64: dts: renesas: r8a774c0-cat874: Enable TI HD3SS3220 support
>   arm64: dts: renesas: r8a774c0-cat874: Enable extcon support
> 
>  .../devicetree/bindings/usb/renesas_usb3.txt       |   2 +
>  .../devicetree/bindings/usb/ti,hd3ss3220.txt       |  15 ++
>  arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts    |  31 +++
>  arch/arm64/configs/defconfig                       |   2 +
>  arch/arm64/configs/renesas_defconfig               |   2 +
>  drivers/usb/gadget/udc/renesas_usb3.c              | 115 +++++++--
>  drivers/usb/typec/Kconfig                          |  10 +
>  drivers/usb/typec/Makefile                         |   1 +
>  drivers/usb/typec/hd3ss3220.c                      | 284 +++++++++++++++++++++
>  9 files changed, 446 insertions(+), 16 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
>  create mode 100644 drivers/usb/typec/hd3ss3220.c
> 
> -- 
> 2.7.4
> 

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

* Re: [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support
  2019-03-06  9:07 ` [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support Biju Das
@ 2019-03-27 23:28   ` Rob Herring
  2019-03-28 13:04     ` Biju Das
  0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2019-03-27 23:28 UTC (permalink / raw)
  To: Biju Das
  Cc: Mark Rutland, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	linux-usb, devicetree, Simon Horman, Yoshihiro Shimoda,
	Geert Uytterhoeven, Chris Paterson, Fabrizio Castro,
	linux-renesas-soc

On Wed, Mar 06, 2019 at 09:07:19AM +0000, Biju Das wrote:
> Add support for renesas_usb3 to receive connect and disconnect notification
> using extcon framework.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> ---
>  Documentation/devicetree/bindings/usb/renesas_usb3.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/renesas_usb3.txt b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> index d366555..ae35674 100644
> --- a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> +++ b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> @@ -21,6 +21,8 @@ Required properties:
>  Optional properties:
>    - phys: phandle + phy specifier pair
>    - phy-names: must be "usb"
> +  - extcon: phandle for the extcon device renesas usb3 uses to detect
> +	    connect/disconnect events.

Please don't use extcon and use usb-connector binding instead.

>  
>  Example of R-Car H3 ES1.x:
>  	usb3_peri0: usb@ee020000 {
> -- 
> 2.7.4
> 

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

* RE: [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support
  2019-03-27 23:28   ` Rob Herring
@ 2019-03-28 13:04     ` Biju Das
  0 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2019-03-28 13:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Greg Kroah-Hartman, Heikki Krogerus, Felipe Balbi,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	Simon Horman, Yoshihiro Shimoda, Geert Uytterhoeven,
	Chris Paterson, Fabrizio Castro,
	linux-renesas-soc@vger.kernel.org

Hi Rob,

Thanks for the feedback.

> Subject: Re: [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support
> 
> On Wed, Mar 06, 2019 at 09:07:19AM +0000, Biju Das wrote:
> > Add support for renesas_usb3 to receive connect and disconnect
> > notification using extcon framework.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > ---
> >  Documentation/devicetree/bindings/usb/renesas_usb3.txt | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > index d366555..ae35674 100644
> > --- a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > +++ b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > @@ -21,6 +21,8 @@ Required properties:
> >  Optional properties:
> >    - phys: phandle + phy specifier pair
> >    - phy-names: must be "usb"
> > +  - extcon: phandle for the extcon device renesas usb3 uses to detect
> > +	    connect/disconnect events.
> 
> Please don't use extcon and use usb-connector binding instead.

I have switched to usb role switch framework  instead of extcon and sent V2 based on the below feedback.
https://patchwork.kernel.org/patch/10840659/

On V2, I have sent  a patch series which uses " usb-connector " binding [1]   and "usb-role-switch" property[2]
[1] https://patchwork.kernel.org/patch/10852495/
[2] https://patchwork.kernel.org/patch/10852497/

Support for  "usb-role-switch" compatible can be  found in the below patch set
https://patchwork.kernel.org/project/linux-usb/list/?series=97707

Please can you comment, is this approach is acceptable or not?

Regards,
Biju 

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

end of thread, other threads:[~2019-03-28 13:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-06  9:07 [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Biju Das
2019-03-06  9:07 ` [PATCH 1/9] dt-bindings: usb: hd3ss3220 device tree binding document Biju Das
2019-03-06  9:07 ` [PATCH 2/9] dt-bindings: usb: renesas_usb3: add extcon support Biju Das
2019-03-27 23:28   ` Rob Herring
2019-03-28 13:04     ` Biju Das
2019-03-06  9:07 ` [PATCH 7/9] arm64: dts: renesas: r8a774c0-cat874: enable USB3.0 host/peripheral device node Biju Das
2019-03-06  9:07 ` [PATCH 8/9] arm64: dts: renesas: r8a774c0-cat874: Enable TI HD3SS3220 support Biju Das
2019-03-06  9:07 ` [PATCH 9/9] arm64: dts: renesas: r8a774c0-cat874: Enable extcon support Biju Das
2019-03-06 13:09 ` [PATCH 0/9] Add USB3.0 and TI HD3SS3220 driver support Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).