On Mon, Oct 3, 2022 at 3:35 PM Fabio Estevam <[email protected]> wrote: > > On 03/10/2022 16:09, Tim Harvey wrote: > > > Right - so it looks like the 'net: fec: add support for DM_MDIO' patch > > is not doing its job to probe the mdio bus and ports. > > > > Is CONFIG_DM_MDIO enabled and is dm_fec_bind_mdio returning > > successfully? > > Yes, for both. > > > > Is CONFIG_DM_ETH_PHY enabled? I don't use that and if I recall that > > code never seemed right to me. > > CONFIG_DM_ETH_PHY is not enabled. >
Fabio, I'm not sure why your configuration is behaving differently and think you'll have to instrument code to help understand it. Here is the chain of events I see on my imx6q fec <-> mv88e6085 configuration: fecmxc_probe() calls dm_fec_bind_mdio() which finds the mdio node in dt and binds the 'fec_mdio' driver to it then probes that driver. When it binds via device_bind_driver_to_node() it should end up calling dsa_post_bind() to bind to the dsa_port driver. Can you verify that you have DM_DSA enabled and that dsa_post_bind() gets called? You can enable debug for dsa-uclass.c and perhaps that will explain more. In dsa_post_bind() there is a loop over pdata->num_ports which calls device_bind_driver_to_node() to bind the node to DSA_PORT_CHILD_DRV_NAME - I imagine that isn't happening due to one of the checks prior to this failing silently. Tim

