Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DB68C636CC for ; Tue, 31 Jan 2023 13:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbjAaNmg (ORCPT ); Tue, 31 Jan 2023 08:42:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232370AbjAaNmT (ORCPT ); Tue, 31 Jan 2023 08:42:19 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 424294FCF5; Tue, 31 Jan 2023 05:42:17 -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=AfBzRuz0UO/lUfWWNyrD9Yc4wL4xaRinOB2IvcHpEDs=; b=O9bGmi/+mp0J/VyC2TzmwkX7W/ 469MlqHn/bSRsOWbqD+6kdLCyW5F8nTiTtzuQRyl8D8aGe1zBqJf6hOuq2cn6W5H3kb+UpHS/nfUw NtGXszdEdZ8zO8wMoVxYD4V6WshdW1jJFV+plKjJvXDhNvRx8YNritsxxTWGk5oUl/2Y=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pMqtc-003hAG-3z; Tue, 31 Jan 2023 14:42:00 +0100 Date: Tue, 31 Jan 2023 14:42:00 +0100 From: Andrew Lunn To: "Frank.Sae" Cc: Peter Geis , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , yanhong.wang@starfivetech.com, xiaogang.fan@motor-comm.com, fei.zhang@motor-comm.com, hua.sun@motor-comm.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next v3 1/5] dt-bindings: net: Add Motorcomm yt8xxx ethernet phy Message-ID: References: <20230130063539.3700-1-Frank.Sae@motor-comm.com> <20230130063539.3700-2-Frank.Sae@motor-comm.com> <18446b51-6428-d8c8-7f59-6a3b9845d2c4@motor-comm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18446b51-6428-d8c8-7f59-6a3b9845d2c4@motor-comm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >> +properties: > >> + rx-internal-delay-ps: > >> + description: | > >> + RGMII RX Clock Delay used only when PHY operates in RGMII mode with > >> + internal delay (phy-mode is 'rgmii-id' or 'rgmii-rxid') in pico-seconds. > >> + enum: [ 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500, 1650, > >> + 1800, 1900, 1950, 2050, 2100, 2200, 2250, 2350, 2500, 2650, 2800, > >> + 2950, 3100, 3250, 3400, 3550, 3700, 3850, 4000, 4150 ] > >> + default: 1950 > > > > Ah! There has been a misunderstand. Yes, this changes does make sense, but > > >> + > >> + tx-internal-delay-ps: > >> + description: | > >> + RGMII TX Clock Delay used only when PHY operates in RGMII mode with > >> + internal delay (phy-mode is 'rgmii-id' or 'rgmii-txid') in pico-seconds. > >> + enum: [ 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500, 1650, 1800, > >> + 1950, 2100, 2250 ] > >> + default: 150 > > > > ... i was actually trying to say this 150 is odd. Why is this not > > 1950? > > Tx-delay is usually adjusted by the mac (~ 2ns). > So here is only fine-turn for the tx-delay. In general, in Linux, this is not true. The PHY inserts both delays. Yes, you can have the MAC insert the delay, but it then means the MAC needs to modify phy-mode to indicate it has inserted the delay, changing rgmii-id to rmgmii-rxid when it calls phy_connect_*(). And few MAC drivers get this correct. So i would avoid this. Default to 1950. And if there is a device which needs a fine tune, it can use 2100, or 2250 in its DTS file. Andrew