Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1442585pxk; Fri, 25 Sep 2020 15:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ02JpkXwx6pvmBZF3cfFGF78FEvjxrI9EE3VeRofvokacvZ1mmJaguTihEhC6IRl6WuCe X-Received: by 2002:aa7:d697:: with SMTP id d23mr3815802edr.13.1601072126543; Fri, 25 Sep 2020 15:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601072126; cv=none; d=google.com; s=arc-20160816; b=nGzdhuqEPrRN/jqqqab0YZlAxv/Rbv6rEYtgW7XmyNujdFUyQBObKycBKybqLgtb2u 3jtzN6j2t/rxbV11F78dcPYe6i6QdnOeWJ6d3+qCAqH6hr6a+7rj4DgweO3HseLQPCND glsXtZKib6AlBlHg796TIFrSfE4IXRrqnHLWLcg5IW8PCntndpu2+FF/21X1dsvAEtS4 2nloxaV/fp3cGUO1PFXBXVZ6L5872DLTkel5HqYxl77lFR4oAcK3wZkOAoorHOy52kWL E3kyW4LcEtJ1D/HkrsK5Pomze3uElHNn20wn81iMVgNBJs7sNE43PxWKMnLY/qhPCWhG 504A== 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; bh=yc3jEW/chfT/sBC1euUc9kPQcqqF0P0Y/ks1xQmmQdQ=; b=b+nGRqoSf8X5x2L/TsthX87lv0UPcSJGkb47e+CUvLW/iZz5TMI1+sv4vE0pdyHjZD OtP7Dymq8Na3AzKKugTTdR+UcR0Gnm5n3WZJUSbfD5t/oDwnwEviZpSVF+/3qw5UcJSc m2AnfqbTtG8fTSvG3SchrxqIvkvFPN7R1jMI/mjLQyDssa7vCM6UwLcBqXIdHk1LaYEF 76bGjVHuJQZIlS8w7YGIEbCXMeKPvfLCGBz91yXUWnZ99zA5Mx1KmGQBv5hpYa9mvIfQ /yqigEYuYoAeGNGZmyCDQmX7CK9C7Rz9NcNe2+VAaERnM7eI34Xd3qBT81FCtRzV6DgG hoWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd25si2756730ejb.177.2020.09.25.15.15.03; Fri, 25 Sep 2020 15:15:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727286AbgIYWOL (ORCPT + 99 others); Fri, 25 Sep 2020 18:14:11 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56110 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbgIYWOK (ORCPT ); Fri, 25 Sep 2020 18:14:10 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kLvyd-00GDLd-Vn; Sat, 26 Sep 2020 00:14:03 +0200 Date: Sat, 26 Sep 2020 00:14:03 +0200 From: Andrew Lunn To: Martin Blumenstingl Cc: netdev@vger.kernel.org, linux-amlogic@lists.infradead.org, alexandre.torgue@st.com, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, joabreu@synopsys.com, kuba@kernel.org, peppe.cavallaro@st.com, davem@davemloft.net, linux-arm-kernel@lists.infradead.org Subject: Re: RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b Message-ID: <20200925221403.GE3856392@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 11:47:18PM +0200, Martin Blumenstingl wrote: > Hello, > > Amlogic's 12nm SoC generation requires some RGMII timing calibration > within the Ethernet controller glue registers. > This calibration is only needed for the RGMII modes, not for the > (internal) RMII PHY. > With "incorrect" calibration settings Ethernet speeds up to 100Mbit/s > will still work fine, but no data is flowing on 1Gbit/s connections > (similar to when RX or TX delay settings are incorrect). Hi Martin Is this trying to detect the correct RGMII interface mode: PHY_INTERFACE_MODE_RGMII, PHY_INTERFACE_MODE_RGMII_ID, PHY_INTERFACE_MODE_RGMII_RXID, PHY_INTERFACE_MODE_RGMII_TXID, In general, we recommend the MAC does not insert any delay, we leave it up to the PHY. In DT, you then set the correct phy-mode value, which gets passed to the PHY when the MAC calls the connect function. Is there any documentation as to what the calibration values mean? I would just hard code it to whatever means 0uS delay, and be done. The only time the MAC needs to add delays is when the PHY is not capable of doing it, and generally, they all are. Andrew