2022-11-14 13:19:18

by Wayne Chang

[permalink] [raw]
Subject: [PATCH v3 01/13] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support

Extend the Tegra XUSB controller device tree binding with Tegra234
support.

Signed-off-by: Wayne Chang <[email protected]>
---
V2 -> V3:nothing has changed
V1 -> V2:address the issue on phy-names property
.../bindings/usb/nvidia,tegra-xudc.yaml | 24 ++++++++++++-------
1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
index fd6e7c81426e..52488a731c4e 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
@@ -22,6 +22,7 @@ properties:
- nvidia,tegra210-xudc # For Tegra210
- nvidia,tegra186-xudc # For Tegra186
- nvidia,tegra194-xudc # For Tegra194
+ - nvidia,tegra234-xudc # For Tegra234

reg:
minItems: 2
@@ -90,21 +91,27 @@ properties:

phys:
minItems: 1
+ maxItems: 8
description:
Must contain an entry for each entry in phy-names.
See ../phy/phy-bindings.txt for details.

phy-names:
minItems: 1
+ maxItems: 8
items:
- - const: usb2-0
- - const: usb2-1
- - const: usb2-2
- - const: usb2-3
- - const: usb3-0
- - const: usb3-1
- - const: usb3-2
- - const: usb3-3
+ enum:
+ - usb2-0
+ - usb2-1
+ - usb2-2
+ - usb2-3
+ - usb3-0
+ - usb3-1
+ - usb3-2
+ - usb3-3
+
+ dma-coherent:
+ type: boolean

avddio-usb-supply:
description: PCIe/USB3 analog logic power supply. Must supply 1.05 V.
@@ -153,6 +160,7 @@ allOf:
enum:
- nvidia,tegra186-xudc
- nvidia,tegra194-xudc
+ - nvidia,tegra234-xudc
then:
properties:
reg:
--
2.25.1



2022-11-15 12:49:19

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH v3 01/13] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support


On 14/11/2022 12:40, Wayne Chang wrote:
> Extend the Tegra XUSB controller device tree binding with Tegra234
> support.
>
> Signed-off-by: Wayne Chang <[email protected]>
> ---
> V2 -> V3:nothing has changed
> V1 -> V2:address the issue on phy-names property
> .../bindings/usb/nvidia,tegra-xudc.yaml | 24 ++++++++++++-------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
> index fd6e7c81426e..52488a731c4e 100644
> --- a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
> +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
> @@ -22,6 +22,7 @@ properties:
> - nvidia,tegra210-xudc # For Tegra210
> - nvidia,tegra186-xudc # For Tegra186
> - nvidia,tegra194-xudc # For Tegra194
> + - nvidia,tegra234-xudc # For Tegra234
>
> reg:
> minItems: 2
> @@ -90,21 +91,27 @@ properties:
>
> phys:
> minItems: 1
> + maxItems: 8
> description:
> Must contain an entry for each entry in phy-names.
> See ../phy/phy-bindings.txt for details.
>
> phy-names:
> minItems: 1
> + maxItems: 8
> items:
> - - const: usb2-0
> - - const: usb2-1
> - - const: usb2-2
> - - const: usb2-3
> - - const: usb3-0
> - - const: usb3-1
> - - const: usb3-2
> - - const: usb3-3
> + enum:
> + - usb2-0
> + - usb2-1
> + - usb2-2
> + - usb2-3
> + - usb3-0
> + - usb3-1
> + - usb3-2
> + - usb3-3
> +
> + dma-coherent:
> + type: boolean
>
> avddio-usb-supply:
> description: PCIe/USB3 analog logic power supply. Must supply 1.05 V.
> @@ -153,6 +160,7 @@ allOf:
> enum:
> - nvidia,tegra186-xudc
> - nvidia,tegra194-xudc
> + - nvidia,tegra234-xudc
> then:
> properties:
> reg:


Reviewed-by: Jon Hunter <[email protected]>

Thanks
Jon

--
nvpublic

2022-11-16 21:36:39

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3 01/13] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support

On Mon, Nov 14, 2022 at 08:40:41PM +0800, Wayne Chang wrote:
> Extend the Tegra XUSB controller device tree binding with Tegra234
> support.

Why do you need any order and number of phys? Please explain in the
commit msg.

>
> Signed-off-by: Wayne Chang <[email protected]>
> ---
> V2 -> V3:nothing has changed
> V1 -> V2:address the issue on phy-names property
> .../bindings/usb/nvidia,tegra-xudc.yaml | 24 ++++++++++++-------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
> index fd6e7c81426e..52488a731c4e 100644
> --- a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
> +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
> @@ -22,6 +22,7 @@ properties:
> - nvidia,tegra210-xudc # For Tegra210
> - nvidia,tegra186-xudc # For Tegra186
> - nvidia,tegra194-xudc # For Tegra194
> + - nvidia,tegra234-xudc # For Tegra234
>
> reg:
> minItems: 2
> @@ -90,21 +91,27 @@ properties:
>
> phys:
> minItems: 1
> + maxItems: 8
> description:
> Must contain an entry for each entry in phy-names.
> See ../phy/phy-bindings.txt for details.
>
> phy-names:
> minItems: 1
> + maxItems: 8
> items:
> - - const: usb2-0
> - - const: usb2-1
> - - const: usb2-2
> - - const: usb2-3
> - - const: usb3-0
> - - const: usb3-1
> - - const: usb3-2
> - - const: usb3-3
> + enum:
> + - usb2-0
> + - usb2-1
> + - usb2-2
> + - usb2-3
> + - usb3-0
> + - usb3-1
> + - usb3-2
> + - usb3-3
> +
> + dma-coherent:
> + type: boolean
>
> avddio-usb-supply:
> description: PCIe/USB3 analog logic power supply. Must supply 1.05 V.
> @@ -153,6 +160,7 @@ allOf:
> enum:
> - nvidia,tegra186-xudc
> - nvidia,tegra194-xudc
> + - nvidia,tegra234-xudc
> then:
> properties:
> reg:
> --
> 2.25.1
>
>

2022-11-17 12:40:08

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH v3 01/13] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support


On 16/11/2022 21:05, Rob Herring wrote:
> On Mon, Nov 14, 2022 at 08:40:41PM +0800, Wayne Chang wrote:
>> Extend the Tegra XUSB controller device tree binding with Tegra234
>> support.
>
> Why do you need any order and number of phys? Please explain in the
> commit msg.

I have been having a quick look at this and for the devices that
this binding is applicable to, they only support one port for USB2
and one port for USB3. So I don't think that we should have all
these ports defined in this binding doc. So ideally, we should have
...

diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
index 52488a731c4e..031796b68bbb 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml
@@ -98,17 +98,9 @@ properties:

phy-names:
minItems: 1
- maxItems: 8
items:
- enum:
- - usb2-0
- - usb2-1
- - usb2-2
- - usb2-3
- - usb3-0
- - usb3-1
- - usb3-2
- - usb3-3
+ - const: usb2
+ - const: usb3

dma-coherent:
type: boolean
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
index 0556bc64287d..349a98119608 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
@@ -2128,7 +2128,7 @@ usb@3550000 {

phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>;
- phy-names = "usb2-0", "usb3-1";
+ phy-names = "usb2", "usb3";
};

usb@3610000 {

Jon

--
nvpublic