2022-09-22 10:10:40

by Jianguo Zhang

[permalink] [raw]
Subject: [resend PATCH v4 2/2] dt-bindings: net: snps,dwmac: add clk_csr property

The clk_csr property is parsed in driver for generating MDC clock
with correct frequency. A warning('clk_csr' was unexpeted) is reported
when runing 'make_dtbs_check' because the clk_csr property
has been not documented in the binding file.

Signed-off-by: Jianguo Zhang <[email protected]>
---
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 491597c02edf..8cff30a8125d 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -288,6 +288,11 @@ properties:
is supported. For example, this is used in case of SGMII and
MAC2MAC connection.

+ clk_csr:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Frequency division factor for MDC clock.
+
mdio:
$ref: mdio.yaml#
unevaluatedProperties: false
--
2.25.1


2022-09-22 15:37:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [resend PATCH v4 2/2] dt-bindings: net: snps,dwmac: add clk_csr property

On 22/09/2022 11:27, Jianguo Zhang wrote:
> The clk_csr property is parsed in driver for generating MDC clock
> with correct frequency. A warning('clk_csr' was unexpeted) is reported
> when runing 'make_dtbs_check' because the clk_csr property
> has been not documented in the binding file.
>

You did not describe the case, but apparently this came with
81311c03ab4d ("net: ethernet: stmmac: add management of clk_csr
property") which never brought the bindings change.

Therefore the property was never part of bindings documentation and
bringing them via driver is not the correct process. It bypasses the
review and such bypass cannot be an argument to bring the property to
bindings. It's not how new properties can be added.

Therefore I don't agree. Please make it a property matching bindings, so
vendor prefix, no underscores in node names.

Driver and DTS need updates.

Best regards,
Krzysztof

2022-09-23 02:41:25

by Jianguo Zhang

[permalink] [raw]
Subject: Re: [resend PATCH v4 2/2] dt-bindings: net: snps,dwmac: add clk_csr property

Dear Krzysztof,

Thanks for your comment.

On Thu, 2022-09-22 at 17:07 +0200, Krzysztof Kozlowski wrote:
> On 22/09/2022 11:27, Jianguo Zhang wrote:
> > The clk_csr property is parsed in driver for generating MDC clock
> > with correct frequency. A warning('clk_csr' was unexpeted) is
> > reported
> > when runing 'make_dtbs_check' because the clk_csr property
> > has been not documented in the binding file.
> >
>
> You did not describe the case, but apparently this came with
> 81311c03ab4d ("net: ethernet: stmmac: add management of clk_csr
> property") which never brought the bindings change.
>
> Therefore the property was never part of bindings documentation and
> bringing them via driver is not the correct process. It bypasses the
> review and such bypass cannot be an argument to bring the property to
> bindings. It's not how new properties can be added.
>
> Therefore I don't agree. Please make it a property matching bindings,
> so
> vendor prefix, no underscores in node names.
>
> Driver and DTS need updates.
>
We will rename the property 'clk_csr' as 'snps,clk-csr' and update DTS
& driver to align with the new name in next versions patches.
> Best regards,
> Krzysztof
>
BRS
Jianguo

2022-09-23 09:57:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [resend PATCH v4 2/2] dt-bindings: net: snps,dwmac: add clk_csr property

On 23/09/2022 03:48, Jianguo Zhang wrote:
> Dear Krzysztof,
>
> Thanks for your comment.
>
> On Thu, 2022-09-22 at 17:07 +0200, Krzysztof Kozlowski wrote:
>> On 22/09/2022 11:27, Jianguo Zhang wrote:
>>> The clk_csr property is parsed in driver for generating MDC clock
>>> with correct frequency. A warning('clk_csr' was unexpeted) is
>>> reported
>>> when runing 'make_dtbs_check' because the clk_csr property
>>> has been not documented in the binding file.
>>>
>>
>> You did not describe the case, but apparently this came with
>> 81311c03ab4d ("net: ethernet: stmmac: add management of clk_csr
>> property") which never brought the bindings change.
>>
>> Therefore the property was never part of bindings documentation and
>> bringing them via driver is not the correct process. It bypasses the
>> review and such bypass cannot be an argument to bring the property to
>> bindings. It's not how new properties can be added.
>>
>> Therefore I don't agree. Please make it a property matching bindings,
>> so
>> vendor prefix, no underscores in node names.
>>
>> Driver and DTS need updates.
>>
> We will rename the property 'clk_csr' as 'snps,clk-csr' and update DTS
> & driver to align with the new name in next versions patches.

Thanks!

Best regards,
Krzysztof