diff mbox series

[net-next,v7,1/6] dt-bindings: net: Add tx and rx internal delays

Message ID 20200617182019.6790-2-dmurphy@ti.com
State Superseded
Headers show
Series [net-next,v7,1/6] dt-bindings: net: Add tx and rx internal delays | expand

Commit Message

Dan Murphy June 17, 2020, 6:20 p.m. UTC
tx-internal-delays and rx-internal-delays are a common setting for RGMII
capable devices.

These properties are used when the phy-mode or phy-controller is set to
rgmii-id, rgmii-rxid or rgmii-txid.  These modes indicate to the
controller that the PHY will add the internal delay for the connection.

Signed-off-by: Dan Murphy <dmurphy@ti.com>

---
 .../devicetree/bindings/net/ethernet-phy.yaml         | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.26.2

Comments

Andrew Lunn June 18, 2020, 1:43 a.m. UTC | #1
On Wed, Jun 17, 2020 at 01:20:14PM -0500, Dan Murphy wrote:
> tx-internal-delays and rx-internal-delays are a common setting for RGMII

> capable devices.

> 

> These properties are used when the phy-mode or phy-controller is set to

> rgmii-id, rgmii-rxid or rgmii-txid.  These modes indicate to the

> controller that the PHY will add the internal delay for the connection.

> 

> Signed-off-by: Dan Murphy <dmurphy@ti.com>


Reviewed-by: Andrew Lunn <andrew@lunn.ch>


    Andrew
Andrew Lunn June 18, 2020, 2:01 a.m. UTC | #2
On Wed, Jun 17, 2020 at 01:20:14PM -0500, Dan Murphy wrote:
> tx-internal-delays and rx-internal-delays are a common setting for RGMII

> capable devices.

> 

> These properties are used when the phy-mode or phy-controller is set to

> rgmii-id, rgmii-rxid or rgmii-txid.  These modes indicate to the

> controller that the PHY will add the internal delay for the connection.

> 

> Signed-off-by: Dan Murphy <dmurphy@ti.com>

> ---

>  .../devicetree/bindings/net/ethernet-phy.yaml         | 11 +++++++++++

>  1 file changed, 11 insertions(+)

> 

> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml

> index 9b1f1147ca36..b2887476fe6a 100644

> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml

> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml

> @@ -162,6 +162,17 @@ properties:

>      description:

>        Specifies a reference to a node representing a SFP cage.

>  

> +

> +  rx-internal-delay-ps:

> +    description: |

> +      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for

> +      PHY's that have configurable RX internal delays.

> +

> +  tx-internal-delay-ps:

> +    description: |

> +      RGMII Transmit PHY Clock Delay defined in pico seconds.  This is used for

> +      PHY's that have configurable TX internal delays.

> +


So in a later patch you have:

default: 2000

That seems to apply that these values only apply when the phy mode
indicates a delay is needed. It would be good to document that here,
when each of these properties will be used. Also, that they default to
2000 when not present.

     Andrew
Dan Murphy June 18, 2020, 1:44 p.m. UTC | #3
Andrew

On 6/17/20 9:01 PM, Andrew Lunn wrote:
> On Wed, Jun 17, 2020 at 01:20:14PM -0500, Dan Murphy wrote:
>> tx-internal-delays and rx-internal-delays are a common setting for RGMII
>> capable devices.
>>
>> These properties are used when the phy-mode or phy-controller is set to
>> rgmii-id, rgmii-rxid or rgmii-txid.  These modes indicate to the
>> controller that the PHY will add the internal delay for the connection.
>>
>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>> ---
>>   .../devicetree/bindings/net/ethernet-phy.yaml         | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
>> index 9b1f1147ca36..b2887476fe6a 100644
>> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
>> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
>> @@ -162,6 +162,17 @@ properties:
>>       description:
>>         Specifies a reference to a node representing a SFP cage.
>>   
>> +
>> +  rx-internal-delay-ps:
>> +    description: |
>> +      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for
>> +      PHY's that have configurable RX internal delays.
>> +
>> +  tx-internal-delay-ps:
>> +    description: |
>> +      RGMII Transmit PHY Clock Delay defined in pico seconds.  This is used for
>> +      PHY's that have configurable TX internal delays.
>> +
> So in a later patch you have:
>
> default: 2000
>
> That seems to apply that these values only apply when the phy mode
> indicates a delay is needed. It would be good to document that here,
> when each of these properties will be used. Also, that they default to
> 2000 when not present.

The default of 2000ps is for the DP83869 only.  The DP83822 fixed delay 
is 3500ps.

So indicating that the default here is 2000ps for all devices is not 
correct.

But I can add a note that if these properties are present then the delay 
is added by the PHY.

Dan


>       Andrew
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 9b1f1147ca36..b2887476fe6a 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -162,6 +162,17 @@  properties:
     description:
       Specifies a reference to a node representing a SFP cage.
 
+
+  rx-internal-delay-ps:
+    description: |
+      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for
+      PHY's that have configurable RX internal delays.
+
+  tx-internal-delay-ps:
+    description: |
+      RGMII Transmit PHY Clock Delay defined in pico seconds.  This is used for
+      PHY's that have configurable TX internal delays.
+
 required:
   - reg