* [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property
@ 2026-01-29 14:13 Teresa Remmet
2026-01-29 14:13 ` [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property Teresa Remmet
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Teresa Remmet @ 2026-01-29 14:13 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andrew Davis, Andrew Lunn, Heiner Kallweit, Russell King
Cc: netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn,
Yashwanth Varakala, Jan Remmet
Introduce a new way to set the output impedance over device tree.
So far it is possible to pass the value either over an nvmem
cell or to set the min and max booleans over device tree.
In our use case we want to be able to set the impedance over
device tree but the boolean values are not the right fit to
provide best signal integrity for the hardware.
To: Andrew Lunn <andrew+netdev@lunn.ch>
To: David S. Miller <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Andrew Davis <afd@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
To: Russell King <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: upstream@lists.phytec.de
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
Teresa Remmet (2):
dt-bindings: dp83867: add binding for ti,output-impedance property
net: phy: dp83867: add numeric io impedance DT property
Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 ++++++++++++++-----
drivers/net/phy/dp83867.c | 17 +++++++++++++----
2 files changed, 27 insertions(+), 9 deletions(-)
---
base-commit: 1f97d9dcf53649c41c33227b345a36902cbb08ad
change-id: 20260128-wip-t-remmet-phytec-de-bspimx95-132_upstream-48188a567544
Best regards,
--
Teresa Remmet <t.remmet@phytec.de>
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property 2026-01-29 14:13 [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property Teresa Remmet @ 2026-01-29 14:13 ` Teresa Remmet 2026-02-10 14:48 ` Rob Herring 2026-01-29 14:13 ` [PATCH 2/2] net: phy: dp83867: add numeric io impedance DT property Teresa Remmet 2026-01-29 17:31 ` [PATCH 0/2] net: phy: dp83867: add numeric " Andrew Davis 2 siblings, 1 reply; 10+ messages in thread From: Teresa Remmet @ 2026-01-29 14:13 UTC (permalink / raw) To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, Andrew Lunn, Heiner Kallweit, Russell King Cc: netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn, Yashwanth Varakala, Jan Remmet Add an optional device tree property, "ti,output-impedance", which specifies the output impedance using a raw register field value from 0x0 to 0x1f. 0x0 corresponds to the highest impedance (approximately 70 ohms), while 0x1f represents the lowest (approximately 35 ohms). This property allows the impedance to be configured through the device-tree to any required value rather than being limited to fixed minimum or maximum settings. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> --- Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Documentation/devicetree/bindings/net/ti,dp83867.yaml index 4bc1f98fd9fe..a8d8bfb68bee 100644 --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml @@ -52,11 +52,20 @@ properties: description: | MAC Interface Impedance control to set the programmable output impedance to a maximum value (70 ohms). - Note: Specifying an io_impedance_ctrl nvmem cell or one of the - ti,min-output-impedance, ti,max-output-impedance properties - are mutually exclusive. If more than one is present, an nvmem - cell takes precedence over ti,max-output-impedance, which in - turn takes precedence over ti,min-output-impedance. + Note: Specifying an io_impedance_ctrl nvmem cell, ti,output-impedance + or one of the boolean ti,min-output-impedance and ti,max-output-impedance + properties is mutually exclusive. + If more than one is present the priority order is nvmem cell, + ti,output-impedance, ti,max-output-impedance and last + ti,min-output-impedance. + + ti,output-impedance: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + MAC Interface Impedance control to set the raw register value from 0x0 + (approx. 70 ohms) to 0x1f (approx. 35 ohms). + minimum: 0 + maximum: 31 tx-fifo-depth: $ref: /schemas/types.yaml#/definitions/uint32 -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property 2026-01-29 14:13 ` [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property Teresa Remmet @ 2026-02-10 14:48 ` Rob Herring 2026-02-11 12:50 ` Teresa Remmet 0 siblings, 1 reply; 10+ messages in thread From: Rob Herring @ 2026-02-10 14:48 UTC (permalink / raw) To: Teresa Remmet Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, Andrew Lunn, Heiner Kallweit, Russell King, netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn, Yashwanth Varakala, Jan Remmet On Thu, Jan 29, 2026 at 03:13:33PM +0100, Teresa Remmet wrote: > Add an optional device tree property, "ti,output-impedance", which > specifies the output impedance using a raw register field value from > 0x0 to 0x1f. > > 0x0 corresponds to the highest impedance (approximately 70 ohms), > while 0x1f represents the lowest (approximately 35 ohms). > > This property allows the impedance to be configured through the > device-tree to any required value rather than being limited to fixed > minimum or maximum settings. > > Signed-off-by: Teresa Remmet <t.remmet@phytec.de> > --- > Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > index 4bc1f98fd9fe..a8d8bfb68bee 100644 > --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > @@ -52,11 +52,20 @@ properties: > description: | > MAC Interface Impedance control to set the programmable output impedance > to a maximum value (70 ohms). > - Note: Specifying an io_impedance_ctrl nvmem cell or one of the > - ti,min-output-impedance, ti,max-output-impedance properties > - are mutually exclusive. If more than one is present, an nvmem > - cell takes precedence over ti,max-output-impedance, which in > - turn takes precedence over ti,min-output-impedance. > + Note: Specifying an io_impedance_ctrl nvmem cell, ti,output-impedance > + or one of the boolean ti,min-output-impedance and ti,max-output-impedance > + properties is mutually exclusive. > + If more than one is present the priority order is nvmem cell, > + ti,output-impedance, ti,max-output-impedance and last > + ti,min-output-impedance. > + > + ti,output-impedance: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + MAC Interface Impedance control to set the raw register value from 0x0 > + (approx. 70 ohms) to 0x1f (approx. 35 ohms). > + minimum: 0 > + maximum: 31 How does this compare to 'mac-termination-ohms'? Seems like this should be a common property whether it's the same or for a different location. Rob ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property 2026-02-10 14:48 ` Rob Herring @ 2026-02-11 12:50 ` Teresa Remmet 2026-02-11 14:02 ` Andrew Lunn 0 siblings, 1 reply; 10+ messages in thread From: Teresa Remmet @ 2026-02-11 12:50 UTC (permalink / raw) To: robh@kernel.org Cc: andrew@lunn.ch, andrew+netdev@lunn.ch, Jan Remmet, davem@davemloft.net, afd@ti.com, pabeni@redhat.com, conor+dt@kernel.org, linux@armlinux.org.uk, devicetree@vger.kernel.org, hkallweit1@gmail.com, krzk+dt@kernel.org, Benjamin Hahn, kuba@kernel.org, edumazet@google.com, Yashwanth Varakala, upstream@lists.phytec.de, netdev@vger.kernel.org, Yannic Moog Hello Rob, Am Dienstag, dem 10.02.2026 um 08:48 -0600 schrieb Rob Herring: > On Thu, Jan 29, 2026 at 03:13:33PM +0100, Teresa Remmet wrote: > > Add an optional device tree property, "ti,output-impedance", which > > specifies the output impedance using a raw register field value > > from > > 0x0 to 0x1f. > > > > 0x0 corresponds to the highest impedance (approximately 70 ohms), > > while 0x1f represents the lowest (approximately 35 ohms). > > > > This property allows the impedance to be configured through the > > device-tree to any required value rather than being limited to > > fixed > > minimum or maximum settings. > > > > Signed-off-by: Teresa Remmet <t.remmet@phytec.de> > > --- > > Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 > > ++++++++++++++----- > > 1 file changed, 14 insertions(+), 5 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > index 4bc1f98fd9fe..a8d8bfb68bee 100644 > > --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > @@ -52,11 +52,20 @@ properties: > > description: | > > MAC Interface Impedance control to set the programmable > > output impedance > > to a maximum value (70 ohms). > > - Note: Specifying an io_impedance_ctrl nvmem cell or one of > > the > > - ti,min-output-impedance, ti,max-output-impedance > > properties > > - are mutually exclusive. If more than one is present, an > > nvmem > > - cell takes precedence over ti,max-output-impedance, which > > in > > - turn takes precedence over ti,min-output-impedance. > > + Note: Specifying an io_impedance_ctrl nvmem cell, ti,output- > > impedance > > + or one of the boolean ti,min-output-impedance and ti,max- > > output-impedance > > + properties is mutually exclusive. > > + If more than one is present the priority order is nvmem > > cell, > > + ti,output-impedance, ti,max-output-impedance and last > > + ti,min-output-impedance. > > + > > + ti,output-impedance: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + MAC Interface Impedance control to set the raw register > > value from 0x0 > > + (approx. 70 ohms) to 0x1f (approx. 35 ohms). > > + minimum: 0 > > + maximum: 31 > > How does this compare to 'mac-termination-ohms'? Seems like this > should > be a common property whether it's the same or for a different > location. the difference is that the termination is not passed in ohms but a raw register value that can not directly be matched to a resistance value. The datasheet says here "Output impedance approximate range from 35- 70ohms in 32 steps. Lowest being 11111 and highest being 00000. Range and Step size will vary with process." So using 'mac-termination-ohms' seemed not the right fit here as the documentation talks about selecting a resistance value which is not possible in this case. Teresa > > Rob -- PHYTEC Messtechnik GmbH | Barcelona-Allee 1 | 55129 Mainz, Germany Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber, Dipl.-Ing. (FH) Markus Lickes | Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 26/665/00608, DE 149059855 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property 2026-02-11 12:50 ` Teresa Remmet @ 2026-02-11 14:02 ` Andrew Lunn 2026-02-17 13:51 ` Teresa Remmet 0 siblings, 1 reply; 10+ messages in thread From: Andrew Lunn @ 2026-02-11 14:02 UTC (permalink / raw) To: Teresa Remmet Cc: robh@kernel.org, andrew+netdev@lunn.ch, Jan Remmet, davem@davemloft.net, afd@ti.com, pabeni@redhat.com, conor+dt@kernel.org, linux@armlinux.org.uk, devicetree@vger.kernel.org, hkallweit1@gmail.com, krzk+dt@kernel.org, Benjamin Hahn, kuba@kernel.org, edumazet@google.com, Yashwanth Varakala, upstream@lists.phytec.de, netdev@vger.kernel.org, Yannic Moog On Wed, Feb 11, 2026 at 12:50:13PM +0000, Teresa Remmet wrote: > Hello Rob, > > Am Dienstag, dem 10.02.2026 um 08:48 -0600 schrieb Rob Herring: > > On Thu, Jan 29, 2026 at 03:13:33PM +0100, Teresa Remmet wrote: > > > Add an optional device tree property, "ti,output-impedance", which > > > specifies the output impedance using a raw register field value > > > from > > > 0x0 to 0x1f. > > > > > > 0x0 corresponds to the highest impedance (approximately 70 ohms), > > > while 0x1f represents the lowest (approximately 35 ohms). > > > > > > This property allows the impedance to be configured through the > > > device-tree to any required value rather than being limited to > > > fixed > > > minimum or maximum settings. > > > > > > Signed-off-by: Teresa Remmet <t.remmet@phytec.de> > > > --- > > > Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 > > > ++++++++++++++----- > > > 1 file changed, 14 insertions(+), 5 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > index 4bc1f98fd9fe..a8d8bfb68bee 100644 > > > --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > @@ -52,11 +52,20 @@ properties: > > > description: | > > > MAC Interface Impedance control to set the programmable > > > output impedance > > > to a maximum value (70 ohms). > > > - Note: Specifying an io_impedance_ctrl nvmem cell or one of > > > the > > > - ti,min-output-impedance, ti,max-output-impedance > > > properties > > > - are mutually exclusive. If more than one is present, an > > > nvmem > > > - cell takes precedence over ti,max-output-impedance, which > > > in > > > - turn takes precedence over ti,min-output-impedance. > > > + Note: Specifying an io_impedance_ctrl nvmem cell, ti,output- > > > impedance > > > + or one of the boolean ti,min-output-impedance and ti,max- > > > output-impedance > > > + properties is mutually exclusive. > > > + If more than one is present the priority order is nvmem > > > cell, > > > + ti,output-impedance, ti,max-output-impedance and last > > > + ti,min-output-impedance. > > > + > > > + ti,output-impedance: > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + description: > > > + MAC Interface Impedance control to set the raw register > > > value from 0x0 > > > + (approx. 70 ohms) to 0x1f (approx. 35 ohms). > > > + minimum: 0 > > > + maximum: 31 > > > > How does this compare to 'mac-termination-ohms'? Seems like this > > should > > be a common property whether it's the same or for a different > > location. > > the difference is that the termination is not passed in ohms but a raw > register value that can not directly be matched to a resistance value. > > The datasheet says here "Output impedance approximate range from 35- > 70ohms in 32 steps. > Lowest being 11111 and highest being 00000. Range and Step size > will vary with process." > > So using 'mac-termination-ohms' seemed not the right fit here as the > documentation talks about selecting a resistance value which is not > possible in this case. You need a really good argument to use raw register values in DT. Given real life use case, how important is the "approximate"? Do you need to tune the value for every single device? Or is one value likely to work for all instances of a board? So long as you state the values are approximate, i don't see why you cannot use ohms, with a range of 34 - 70, and let the driver convert to register value. Andrew ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property 2026-02-11 14:02 ` Andrew Lunn @ 2026-02-17 13:51 ` Teresa Remmet 0 siblings, 0 replies; 10+ messages in thread From: Teresa Remmet @ 2026-02-17 13:51 UTC (permalink / raw) To: andrew@lunn.ch Cc: robh@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, afd@ti.com, edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk, devicetree@vger.kernel.org, hkallweit1@gmail.com, Benjamin Hahn, kuba@kernel.org, Jan Remmet, Yashwanth Varakala, krzk+dt@kernel.org, upstream@lists.phytec.de, netdev@vger.kernel.org, conor+dt@kernel.org, Yannic Moog Hello Andrew, Am Mittwoch, dem 11.02.2026 um 15:02 +0100 schrieb Andrew Lunn: > On Wed, Feb 11, 2026 at 12:50:13PM +0000, Teresa Remmet wrote: > > Hello Rob, > > > > Am Dienstag, dem 10.02.2026 um 08:48 -0600 schrieb Rob Herring: > > > On Thu, Jan 29, 2026 at 03:13:33PM +0100, Teresa Remmet wrote: > > > > Add an optional device tree property, "ti,output-impedance", > > > > which > > > > specifies the output impedance using a raw register field value > > > > from > > > > 0x0 to 0x1f. > > > > > > > > 0x0 corresponds to the highest impedance (approximately 70 > > > > ohms), > > > > while 0x1f represents the lowest (approximately 35 ohms). > > > > > > > > This property allows the impedance to be configured through the > > > > device-tree to any required value rather than being limited to > > > > fixed > > > > minimum or maximum settings. > > > > > > > > Signed-off-by: Teresa Remmet <t.remmet@phytec.de> > > > > --- > > > > Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 > > > > ++++++++++++++----- > > > > 1 file changed, 14 insertions(+), 5 deletions(-) > > > > > > > > diff --git > > > > a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > > b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > > index 4bc1f98fd9fe..a8d8bfb68bee 100644 > > > > --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > > +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml > > > > @@ -52,11 +52,20 @@ properties: > > > > description: | > > > > MAC Interface Impedance control to set the programmable > > > > output impedance > > > > to a maximum value (70 ohms). > > > > - Note: Specifying an io_impedance_ctrl nvmem cell or one > > > > of > > > > the > > > > - ti,min-output-impedance, ti,max-output-impedance > > > > properties > > > > - are mutually exclusive. If more than one is present, > > > > an > > > > nvmem > > > > - cell takes precedence over ti,max-output-impedance, > > > > which > > > > in > > > > - turn takes precedence over ti,min-output-impedance. > > > > + Note: Specifying an io_impedance_ctrl nvmem cell, > > > > ti,output- > > > > impedance > > > > + or one of the boolean ti,min-output-impedance and > > > > ti,max- > > > > output-impedance > > > > + properties is mutually exclusive. > > > > + If more than one is present the priority order is > > > > nvmem > > > > cell, > > > > + ti,output-impedance, ti,max-output-impedance and last > > > > + ti,min-output-impedance. > > > > + > > > > + ti,output-impedance: > > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > + description: > > > > + MAC Interface Impedance control to set the raw register > > > > value from 0x0 > > > > + (approx. 70 ohms) to 0x1f (approx. 35 ohms). > > > > + minimum: 0 > > > > + maximum: 31 > > > > > > How does this compare to 'mac-termination-ohms'? Seems like this > > > should > > > be a common property whether it's the same or for a different > > > location. > > > > the difference is that the termination is not passed in ohms but a > > raw > > register value that can not directly be matched to a resistance > > value. > > > > The datasheet says here "Output impedance approximate range from > > 35- > > 70ohms in 32 steps. > > Lowest being 11111 and highest being 00000. Range and Step size > > will vary with process." > > > > So using 'mac-termination-ohms' seemed not the right fit here as > > the > > documentation talks about selecting a resistance value which is not > > possible in this case. > > You need a really good argument to use raw register values in DT. > > Given real life use case, how important is the "approximate"? Do you > need to tune the value for every single device? Or is one value > likely > to work for all instances of a board? There is already an nvmem binding which makes it possible to tune the raw value per device, so I would say is clearly useful in some setups. In our case I discussed this with our HW engineer. On the current board design a single value is expected to give sufficiently good signal integrity for all instances of that board. We use this PHY also in other designs where selecting either the minimum or maximum output impedance value has been good enough and we could rely on the existing min/max bindings. The difference now is that for this new design we need a value in between those extremes, so we can no longer use just the min/max values. > > So long as you state the values are approximate, i don't see why you > cannot use ohms, with a range of 34 - 70, and let the driver convert > to register value. According to the data sheet, the default impedance control register is trimmed to 50 ohms during production, which means different devices power up with different reset values. I checked the impedance reset values on around 20 PHYs and observed that the default raw register values ranged from 0xc to 0x10. A TI forum post mentions a tolerance of around +/-8% [1]. Given this spread, mapping 31 register steps directly to 35-70 ohms would imply a level of accuracy that is not actually present. A very similar concerns and arguments came up during the initial discussion of the output impedance bindings [2]. The solution was to create just the min/max settings. Teresa [1]https://e2e.ti.com/support/interface-group/interface/f/interface-forum/723512/dp83867ergz-r-evm-dp83867-tolerance-drift-of-output-impedance-control-bit-4-0-of-io_mux_cfg-0x0170 [2] https://lore.kernel.org/all/959bac39-ccd6-8338-a9f4-7f56f63b0478@ti.com/ > Andrew -- PHYTEC Messtechnik GmbH | Barcelona-Allee 1 | 55129 Mainz, Germany Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber, Dipl.-Ing. (FH) Markus Lickes | Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 26/665/00608, DE 149059855 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] net: phy: dp83867: add numeric io impedance DT property 2026-01-29 14:13 [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property Teresa Remmet 2026-01-29 14:13 ` [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property Teresa Remmet @ 2026-01-29 14:13 ` Teresa Remmet 2026-01-29 16:25 ` Jakub Kicinski 2026-01-29 17:31 ` [PATCH 0/2] net: phy: dp83867: add numeric " Andrew Davis 2 siblings, 1 reply; 10+ messages in thread From: Teresa Remmet @ 2026-01-29 14:13 UTC (permalink / raw) To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, Andrew Lunn, Heiner Kallweit, Russell King Cc: netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn, Yashwanth Varakala, Jan Remmet The DP83867 MAC-side IO impedance is currently configured in the driver either via an NVMEM cell or via the two boolean device tree properties ti,min-output-impedance and ti,max-output-impedance. Some boards require an impedance setting different from the default, minimum, or maximum values, and may not have NVMEM storage available. For such cases, a device tree configuration option is needed. Add a optional device-tree property "ti,output-impedance", that passes the raw register field value (0x0 - 0x1f) representing the range between approximately 70 ohms and 35 ohms. Because the actual impedance range and step size varies depending on the production process, no exact mapping between register value and impedance can be made. The values are determined empirically. If the property is not set the existing behavior is maintained. NVMEM cell has still priority but ti,output-impedance is checked before the boolean min and max values. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> --- drivers/net/phy/dp83867.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 5f5de01c41e1..b06d851c3487 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -516,13 +516,22 @@ static int dp83867_of_init_io_impedance(struct phy_device *phydev) return phydev_err_probe(phydev, ret, "failed to get nvmem cell io_impedance_ctrl\n"); - /* If no nvmem cell, check for the boolean properties. */ - if (of_property_read_bool(of_node, "ti,max-output-impedance")) + /* If no nvmem cell, check for the device tree entries */ + ret = of_property_read_u32(of_node, "ti,output-impedance", + (u32 *)&dp83867->io_impedance); + if (!ret) { + if (dp83867->io_impedance > DP83867_IO_MUX_CFG_IO_IMPEDANCE_MASK) { + phydev_err(phydev, "'ti,output-impedance' value %u out of range\n", + dp83867->io_impedance); + return -EINVAL; + } + } else if (of_property_read_bool(of_node, "ti,max-output-impedance")) { dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX; - else if (of_property_read_bool(of_node, "ti,min-output-impedance")) + } else if (of_property_read_bool(of_node, "ti,min-output-impedance")) { dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN; - else + } else { dp83867->io_impedance = -1; /* leave at default */ + }; return 0; } -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] net: phy: dp83867: add numeric io impedance DT property 2026-01-29 14:13 ` [PATCH 2/2] net: phy: dp83867: add numeric io impedance DT property Teresa Remmet @ 2026-01-29 16:25 ` Jakub Kicinski 0 siblings, 0 replies; 10+ messages in thread From: Jakub Kicinski @ 2026-01-29 16:25 UTC (permalink / raw) To: Teresa Remmet Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, Andrew Lunn, Heiner Kallweit, Russell King, netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn, Yashwanth Varakala, Jan Remmet On Thu, 29 Jan 2026 15:13:34 +0100 Teresa Remmet wrote: > + } else { > dp83867->io_impedance = -1; /* leave at default */ > + }; drivers/net/phy/dp83867.c:534:3-4: Unneeded semicolon reminder: please wait 24h between reposts on netdev: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#tl-dr -- pw-bot: cr ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property 2026-01-29 14:13 [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property Teresa Remmet 2026-01-29 14:13 ` [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property Teresa Remmet 2026-01-29 14:13 ` [PATCH 2/2] net: phy: dp83867: add numeric io impedance DT property Teresa Remmet @ 2026-01-29 17:31 ` Andrew Davis 2026-02-10 14:42 ` Rob Herring 2 siblings, 1 reply; 10+ messages in thread From: Andrew Davis @ 2026-01-29 17:31 UTC (permalink / raw) To: Teresa Remmet, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Lunn, Heiner Kallweit, Russell King Cc: netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn, Yashwanth Varakala, Jan Remmet On 1/29/26 8:13 AM, Teresa Remmet wrote: > Introduce a new way to set the output impedance over device tree. > So far it is possible to pass the value either over an nvmem > cell or to set the min and max booleans over device tree. > We have a similar issue in our networking driver, we can either get the MAC address though a NVMEM cell, or when that is unavailable use fallback to using a hardcoded value in DT. I wonder if it would make sense to add a new type of NVMEM cell that encodes the content of the cell in DT itself.. That way we can use the same NVMEM interface in both cases, without adding all these custom fallback properties to every NVMEM consumer. Andrew > In our use case we want to be able to set the impedance over > device tree but the boolean values are not the right fit to > provide best signal integrity for the hardware. > > To: Andrew Lunn <andrew+netdev@lunn.ch> > To: David S. Miller <davem@davemloft.net> > To: Eric Dumazet <edumazet@google.com> > To: Jakub Kicinski <kuba@kernel.org> > To: Paolo Abeni <pabeni@redhat.com> > To: Rob Herring <robh@kernel.org> > To: Krzysztof Kozlowski <krzk+dt@kernel.org> > To: Conor Dooley <conor+dt@kernel.org> > To: Andrew Davis <afd@ti.com> > To: Andrew Lunn <andrew@lunn.ch> > To: Heiner Kallweit <hkallweit1@gmail.com> > To: Russell King <linux@armlinux.org.uk> > Cc: netdev@vger.kernel.org > Cc: devicetree@vger.kernel.org > Cc: upstream@lists.phytec.de > > Signed-off-by: Teresa Remmet <t.remmet@phytec.de> > --- > Teresa Remmet (2): > dt-bindings: dp83867: add binding for ti,output-impedance property > net: phy: dp83867: add numeric io impedance DT property > > Documentation/devicetree/bindings/net/ti,dp83867.yaml | 19 ++++++++++++++----- > drivers/net/phy/dp83867.c | 17 +++++++++++++---- > 2 files changed, 27 insertions(+), 9 deletions(-) > --- > base-commit: 1f97d9dcf53649c41c33227b345a36902cbb08ad > change-id: 20260128-wip-t-remmet-phytec-de-bspimx95-132_upstream-48188a567544 > > Best regards, ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property 2026-01-29 17:31 ` [PATCH 0/2] net: phy: dp83867: add numeric " Andrew Davis @ 2026-02-10 14:42 ` Rob Herring 0 siblings, 0 replies; 10+ messages in thread From: Rob Herring @ 2026-02-10 14:42 UTC (permalink / raw) To: Andrew Davis Cc: Teresa Remmet, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Krzysztof Kozlowski, Conor Dooley, Andrew Lunn, Heiner Kallweit, Russell King, netdev, devicetree, upstream, Yannic Moog, Benjamin Hahn, Yashwanth Varakala, Jan Remmet On Thu, Jan 29, 2026 at 11:31:29AM -0600, Andrew Davis wrote: > On 1/29/26 8:13 AM, Teresa Remmet wrote: > > Introduce a new way to set the output impedance over device tree. > > So far it is possible to pass the value either over an nvmem > > cell or to set the min and max booleans over device tree. > > > > We have a similar issue in our networking driver, we can either get > the MAC address though a NVMEM cell, or when that is unavailable use > fallback to using a hardcoded value in DT. > > I wonder if it would make sense to add a new type of NVMEM cell that > encodes the content of the cell in DT itself.. I don't think DT should be providing fake nvmem... The firmware/bootloader could read nvmem and always populate the DT MAC address property. Or Linux can provide a single API that reads from different sources. Rob ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-02-17 13:51 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-29 14:13 [PATCH 0/2] net: phy: dp83867: add numeric impedance DT property Teresa Remmet 2026-01-29 14:13 ` [PATCH 1/2] dt-bindings: dp83867: add binding for ti,output-impedance property Teresa Remmet 2026-02-10 14:48 ` Rob Herring 2026-02-11 12:50 ` Teresa Remmet 2026-02-11 14:02 ` Andrew Lunn 2026-02-17 13:51 ` Teresa Remmet 2026-01-29 14:13 ` [PATCH 2/2] net: phy: dp83867: add numeric io impedance DT property Teresa Remmet 2026-01-29 16:25 ` Jakub Kicinski 2026-01-29 17:31 ` [PATCH 0/2] net: phy: dp83867: add numeric " Andrew Davis 2026-02-10 14:42 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox