2023-05-02 08:20:51

by Minda Chen

[permalink] [raw]
Subject: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset

To support generic clock and reset init in Cadence USBSS
controller. Add clock and reset dts configuration.

Signed-off-by: Minda Chen <[email protected]>
---
Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
index cae46c4982ad..7bffd8fb1e38 100644
--- a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
+++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
@@ -42,6 +42,18 @@ properties:
- const: otg
- const: wakeup

+ clocks:
+ minItems: 1
+
+ clock-names:
+ minItems: 1
+
+ resets:
+ minItems: 1
+
+ reset-names:
+ minItems: 1
+
dr_mode:
enum: [host, otg, peripheral]

--
2.17.1


2023-05-02 20:08:55

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset

On 02/05/2023 10:18, Minda Chen wrote:
> To support generic clock and reset init in Cadence USBSS
> controller. Add clock and reset dts configuration.
>
> Signed-off-by: Minda Chen <[email protected]>

Subject prefix: dt-bindings

> ---
> Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
> index cae46c4982ad..7bffd8fb1e38 100644
> --- a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
> +++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
> @@ -42,6 +42,18 @@ properties:
> - const: otg
> - const: wakeup
>
> + clocks:
> + minItems: 1

no, this must maxItems.

> +
> + clock-names:
> + minItems: 1

Drop entire property, not useful without descriptive name.

> +
> + resets:
> + minItems: 1

instead maxItems.

> +
> + reset-names:
> + minItems: 1

Drop entire property, not useful without descriptive name.

> +
> dr_mode:
> enum: [host, otg, peripheral]
>

Best regards,
Krzysztof

2023-05-02 20:10:57

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset

On 02/05/2023 10:18, Minda Chen wrote:
> To support generic clock and reset init in Cadence USBSS
> controller. Add clock and reset dts configuration.

s/. Add/, add/
(although still weird sentence)

>
> Signed-off-by: Minda Chen <[email protected]>
> ---
> Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 12 ++++++++++++

Also update the example or any in-tree DTS. Why existing users do not
need it? Aren't you duplicating clocks with wrapping node?

Best regards,
Krzysztof

2023-05-06 01:43:24

by Minda Chen

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset



On 2023/5/3 4:10, Krzysztof Kozlowski wrote:
> On 02/05/2023 10:18, Minda Chen wrote:
>> To support generic clock and reset init in Cadence USBSS
>> controller. Add clock and reset dts configuration.
>
> s/. Add/, add/
> (although still weird sentence)
>
ok
>>
>> Signed-off-by: Minda Chen <[email protected]>
>> ---
>> Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 12 ++++++++++++
>
> Also update the example or any in-tree DTS. Why existing users do not
> need it? Aren't you duplicating clocks with wrapping node?
>
> Best regards,
> Krzysztof
>
I will update the example. Exiting users are NXP and TI. NXP codes do not contain clock and resets, TI usb2 refclk require to set clock rateļ¼Œ
TI codes can't direct use it. And I don't know TI's hardware. Maybe Roger can take into account to use it.

2023-05-06 02:02:53

by Minda Chen

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset



On 2023/5/3 4:08, Krzysztof Kozlowski wrote:
> On 02/05/2023 10:18, Minda Chen wrote:
>> To support generic clock and reset init in Cadence USBSS
>> controller. Add clock and reset dts configuration.
>>
>> Signed-off-by: Minda Chen <[email protected]>
>
> Subject prefix: dt-bindings
>
ok
>> ---
>> Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
>> index cae46c4982ad..7bffd8fb1e38 100644
>> --- a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
>> +++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
>> @@ -42,6 +42,18 @@ properties:
>> - const: otg
>> - const: wakeup
>>
>> + clocks:
>> + minItems: 1
>
> no, this must maxItems.
>
ok
>> +
>> + clock-names:
>> + minItems: 1
>
> Drop entire property, not useful without descriptive name.
>
So I will delete clock-names and reset-names in my starfive codes.
>> +
>> + resets:
>> + minItems: 1
>
> instead maxItems.
>
>> +
>> + reset-names:
>> + minItems: 1
>
> Drop entire property, not useful without descriptive name.
>
>> +
>> dr_mode:
>> enum: [host, otg, peripheral]
>>
>
> Best regards,
> Krzysztof
>