Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1858321rwb; Thu, 17 Nov 2022 03:09:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4c8Gx9a+PJhQap/Xz2MAkrJKJ1zQB7/rjOBqQO9c8IFPBgXZnY0qvvO9YE2O5YeL8JNu0T X-Received: by 2002:a17:902:e484:b0:188:f1ab:94f5 with SMTP id i4-20020a170902e48400b00188f1ab94f5mr1733520ple.62.1668683353041; Thu, 17 Nov 2022 03:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668683353; cv=none; d=google.com; s=arc-20160816; b=NhMjPyR2klaCK05/ipwc7BSL4RBoQDOWLt5J0dOexSgHjPVWpLL87UtULHVdWrnuT2 rVSuPHaLnNRYSwrav6ZwhzHdO8bGd/guFmo++Hw1otdvhwSI+f1tnPEKAJ1a+oh1RbVs yjtbXgugNWhGlCjP1O17dpHRWGUYoCti+K0f00Rik5A9glUyXQI7ULuB1VMNSG1vcnCw 9oMeNm3W6rFH1oKz9K5MPVEBEIpOuONQfdmk6T5siYSDyYxkcTlqiF5nkmI3JIwY81ng isZYb90U8hhFXYwoZ1UOxLpIIugweoKmuCrSW882gWxQsJ8Kap9UiJuwt8E5zaExtpXD EnTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=koV6aXgfgb6iW4REicaZlP/2ohfzUk35VWy+FexADw0=; b=V6iEU5dm0RUdoFZrimDslMulKiSJkigzKwcNmlmLpjuVMRmriEfsyx/nxPQFw0WIbZ yh8Fg6h81WbbANSofu5v3JgEG8jh7tbIev0zHDz9ONI/xaXexb4bzuwPVNx2cKx/Qeau +tSlJgdbH37s509vyKZgzyXYwKmFxbfHn7RcRs+5jZ1SihDvh/MrsA6ved1DIRTGAnbQ K1fxvFqDDO7kTqRYo3Aslvkhbxo6zy4efwSskabnvaRWuBp17Gwi1pVvWDmXsKr4V+UW sWKfMPPQDcKZIC6HPaOSYUCpS03EQd/5LGEUsytEVDn7gLFOACk3xgoF3upGF4U9Tjlb 42vQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 136-20020a63008e000000b0042b4defce13si746574pga.344.2022.11.17.03.09.00; Thu, 17 Nov 2022 03:09:13 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239559AbiKQK4q (ORCPT + 92 others); Thu, 17 Nov 2022 05:56:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbiKQK4A (ORCPT ); Thu, 17 Nov 2022 05:56:00 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B5275C759; Thu, 17 Nov 2022 02:54:19 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2CAB9D6E; Thu, 17 Nov 2022 02:54:25 -0800 (PST) Received: from [10.57.69.157] (unknown [10.57.69.157]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 257C73F73B; Thu, 17 Nov 2022 02:54:17 -0800 (PST) Message-ID: <99849c5e-5bd9-386b-99c5-fbc8c8df9656@arm.com> Date: Thu, 17 Nov 2022 10:54:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [linux-next-v2 5/5] arm64: dts: rockchip: Add missing of ethernet-phy-id to reset the phy on Rock 3A SBC Content-Language: en-GB To: Anand Moon , Peter Geis Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Chukun Pan , Michael Riesch , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221116200150.4657-1-linux.amoon@gmail.com> <20221116200150.4657-7-linux.amoon@gmail.com> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 2022-11-17 05:57, Anand Moon wrote: > Hi Peter, > > On Thu, 17 Nov 2022 at 02:16, Peter Geis wrote: >> >> On Wed, Nov 16, 2022 at 3:02 PM Anand Moon wrote: >>> >>> Add MDIO description with ethernet-phy-id compatible string >>> which enable calling reset of the phy. The PHY will then be probed, >>> independent of if it can be found on the bus or not, >>> and that probing will enable the GPIO. >>> >>> ethernet-phy-id is read from ethenet register dump reg2 and reg3. >>> >>> Fix following warning. >>> [ 12.323417] rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 >>> [ 12.324078] rk_gmac-dwmac fe010000.ethernet eth0: no phy at addr -1 >>> [ 12.324099] rk_gmac-dwmac fe010000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) >>> >>> Signed-off-by: Anand Moon >>> --- >>> V2: new to the patch series. >>> >>> alarm@rock-3a:~$ sudo ethtool -d eth0 >>> [sudo] password for alarm: >>> ST GMAC Registers >>> GMAC Registers >>> Reg0 0x08072203 >>> Reg1 0x00000000 >>> Reg2 0x00000404 >>> Reg3 0x00000000 >>> Reg4 0x00000002 >>> --- >>> arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts >>> index 9f84a23a8789..fe36156a5017 100644 >>> --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts >>> +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts >>> @@ -585,7 +585,7 @@ &i2s2_2ch { >>> >>> &mdio1 { >>> rgmii_phy1: ethernet-phy@0 { >>> - compatible = "ethernet-phy-ieee802.3-c22"; >>> + compatible = "ethernet-phy-id0000.0404", "ethernet-phy-ieee802.3-c22"; >>> reg = <0x0>; >>> pinctrl-names = "default"; >>> pinctrl-0 = <ð_phy_rst>, <ð_phy_int>; >> >> Have you tried instead moving the reset to the mdio bus? I've had >> success with this, though you'll need to change the reset assert and >> deassert timing handles, they are different for the bus. >> > No can you share some examples? > If you got a better way to solve this issue please let me know. > I will give this a try. Note that the Rock 3A schematic says the phy is configured for address 1, not 0. From what I remember of adding the MDIO node for NanoiPi4, that didn't work if I got the address wrong, despite the fact that the auto-detection when the MDIO node is omitted claimed to find the same phy on both addresses 0 and 1. Robin. > > Thanks > -Anand >>> -- >>> 2.38.1 >>> > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip