Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Re: [PATCH v3 1/2] dt-bindings: net: motorcomm: Add pad driver strength cfg
From: Andrew Lunn <andrew@xxxxxxx>
to: Guo Samin <samin.guo@xxxxxxxxxxxxxxxx>
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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux