Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4461720pxj; Wed, 12 May 2021 06:16:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3jafQS+AbSQsw6jp1aK2vj+Uj5eyUbRq3eNRerRKFtqEeiGHu8DVeqI6pCRPPI2VhboLO X-Received: by 2002:a05:6402:4392:: with SMTP id o18mr3679381edc.58.1620825363958; Wed, 12 May 2021 06:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620825363; cv=none; d=google.com; s=arc-20160816; b=I+oNl9KhDD348s5vy5I00pY8V9ychwPEhto/Dq3Ntuj3Xlsrei9zH00RLsUoB8lz7Q Dqyk9iPDlFhSMzYm9swjEbPwsQLCbJAnt2GreoFubB6T1Z3h+lT12Zr/y/Vl9gG5GGcg q9DFq/zGyLsKy3Oum0VGjq6cor/Ba1DaUDh57vW7io4HC0QjS429PdlZjUacisde8W7Q b52I4BUWlN+taBRrAMplqGXc0yT8Ubs8fGV0MqM1WWrjd2IY8dIYIVyhbqMkt2MkLctV Qq5NcoDAB2CAq/vo59oRV24ooWzLjxVix5GAiJBF5fMv4Zmk5qa11R/lE6EuSAmfvmF/ 2udg== 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=OJJr8CZTbZhq52U3R30ulRa0ODzw83ZeiqAf+DqB3O0=; b=JHbMPJ+vgQ4akRzVyEDAY0jEfpyD0Mx5eZDDJyWW1Qi9mJiU2QqA7UXmDOVcfX+7hj iajLyISyEKJgcCG/EK2iZVbMkxOx4jAwSKeueNnvv5lfuyCfETtpbCuBgxRLkrWWKXfb XtCRi8mnJLfVq/JRpiZYvsOJTk/f38J4TnsurXhPm6Qb+wjHtmonrjJEkK3MQUHQGvjv YRtPVMX+FjITwV4ia1MZsV7S0UWEKg2gM8FXYaWoJI97gW1gVTi/qeg4PKpZ0DvswB/S UJ2MhLj3RkamITG/8o4TwdNw6+LCHu3fRxECYhGplvtgj26lkLYBAj3mcYwzAJQKUEGh xmpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=pacQotNK; 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 g18si11272774ejb.311.2021.05.12.06.15.39; Wed, 12 May 2021 06:16:03 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=pacQotNK; 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 S232867AbhELMjn (ORCPT + 99 others); Wed, 12 May 2021 08:39:43 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:36870 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232856AbhELMjm (ORCPT ); Wed, 12 May 2021 08:39:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=OJJr8CZTbZhq52U3R30ulRa0ODzw83ZeiqAf+DqB3O0=; b=pacQotNKRZo+ykt5hJEFh1OaoN GBg7Cp2d0smTSvP5G8drNk4rVT5ZLyKMmExcrltDv/1Zr3Clt/HPshs4fG6paFM1OdlWG/d4bEMiE 4cTXPN0A1vgNikU5CbHSmFwFsgFMKCLFh2iowTpzEsvJJ2ocGsCNY9xIFu88OxqlG094=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lgo89-003uFc-Dt; Wed, 12 May 2021 14:38:25 +0200 Date: Wed, 12 May 2021 14:38:25 +0200 From: Andrew Lunn To: Peter Geis Cc: Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Linux Kernel Mailing List , Linux Kernel Network Developers , "open list:ARM/Rockchip SoC..." Subject: Re: [PATCH v2] net: phy: add driver for Motorcomm yt8511 phy Message-ID: References: <20210511225913.2951922-1-pgwipeout@gmail.com> 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 Hi Peter > A lot of items should be set up via the device tree, though it seems > this is a relatively unused concept in the net phy subsystem. Very little should be set up via device tree, since it does not describe the hardware. The interface mode does describe the hardware, so that is expected to be in DT, but not too much else. > > Do you know which one of the four RGMII modes your setup needs? Is the > > PHY adding the Rx and Tx delays? So "rgmii-id"? > > By default it implements a 500ps delay internally on the txd clock and > a 1.2 ns delay on the rx clock. > The controller is the snps,dwmac-4.20a, and it implements a default > delay as well. O.K, that is confusing. We generally recommend that the MAC does not add delays, the PHY does it. So maybe you can implement "rgmii-id" in the PHY, and return -EOPNOTSUP for the other three RGMII modes, as a minimum. However dwmac is one of the oddball drivers which does sometime add the delays, and always sets the PHY to "rgmii" so it does not add delays. Either way, is O.K, but please avoid having some of the delay on one side, and the rest on the other. Andrew