[PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent

Dimitri Fedrau via B4 Relay posted 3 patches 10 months, 1 week ago
There is a newer version of this series
[PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent
Posted by Dimitri Fedrau via B4 Relay 10 months, 1 week ago
From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>

Add property tx-amplitude-100base-tx-percent in the device tree bindings
for configuring the tx amplitude of 100BASE-TX PHYs. Modifying it can be
necessary to compensate losses on the PCB and connector, so the voltages
measured on the RJ45 pins are conforming.

Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 2c71454ae8e362e7032e44712949e12da6826070..e0c001f1690c1eb9b0386438f2d5558fd8c94eca 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -232,6 +232,12 @@ properties:
       PHY's that have configurable TX internal delays. If this property is
       present then the PHY applies the TX delay.
 
+  tx-amplitude-100base-tx-percent:
+    description:
+      Transmit amplitude gain applied for 100BASE-TX. When omitted, the PHYs
+      default will be left as is.
+    default: 100
+
   leds:
     type: object
 

-- 
2.39.5
Re: [PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent
Posted by Andrew Lunn 10 months, 1 week ago
On Tue, Feb 11, 2025 at 09:33:47AM +0100, Dimitri Fedrau via B4 Relay wrote:
> From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> 
> Add property tx-amplitude-100base-tx-percent in the device tree bindings
> for configuring the tx amplitude of 100BASE-TX PHYs. Modifying it can be
> necessary to compensate losses on the PCB and connector, so the voltages
> measured on the RJ45 pins are conforming.
> 
> Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> ---
>  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> index 2c71454ae8e362e7032e44712949e12da6826070..e0c001f1690c1eb9b0386438f2d5558fd8c94eca 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> @@ -232,6 +232,12 @@ properties:
>        PHY's that have configurable TX internal delays. If this property is
>        present then the PHY applies the TX delay.
>  
> +  tx-amplitude-100base-tx-percent:
> +    description:
> +      Transmit amplitude gain applied for 100BASE-TX. When omitted, the PHYs
> +      default will be left as is.
> +    default: 100

Doesn't having a default statement contradict the text? Maybe the
bootloader has set it to 110%, the text suggests it will be left at
that, but the default value of 100 means it will get set back to 100%?

What do your driver changes actually do?

	Andrew
Re: [PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent
Posted by Dimitri Fedrau 10 months, 1 week ago
Am Wed, Feb 12, 2025 at 02:04:02PM +0100 schrieb Andrew Lunn:
> On Tue, Feb 11, 2025 at 09:33:47AM +0100, Dimitri Fedrau via B4 Relay wrote:
> > From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> > 
> > Add property tx-amplitude-100base-tx-percent in the device tree bindings
> > for configuring the tx amplitude of 100BASE-TX PHYs. Modifying it can be
> > necessary to compensate losses on the PCB and connector, so the voltages
> > measured on the RJ45 pins are conforming.
> > 
> > Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> > ---
> >  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > index 2c71454ae8e362e7032e44712949e12da6826070..e0c001f1690c1eb9b0386438f2d5558fd8c94eca 100644
> > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > @@ -232,6 +232,12 @@ properties:
> >        PHY's that have configurable TX internal delays. If this property is
> >        present then the PHY applies the TX delay.
> >  
> > +  tx-amplitude-100base-tx-percent:
> > +    description:
> > +      Transmit amplitude gain applied for 100BASE-TX. When omitted, the PHYs
> > +      default will be left as is.
> > +    default: 100
> 
> Doesn't having a default statement contradict the text? Maybe the
> bootloader has set it to 110%, the text suggests it will be left at
> that, but the default value of 100 means it will get set back to 100%?
>
You are right, will remove the default statement.

> What do your driver changes actually do?

Only if tx-amplitude-100base-tx-percent is present, the amplitude should
be changed.

Best regards,
Dimitri Fedrau
Re: [PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent
Posted by Russell King (Oracle) 10 months, 1 week ago
On Tue, Feb 11, 2025 at 09:33:47AM +0100, Dimitri Fedrau via B4 Relay wrote:
> @@ -232,6 +232,12 @@ properties:
>        PHY's that have configurable TX internal delays. If this property is
>        present then the PHY applies the TX delay.
>  
> +  tx-amplitude-100base-tx-percent:
> +    description:
> +      Transmit amplitude gain applied for 100BASE-TX. When omitted, the PHYs
> +      default will be left as is.
> +    default: 100
> +

This should mention what the reference is - so 100% is 100% of what (it
would be the 802.3 specified 100BASE-TX level, but it should make that
clear.)

I'm having a hard time trying to find its specification in 802.3, so
maybe a reference to where it can be found would be useful, otherwise
it's unclear what one gets for "100%".

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Re: [PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent
Posted by Dimitri Fedrau 10 months, 1 week ago
Am Wed, Feb 12, 2025 at 01:38:13PM +0000 schrieb Russell King (Oracle):
> On Tue, Feb 11, 2025 at 09:33:47AM +0100, Dimitri Fedrau via B4 Relay wrote:
> > @@ -232,6 +232,12 @@ properties:
> >        PHY's that have configurable TX internal delays. If this property is
> >        present then the PHY applies the TX delay.
> >  
> > +  tx-amplitude-100base-tx-percent:
> > +    description:
> > +      Transmit amplitude gain applied for 100BASE-TX. When omitted, the PHYs
> > +      default will be left as is.
> > +    default: 100
> > +
> 
> This should mention what the reference is - so 100% is 100% of what (it
> would be the 802.3 specified 100BASE-TX level, but it should make that
> clear.)
>
Yes, will add that to the description. 100% should match 2V peak to
peak.

> I'm having a hard time trying to find its specification in 802.3, so
> maybe a reference to where it can be found would be useful, otherwise
> it's unclear what one gets for "100%".
>
Compliance testing was done as described in:
https://download.tek.com/document/61W_17381_3.pdf

Didn't find the specification regarding the amplitude in 802.3, but
according to the document above it should then be part of ANSI X3.263.
Unfortunately I don't have access to ANSI X3.263, so I have to rely on
the information in the document above.

Best regards,
Dimitri Fedrau
Re: [PATCH net-next v4 1/3] dt-bindings: net: ethernet-phy: add property tx-amplitude-100base-tx-percent
Posted by Conor Dooley 10 months, 1 week ago
On Tue, Feb 11, 2025 at 09:33:47AM +0100, Dimitri Fedrau via B4 Relay wrote:
> From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> 
> Add property tx-amplitude-100base-tx-percent in the device tree bindings
> for configuring the tx amplitude of 100BASE-TX PHYs. Modifying it can be
> necessary to compensate losses on the PCB and connector, so the voltages
> measured on the RJ45 pins are conforming.
> 
> Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

> ---
>  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> index 2c71454ae8e362e7032e44712949e12da6826070..e0c001f1690c1eb9b0386438f2d5558fd8c94eca 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> @@ -232,6 +232,12 @@ properties:
>        PHY's that have configurable TX internal delays. If this property is
>        present then the PHY applies the TX delay.
>  
> +  tx-amplitude-100base-tx-percent:
> +    description:
> +      Transmit amplitude gain applied for 100BASE-TX. When omitted, the PHYs
> +      default will be left as is.
> +    default: 100
> +
>    leds:
>      type: object
>  
> 
> -- 
> 2.39.5
> 
>