lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15eb4ffe-ea12-9a2c-ae9d-c34860384b60@starfivetech.com>
Date:   Tue, 20 Jun 2023 11:09:52 +0800
From:   Guo Samin <samin.guo@...rfivetech.com>
To:     Andrew Lunn <andrew@...n.ch>, Conor Dooley <conor@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <netdev@...r.kernel.org>, Peter Geis <pgwipeout@...il.com>,
        Frank <Frank.Sae@...or-comm.com>,
        "David S . Miller" <davem@...emloft.net>,
        "Eric Dumazet" <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andrew Lunn <andrew@...n.ch>,
        "Heiner Kallweit" <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Yanhong Wang <yanhong.wang@...rfivetech.com>
Subject: Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver
 strength cfg


Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
From: Guo Samin <samin.guo@...rfivetech.com>
to: Conor Dooley <conor@...nel.org>; Andrew Lunn <andrew@...n.ch>
data: 2023/5/29

> Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
> From: Conor Dooley <conor@...nel.org>
> to: Samin Guo <samin.guo@...rfivetech.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@...rfivetech.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
>>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ