Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4457908rwd; Sun, 4 Jun 2023 05:55:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6gRGRz190LRw/o2DFkDDVyrl/lPBCMXcpWvf7fjWyN8gfFCQ73Fp+8yEqUFRHWwaRpKGcB X-Received: by 2002:a17:90a:8a91:b0:256:b190:2733 with SMTP id x17-20020a17090a8a9100b00256b1902733mr2291469pjn.33.1685883357166; Sun, 04 Jun 2023 05:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685883357; cv=none; d=google.com; s=arc-20160816; b=GB1VvuBd8sHHShAbLC8OuSTjETrdAXT+ZcylYXExntZ8bnUhEELu+rWWN1AhZOWe1e KAs02nDAdHLLNYhRSaE/4RAEZsvNtZxHzrJVI/6H9rSomYu+cIsrlY/eSYfxMYu33HRh grm16haGDbyaMBEVutgUwjnsFUuO4dXUZU4h/61YlD0hNAWk/OFImS+cdGKGWxGZLYvh 8+OidXkle++wSSwNjy3HoGCSk418xOC2vnffP9QWerHE0QH6g9Wot7jdE4qUDuqxLocz Za3G6sv1fWGCFuk7zayBCCiquRFcaQBav9MCkA7m6Mmi+DaCAChMuTjUec0Ct81YHLWV nmYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dGNVxpwHJnnAamvIc2rksdRnjKTAELbw3YumYVy/g28=; b=YGFApf5kQQZLCr1aChsUA1Gb2AYNsHVSZSAjXIxcdeh7lS1VKUb6u4f15ezccLG6UV 44ny8Q4O41DFBOCBESjVZu3Nj6HfJXf0CgzrdpJjsvWxL62CLA54ApMtNZ1qCyzH2nSZ E1dA2I0sJr31EGna2rW+jsXZaenJ/85DEimuaZlmq+kyj19wT9oh5SLNqkahp909ugEJ BfO2FYomKkyNTSSHuoGb/eqELN4evSSWVeri0sq8jszuYCveXzhsFNCj/f89GpyRUAuU xf91xKhUd/+mBhIuR39j3MGQqf7Tg0NDR4nESg6cFodgeuYgOGPTXuscPwHxlp+5euG0 Y5Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbhxItIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cp21-20020a17090afb9500b0024e1eed547esi2393145pjb.96.2023.06.04.05.55.42; Sun, 04 Jun 2023 05:55:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbhxItIg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbjFDMuQ (ORCPT + 99 others); Sun, 4 Jun 2023 08:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjFDMuP (ORCPT ); Sun, 4 Jun 2023 08:50:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 694DAAB; Sun, 4 Jun 2023 05:50:14 -0700 (PDT) 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 F018D614AB; 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230529193311.1033939-1-hugo@hugovil.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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!