From: Shawn Guo <shawnguo@kernel.org>
To: Hugo Villeneuve <hugo@hugovil.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Hugo Villeneuve <hvilleneuve@dimonoff.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: imx8mn-var-som: add 20ms delay to ethernet regulator enable
Date: Sun, 4 Jun 2023 20:49:47 +0800 [thread overview]
Message-ID: <20230604124947.GL4199@dragon> (raw)
In-Reply-To: <20230529193311.1033939-1-hugo@hugovil.com>
On Mon, May 29, 2023 at 03:33:12PM -0400, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>
> This commit is taken from Variscite linux kernel public git repository.
> Original patch author: Nate Drude <nate.d@variscite.com>
> See: https://github.com/varigit/linux-imx/blob/5.15-2.0.x-imx_var01/drivers/net/ethernet/freescale/fec_main.c#L3993-L4050
>
> The ethernet phy reset was moved from the fec controller to the
> mdio bus, see for example: 0e825b32c033e1998d0ebaf247f5dab3c340e3bf
>
> When the fec driver managed the reset, the regulator had time to
> settle during the fec phy reset before calling of_mdiobus_register,
> which probes the mii bus for the phy id to match the correct driver.
>
> Now that the mdio bus controls the reset, the fec driver no longer has
> any delay between enabling the regulator and calling of_mdiobus_register.
> If the regulator voltage has not settled, the phy id will not be read
> correctly and the generic phy driver will be used.
>
> The following call tree explains in more detail:
>
> fec_probe
> fec_reset_phy <- no longer introduces delay after migration to mdio reset
> fec_enet_mii_init
> of_mdiobus_register
> of_mdiobus_register_phy
> fwnode_mdiobus_register_phy
> get_phy_device <- mii probe for phy id to match driver happens here
> ...
> fwnode_mdiobus_phy_device_register
> phy_device_register
> mdiobus_register_device
> mdio_device_reset <- mdio reset assert / deassert delay happens here
>
> Add a 20ms enable delay to the regulator to fix the issue.
>
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Applied, thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-06-04 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 19:33 [PATCH] arm64: dts: imx8mn-var-som: add 20ms delay to ethernet regulator enable Hugo Villeneuve
2023-06-04 12:49 ` Shawn Guo [this message]
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=20230604124947.GL4199@dragon \
--to=shawnguo@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=hugo@hugovil.com \
--cc=hvilleneuve@dimonoff.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).