mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Renaud Barbier <Renaud.Barbier@ametek.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] ARM: Layerscape: Add LS1021A IOT board support
Date: Fri, 17 Feb 2023 15:51:40 +0100	[thread overview]
Message-ID: <20230217145140.GT10447@pengutronix.de> (raw)
In-Reply-To: <BL0PR07MB5665182C6ACFFFB3B4AB456AECA19@BL0PR07MB5665.namprd07.prod.outlook.com>

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 |



  reply	other threads:[~2023-02-17 14:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 13:26 Renaud Barbier
2023-02-10 12:23 ` Sascha Hauer
2023-02-16 11:54   ` Renaud Barbier
2023-02-16 12:54     ` Sascha Hauer
2023-02-16 13:56       ` Renaud Barbier
2023-02-17  9:36         ` Sascha Hauer
2023-02-17 13:44           ` Renaud Barbier
2023-02-17 14:51             ` Sascha Hauer [this message]
2023-02-17 18:06               ` Renaud Barbier
2023-02-21 10:31                 ` Sascha Hauer
2023-02-17 15:22           ` Renaud Barbier
2023-02-16 13:58       ` Renaud Barbier
2023-03-13 14:43 Renaud Barbier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230217145140.GT10447@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=Renaud.Barbier@ametek.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox