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

Minda Chen posted 2 patches 2 years, 9 months ago
There is a newer version of this series
[PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset
Posted by Minda Chen 2 years, 9 months ago
To support generic clock and reset init in Cadence USBSS
controller. Add clock and reset dts configuration.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 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
Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset
Posted by Krzysztof Kozlowski 2 years, 9 months ago
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 <minda.chen@starfivetech.com>
> ---
>  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
Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset
Posted by Minda Chen 2 years, 9 months ago

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 <minda.chen@starfivetech.com>
>> ---
>>  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.
Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset
Posted by Krzysztof Kozlowski 2 years, 9 months ago
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 <minda.chen@starfivetech.com>

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
Re: [PATCH v1 1/2] dt-binding: cdns,usb3: Add clock and reset
Posted by Minda Chen 2 years, 9 months ago

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 <minda.chen@starfivetech.com>
> 
> 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
>