Enabling a new Phy in u-boot

We are trying to get an enthernet device with a new phy (TI dp83768) to work in both Linux and in u-boot. We are takling u-boot first because it seemed easier. We have enabled the TI phy driver in the u-boot menuconfig. We put prints in the main functions fo the phy driver and noticed that only the "init" method is getting called.

We don't really understand how the u-boot driver system figures out which phy driver to load. We don't think it is using the u-boot device tree since it doesn't even get compiled in the build process.

When we stop at the u-boot comand we can run the "mii" command and talk to the phy and read its registers. If we run the "mdio list" command it doesn't see the phy as being attatched.

Any ideas or information we can investigate?

U-boot (just like Linux) selects the PHY driver by traversing a list of available drivers and using the driver which first matches a part of the PHY ID (ie. PHY Identifier Registers #1 and #2 in the datasheet)
See https://source.denx.de/u-boot/u-boot/-/blob/master/drivers/net/phy/phy.c#L654 where it happens in the code and see here https://source.denx.de/u-boot/u-boot/-/blob/master/drivers/net/phy/marvell.c#L595 for plenty of examples of drivers defining uid and mask to be matched.