Re: [PATCH v2 2/2] net: phy: motorcomm: Add pad drive strength cfg support

From: Guo Samin
Date: Thu May 18 2023 - 04:30:21 EST


Re: [PATCH v2 2/2] net: phy: motorcomm: Add pad drive strength cfg support
From: Guo Samin <samin.guo@xxxxxxxxxxxxxxxx>
to: Andrew Lunn <andrew@xxxxxxx>
data: 2023/5/6

>
> Re: [PATCH v2 2/2] net: phy: motorcomm: Add pad drive strength cfg support
> From: Andrew Lunn <andrew@xxxxxxx>
> to: Samin Guo <samin.guo@xxxxxxxxxxxxxxxx>
> data: 2023/5/5
>
>>> #define YTPHY_DTS_OUTPUT_CLK_DIS 0
>>> @@ -1495,6 +1504,7 @@ static int yt8531_config_init(struct phy_device *phydev)
>>> {
>>> struct device_node *node = phydev->mdio.dev.of_node;
>>> int ret;
>>> + u32 ds, val;
>>
>> Reverse Christmas tree. Sort these longest first, shortest last.
>>
> Thanks, will fix.
>> Otherwise this looks O.K.
>>
>> The only open question is if real unit should be used, uA, not some
>> magic numbers. Lets see what the DT Maintainers say.
>>
>> Andrew
>
> Hi Andrew,
>
> As I communicated with Frank, Motorcomm doesn't give specific units on their datasheet, except for magic numbers.
> Tried to ask Motorcomm last week, but it seems that they themselves do not know what the unit is and have no response so far.
>
>
> Below is all the relevant information I found:
>
> Pad Drive Strength Cfg (EXT_0xA010)
>
> Bit | Symbol | Access | Default | Description
> 15:13 | Rgmii_sw_dr_rx | RW | 0x3 | Drive strenght of rx_clk pad.
> | 3'b111: strongest; 3'b000: weakest.
>
> 12 | Rgmii_sw_dr[2] | RW | 0x0 | Bit 2 of Rgmii_sw_dr[2:0], refer to ext A010[5:4]
>
> 5:4 | Rgmii_sw_dr[1:0] | RW | 0x3 | Bit 1 and 0 of Rgmii_sw_dr, Drive strenght of rxd/rx_ctl rgmii pad.
> | 3'b111: strongest; 3'b000: weakest
>
>
>
> Best regards,
> Samin

Hi Andrew,

We tried contacting motorcomm again, but so far we haven't been able to get any more information about unit.
Also, I found a similar configuration in Documentation/devicetree/bindings/net/qca,ar803x.yaml, and they also
used the 'magic numbers':

qca,clk-out-strength:
description: Clock output driver strength.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]


Best regards,
Samin