[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cce9e2d7-6a62-7e9d-fa44-d577273e672e@starfivetech.com>
Date: Wed, 21 Jun 2023 11:03:33 +0800
From: Guo Samin <samin.guo@...rfivetech.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Conor Dooley
<conor.dooley@...rochip.com>
CC: Andrew Lunn <andrew@...n.ch>, Conor Dooley <conor@...nel.org>,
<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>, 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: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
收件人: Conor Dooley <conor.dooley@...rochip.com>, Guo Samin <samin.guo@...rfivetech.com>
日期: 2023/6/20
> On 20/06/2023 10:26, Conor Dooley wrote:
>> Hey,
>>
>> On Tue, Jun 20, 2023 at 11:09:52AM +0800, Guo Samin wrote:
>>> From: Guo Samin <samin.guo@...rfivetech.com>
>>>> From: Conor Dooley <conor@...nel.org>
>>>>> 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.
>>
>>>>>> + 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.
>>
>>>> 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.
>>
>>> Sorry, haven't updated in a while.
>>
>> NW chief.
>>
>>> 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,
>
> There is no mA unit in DT schema, so I don't see what by "not integer
> values". 1200 uA is an integer.
>
>>> it is not very good to use in the drive/dts in my opinion.
>>
>> Who says you have to use mA? What about uA?
>
> Yep
>
>>
>>> 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.
>>
>> I think this goes against not putting register values into the dts &
>> that the accurate description of the hardware are the currents.
>
> For vendor properties register values are often accepted, but logical
> unit is much more readable in the DTS. Also allows further customization
> or extending when new variant appears. You cannot do extend a property
> easily when it holds a register value, without changing the meaning per
> variant.
>
Hi Conor & Krzysztof,
Thanks for taking the time to review.
Yes, uA can be used to avoid the problem of decimals.
In addition to this, we need to deal with the DS under different IOPAD.
these values were existed at IO 1.8V. When the IO is set to 3.3V, the values will change.
Chip_Config (EXT_0xA001)
|Bit |Symbol |Access |Default |Description |
|5:4 |Cfg_ldo |RW |0x0 |Rgmii ldo voltage and RGMII/MDC/MDIO PAD's level shifter control. Depends on strapping.|
|2'b11: 1.8v 2'b10: 1.8v 2'b01: 2.5v 2'b00: 3.3v |
|----------------------|
| ds map table(1.8V) |
|----------------------|
| 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 |
|--------|-------------|
|----------------------|
| ds map table(3.3V) |
|----------------------|
| DS(3b) | Current (mA)|
| 000 | 3.07 |
| 001 | 4.08 |
| 010 | 4.37 |
| 011 | 4.68 |
| 100 | 5.02 |
| 101 | 5.45 |
| 110 | 5.74 |
| 111 | 6.14 |
|--------|-------------|
Best regards,
Samin
>>
>>> Like This:
>>>
>>> + motorcomm,rx-clk-driver-strength:
>>> + description: drive strength of rx_clk pad.
>>
>> You need "description: |" to preserve the formatting if you add tables,
>> but I don't think that this is a good idea. Put the values in here that
>> describe the hardware (IOW the currents) and then you don't need to have
>> this table.
>>
>>> + |----------------------|
>>> + | 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
>>> +
>>
>>> Or use minimum & maximum instead of these listed out enums
>>
>> With the actual current values, enum rather than min + max.
>
>
>
> Best regards,
> Krzysztof
>
Powered by blists - more mailing lists