Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1020909rwb; Wed, 16 Nov 2022 10:47:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fBvzd9jeEeIP7MHj2OC2eJi/O7kGGfiI5ekMFvRmJ9aMoQqsuTV9K53d4Ej0zyYLs3pFw X-Received: by 2002:a17:906:c251:b0:7ae:1874:3e09 with SMTP id bl17-20020a170906c25100b007ae18743e09mr17869583ejb.534.1668624455194; Wed, 16 Nov 2022 10:47:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668624455; cv=none; d=google.com; s=arc-20160816; b=wdO1zMzb2gmyebZkGHHbtdP7SIZV+8HBA76jpekKOmlN3YsTfaO6pS5vyTbnV2SS7v VvqB4T4YqgbgMkZUqc754tqEklWM4loTaf5C4n6Iaauw9hNquaYAVeqCUzt0ajMoPkJW Ihc3Trx7nt29N+Fg1sWWFaSjSLO7PGJKxxlfvyUaFDgwWwSbE6pDJRHgNV9cv7xpBjd6 3u/uXOUyNhDdFfGyKrpNN0qJ/h6Z9xd7QUOd16cIjLC2h1SgBdgo/2TWgQ6mb0l22KXj SAgE+oP4XoXEzBR6FarvtfTPx6+K6pCvI6VW43Oj7RP0MH9RK9K5/nYk//Eivia6wr4s Y2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AD20eKHS2F7b47L1iqXnzg2RFxJr+L65BkbTitr0Fkw=; b=B5hLd6Q6p1yoKt0TLM/drTsNuJLTqTnBcNzkmxVyS0lVgHfzaZXLZTttTtTXvvmkaC 7WK6OBX6XZjm6Vn5pMytLdPw1e7jbF50LFZsyKr5Nl52SMVv77cckJWNHyiG+Za2KiIv XrRowMx18y8zOqyoTTTDh9kd2UsbXwdbx4ktHqLfMrYI1zW0OjMkzq6tB37rlRdRqqDx r+h+pPL3sVSwxHpU29EMJz5oSurSNbYDS/8JkuQlQ9tGdesPVMVlHE3PyuVOOTt4MrCG 9F1G8Q1IST4arryBS2wgspNPUpimtnPzvx2XfCtO+KyXce3HNcGbvyJ274092TbtdB/4 UvwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KsQmzCIE; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a1709060f4300b0078c2c22d6cesi10839509ejj.70.2022.11.16.10.47.12; Wed, 16 Nov 2022 10:47:35 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KsQmzCIE; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234496AbiKPSMM (ORCPT + 90 others); Wed, 16 Nov 2022 13:12:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234274AbiKPSMJ (ORCPT ); Wed, 16 Nov 2022 13:12:09 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592535F866; Wed, 16 Nov 2022 10:12:07 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id m22so46059285eji.10; Wed, 16 Nov 2022 10:12:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AD20eKHS2F7b47L1iqXnzg2RFxJr+L65BkbTitr0Fkw=; b=KsQmzCIEK8MWYSZTbZxubjO5yaIJHrJBkyWJjXX+NzrcA/Cxe6PbrIFt700NTGZPnd ZcX/fvjGZNEkYHOPgCGgmnKhw087XVIwjXczacKiEC9vpWlwWoSJcrEwZMLUDbY0gl+e N7jBKQhds/7lnbpqN546ppBSdhoIWLM3YqLRiwRvAHb/wbUEYUsBHhqhsNFs9ABBCYSx ECfajeHvXWRkccS3Y8WdZ47uottVZTqZIX+PmkObmGWY4nQv2mo5sR480CWpTwMks47q dEhkHIoHGbTF9/cwmheQLmDZsP2oyeh8E5Wc0N9yrEXJyRbehxvlEng9mmSrk09OcJXN 3pdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AD20eKHS2F7b47L1iqXnzg2RFxJr+L65BkbTitr0Fkw=; b=mywPLUCwSyWXLKL1C6AQ+MB6DBaNAXj0j0LGXqTVZIyboMD39S1afj1pW8BCZBRDJH K/BIck3DGlhKOL/hrizezAtskmHYR/sjc0cfvHNvOTZVZIqCgtJ6EYrgFEhLQvfuJQzi TFjL/jGJgfHN66cTS6LWB4tSFBISFqtNgeoMEo8Lo8fnrVM/O5354KP3D5/YOGqxgdQU p93hjbGbbvNBBM8+Q+5MGLyU0JYJpa0VJf0lN4yPiyY4xbUDAXdAC37EeRbYZDncGjDd N1hczKTj674XBZWEFTmxP/2ymafkfdNNZeZPWlRcK8mbZ7YY7McX002rac24X4Yb+7ha G1hw== X-Gm-Message-State: ANoB5pm2MSpzcBsjXj+8hqaD97Z6JnZyeXawV5D8dhkByHuV9RI1Mqu9 iJwG4AM/oS4oc1cP/EOsofXwa2BHdo+xYsnsh8U= X-Received: by 2002:a17:906:b103:b0:7ad:c3b6:fe89 with SMTP id u3-20020a170906b10300b007adc3b6fe89mr17520031ejy.697.1668622325824; Wed, 16 Nov 2022 10:12:05 -0800 (PST) MIME-Version: 1.0 References: <20221111094238.1640-1-linux.amoon@gmail.com> <20221111094238.1640-3-linux.amoon@gmail.com> In-Reply-To: From: Anand Moon Date: Wed, 16 Nov 2022 23:41:49 +0530 Message-ID: Subject: Re: [linux-next-v1 3/3] arm64: dts: rockchip: Fix ethernet reset node Rock 3A sbc To: 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Hi Peter / Michael On Fri, 11 Nov 2022 at 18:32, Peter Geis wrote: > > On Fri, Nov 11, 2022 at 4:44 AM Anand Moon wrote: > > > > Add support for snps,reset-gpio reset ethernet gpio pins and > > drop the mdio reset code. > > Nack, the snps,reset-gpio is depreciated in favor of the mdio-reset > code. See [0]. > Ok coming to the ethernet reset controller with gpio-reset with MDIO. I got this working by adding ethernet-phy-id to MDIO. > > > > Signed-off-by: Anand Moon > > --- > > .../boot/dts/rockchip/rk3568-rock-3a.dts | 19 ++++++++----------- > > 1 file changed, 8 insertions(+), 11 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts > > index 16fff1ada195..9172cf60b867 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts > > +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts > > @@ -258,6 +258,11 @@ &gmac1 { > > assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; > > assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>; > > clock_in_out = "input"; > > + snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; > > + snps,reset-active-low; > > + /* Reset time is 20ms, 100ms for rtl8211f */ > > + snps,reset-delays-us = <0 20000 100000>; > > + phy-supply = <&vcc_3v3>; > > The phy supply shouldn't be part of this patch. > Ok will add this in a separate patch. > > phy-handle = <&rgmii_phy1>; > > phy-mode = "rgmii"; > > pinctrl-names = "default"; > > @@ -267,6 +272,9 @@ &gmac1m1_rx_bus2 > > &gmac1m1_rgmii_clk > > &gmac1m1_clkinout > > &gmac1m1_rgmii_bus>; > > + > > + tx_delay = <0x4f>; > > + rx_delay = <0x26>; > > Delays should move to your rgmii patch. Have you tested these to > ensure they are in the middle of the functional range for this board? Ok but this delay is different from the actual requirements see below. rx-internal-delay-ps and tx-internal-delay-ps [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet-controller.yaml?h=v6.1-rc5#n222 tx_delay and rx_dealy are used by rockchip binding. > > > status = "okay"; > > }; > > > > @@ -583,11 +591,6 @@ &mdio1 { > > rgmii_phy1: ethernet-phy@0 { > > compatible = "ethernet-phy-ieee802.3-c22"; > > reg = <0x0>; > > - pinctrl-names = "default"; > > - pinctrl-0 = <ð_phy_rst>; > > - reset-assert-us = <20000>; > > - reset-deassert-us = <100000>; > > - reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; > > }; > > }; > > > > @@ -625,12 +628,6 @@ vcc_mipi_en: vcc_mipi_en { > > }; > > }; > > > > - ethernet { > > - eth_phy_rst: eth_phy_rst { > > - rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; > > - }; > > - }; > > - > > hym8563 { > > hym8563_int: hym8563-int { > > rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; > > -- > > 2.38.1 > > > [0] https://elixir.bootlin.com/linux/v6.1-rc4/source/Documentation/devicetree/bindings/net/snps,dwmac.yaml#L222 > > Thanks -Anand > > _______________________________________________ > > Linux-rockchip mailing list > > Linux-rockchip@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-rockchip