From: Guo Samin <samin.guo@starfivetech.com>
To: Andrew Lunn <andrew@lunn.ch>, Conor Dooley <conor@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<netdev@vger.kernel.org>, Peter Geis <pgwipeout@gmail.com>,
Frank <Frank.Sae@motor-comm.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Andrew Lunn <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Yanhong Wang <yanhong.wang@starfivetech.com>
Subject: Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
Date: Tue, 20 Jun 2023 11:09:52 +0800 [thread overview]
Message-ID: <15eb4ffe-ea12-9a2c-ae9d-c34860384b60@starfivetech.com> (raw)
In-Reply-To: <1dbf113c-7592-68bd-6aaf-05ff1d8c538c@starfivetech.com>
Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
From: Guo Samin <samin.guo@starfivetech.com>
to: Conor Dooley <conor@kernel.org>; Andrew Lunn <andrew@lunn.ch>
data: 2023/5/29
> Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
> From: Conor Dooley <conor@kernel.org>
> to: Samin Guo <samin.guo@starfivetech.com>
> data: 2023/5/27
>
>> On Fri, May 26, 2023 at 05:05:01PM +0800, Samin Guo wrote:
>>> The motorcomm phy (YT8531) supports the ability to adjust the drive
>>> strength of the rx_clk/rx_data, the value range of pad driver
>>> strength is 0 to 7.
>>>
>>> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
>>> ---
>>> .../devicetree/bindings/net/motorcomm,yt8xxx.yaml | 12 ++++++++++++
>>> 1 file changed, 12 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
>>> index 157e3bbcaf6f..29a1997a1577 100644
>>> --- a/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
>>> +++ b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
>>> @@ -52,6 +52,18 @@ properties:
>>> for a timer.
>>> type: boolean
>>>
>>> + motorcomm,rx-clk-driver-strength:
>>> + description: drive strength of rx_clk pad.
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
>>
>> I think you should use minimum & maximum instead of these listed out
>> enums.
>
> Thanks Conor, This can be improved in the next version.
>
> You have also had this comment since v1 & were reminded of it on
>> v2 by Krzysztof: "What do the numbers mean? What are the units? mA?"
>>
>
>
> The good news is that we just got some data about units from Motorcomm.
> Maybe I can post the data show of the unit later after I get the complete data.
>
Hi Andrew & Conor,
Sorry, haven't updated in a while.
I just got the detailed data of Driver Strength(DS) from Motorcomm , which applies to both rx_clk and rx_data.
|----------------------|
| ds map table |
|----------------------|
| DS(3b) | Current (mA)|
|--------|-------------|
| 000 | 1.20 |
| 001 | 2.10 |
| 010 | 2.70 |
| 011 | 2.91 |
| 100 | 3.11 |
| 101 | 3.60 |
| 110 | 3.97 |
| 111 | 4.35 |
|--------|-------------|
Since these currents are not integer values and have no regularity, it is not very good to use in the drive/dts in my opinion.
Therefore, I tend to continue to use DS(0-7) in dts/driver, and adding a description of the current value corresponding to DS in dt-bindings.
Like This:
+ motorcomm,rx-clk-driver-strength:
+ description: drive strength of rx_clk pad.
+ |----------------------|
+ | rx_clk ds map table |
+ |----------------------|
+ | DS(3b) | Current (mA)|
+ | 000 | 1.20 |
+ | 001 | 2.10 |
+ | 010 | 2.70 |
+ | 011 | 2.91 |
+ | 100 | 3.11 |
+ | 101 | 3.60 |
+ | 110 | 3.97 |
+ | 111 | 4.35 |
+ |--------|-------------|
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ default: 3
+
+ motorcomm,rx-data-driver-strength:
+ description: drive strength of rx_data/rx_ctl rgmii pad.
+ |----------------------|
+ | rx_data ds map table |
+ |----------------------|
+ | DS(3b) | Current (mA)|
+ | 000 | 1.20 |
+ | 001 | 2.10 |
+ | 010 | 2.70 |
+ | 011 | 2.91 |
+ | 100 | 3.11 |
+ | 101 | 3.60 |
+ | 110 | 3.97 |
+ | 111 | 4.35 |
+ |--------|-------------|
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ default: 3
+
Or use minimum & maximum instead of these listed out enums(Suggested by Conor)
+ motorcomm,rx-clk-driver-strength:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 3
+ minimum: 0
+ maximum: 7
+ description: drive strength of rx_clk pad.
+ |----------------------|
+ | rx_clk ds map table |
+ |----------------------|
+ | DS(3b) | Current (mA)|
+ | 000 | 1.20 |
+ | 001 | 2.10 |
+ | 010 | 2.70 |
+ | 011 | 2.91 |
+ | 100 | 3.11 |
+ | 101 | 3.60 |
+ | 110 | 3.97 |
+ | 111 | 4.35 |
+ |--------|-------------|
+
+ motorcomm,rx-data-driver-strength:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 3
+ minimum: 0
+ maximum: 7
+ description: drive strength of rx_data/rx_ctl rgmii pad.
+ |----------------------|
+ | rx_data ds map table |
+ |----------------------|
+ | DS(3b) | Current (mA)|
+ | 000 | 1.20 |
+ | 001 | 2.10 |
+ | 010 | 2.70 |
+ | 011 | 2.91 |
+ | 100 | 3.11 |
+ | 101 | 3.60 |
+ | 110 | 3.97 |
+ | 111 | 4.35 |
+ |--------|-------------|
+
Looking forward to your suggestions.
Best regards,
Samin
>
>
>> This information should go into the binding, not sit in a thread on a
>> mailing list that noone will look at when trying to write a DT :(
>>
>> Thanks,
>> Conor.
>>
>
> Yes,when we have the complete 'unit' data, it will be placed in DT.
>
> Best regards,
> Samin
>
>>> + default: 3
>>> +
>>> + motorcomm,rx-data-driver-strength:
>>> + description: drive strength of rx_data/rx_ctl rgmii pad.
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
>>> + default: 3
>>> +
>>> motorcomm,tx-clk-adj-enabled:
>>> description: |
>>> This configuration is mainly to adapt to VF2 with JH7110 SoC.
>>> --
>>> 2.17.1
>>>
next prev parent reply other threads:[~2023-06-20 3:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 9:05 [PATCH v3 0/2] Add motorcomm phy pad-driver-strength-cfg support Samin Guo
2023-05-26 9:05 ` [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg Samin Guo
2023-05-26 19:41 ` Conor Dooley
2023-05-29 3:46 ` Guo Samin
2023-06-20 3:09 ` Guo Samin [this message]
2023-06-20 8:26 ` Conor Dooley
2023-06-20 8:55 ` Krzysztof Kozlowski
2023-06-21 3:03 ` Guo Samin
2023-06-20 13:29 ` Andrew Lunn
2023-06-21 3:28 ` Guo Samin
2023-06-21 14:13 ` Andrew Lunn
2023-05-26 9:05 ` [PATCH v3 2/2] net: phy: motorcomm: Add pad drive strength cfg support Samin Guo
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=15eb4ffe-ea12-9a2c-ae9d-c34860384b60@starfivetech.com \
--to=samin.guo@starfivetech.com \
--cc=Frank.Sae@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=conor@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pgwipeout@gmail.com \
--cc=robh+dt@kernel.org \
--cc=yanhong.wang@starfivetech.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).