Re: [PATCH 2/2] ARM: Layerscape: Add LS1021A IOT board support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 17, 2023 at 01:44:25PM +0000, Renaud Barbier wrote:
> > 
> > A phy is registered in phy_register_device(). The call to register_device() in
> > that function will end up in mdio_bus_match(). You could add some
> > debugging there to see which phy ids are matched against each other.
> > 
> > An idea is that the at803x driver is not yet registered by the time
> > phy_device_connect() is called, but I don't see how this could happen.
> > 
> For some reason mdio_bus_match is not called.
> So if I understand the sequence correctly 
> 
> First phy_register is called and assign genphy to all phys
> 
> phy_register_device id = 0x0, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
> phy_register_device id = 0x4dd074, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
> phy_register_device id = 0x4dd074, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY

Okay, here is the problem. You registered the mdio driver at coredevice
level, but the phy drivers are registered at device level. That means
the at803x driver is not present when the phys are probed and then
genphy is used as fallback.

IMO the phy drivers should be moved to an earlier level, like core
or coredevice.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux