mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Leonardo Mörlein" <leo.moerlein@proton.me>
Cc: netdev@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>,
	Russell King <linux@armlinux.org.uk>,
	Paolo Abeni <pabeni@redhat.com>,
	Buday Csaba <buday.csaba@prolan.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: mdio_device: leave PHY reset deasserted on unregister
Date: Thu, 21 May 2026 01:39:33 +0200	[thread overview]
Message-ID: <5b7e9dad-d346-40a8-8c7b-cfe10f8388a7@lunn.ch> (raw)
In-Reply-To: <hRNIpXMBtfUH-OrabbMVvOWAZ5J4O1XNTvx0lMYIDdSLqFL9hhZKdb3CzPo7VgUrwKi6MD3qlj2li6eHybgzFBB_Wfqu5Lc4dABXt9mpL2s=@proton.me>

On Wed, May 20, 2026 at 10:53:04PM +0000, Leonardo Mörlein wrote:
> > I'm wondering if we are fixing the wrong thing here.
> 
> In general, I see two options to fix this. Either we fix the
> tear down or we fix the setup of the device.

Can we take a step back, and look at your actual hardware. What is the
state of the hardware when Linux boots, but before the MDIO bus is
enumerated?

Is the GPIO is configured as an input, and there is a resistor keeping
the PHY out of reset?

Is the GPIO configured as an output with the reset not asserted, by
the bootloader?

Maybe when we probe the PHY we need to ask the GPIO subsystem how the
GPIO is configured. On unregistered of the PHY we need to put the GPIO
back into that state?

> Currently, it seems that this case only occurs when the kernel
> leaves the reset asserted. The bootloader initially leaves the
> reset deasserted, at least for my current hardware.

Are you sure about this? Maybe it is simply an input by default, with
a resistor pulling the reset line the right way?

	Andrew

  reply	other threads:[~2026-05-20 23:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 15:13 leo.moerlein
2026-05-20 15:55 ` Andrew Lunn
2026-05-20 22:53   ` Leonardo Mörlein
2026-05-20 23:39     ` Andrew Lunn [this message]
2026-06-06 12:03       ` Leonardo Mörlein
2026-05-21  8:47     ` Buday Csaba

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=5b7e9dad-d346-40a8-8c7b-cfe10f8388a7@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=buday.csaba@prolan.hu \
    --cc=hauke@hauke-m.de \
    --cc=leo.moerlein@proton.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®