Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2071499rwl; Mon, 26 Dec 2022 08:28:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXs5vtlH7lIZyqP4bK8QFMnTXdyUmUYF7dHnNs/ZcvEkRYafJ5/7+gv5rzvsfzUcCm0YxC5J X-Received: by 2002:a17:906:280d:b0:7c1:2a0f:55b1 with SMTP id r13-20020a170906280d00b007c12a0f55b1mr16782977ejc.14.1672072087775; Mon, 26 Dec 2022 08:28:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672072087; cv=none; d=google.com; s=arc-20160816; b=Di6q3L5JJLwIeK+rVSLvZdrLv+lzRRVpVEKXgLuMpOy2MKrm7Xh4zrIvbx1UVhHrCx dOGPE7n53iRvKszIDsU1SB63aYieBip4zKMMsz8B2AfUEQFWcJSAMoQyO58GrMLfiWct 6sGj2KQI8/BTvfjkqc1Dwc4vtzTerFvn/c/wkvoYAr9IH9QvP+JMPVnqTQyxN62xhDvI jM28lklLaPB5TvyMEORjOy9O6MJ8n41QZPRs4jB4UcSfiMDnHPaZ+yJbkl76AvWnAPKd AumeEEhsxnBtFCftrEKDzj6d0FnB5zYN1F1bPYtO/mYp/3wBXEkDb/zl6tQmp3NYqyWR 0zmg== 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=CJ0s4RC8ixikC2btIIdHDJkIJhgIxIMo2x6A5xpALMk=; b=tK96qXKqE/sTbmNLDH+tq5/OEh0Jx2FvF6y8Vg+LeoGGQhyOaGOkYjIkVUtJ/NII9h BpTFYqZ9ioMicnFtjMqM+ebjRJJStEz366s0BI3NeirtFGG4fVAtCVdh1cIPGlISksyu SG0SWu1gAQ5Fv4SbqwmzJpyVmPMtf4Y/YD4Vx2PxG06r8qHEYpAlcYLvcsvnm0m1g+d8 V84vvn4+rdTkGTT1lCS2bFuYfX5Jjuvls221BwgmpOD6QLLONrFf9bliObLo676ePn84 5hhoj4d+uoqpbZdrYcr19z6wReGEQwG9OYGTvpy5yo0lrIptYVJK6Zrxf1DI/gK3zDQQ Kl7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=5Y2X3l4a; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb20-20020a170907161400b007ae76a4e35fsi9625469ejc.5.2022.12.26.08.27.52; Mon, 26 Dec 2022 08:28:07 -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=@lunn.ch header.s=20171124 header.b=5Y2X3l4a; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiLZPTj (ORCPT + 66 others); Mon, 26 Dec 2022 10:19:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbiLZPTd (ORCPT ); Mon, 26 Dec 2022 10:19:33 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A251260ED; Mon, 26 Dec 2022 07:19:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=CJ0s4RC8ixikC2btIIdHDJkIJhgIxIMo2x6A5xpALMk=; b=5Y2X3l4ayBSYhKB92xci3QHhza 3+rZitQO+VAVq7GdeQsfaKzvkXLi3YAd5W/LiKV+lsp1KUfeDV6auyENA1c0Dn9bJ3HvJHZsNevHg Gedc5W2EBEAPzoAp15tYOHjSOeFhzkiTzreplDFmPnrLOA8oLtfIpitn+TeH3i8UnUCM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p9pG4-000VyF-Uc; Mon, 26 Dec 2022 16:19:20 +0100 Date: Mon, 26 Dec 2022 16:19:20 +0100 From: Andrew Lunn To: Biao Huang =?utf-8?B?KOm7hOW9qik=?= Cc: "linux-mediatek@lists.infradead.org" , "robh+dt@kernel.org" , "linux-kernel@vger.kernel.org" , "peppe.cavallaro@st.com" , "joabreu@synopsys.com" , "devicetree@vger.kernel.org" , "kuba@kernel.org" , "edumazet@google.com" , "alexandre.torgue@foss.st.com" , "mcoquelin.stm32@gmail.com" , "pabeni@redhat.com" , "richardcochran@gmail.com" , "krzysztof.kozlowski+dt@linaro.org" , Macpaul Lin =?utf-8?B?KOael+aZuuaWjCk=?= , "matthias.bgg@gmail.com" , "davem@davemloft.net" , "linux-arm-kernel@lists.infradead.org" , "angelogioacchino.delregno@collabora.com" Subject: Re: [PATCH v5 1/2] stmmac: dwmac-mediatek: enable 2ns delay only for special cases Message-ID: References: <20221223015029.24978-1-biao.huang@mediatek.com> <20221223015029.24978-2-biao.huang@mediatek.com> <4a82aa5437e496e2b65b77ef08d7897a4b23f7e5.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a82aa5437e496e2b65b77ef08d7897a4b23f7e5.camel@mediatek.com> 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 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 > We don't want to restrict phy-mode to rgmii-id only, so I don't think > we need mask RXID bit, then, User can use rgmii-rxid/-txid/-id as their > will. The phy-mode is a property of the board. It describes what delays are required, in addition to what the board itself provides via extra long lines. As such, there is no choice, it is set by physics. How you implement those delays is then up to the MAC and PHY. 95% of all MAC drivers simply pass phy-mode to the PHY and let the PHY add the delays. The Renesas MAC driver is one of the exceptions, it often adds the delays, and then passes a different phy-mode to the PHY in order that there are not double delays. So you can be different to everybody else, have MAC do one delay, and the PHY do the other. Just be aware that nobody else does this, no DT developers will expect it, etc. Or you can just do what everybody else does and let the PHY add the delays. What some MACs do is implement rx-internal-delay-ps and tx-internal-delay-ps These allow fine tuning of the delays. These are expected to be small values, adding 10s or 100s of pico seconds. They are not expected to be 2000ps. Andrew