All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierluigi Passaro <pierluigi.p@variscite.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Pierluigi Passaro <pierluigi.passaro@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Eran Matityahu <eran.m@variscite.com>,
	Nate Drude <Nate.D@variscite.com>,
	Francesco Ferraro <francesco.f@variscite.com>
Subject: Re: [PATCH] net: mdio: force deassert MDIO reset signal
Date: Mon, 16 Jan 2023 09:44:01 +0000	[thread overview]
Message-ID: <AM6PR08MB437630CD49B50D66543EC3BDFFC19@AM6PR08MB4376.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <Y8SWPwM7V8yj9s+v@lunn.ch>

On Mon, Jan 16, 2023 at 1:11 AM Andrew Lunn <andrew@lunn.ch> wrote:
> > IMHO, since the framework allows defining the reset GPIO, it does not sound
> > reasonable to manage it only after checking if the PHY can communicate:
> > if the reset is asserted, the PHY cannot communicate at all.
> > This patch just ensures that, if the reset GPIO is defined, it's not asserted
> > while checking the communication.
>
> The problem is, you are only solving 1/4 of the problem. What about
> the clock the PHY needs? And the regulator, and the linux reset
> controller? And what order to do enable these, and how long do you
> wait between each one?
>
Interesting point of view: I was thinking about solving one of 4 problems ;)
This problem affects all the platforms using the reset GPIO without
ensuring that either u-boot or the HW put a pull-up on it.
In our test, the problem is reproducible simply setting the reset to 0 from
u-boot and then use the GPIO reset as designed in the MDIO framework.
Is this approach reasonable or a comprehensive solution is expected to
cover all additional HW actors (clocks, regulators, ...) ?>
> And why are you solving this purely for Ethernet PHYs when the same
> problem probably affects other sorts of devices which have reset
> GPIOs, regulators and clocks? It looks like MMC/SDIO devices have a
> similar problem.
>
> https://lwn.net/Articles/867740/
>
> As i said, i've not been following this work. Has it got anywhere? Can
> ethernet PHYs use it?
>
>          Andrew
I'm not that familiar with the article's implications, but it sounds like a
partial redesign of the framework is needed.
I'm not sure this is the real point.
Let's refer to I2C/SPI/USB busses, the sequence is something like
- probe and setup the bus
- once the bus is up & running, start probing the connected slaves
Apparently, in the MDIO framework there's an excessive coupling
between the MDIO bus and the PHYs.
I can't really understand why the MDIO bus must check the PHY presence.
Other busses try the communication only while probing the slaves,
never before.

  reply	other threads:[~2023-01-16  9:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 16:10 [PATCH] net: mdio: force deassert MDIO reset signal Pierluigi Passaro
2023-01-15 17:08 ` Andrew Lunn
2023-01-15 18:38   ` Pierluigi Passaro
2023-01-15 19:02     ` Andrew Lunn
2023-01-15 20:34       ` Pierluigi Passaro
2023-01-15 21:58   ` Lars-Peter Clausen
2023-01-15 22:33     ` Pierluigi Passaro
2023-01-15 22:56       ` Lars-Peter Clausen
2023-01-15 23:16         ` Pierluigi Passaro
2023-01-16  0:11       ` Andrew Lunn
2023-01-16  9:44         ` Pierluigi Passaro [this message]
2023-01-16 10:21           ` Russell King (Oracle)
2023-01-17 14:01           ` Andrew Lunn
2023-01-17 15:20             ` Pierluigi Passaro
2023-01-15 23:55     ` Andrew Lunn
2023-01-16  2:21       ` Lars-Peter Clausen
2023-01-16  9:51         ` Pierluigi Passaro
2023-01-17 13:40         ` Andrew Lunn
2023-01-17 13:48           ` Lars-Peter Clausen
2023-01-17 14:13             ` Andrew Lunn
2023-01-16  8:39       ` Pierluigi Passaro
2023-01-17 13:43         ` Andrew Lunn
2023-01-16  8:43 ` kernel test robot
2023-01-16 10:32   ` Pierluigi Passaro
2023-01-16 10:34     ` Russell King (Oracle)
2023-01-16 14:35   ` Pierluigi Passaro
2023-01-17 19:25 kernel test robot
2023-01-17 20:30 ` Dan Carpenter

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=AM6PR08MB437630CD49B50D66543EC3BDFFC19@AM6PR08MB4376.eurprd08.prod.outlook.com \
    --to=pierluigi.p@variscite.com \
    --cc=Nate.D@variscite.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eran.m@variscite.com \
    --cc=francesco.f@variscite.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pierluigi.passaro@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.