mbox series

[v4,0/6] Remodel HD3SS3220 device nodes

Message ID 20200920134905.4370-1-biju.das.jz@bp.renesas.com
Headers show
Series Remodel HD3SS3220 device nodes | expand

Message

Biju Das Sept. 20, 2020, 1:48 p.m. UTC
Some platforms have only super speed data bus connected to HD3SS3220 device
and high speed data bus directly connected to the SoC. In such platforms
modelling connector as a child of this device is making it non compliant
with usb connector bindings. By modelling connector node as standalone
device node along with HD3SS3220 device and the SoC data bus will make it
compliant with usb connector bindings.

It is based on the below discussion threads

1) https://patchwork.kernel.org/patch/11669423/
2) https://patchwork.kernel.org/patch/11129567/

V3->V4
  * Updated connector and ti,hd3ss3220 as per Rob's suggestion
  * Added Rb tags.

Biju Das (5):
  dt-bindings: update usb-c-connector example
  dt-bindings: usb: renesas,usb3-peri: Document HS and SS data bus
  usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode
  arm64: dts: renesas: cat874: Move connector node out of hd3ss3220
    device
  arm64: dts: renesas: beacon-renesom-baseboard: Move connector node out
    of hd3ss3220 device

Lad Prabhakar (1):
  dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema

 .../bindings/connector/usb-connector.yaml     | 30 ++++++-
 .../bindings/usb/renesas,usb3-peri.yaml       | 34 ++++++--
 .../devicetree/bindings/usb/ti,hd3ss3220.txt  | 38 ---------
 .../devicetree/bindings/usb/ti,hd3ss3220.yaml | 82 +++++++++++++++++++
 .../dts/renesas/beacon-renesom-baseboard.dtsi | 67 +++++++++++----
 .../boot/dts/renesas/r8a774c0-cat874.dts      | 67 +++++++++++----
 drivers/usb/typec/hd3ss3220.c                 | 18 +++-
 7 files changed, 254 insertions(+), 82 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.txt
 create mode 100644 Documentation/devicetree/bindings/usb/ti,hd3ss3220.yaml

Comments

Biju Das Oct. 27, 2020, 8:54 a.m. UTC | #1
Hi Geert,

The dependencies patches hit on 5.10-rc1 [1] [2][3].  This patch cleanly applies on renesas-devel. 

[1]  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10-rc1&id=588614be61b7cb46f697c3e141b2aef7f6b49347
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10-rc1&id=a6806e32e7a41c20c6b288009cb6f30929668327
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10-rc1&id=1c6e8ee63adbaf02a1e5177610fe9b77bec93d8a


Regards,
Biju


> Subject: [PATCH v4 6/6] arm64: dts: renesas: beacon-renesom-baseboard:
> Move connector node out of hd3ss3220 device
> 
> Move connector node out of hd3ss3220 device in order to comply with usb
> connector bindings.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v3->v4: No change
> v2->v3: No change
> v1->v2: No change
> ---
>  .../dts/renesas/beacon-renesom-baseboard.dtsi | 67 ++++++++++++++-----
>  1 file changed, 50 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
> b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
> index 66c9153b3101..e66b5b36e489 100644
> --- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
> +++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
> @@ -223,6 +223,29 @@
>  		#clock-cells = <0>;
>  		clock-frequency = <25000000>;
>  	};
> +
> +	connector {
> +		compatible = "usb-c-connector";
> +		label = "USB-C";
> +		data-role = "dual";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			port@0 {
> +				reg = <0>;
> +				hs_ep: endpoint {
> +					remote-endpoint = <&usb3_hs_ep>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				ss_ep: endpoint {
> +					remote-endpoint =
> <&hd3ss3220_in_ep>;
> +				};
> +			};
> +		};
> +	};
>  };
> 
>  &audio_clk_a {
> @@ -427,20 +450,19 @@
>  		interrupt-parent = <&gpio6>;
>  		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
> 
> -		connector {
> -			compatible = "usb-c-connector";
> -			label = "USB-C";
> -			data-role = "dual";
> -
> -			ports {
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -
> -				port@1 {
> -					reg = <1>;
> -					hd3ss3220_ep: endpoint {
> -						remote-endpoint =
> <&usb3_role_switch>;
> -					};
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			port@0 {
> +				reg = <0>;
> +				hd3ss3220_in_ep: endpoint {
> +					remote-endpoint = <&ss_ep>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				hd3ss3220_out_ep: endpoint {
> +					remote-endpoint =
> <&usb3_role_switch>;
>  				};
>  			};
>  		};
> @@ -714,9 +736,20 @@
>  	status = "okay";
>  	usb-role-switch;
> 
> -	port {
> -		usb3_role_switch: endpoint {
> -			remote-endpoint = <&hd3ss3220_ep>;
> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		port@0 {
> +			reg = <0>;
> +			usb3_hs_ep: endpoint {
> +				remote-endpoint = <&hs_ep>;
> +			};
> +		};
> +		port@1 {
> +			reg = <1>;
> +			usb3_role_switch: endpoint {
> +				remote-endpoint = <&hd3ss3220_out_ep>;
> +			};
>  		};
>  	};
>  };
> --
> 2.17.1
Biju Das Oct. 27, 2020, 8:55 a.m. UTC | #2
Hi Geert,

The dependencies patches hit on 5.10-rc1 [1] [2][3].  This patch cleanly applies on renesas-devel. 

[1]  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10-rc1&id=588614be61b7cb46f697c3e141b2aef7f6b49347
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10-rc1&id=a6806e32e7a41c20c6b288009cb6f30929668327
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10-rc1&id=1c6e8ee63adbaf02a1e5177610fe9b77bec93d8a


Regards,
Biju

> -----Original Message-----
> From: Biju Das <biju.das.jz@bp.renesas.com>
> Sent: 20 September 2020 14:49
> To: Rob Herring <robh+dt@kernel.org>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>; Geert Uytterhoeven
> <geert+renesas@glider.be>; Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@renesas.com>; Magnus Damm
> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
> devicetree@vger.kernel.org; Chris Paterson
> <Chris.Paterson2@renesas.com>; Biju Das <biju.das@bp.renesas.com>;
> Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Subject: [PATCH v4 5/6] arm64: dts: renesas: cat874: Move connector node
> out of hd3ss3220 device
> 
> Move connector node out of hd3ss3220 device in order to comply with usb
> connector bindings.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v3->v4: No change
> v2->v3: No change
> v1->v2: No change
> ---
>  .../boot/dts/renesas/r8a774c0-cat874.dts      | 67 ++++++++++++++-----
>  1 file changed, 50 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> index 26aee004a44e..ea87cb5a459c 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> @@ -129,6 +129,29 @@
>  		#clock-cells = <0>;
>  		clock-frequency = <74250000>;
>  	};
> +
> +	connector {
> +		compatible = "usb-c-connector";
> +		label = "USB-C";
> +		data-role = "dual";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			port@0 {
> +				reg = <0>;
> +				hs_ep: endpoint {
> +					remote-endpoint = <&usb3_hs_ep>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				ss_ep: endpoint {
> +					remote-endpoint =
> <&hd3ss3220_in_ep>;
> +				};
> +			};
> +		};
> +	};
>  };
> 
>  &audio_clk_a {
> @@ -186,20 +209,19 @@
>  		interrupt-parent = <&gpio6>;
>  		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> 
> -		connector {
> -			compatible = "usb-c-connector";
> -			label = "USB-C";
> -			data-role = "dual";
> -
> -			ports {
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -
> -				port@1 {
> -					reg = <1>;
> -					hd3ss3220_ep: endpoint {
> -						remote-endpoint =
> <&usb3_role_switch>;
> -					};
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			port@0 {
> +				reg = <0>;
> +				hd3ss3220_in_ep: endpoint {
> +					remote-endpoint = <&ss_ep>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				hd3ss3220_out_ep: endpoint {
> +					remote-endpoint =
> <&usb3_role_switch>;
>  				};
>  			};
>  		};
> @@ -405,9 +427,20 @@
>  	status = "okay";
>  	usb-role-switch;
> 
> -	port {
> -		usb3_role_switch: endpoint {
> -			remote-endpoint = <&hd3ss3220_ep>;
> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		port@0 {
> +			reg = <0>;
> +			usb3_hs_ep: endpoint {
> +				remote-endpoint = <&hs_ep>;
> +			};
> +		};
> +		port@1 {
> +			reg = <1>;
> +			usb3_role_switch: endpoint {
> +				remote-endpoint = <&hd3ss3220_out_ep>;
> +			};
>  		};
>  	};
>  };
> --
> 2.17.1
Geert Uytterhoeven Oct. 29, 2020, 1:38 p.m. UTC | #3
On Sun, Sep 20, 2020 at 3:49 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Move connector node out of hd3ss3220 device in order to comply with usb
> connector bindings.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.11.

Gr{oetje,eeting}s,

                        Geert
Geert Uytterhoeven Oct. 29, 2020, 1:40 p.m. UTC | #4
On Sun, Sep 20, 2020 at 3:49 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Move connector node out of hd3ss3220 device in order to comply with usb
> connector bindings.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.11.

Gr{oetje,eeting}s,

                        Geert