Re: [PATCH net-next v3 5/5] net: phy: dp83867: support setting output-impedance

From: Andrew Lunn

Date: Tue Nov 10 2026 - 08:16:56 EST


On Fri, Nov 06, 2026 at 08:47:29AM +0100, Steffen Trumtrar wrote:
> Currently the dp83867 supports setting the io impedance to minimum,
> maximum, default or a value from a nvmem cell. In situations where there
> is no backend for a nvmem cell, the value can not be set to anything but
> minimum, maximum or default.
>
> Add support for the ti,output-impedance-ohms binding, allowing to
> specify the impedance in ohms via the devicetree. The PHY has 32
> settings between 35 and 70 ohms. The datasheet does not specify the
> impedance of each setting, so the value is mapped linearly to the
> nearest one.
>
> With this mapping, 50 ohms results in 0x12. For non-OF devices, the
> driver sets 0x0f (IO_IMPEDANCE_MIN / 2) as the 50 ohm default "per
> datasheet", which would be 53 ohms with the linear mapping. As the
> datasheet only gives the range, neither value can be checked against it.
>
> The binding does not allow combining the new property with the nvmem
> cell or the boolean properties. The driver still reads the nvmem cell
> first, then ti,max-output-impedance, ti,min-output-impedance and
> ti,output-impedance-ohms.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew