diff mbox series

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

Message ID 20200527164934.28651-2-dmurphy@ti.com
State Changes Requested, archived
Headers show
Series RGMII Internal delay common property | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success

Commit Message

Dan Murphy May 27, 2020, 4:49 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>
---
 .../bindings/net/ethernet-controller.yaml          | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Rob Herring (Arm) May 29, 2020, 6:25 p.m. UTC | #1
On Wed, May 27, 2020 at 11:49:31AM -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>
> ---
>  .../bindings/net/ethernet-controller.yaml          | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> index ac471b60ed6a..70702a4ef5e8 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> @@ -143,6 +143,20 @@ properties:
>        Specifies the PHY management type. If auto is set and fixed-link
>        is not specified, it uses MDIO for management.
>  
> +  rx-internal-delay-ps:
> +    $ref: /schemas/types.yaml#definitions/uint32
> +    description: |
> +      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for
> +      PHY's that have configurable RX internal delays.  This property is only
> +      used when the phy-mode or phy-connection-type is rgmii-id or rgmii-rxid.

Isn't this a property of the phy (this is the controller schema)? Looks 
like we have similar properties already and they go in phy nodes. Would 
be good to have a standard property, but let's be clear where it goes.

We need to add '-ps' as a standard unit suffix (in dt-schema) and then a 
type is not needed here.

Rob
Dan Murphy May 29, 2020, 7:24 p.m. UTC | #2
Rob

On 5/29/20 1:25 PM, Rob Herring wrote:
> On Wed, May 27, 2020 at 11:49:31AM -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>
>> ---
>>   .../bindings/net/ethernet-controller.yaml          | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
>> index ac471b60ed6a..70702a4ef5e8 100644
>> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
>> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
>> @@ -143,6 +143,20 @@ properties:
>>         Specifies the PHY management type. If auto is set and fixed-link
>>         is not specified, it uses MDIO for management.
>>   
>> +  rx-internal-delay-ps:
>> +    $ref: /schemas/types.yaml#definitions/uint32
>> +    description: |
>> +      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for
>> +      PHY's that have configurable RX internal delays.  This property is only
>> +      used when the phy-mode or phy-connection-type is rgmii-id or rgmii-rxid.
> Isn't this a property of the phy (this is the controller schema)? Looks
> like we have similar properties already and they go in phy nodes. Would
> be good to have a standard property, but let's be clear where it goes.
>
> We need to add '-ps' as a standard unit suffix (in dt-schema) and then a
> type is not needed here.

This is a PHY specific property.

I will move them.

Dumb question but you can just point me to the manual about how and 
where to add the '-ps' to the dt-schema

Dan


> Rob
Rob Herring (Arm) May 29, 2020, 8:58 p.m. UTC | #3
On Fri, May 29, 2020 at 1:24 PM Dan Murphy <dmurphy@ti.com> wrote:
>
> Rob
>
> On 5/29/20 1:25 PM, Rob Herring wrote:
> > On Wed, May 27, 2020 at 11:49:31AM -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>
> >> ---
> >>   .../bindings/net/ethernet-controller.yaml          | 14 ++++++++++++++
> >>   1 file changed, 14 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> >> index ac471b60ed6a..70702a4ef5e8 100644
> >> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> >> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> >> @@ -143,6 +143,20 @@ properties:
> >>         Specifies the PHY management type. If auto is set and fixed-link
> >>         is not specified, it uses MDIO for management.
> >>
> >> +  rx-internal-delay-ps:
> >> +    $ref: /schemas/types.yaml#definitions/uint32
> >> +    description: |
> >> +      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for
> >> +      PHY's that have configurable RX internal delays.  This property is only
> >> +      used when the phy-mode or phy-connection-type is rgmii-id or rgmii-rxid.
> > Isn't this a property of the phy (this is the controller schema)? Looks
> > like we have similar properties already and they go in phy nodes. Would
> > be good to have a standard property, but let's be clear where it goes.
> >
> > We need to add '-ps' as a standard unit suffix (in dt-schema) and then a
> > type is not needed here.
>
> This is a PHY specific property.
>
> I will move them.
>
> Dumb question but you can just point me to the manual about how and
> where to add the '-ps' to the dt-schema

Here[1], but looks like I already added it. I'd checked the old kernel
version (property-units.txt) which didn't have it.

Rob

[1] https://github.com/devicetree-org/dt-schema/blob/master/schemas/property-units.yaml#L48
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index ac471b60ed6a..70702a4ef5e8 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -143,6 +143,20 @@  properties:
       Specifies the PHY management type. If auto is set and fixed-link
       is not specified, it uses MDIO for management.
 
+  rx-internal-delay-ps:
+    $ref: /schemas/types.yaml#definitions/uint32
+    description: |
+      RGMII Receive PHY Clock Delay defined in pico seconds.  This is used for
+      PHY's that have configurable RX internal delays.  This property is only
+      used when the phy-mode or phy-connection-type is rgmii-id or rgmii-rxid.
+
+  tx-internal-delay-ps:
+    $ref: /schemas/types.yaml#definitions/uint32
+    description: |
+      RGMII Transmit PHY Clock Delay defined in pico seconds.  This is used for
+      PHY's that have configurable TX internal delays.  This property is only
+      used when the phy-mode or phy-connection-type is rgmii-id or rgmii-txid.
+
   fixed-link:
     allOf:
       - if: