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: <8e2a50b2-a9ab-e164-a3c2-b7bc11ccdb53@starfivetech.com>
Date: Wed, 21 Jun 2023 11:28:59 +0800
From: Guo Samin <samin.guo@...rfivetech.com>
To: Andrew Lunn <andrew@...n.ch>
CC: 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: Andrew Lunn <andrew@...n.ch>
to: Guo Samin <samin.guo@...rfivetech.com>
data: 2023/6/20

>> 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
> 
> Integers is not a problem. Simply use uA.
> 
>> and have no regularity, it is not very good to use in the drive/dts
>> in my opinion.
> 
> I think they are fine to use. Add a lookup table, microamps to
> register value. Return -EINVAL if the requested value is not in the
> table. List the valid values in the schema, so the checker tool might
> point out problems.
> 
>       Andrew

Thanks Andrew,
I'll use a lookup table to try.
Another thing we need to deal with DS under different IO voltages(1.8V/2.5V/3.3V).

The IO voltage can be configured via a hardware pull-up resistor (visionfive 2 is configured to 1.8V by default), 
and then the IO voltage can be obtained or set through the register(0xA001)

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    |
      |--------|-------------|
 
(The current value of 2.5V is not available to us now)

When we need to deal with current values at different voltages, using register values in drives may be simpler, comparing the current value.
Of course, I will also follow your suggestion and use the current value + lookup table to implement a solution. Thanks!

Best regards,
Samin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ