Message ID | 20230501170531.2961459-1-hugo@hugovil.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp95171vqo; Mon, 1 May 2023 11:03:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WAB5sMDeWtc2HxUjwZ9jZfawaHqKSCwPLTDlsnefL+OgyJw0NmyOTPwjwYqQMr4n+f9fN X-Received: by 2002:a05:6a00:2d16:b0:63d:2d99:2e92 with SMTP id fa22-20020a056a002d1600b0063d2d992e92mr21048246pfb.17.1682964229063; Mon, 01 May 2023 11:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682964229; cv=none; d=google.com; s=arc-20160816; b=HM4CgxvuTE2e7W+y5TwX2hHitmmd8apHlngAAfW2C4U0o8pU2w7qEsivlbc5WesYQR faGf04p7uD1wYqYKDr5OGIwmKVl+iJOHsSiDRyBA01oY4N6u+KWI9sd3CJSnk2lH1EeA SSQPXw+edLNFSBWym85fHiNWFE22KUg+rUFBMXmE/Xk5ZlJXrOGLMwN3MC0abSEHrJh+ VpkIL7I5gQbfE0EjDJO8I8b4eZ3LIVbny5qiOqsmDkSS1rTiWqWvjTsHpRMTQ/+jwctF NmK97T1TpV5y6FzBfbEK+FXV/YkM+5LgfdGXRwHOpFmo6cH+V4TlVVYxGYQiFE1QwLAR CQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :message-id:date:cc:to:from:dkim-signature; bh=PzJmc0+GvzSfc2yOHqDineOYCekWt+cdUMYavoLGzI4=; b=YCyoSomEqxu5WvZ36scidmnSHSj0fP8U+TtJ/CyDRySmem35uA5SMF9guVr1SSTFjF Iek/PvCkL3+l3Xyc7eOCIr0fkn2cy4YZk0lRorLfxExswEpEU2jUqw0GkdqizXcGM1BH 2YNsE28YdjNK0lU6SicWGsLFe9r7oqgrEkK9Bh4VkBANAdbW1kLGU1MwLo8v2Z8Har9S KilDUHv0GE/njFpf8BjZYC+JtP4GdJJK7oySMtPHmmU/MWvkg6OKD3bZe4H+B5DVtU+x U0dJIlnLZLQDLla1edGPABFkvXMi/YaO5394htvw4vrl7oYhHrLIUVsA9/Qy7BAOkeac Erjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=k1Eb1jh2; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w82-20020a627b55000000b0062dbc05a323si25963774pfc.298.2023.05.01.11.03.36; Mon, 01 May 2023 11:03:49 -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=fail header.i=@hugovil.com header.s=x header.b=k1Eb1jh2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230337AbjEARvQ (ORCPT <rfc822;rbbytesnap@gmail.com> + 99 others); Mon, 1 May 2023 13:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbjEARvN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 1 May 2023 13:51:13 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D60682123; Mon, 1 May 2023 10:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To :From:Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=PzJmc0+GvzSfc2yOHqDineOYCekWt+cdUMYavoLGzI4=; b=k 1Eb1jh2wo+EWvi7LtyEun/pAGmmrMrZDOcNpDpDpeBZzYu0bCZwlCJEsEngzGn7QAggw0iWp5e7MU GB1oKq7HRqpBDCZVC6jInh+xQdowIznwmrMHI3t0f/MaIHL3vHnXlA3etZ6PB2jzJix0jjYhDx67m 9E4mr5cW1zCGzt0A=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:45966 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from <hugo@hugovil.com>) id 1ptWyS-0006Ac-Bk; Mon, 01 May 2023 13:06:05 -0400 From: Hugo Villeneuve <hugo@hugovil.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Shawn Guo <shawnguo@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> Cc: hugo@hugovil.com, Hugo Villeneuve <hvilleneuve@dimonoff.com>, Krzysztof Kozlowski <krzk@kernel.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 1 May 2023 13:05:32 -0400 Message-Id: <20230501170531.2961459-1-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v2] arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764715899056483354?= X-GMAIL-MSGID: =?utf-8?q?1764715899056483354?= |
Series |
[v2] arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay
|
|
Commit Message
Hugo Villeneuve
May 1, 2023, 5:05 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com> While testing the ethernet interface on a Variscite symphony carrier board using an imx8mn SOM with an onboard ADIN1300 PHY (EC hardware configuration), the ethernet PHY is not detected. The ADIN1300 datasheet indicate that the "Management interface active (t4)" state is reached at most 5ms after the reset signal is deasserted. The device tree in Variscite custom git repository uses the following property: phy-reset-post-delay = <20>; Add a new MDIO property 'reset-deassert-us' of 20ms to have the same delay inside the ethphy node. Adding this property fixes the problem with the PHY detection. Note that this SOM can also have an Atheros AR8033 PHY. In this case, a 1ms deassert delay is sufficient. Add a comment to that effect. Fixes: ade0176dd8a0 ("arm64: dts: imx8mn-var-som: Add Variscite VAR-SOM-MX8MN System on Module") Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> --- arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Comments
On Mon, May 01, 2023 at 01:05:32PM -0400, Hugo Villeneuve wrote: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > While testing the ethernet interface on a Variscite symphony carrier > board using an imx8mn SOM with an onboard ADIN1300 PHY (EC hardware > configuration), the ethernet PHY is not detected. > > The ADIN1300 datasheet indicate that the "Management interface > active (t4)" state is reached at most 5ms after the reset signal is > deasserted. > > The device tree in Variscite custom git repository uses the following > property: > > phy-reset-post-delay = <20>; > > Add a new MDIO property 'reset-deassert-us' of 20ms to have the same > delay inside the ethphy node. Adding this property fixes the problem > with the PHY detection. > > Note that this SOM can also have an Atheros AR8033 PHY. In this case, > a 1ms deassert delay is sufficient. Add a comment to that effect. > > Fixes: ade0176dd8a0 ("arm64: dts: imx8mn-var-som: Add Variscite > VAR-SOM-MX8MN System on Module") > > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Applied, thanks!
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi index 67072e6c77d5..cbd9d124c80d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi @@ -98,11 +98,17 @@ mdio { #address-cells = <1>; #size-cells = <0>; - ethphy: ethernet-phy@4 { + ethphy: ethernet-phy@4 { /* AR8033 or ADIN1300 */ compatible = "ethernet-phy-ieee802.3-c22"; reg = <4>; reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>; + /* + * Deassert delay: + * ADIN1300 requires 5ms. + * AR8033 requires 1ms. + */ + reset-deassert-us = <20000>; }; }; };