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]

 



Hey,

On Tue, Jun 20, 2023 at 11:09:52AM +0800, Guo Samin wrote:
> From: Guo Samin <samin.guo@xxxxxxxxxxxxxxxx>
> > From: Conor Dooley <conor@xxxxxxxxxx>
> >> 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,
> it is not very good to use in the drive/dts in my opinion.

Who says you have to use mA? What about uA?

> 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.

> 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.

Cheers,
Conor.

Attachment: signature.asc
Description: PGP signature


[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