[PATCH v3 2/2] dt-bindings: net: snps,dwmac: add clk_csr property

Jianguo Zhang posted 2 patches 2 years ago
There is a newer version of this series
[PATCH v3 2/2] dt-bindings: net: snps,dwmac: add clk_csr property
Posted by Jianguo Zhang 2 years ago
Add clk_csr property for snps,dwmac

Signed-off-by: Jianguo Zhang <jianguo.zhang@mediatek.com>
---
 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
Re: [PATCH v3 2/2] dt-bindings: net: snps,dwmac: add clk_csr property
Posted by Krzysztof Kozlowski 2 years ago
On 21/09/2022 09:07, Jianguo Zhang wrote:
> Add clk_csr property for snps,dwmac
> 
> Signed-off-by: Jianguo Zhang <jianguo.zhang@mediatek.com>
> ---
>  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:

No underscores in node names. Missing vendor prefix.

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Frequency division factor for MDC clock.

Can't common clock framework do the job? What is the MDC clock?

Best regards,
Krzysztof
Re: [PATCH v3 2/2] dt-bindings: net: snps,dwmac: add clk_csr property
Posted by Jianguo Zhang 2 years ago
Dear Krzysztof,

	Thanks for your comment.

On Wed, 2022-09-21 at 10:24 +0200, Krzysztof Kozlowski wrote:
> On 21/09/2022 09:07, Jianguo Zhang wrote:
> > Add clk_csr property for snps,dwmac
> > 
> > Signed-off-by: Jianguo Zhang <jianguo.zhang@mediatek.com>
> > ---
> >  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:
> 
> No underscores in node names. Missing vendor prefix.
> 
We will remane the property name 'clk_csr' as 'snps,clk-csr' and
another driver patch is needed to align the name used in driver with
the new name. 
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description:
> > +      Frequency division factor for MDC clock.
> 
> Can't common clock framework do the job? What is the MDC clock?
> 
MDC clock is used for ethernet MAC accessing PHY register by MDIO bus.
There is frequency divider designed in ethernet internal HW to ensure
that ethernet can get correct frequency of MDC colck and the vlaue of
frequency divider can be got from DTS.
> Best regards,
> Krzysztof

BRS
Jianguo
Re: [PATCH v3 2/2] dt-bindings: net: snps,dwmac: add clk_csr property
Posted by Krzysztof Kozlowski 2 years ago
On 22/09/2022 04:15, Jianguo Zhang wrote:
> Dear Krzysztof,
> 
> 	Thanks for your comment.
> 
> On Wed, 2022-09-21 at 10:24 +0200, Krzysztof Kozlowski wrote:
>> On 21/09/2022 09:07, Jianguo Zhang wrote:
>>> Add clk_csr property for snps,dwmac
>>>
>>> Signed-off-by: Jianguo Zhang <jianguo.zhang@mediatek.com>
>>> ---
>>>  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:
>>
>> No underscores in node names. Missing vendor prefix.
>>
> We will remane the property name 'clk_csr' as 'snps,clk-csr' and
> another driver patch is needed to align the name used in driver with
> the new name. 

You did not say anything that you document existing property. Commit msg
*must* explain why you are doing stuff in commit body.

We should not be asking for this and for reason of clk_csr.

Best regards,
Krzysztof
Re: [PATCH v3 2/2] dt-bindings: net: snps,dwmac: add clk_csr property
Posted by Jianguo Zhang 2 years ago
Dear Krzysztof,

On Thu, 2022-09-22 at 08:38 +0200, Krzysztof Kozlowski wrote:
> On 22/09/2022 04:15, Jianguo Zhang wrote:
> > Dear Krzysztof,
> > 
> > 	Thanks for your comment.
> > 
> > On Wed, 2022-09-21 at 10:24 +0200, Krzysztof Kozlowski wrote:
> > > On 21/09/2022 09:07, Jianguo Zhang wrote:
> > > > Add clk_csr property for snps,dwmac
> > > > 
> > > > Signed-off-by: Jianguo Zhang <jianguo.zhang@mediatek.com>
> > > > ---
> > > >  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:
> > > 
> > > No underscores in node names. Missing vendor prefix.
> > > 
> > 
> > We will remane the property name 'clk_csr' as 'snps,clk-csr' and
> > another driver patch is needed to align the name used in driver
> > with
> > the new name. 
> 
> You did not say anything that you document existing property. Commit
> msg
> *must* explain why you are doing stuff in commit body.
> 
> We should not be asking for this and for reason of clk_csr.

We will explain the background that why we document 'clk_csr' property
in binding file in commit message in next version patches.
> 
> Best regards,
> Krzysztof
> 
BRS
Jianguo