Re: Re: [PATCH] phy: nxp-c45: add driver for tja1103
From: Christian Herber
Date: Tue Apr 13 2021 - 02:56:46 EST
Hi Andrew,
On 4/12/2021 6:52 PM, Andrew Lunn wrote:
So what you are say is, you don't care if the IP is completely
different, it all goes in one driver. So lets put this driver into
nxp-tja11xx.c. And then we avoid all the naming issues.
Andrew
As this seems to be a key question, let me try and shed some more light
on this.
The original series of BASE-T1 PHYs includes TJA110, TJA1101, and
TJA1102. They are covered by the existing driver, which has the
unfortunate naming TJA11xx. Unfortunate, because the use of wildcards is
a bit to generous. E.g. the naming would also include a TJA1145, which
is a high-speed CAN transceiver. The truth is, extrapolating wildcards
in product names doesn't work as there is not guarantee of future
product names.
The mentioned TJA1100/1/2 are *fairly* software-compatible, which is why
it makes sense to have a shared driver. When it gets to TJA1103, there
is no SW compatibility, which is why we decided to create a new driver.
We want to support all future Ethernet PHY devices with this codebase,
and that is why the naming is that generic. The common denominator of
the devices is that they are NXP products and use clause 45 addressing.
When you say we don't care that the IP is different, that doesn't quite
fit. Just because the MDI is different, the register map does not need
to change much, so it will be easy to support future PHYs also when
using different PHY technology.
Moving the code into TJA11xx is creating more issues, as it assumes that
the devices which are managed by the driver are always TJA... devices
which may not be true.
Christian