Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9404459rwl; Wed, 11 Jan 2023 05:25:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXsWXEu6L9iSqRZ5/42m6m7VRJbehVXlSEEqVboFzonMCWeF/bcoqDUTMiI/Ij3xUFCSOsTd X-Received: by 2002:a05:6a00:18a3:b0:582:197e:f6c1 with SMTP id x35-20020a056a0018a300b00582197ef6c1mr58588352pfh.4.1673443532756; Wed, 11 Jan 2023 05:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673443532; cv=none; d=google.com; s=arc-20160816; b=dhjYi/S4QeZgWHOET9GQyuislNAwXrtKNuwxPLdnnxj2V0hjITexaPeOSNIAjQnAAW l+4zK+SnC/a6EoNEYOv7PXAOY4HvTRgNZCILf1yJbYFoYdYyRjKjYCkGFIkKgpAgvf4a v+efL97qlNita+jp35OBxXGqYeVY044+spWlcA1r0QNTQ/XyLhhqjimiARzeM0kb7Xea g88lTxiIxKXn/LpMfhC8a1qf5A7+1TlSICAeI21vrfkfSaFxzLXUI8yb2ww5my2vVIiE WRX6J/lsjoEmNqO0lmmok5dLS/JWLZMhZWTuqeBtIHOatQ7BoBLSSi5lxjz2/6Wdh8wc vb1g== 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=UXiBWiMARtUARLuVCb/C2RAQABw9gUr7NLniBV1MKfk=; b=ah+xX3y+vHnx9RqyLbD47fV+O4srnI/UE5+eI2i2ZM6a0ElGIYR+DUbhIqZdg9gvQp oy8KZJ6juhL9enJEzKMQi8xKwLk+rKvaeWmq0j78fM2DlMjwfctyDb2QusGlGzAlJ+lN cHLYqpOR4CkgGtRh2kgCd00XAy/2Mhjk9G/N2r3jfvdgqKMneBoAUXwiKRe3XGNkzXdu jVGm1BFDA4Y5EyXGWE0ZBOjkMlv+ElwtCC/Jsmi92zFSggis1tb8kxx7LmPwPmOYDWgz 8ta2+5xjsKmyY2UVlsZHuutgCZ/BEp39iK+swh8rugky1JZFJtpiiPJWnWsGJXxnigtx mtbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=v9Jqcagt; 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 e10-20020a056a001a8a00b0056aafb43783si15356222pfv.155.2023.01.11.05.25.26; Wed, 11 Jan 2023 05:25:32 -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=v9Jqcagt; 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 S230055AbjAKNHy (ORCPT + 53 others); Wed, 11 Jan 2023 08:07:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjAKNHw (ORCPT ); Wed, 11 Jan 2023 08:07:52 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE1921A; Wed, 11 Jan 2023 05:07:51 -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=UXiBWiMARtUARLuVCb/C2RAQABw9gUr7NLniBV1MKfk=; b=v9Jqcagt5k7zvlgVRWSVVLCYJ9 hMkvfw1OzI8T39q5Dat2q4A27PoXAQk+IbDHCGNspW80gZSS9jFNPfWnzvk9LRXPUjeB55cDeMhUY yjp3auB60Y3lJytugTAXmY1sEHuzlQBAfubNMJqFruBNcWp6bYWCTL6jY50SN/VO4jD4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pFapH-001mEh-DM; Wed, 11 Jan 2023 14:07:31 +0100 Date: Wed, 11 Jan 2023 14:07:31 +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 , 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 v1 1/3] dt-bindings: net: Add Motorcomm yt8xxx ethernet phy Driver bindings Message-ID: References: <20230105073024.8390-1-Frank.Sae@motor-comm.com> <20230105073024.8390-2-Frank.Sae@motor-comm.com> <83fd7a69-7e6a-ab93-b05a-4eba8af4d245@motor-comm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83fd7a69-7e6a-ab93-b05a-4eba8af4d245@motor-comm.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 > RX delay = rx-delay-basic (0ns or 1.9ns) + x-delay-additional-ps > (N*150ps, N = 0 ~ 15) > If rx-delay-basic is removed and controlled by phy-mode. > when phy-mode is rgmii-id or rgmii-rxid, RX delay is 1.9ns + N*150ps. > But sometimes 1.9ns is still too big, we just need 0ns + N*150ps. > > For this case, can we do like following ? > rx-internal-delay-ps: > 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: 0 > rx-internal-delay-ps is 0ns + N*150ps and 1.9ns + N*150ps. > And check whether need rx-delay-basic (1.9ns) by the val of > rx-internal-delay-ps? Nothing says delays are only positive. So you could have rgmii-id or rgmii-rxid and a rx-internal-delay-ps of -150, if you need less than 1.9ns. As i said, rx-internal-delay-ps is used to fine tune the delay. > We can't reduce this down to tx-clk-inverted. > There are two mac and two yt8531 on their board. Each of yt8531 need > different config in DTS. They need adjust tx clk delay in > link_change_notify callback function according to current speed. > > They configured tx-clk-xxxx-inverted like this : > > speed GMAC0 GMAC1 > 1000M 1 0 tx-clk-1000-inverted > 100M 1 1 tx-clk-100-inverted > 10M 0/1 0/1 tx-clk-10-inverted What MAC is this? It seems very oddly designed, getting close to broken. I've not seen any other MAC/PHY combination need anything like this. > Can we put tx-clk-adj-enabled, tx-clk-10-inverted, tx-clk-100-inverted > and tx-clk-1000-inverted in tx-clk-10-inverted like bit in byte? No, they are individual boolean properties, so should be kept as they are. But i really think somebody should be looking deep into the MAC design to understand why it is like this, and if the MAC can sort out this mess itself. Andrew