devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <krzysztof.kozlowski@linaro.org>, <mturquette@baylibre.com>,
	<sboyd@kernel.org>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>,
	<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>
Cc: <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/5] dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml
Date: Wed, 10 May 2023 07:14:19 +0000	[thread overview]
Message-ID: <a4d934c6-ec28-50d0-b9bb-9b11fee7ebb6@microchip.com> (raw)
In-Reply-To: <b3c7db03-6614-47d9-a9e0-a8e51c836d86@linaro.org>

On 10.05.2023 10:06, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 10/05/2023 09:00, Claudiu.Beznea@microchip.com wrote:
>> On 09.05.2023 09:25, Krzysztof Kozlowski wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On 09/05/2023 07:27, Claudiu Beznea wrote:
>>>> Convert Atmel PMC documentation to yaml. Along with it clock names
>>>> were adapted according to the current available device trees as
>>>> different controller versions accept different clocks (some of them
>>>> have 3 clocks as input, some has 2 clocks as inputs and some with 2
>>>> input clocks uses different clock names).
>>>>
>>>
>>> Thank you for your patch. There is something to discuss/improve.
>>>
>>>> +title: Atmel Power Management Controller (PMC)
>>>> +
>>>> +maintainers:
>>>> +  - Claudiu Beznea <claudiu.beznea@microchip.com>
>>>> +
>>>> +description:
>>>> +  The power management controller optimizes power consumption by controlling all
>>>> +  system and user peripheral clocks. The PMC enables/disables the clock inputs
>>>> +  to many of the peripherals and to the processor.
>>>> +
>>>> +properties:
>>>> +  compatible:
>>>> +    oneOf:
>>>> +      - items:
>>>> +          - enum:
>>>> +              - atmel,at91sam9g15-pmc
>>>> +              - atmel,at91sam9g20-pmc
>>>> +              - atmel,at91sam9g25-pmc
>>>> +              - atmel,at91sam9g35-pmc
>>>> +              - atmel,at91sam9x25-pmc
>>>> +              - atmel,at91sam9x35-pmc
>>>> +          - enum:
>>>> +              - atmel,at91sam9260-pmc
>>>> +              - atmel,at91sam9x5-pmc
>>>
>>> I missed it last time - why you have two enums? We never talked about
>>> this. It's usually wrong... are you sure this is real hardware:
>>> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc
>>> ?
>>
>> I have 2 enums because there are some hardware covered by:
>> "vendor-name,hardware-v1-pmc", "syscon" and some covered by:
>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon".
> 
> The enum does not say this. At all.
> 
> So again, answer, do not ignore:
> is this valid setup:
> atmel,at91sam9g20-pmc, atmel,at91sam9260-pmc
> ?

Not w/o syscon. This is valid:

compatible = "atmel,at91sam9g20-pmc", "atmel,at91sam9260-pmc", "syscon";

available in arch/arm/boot/dts/at91sam9g20.dtsi +45

> 
>>
>> Many AT91 device trees compatibles were written in this way. Thus when new
>> versions of the same IP has been introduced the drivers were not
>> necessarily updated but the compatibles in device trees were updated e.g.
>> with "vendor-name,hardware-v2-pmc" (the full compatible becoming
>> "vendor-name,hardware-v2-pmc", "vendor-name,hardware-v1-pmc", "syscon") and
>> let the drivers fall back to already in driver supported compatible
>> "vendor-name,hardware-v1-pmc", "syscon". In general v2 comes with new
>> features in addition to v1.
>>
>> That way they AT91 ensures the ABI properties of DT and thus when the
>> drivers were finally updated with the new features of the
>> "vendor-name,hardware-v2-pmc" DT remained in place.
>>
>> Please let me know if these could be handled better in YAML.
> 
> 
> enum + const + syscon, like every binding that type does in all
> bindings. Don't invent some new syntax.
> 
> Best regards,
> Krzysztof
> 


  reply	other threads:[~2023-05-10  7:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09  5:27 [PATCH v3 0/5] dt-bindings: clocks: at91: convert to yaml Claudiu Beznea
2023-05-09  5:27 ` [PATCH v3 1/5] ARM: dts: at91: use clock-controller name for PMC nodes Claudiu Beznea
2023-05-09  5:27 ` [PATCH v3 2/5] dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml Claudiu Beznea
2023-05-09  6:25   ` Krzysztof Kozlowski
2023-05-10  7:00     ` Claudiu.Beznea
2023-05-10  7:06       ` Krzysztof Kozlowski
2023-05-10  7:14         ` Claudiu.Beznea [this message]
2023-05-10  7:58           ` Krzysztof Kozlowski
2023-05-10  8:31             ` Claudiu.Beznea
2023-05-10 10:12               ` Krzysztof Kozlowski
2023-05-11  6:29                 ` Claudiu.Beznea
2023-05-11  8:58                   ` Conor Dooley
2023-05-12  7:59                     ` Claudiu.Beznea
2023-05-09  5:27 ` [PATCH v3 3/5] ARM: dts: at91: at91sam9n12: witch sckc to new clock bindings Claudiu Beznea
2023-05-09  5:27 ` [PATCH v3 4/5] ARM: dts: at91: use clock-controller name for sckc nodes Claudiu Beznea
2023-05-09  5:27 ` [PATCH v3 5/5] dt-bindings: clocks: at91sam9x5-sckc: convert to yaml Claudiu Beznea

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=a4d934c6-ec28-50d0-b9bb-9b11fee7ebb6@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@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).