devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gatien CHEVALLIER <gatien.chevallier@foss.st.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Marek Vasut <marex@denx.de>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lionel Debieve" <lionel.debieve@foss.st.com>,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Yang Yingliang" <yangyingliang@huawei.com>
Subject: Re: [PATCH 1/4] dt-bindings: rng: add st,stm32mp25-rng support
Date: Mon, 7 Oct 2024 18:22:56 +0200	[thread overview]
Message-ID: <c425507f-5e78-408e-8a8d-fe02412a76e7@foss.st.com> (raw)
In-Reply-To: <ec3cda71-57d0-4ec1-b9d8-62381667f7d6@linaro.org>



On 10/7/24 17:00, Krzysztof Kozlowski wrote:
> On 07/10/2024 15:27, Gatien Chevallier wrote:
>> Add RNG STM32MP25x platforms compatible. Update the clock
>> properties management to support all versions.
>>
>> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> 
> You CC-ed an address, which suggests you do not work on mainline kernel
> or you do not use get_maintainers.pl/b4/patman. Regardless of the
> reason, process needs improvement: please CC correct address.
> 

Hi,

I'm using get_maintainers.pl so I'll check why I have an issue.

>> ---
>>   .../devicetree/bindings/rng/st,stm32-rng.yaml | 41 +++++++++++++++++--
>>   1 file changed, 38 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml b/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
>> index 340d01d481d1..c92ce92b6ac9 100644
>> --- a/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
>> +++ b/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
>> @@ -18,12 +18,19 @@ properties:
>>       enum:
>>         - st,stm32-rng
>>         - st,stm32mp13-rng
>> +      - st,stm32mp25-rng
>>   
>>     reg:
>>       maxItems: 1
>>   
>>     clocks:
>> -    maxItems: 1
>> +    minItems: 1
>> +    maxItems: 2
>> +
>> +  clock-names:
> 
> Missing minItems
> 

Ok, will add in V2

>> +    items:
>> +      - const: rng_clk
>> +      - const: rng_hclk
> 
> Drop _clk and come with some reasonable names, e.g. "core" and "bus"?
> 

Sure, makes sense. Will change in V2.

>>   
>>     resets:
>>       maxItems: 1
>> @@ -57,15 +64,43 @@ allOf:
>>         properties:
>>           st,rng-lock-conf: false
>>   
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - st,stm32mp25-rng
>> +    then:
>> +      properties:
>> +        clocks:
>> +          description: >
>> +            RNG bus clock must be named "rng_hclk". The RNG kernel clock
>> +            must be named "rng_clk".
> 
> Drop description, useless.
> 
> Missing minItems
> 

Ok, will update in V2

>> +          maxItems: 2
>> +      required:
>> +        - clock-names
>> +    else:
>> +      properties:
>> +        clocks:
>> +          maxItems: 1
> 
> Missing constrain for clock-names.
> 
>> +
>>   additionalProperties: false
>>   
>>   examples:
>>     - |
>> -    #include <dt-bindings/clock/stm32mp1-clks.h>
> 
> Why?
> 
>>       rng@54003000 {
>>         compatible = "st,stm32-rng";
>>         reg = <0x54003000 0x400>;
>> -      clocks = <&rcc RNG1_K>;
>> +      clocks = <&rcc 124>;
> 
> Why?
> 
> 

I have an issue with the generated st,stm32-rng.example.dts example.
Because there are 2 binding files included, I have a collision with
clock bindings names between the "dt-bindings/clock/stm32mp1-clks.h"
and the "dt-bindings/clock/st,stm32mp25-rcc.h" files. For example:
CK_MCO1 or CK_SCMI_HSE. I replaced the bindings with numbers
to avoid this conflict.

If you think this binding update does not need the addition of an
example, I'll completely drop it and we won't have the issue.

Best regards,
Gatien

>>       };
>>   
>> +  - |
>> +    rng: rng@42020000 {
>> +      compatible = "st,stm32mp25-rng";
>> +      reg = <0x42020000 0x400>;
>> +      clocks = <&clk_rcbsec>, <&rcc 110>;
>> +      clock-names = "rng_clk", "rng_hclk";
>> +      resets = <&rcc 97>;
>> +      access-controllers = <&rifsc 92>;
> 
> 
> Difference in one property should not need new example, usually.
> 
> Best regards,
> Krzysztof
> 

  reply	other threads:[~2024-10-07 16:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07 13:27 [PATCH 0/4] Add support for stm32mp25x RNG Gatien Chevallier
2024-10-07 13:27 ` [PATCH 1/4] dt-bindings: rng: add st,stm32mp25-rng support Gatien Chevallier
2024-10-07 13:53   ` Marek Vasut
2024-10-07 14:57     ` Gatien CHEVALLIER
2024-10-07 15:00   ` Krzysztof Kozlowski
2024-10-07 16:22     ` Gatien CHEVALLIER [this message]
2024-10-07 17:55       ` Krzysztof Kozlowski
2024-10-07 13:27 ` [PATCH 2/4] hwrng: stm32 - implement support for STM32MP25x platforms Gatien Chevallier
2024-10-07 13:54   ` Marek Vasut
2024-10-11  9:55     ` Gatien CHEVALLIER
2024-10-11 11:24       ` Marek Vasut
2024-10-11 12:07         ` Gatien CHEVALLIER
2024-10-11 12:38           ` Marek Vasut
2024-10-11 15:51             ` Gatien CHEVALLIER
2024-10-11 16:18               ` Marek Vasut
2024-10-07 13:27 ` [PATCH 3/4] hwrng: stm32 - update STM32MP15 RNG max clock frequency Gatien Chevallier
2024-10-07 13:55   ` Marek Vasut
2024-10-07 14:58     ` Gatien CHEVALLIER
2024-10-07 13:27 ` [PATCH 4/4] arm64: dts: st: add RNG node on stm32mp251 Gatien Chevallier
2024-10-07 13:55   ` Marek Vasut
2024-10-07 14:59     ` Gatien CHEVALLIER
2024-10-07 15:42       ` Marek Vasut

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=c425507f-5e78-408e-8a8d-fe02412a76e7@foss.st.com \
    --to=gatien.chevallier@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=lionel.debieve@foss.st.com \
    --cc=marex@denx.de \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=olivia@selenic.com \
    --cc=robh+dt@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=yangyingliang@huawei.com \
    /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).