diff mbox series

[net-next,1/2] dt-bindings: net: marvell,aquantia: add properties to override MDI_CFG

Message ID 5173302f9f1a52d7487e1fb54966673c448d6928.1724244281.git.daniel@makrotopia.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next,1/2] dt-bindings: net: marvell,aquantia: add properties to override MDI_CFG | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 7 this patch: 7
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 7 this patch: 7
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Daniel Golle Aug. 21, 2024, 12:46 p.m. UTC
Usually the MDI pair order reversal configuration is defined by
bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
pair order and force either normal or reverse order.

Add properties 'marvell,force-mdi-order-normal' and
'marvell,force-mdi-order-reverse' for that purpose.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 .../devicetree/bindings/net/marvell,aquantia.yaml      | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Conor Dooley Aug. 21, 2024, 3:51 p.m. UTC | #1
On Wed, Aug 21, 2024 at 01:46:30PM +0100, Daniel Golle wrote:
> Usually the MDI pair order reversal configuration is defined by
> bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
> pair order and force either normal or reverse order.

Is that a PC way of saying that someone messed up and wired the pins
incorrectly? A concrete example of why this is required would be good ;)

> 
> Add properties 'marvell,force-mdi-order-normal' and
> 'marvell,force-mdi-order-reverse' for that purpose.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  .../devicetree/bindings/net/marvell,aquantia.yaml      | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/marvell,aquantia.yaml b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml
> index 9854fab4c4db0..c82d0be48741d 100644
> --- a/Documentation/devicetree/bindings/net/marvell,aquantia.yaml
> +++ b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml
> @@ -48,6 +48,16 @@ properties:
>    firmware-name:
>      description: specify the name of PHY firmware to load
>  
> +  marvell,force-mdi-order-normal:
> +    type: boolean
> +    description:
> +      force normal order of MDI pairs, overriding MDI_CFG bootstrap pin.
> +
> +  marvell,force-mdi-order-reverse:
> +    type: boolean
> +    description:
> +      force reverse order of MDI pairs, overriding MDI_CFG bootstrap pin.

These properties are mutually exclusive, right? If so, the binding
should enforce that.

Thanks,
Conor.

> +
>    nvmem-cells:
>      description: phandle to the firmware nvmem cell
>      maxItems: 1
> -- 
> 2.46.0
Andrew Lunn Aug. 21, 2024, 4 p.m. UTC | #2
On Wed, Aug 21, 2024 at 01:46:30PM +0100, Daniel Golle wrote:
> Usually the MDI pair order reversal configuration is defined by
> bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
> pair order and force either normal or reverse order.

Could you explain that in a bit more detail. Are you talking about
changing the order of the 4 pairs? Or reversing the polarity within
pairs?

	Andrew
Daniel Golle Aug. 21, 2024, 4:08 p.m. UTC | #3
On Wed, Aug 21, 2024 at 06:00:36PM +0200, Andrew Lunn wrote:
> On Wed, Aug 21, 2024 at 01:46:30PM +0100, Daniel Golle wrote:
> > Usually the MDI pair order reversal configuration is defined by
> > bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
> > pair order and force either normal or reverse order.
> 
> Could you explain that in a bit more detail. Are you talking about
> changing the order of the 4 pairs? Or reversing the polarity within
> pairs?

It's about changing the order of the 4 pairs, either ABCD or DCBA.
Polarity of each pair is not affected by this.
Andrew Lunn Aug. 21, 2024, 4:13 p.m. UTC | #4
On Wed, Aug 21, 2024 at 05:08:39PM +0100, Daniel Golle wrote:
> On Wed, Aug 21, 2024 at 06:00:36PM +0200, Andrew Lunn wrote:
> > On Wed, Aug 21, 2024 at 01:46:30PM +0100, Daniel Golle wrote:
> > > Usually the MDI pair order reversal configuration is defined by
> > > bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
> > > pair order and force either normal or reverse order.
> > 
> > Could you explain that in a bit more detail. Are you talking about
> > changing the order of the 4 pairs? Or reversing the polarity within
> > pairs?
> 
> It's about changing the order of the 4 pairs, either ABCD or DCBA.
> Polarity of each pair is not affected by this.

So when i do

ethtool -s 42 mdix off

to enable straight through, are you saying the PHY actually does
crossover, because the pull-up tells it the wrong thing about how the
cable is wired? And `mdix on` for crossover gives straight?

'mdix auto' just works as expected, since it tried all the
combinations until it works?

      Andrew
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/marvell,aquantia.yaml b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml
index 9854fab4c4db0..c82d0be48741d 100644
--- a/Documentation/devicetree/bindings/net/marvell,aquantia.yaml
+++ b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml
@@ -48,6 +48,16 @@  properties:
   firmware-name:
     description: specify the name of PHY firmware to load
 
+  marvell,force-mdi-order-normal:
+    type: boolean
+    description:
+      force normal order of MDI pairs, overriding MDI_CFG bootstrap pin.
+
+  marvell,force-mdi-order-reverse:
+    type: boolean
+    description:
+      force reverse order of MDI pairs, overriding MDI_CFG bootstrap pin.
+
   nvmem-cells:
     description: phandle to the firmware nvmem cell
     maxItems: 1