From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5F15C77B73 for ; Sun, 4 Jun 2023 12:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s3i2u9mhiL5+JZoIA9d8z4pZIazjTEkUBiM5jQl9FXo=; b=sXYlg9lSrA72O4 phIyH1O+PAQ77M/CMRdhpxr0jLcBDPVftz//48zxonBVrn9a/gFUNXUSIXCVmYqKT/PtBxtSr0Mxx jyc8r4gmghzZj8c/dMgF93jgwZDuNlgPfLNKrZzb5dzdRU7BEUD4wOOI1GowW/VgkpW8j1GAj01wS tu1gPBARNWEKzqzDfzOp7RVJJaLOTEuqtkPvGI6dk36Q53lqs6uAYmCsSSm84GLKikxQwyjClP/6c +SZMnKhforFPOV1FrZUxk8chdQZUkeWbSDcKmoA2yVxYKDcMSSXzOp7KgaMNmjC6CqwbLrfRNO7Az WAfwRRy1uCq7H1csrD9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q5nBZ-00CAK5-0s; Sun, 04 Jun 2023 12:50:17 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q5nBW-00CAJb-1Y for linux-arm-kernel@lists.infradead.org; Sun, 04 Jun 2023 12:50:15 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E74DB60C22; Sun, 4 Jun 2023 12:50:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF2F9C433EF; Sun, 4 Jun 2023 12:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685883013; bh=st6rITNeMkA28xYwqynrWkwTwwzdBr6+2EomXGWAPSE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DbhxItIgU/jVbU7GQSr7P+Q6HQWm5kachurpeydFjzaklQKOe9vntZ//5Irpl0Vk+ LSXcs6o2EsrdOAxe/TJ4HspcIukFEk+98O3mYrmxxZLiPkQlQn/lz4yIOOIWbWTRKl ERbQfxmCN9LwHV7Y8C8JflOjSjYSDQGKl7afXvnpizQVOcc3aNmvTQBUH2fmSIixnq 03T0j48clRqylxk0eHCvxXTNcFaJ3xtMyRNsBi3JtHHQiCSoRPwnbFrtE6NLf+Rcg2 T5x+0L3VId4q6MNl1OVJs7ouIQ4q4UGVi1zshV68urpl15Ghf4AS4cJqkj3h2xugPo QjXcXp8+1NoxA== Date: Sun, 4 Jun 2023 20:49:47 +0800 From: Shawn Guo To: Hugo Villeneuve Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Hugo Villeneuve , 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 Message-ID: <20230604124947.GL4199@dragon> References: <20230529193311.1033939-1-hugo@hugovil.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230529193311.1033939-1-hugo@hugovil.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230604_055014_567968_FC31C9E5 X-CRM114-Status: GOOD ( 18.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 29, 2023 at 03:33:12PM -0400, Hugo Villeneuve wrote: > From: Hugo Villeneuve > > This commit is taken from Variscite linux kernel public git repository. > Original patch author: Nate Drude > 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 Applied, thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel