Re: [PATCH 2/4] dt-bindings: phy: cadence-torrent: drop cdns,num-lanes default value

From: Benjamin Robin

Date: Tue Nov 24 2026 - 11:11:54 EST


On Saturday, November 21, 2026 at 5:19 PM, Krzysztof Kozlowski wrote:
> On Fri, Nov 20, 2026 at 01:55:50PM +0100, Benjamin Robin wrote:
> > The driver treats cdns,num-lanes as mandatory and refuses to probe a PHY
> > sub-node that does not provide it, logging:
> >
> > No "cdns,num-lanes"-property.
> >
> > A default value in the schema wrongly suggests that the property is
> > optional, which it is not since it is listed as required. Remove the
> > "default: 4" so the binding reflects the actual driver behavior and the
> > mandatory nature of the property.
>
> No, that's a bug in the driver introduced in 2020. You ignored the
> background and history of this driver and DT bindings.

Hello Krzysztof,

I was not aware that this was a driver bug introduced in 2020. Series [1]
made the "cdns,num-lanes" property required in the DT binding back then
(see [2]), so the mismatch has been there for six years with no one
complaining so far.

Two options (I have a slight preference for the 2nd proposal):

1. Keep my current change: leave the property required and drop the
misleading "default: 4" from the schema, so the binding matches the
driver's behavior.

2. Restore the previous behavior: make "cdns,num-lanes" optional and
default to 4 lanes again, fixing the driver regression introduced
in 2020.

Which one do you prefer? If you consider the 2020 change a regression,
I can fix the driver instead and make the property optional with a
default of 4.

[1] https://lore.kernel.org/all/1600280911-9214-6-git-send-email-sjakhade@xxxxxxxxxxx/
[2] https://lore.kernel.org/all/1600280911-9214-8-git-send-email-sjakhade@xxxxxxxxxxx/

--
Benjamin Robin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com