devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Minda Chen <minda.chen@starfivetech.com>,
	Roger Quadros <rogerq@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Pawel Laszczak <pawell@cadence.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Chen <peter.chen@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: cdns,usb3: Add clock and reset
Date: Sat, 13 May 2023 20:42:18 +0200	[thread overview]
Message-ID: <a6aa353c-3de0-9acb-9848-4f37fac0ab2e@linaro.org> (raw)
In-Reply-To: <d4de3b1b-31b6-c257-29a5-f404ff0fbe99@starfivetech.com>

On 12/05/2023 12:22, Minda Chen wrote:
> 
> 
> On 2023/5/11 22:49, Krzysztof Kozlowski wrote:
>> On 11/05/2023 14:16, Roger Quadros wrote:
>>>
>>>
>>> On 11/05/2023 12:26, Krzysztof Kozlowski wrote:
>>>> On 10/05/2023 15:28, 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>
>>>>> ---
>>>>>  .../devicetree/bindings/usb/cdns,usb3.yaml         | 14 ++++++++++++++
>>>>>  1 file changed, 14 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
>>>>> index cae46c4982ad..623c6b34dee3 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
>>>>> +    maxItems: 8
>>>>> +    description:
>>>>> +      USB controller clocks.
>>>>
>>>> You need to list the items. And why is it variable? Your clock choice in
>>>> the example is poor, I doubt it is real.
>>>>
>>>>> +
>>>>> +  resets:
>>>>> +    minItems: 1
>>>>> +    maxItems: 8
>>>>> +    description:
>>>>> +      USB controller generic resets.
>>>>
>>>> Here as well.
>>>>
>>>> You had one clock last time, thus the review was - drop the names. Now
>>>> you changed it to 8 clocks... I don't understand.
>>>>
>>>
>>> Different platforms may have different number of clocks/resets or none.
>>> So I don't think minItems/maxItems should be specified.
>>
>> Yeah, but we want the clocks to be specific per platform. Not anything
>> anywhere.
>>
>> Best regards,
>> Krzysztof
>>
> 
> I can change like these. Are these changes can be approved?
> lpm , bus clock and "pwrup" reset can be specific cases. (The changes are from snps,dwc3.yaml.)
> 
>   clocks:
>     description:
>       In general the core supports two types of clocks. bus is a SoC Bus
>       Clock(AHB/AXI/APB). lpm is a link power management clock. But particular
>       cases may differ from that having less or more clock sources with
>       another names.
> 
>   clock-names:
>     contains:
>       anyOf:
>         - enum: [bus, lpm]
>         - true
> 

No because this does not solve my concern. You allow here anything,
which is not desired. The device bindings should specify what clocks
(and resets) you have here. Order is also fixed (with exceptions).

Now, if this is generic IP block used by different SoC vendors and it
has different clocks in different implementations, it means one
compatible for all of them is not enough anymore.

Best regards,
Krzysztof


  reply	other threads:[~2023-05-13 18:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 13:28 [PATCH v2 0/2] Add clock and reset in cdns3 platform Minda Chen
2023-05-10 13:28 ` [PATCH v2 1/2] dt-bindings: cdns,usb3: Add clock and reset Minda Chen
2023-05-11  9:26   ` Krzysztof Kozlowski
2023-05-11 12:16     ` Roger Quadros
2023-05-11 14:49       ` Krzysztof Kozlowski
2023-05-12 10:22         ` Minda Chen
2023-05-13 18:42           ` Krzysztof Kozlowski [this message]
2023-05-12 11:08         ` Roger Quadros
2023-05-13 18:43           ` Krzysztof Kozlowski
2023-05-10 13:28 ` [PATCH v2 2/2] usb: cdns3: cdns3-plat: Add clk and reset init Minda Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6aa353c-3de0-9acb-9848-4f37fac0ab2e@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=minda.chen@starfivetech.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pawell@cadence.com \
    --cc=peter.chen@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).