Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp585884rwd; Thu, 25 May 2023 00:36:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MkthaMS2R1TFdLwsL/ZjxTiXFQwIT5cnnEld1vmIFSC/f+OWTwSrskxpyksQzt8ZUhoQi X-Received: by 2002:a17:903:32c6:b0:1af:cbb1:845 with SMTP id i6-20020a17090332c600b001afcbb10845mr830273plr.16.1685000201741; Thu, 25 May 2023 00:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685000201; cv=none; d=google.com; s=arc-20160816; b=Cy7gzpgXSPVI4/J1x3W7LuhkR0OiEAzNOGjIF2mQ+9NJrgFvAwSbm6YVUHa9SC1qhn UTZwt4R+6pI2NzJGiXVd8x5okULf9Vp9IJjtb5IymQ9jym/60nYalSBmBR4inqM0NxJq D0y7fhoiwVQYoaunxTun1YLhK+UdsabzXxTTSFT28JjiKhSAigXVR7FZYtDoGVteUlj+ EK3j/CqyH0vL5gOW+OabGlqZoHcgULwaSDgMY8/q9FG45Jq7wOj+iCSTOjp+pdt7UKlS zC8k4r74sdAkS1l/vKrFRvyLrxisEwbUKZcstVfh5bQsrDMjR2NTOPpvwMXD/VFeDvHc gXhA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VSOLy5MqjA2rcEf/CbybPxozTK7Lkg9r9DSIeOzFzzA=; b=ibTcUrL7l29g7ltXTWTRPsHPel6Y6cgdn8QOJ18YVuHpb1q2iPFRyo8iv3Nt0GDBkv 1dQirL/wWQuTsftYCg+/Zq/gBznejkoL7aK0CbYIKZlYj96AcF2mYSAyLvd5c82mB6Yy U4dmLFS4VwlbxKvwidh249MeAtI7vpFQ194Ouql/edgmIztUvygQSA7CfIrUS2aCd+Tq otuJFEeuYVk6U7b1JtCIRslArtc8/Xajx/RBtClPfFKiXRtWTzUoYHC/0XpSFabr/V7v 4eVREzIb7CYxKc4ZXtMQzwBpASeVYlTY7xq6VXu6QO+uVwRWfHu2bJLN75fFOF8BxX/4 369A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020a170902821500b001a97e24eb34si854287pln.201.2023.05.25.00.36.24; Thu, 25 May 2023 00:36:41 -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; 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 S233058AbjEYHds (ORCPT + 99 others); Thu, 25 May 2023 03:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbjEYHdp (ORCPT ); Thu, 25 May 2023 03:33:45 -0400 Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96AA4183; Thu, 25 May 2023 00:33:40 -0700 (PDT) Received: from francesco-nb.int.toradex.com (31-10-206-125.static.upc.ch [31.10.206.125]) by mail11.truemail.it (Postfix) with ESMTPA id 6314720B20; Thu, 25 May 2023 09:33:36 +0200 (CEST) Date: Thu, 25 May 2023 09:33:31 +0200 From: Francesco Dolcini To: Johannes Pointner Cc: Francesco Dolcini , Bagas Sanjaya , Andrew Lunn , Praneeth Bajjuri , Heiner Kallweit , Russell King , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Grygorii Strashko , Dan Murphy Subject: Re: DP83867 ethernet PHY regression Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 Hello Johannes, On Thu, May 25, 2023 at 08:31:00AM +0200, Johannes Pointner wrote: > On Wed, May 24, 2023 at 3:22 PM Bagas Sanjaya wrote: > > > > On Mon, May 22, 2023 at 04:58:46PM +0200, Francesco Dolcini wrote: > > > Hello all, > > > commit da9ef50f545f ("net: phy: dp83867: perform soft reset and retain > > > established link") introduces a regression on my TI AM62 based board. > > > > > > I have a working DTS with Linux TI 5.10 downstream kernel branch, while > > > testing the DTS with v6.4-rc in preparation of sending it to the mailing > > > list I noticed that ethernet is working only on a cold poweron. > > > > > > With da9ef50f545f reverted it always works. > > > > > > Here the DTS snippet for reference: > > > > > > &cpsw_port1 { > > > phy-handle = <&cpsw3g_phy0>; > > > phy-mode = "rgmii-rxid"; > > > }; > > > > > > &cpsw3g_mdio { > > > assigned-clocks = <&k3_clks 157 20>; > > > assigned-clock-parents = <&k3_clks 157 22>; > > > assigned-clock-rates = <25000000>; > > > > > > cpsw3g_phy0: ethernet-phy@0 { > > > compatible = "ethernet-phy-id2000.a231"; > > > reg = <0>; > > > interrupt-parent = <&main_gpio0>; > > > interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > > > reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_LOW>; > > > reset-assert-us = <10>; > > > reset-deassert-us = <1000>; > > > ti,fifo-depth = ; > > > ti,rx-internal-delay = ; > > > }; > > > }; > > > > > > > Thanks for the regression report. I'm adding it to regzbot: > > > > #regzbot ^introduced: da9ef50f545f86 > > #regzbot title: TI AM62 DTS regression due to dp83867 soft reset > > Hello Francesco, > > I had a similar issue with a patch like this, but in my case it was the DP83822. > https://lore.kernel.org/netdev/CAHvQdo2yzJC89K74c_CZFjPydDQ5i22w36XPR5tKVv_W8a2vcg@mail.gmail.com/ > I also raised the question for the commit da9ef50f545f. > https://lore.kernel.org/lkml/CAHvQdo1U_L=pETmTJXjdzO+k7vNTxMyujn99Y3Ot9xAyQu=atQ@mail.gmail.com/ > > The problem was/is for me that the phy gets the clock from the CPU and > the phy is already initialized in the u-boot. > During the Linux kernel boot up there is a short amount of time where > no clock is delivered to the phy. > The phy didn't like this and was most of the time not usable anymore. > The only thing that brought the phy/link back was resetting the phy > using the phytool. I had a look and it seems that is a different issue here, but I cannot exclude that this is related. First the link up/down, negotiation and mdio and related communication is perfectly fine, what it looks like is not working is that no data is flowing over RGMII. Second, also in our case the clock is coming from the SoC, however this clock is enabled way earlier in the boot, and at that time the phy is even in reset. phy reset asserted . SPL on TI AM62 R5 . enable clock . SPL on TI AM62 A . U-Boot proper on TI AM62 A .release phy reset The phy reset is also configured in the DTS and used by the Linux driver. In addition to that, as I already clarified in my second email, the issue is happening also on a cold poweron. It happens most of the time, but not always. Francesco