Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1286065pxb; Wed, 20 Oct 2021 01:55:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4k027zPURYN+H4wIV65N+tc743z/AgBQ4U7dhjEMqyQi3p8AEGh5NUajR5cWyTnxymW4V X-Received: by 2002:a63:6a05:: with SMTP id f5mr31965607pgc.398.1634720116700; Wed, 20 Oct 2021 01:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634720116; cv=none; d=google.com; s=arc-20160816; b=DY7gNgwiFizTD3hAGgLL4/R3Rxt8tQXDZqwcnTtMEXvRu2r/0GkM6Xd+o58KhuP2as 9POvwtKNL5NEaOXjtvR1oxIePzhjHJAWfoI4S3OhJHw/EUiW4JKChL8+SBudUq8puVLq LGwJldDrpUS0WYxMcO6WzZ46mGL3QSVTF7BvTSRj+bWBClxJbKrzxhS0wTLSvodnuaRP gQ7QuWuDTpHhY9RpXr6Rp8NCr2NufNUieOf+8a22FFrsnR/CyWj5Ec5qVO5cV6o6Tres +VyijJd4VHHjDpAtxZMGNOQTG1wJRdkO4xX2NXtS+RKCsAhRqJXox94Yo39VBntDfSQX fvKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=VAq62En+T+IewWUUrgImU4OLi6wKNQ4dwple83/KN4c=; b=gXSig3LxyI1sxkoMR/iPeVBy6+GPCcwID1t1V0PA1+kvAGb+rALXTcjPM+jueZkLoj bywkGvJ2750yRhi1MAdZNB7glDu1RVPZHE948CJ3LYkaJ2hta5LNQeOQ8+4dheMz1D8b fNG7C7GF78QXM44OWALFx1FR5PI/vfHmt4Comu3Ju2HXCN3IFKzwma7aXGZVCqWZ4/tZ eigJnHnpeU6tMiJqETkFTgy3szkrZeFKxj01w46kZbaqiP3GdbIDdp/43OxBFHDAZpzb G/5dBbKPLihYvHf56IRcLhRjreYJPnl+RspV+c+EDOyWfgvDOLcixcWw9f2/j9auPN/7 bhLQ== 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 140si2102584pfy.240.2021.10.20.01.55.04; Wed, 20 Oct 2021 01:55:16 -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 S230137AbhJTIzs convert rfc822-to-8bit (ORCPT + 99 others); Wed, 20 Oct 2021 04:55:48 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:41621 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbhJTIzq (ORCPT ); Wed, 20 Oct 2021 04:55:46 -0400 Received: (Authenticated sender: kory.maincent@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id EA6EA100013; Wed, 20 Oct 2021 08:53:28 +0000 (UTC) Date: Wed, 20 Oct 2021 10:53:28 +0200 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Geert Uytterhoeven Cc: Thomas Petazzoni , Andrew Lunn , netdev , Linux-Renesas , Linux Kernel Mailing List , Sergey Shtylyov , "David S. Miller" , Jakub Kicinski , Lad Prabhakar , Biju Das , Sergei Shtylyov , Adam Ford , Yoshihiro Shimoda , Yang Yingliang Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays Message-ID: <20211020105328.411a712f@kmaincent-XPS-13-7390> In-Reply-To: References: <20211019145719.122751-1-kory.maincent@bootlin.com> <20211019173520.0154a8cb@kmaincent-XPS-13-7390> <20211019175746.11b388ce@windsurf> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Geert, Thomas On Tue, 19 Oct 2021 22:05:41 +0200 Geert Uytterhoeven wrote: > Hi Thomas, > > On Tue, Oct 19, 2021 at 5:57 PM Thomas Petazzoni > wrote: > > On Tue, 19 Oct 2021 17:41:49 +0200 > > Andrew Lunn wrote: > > > > When people update the kernel version don't they update also the > > > > devicetree? > > > > > > DT is ABI. Driver writers should not break old blobs running on new > > > kernels. Often the DT blob is updated with the kernel, but it is not > > > required. It could be stored in a hard to reach place, shared with > > > u-boot etc. > > > > Right, but conversely if someone reads the DT bindings that exists > > today, specifies phy-mode = "rgmii-rxid" or phy-mmode = "rmgii-txid", > > Today == v5.10-rc1 and later? > > > this person will get incorrect behavior. Sure a behavior that is > > backward compatible with older DTs, but a terribly wrong one when you > > write a new DT and read the DT binding documentation. This is exactly > > the problem that happened to us. > > If you write a new DT, you read the DT binding documentation, and > "make dtbs_check" will inform you politely if you use the legacy/wrong > DT (i.e. lacking "[rt]x-internal-delay-ps")? Indeed this command will inform the missing required "[rt]x-internal-delay-ps". I am not use to that command, as it seems to check all the devicetree each time where I want only to check one. > > The current driver is backwards-compatible with the legacy/wrong DTB. > The current DT bindings (as of v5.10-rc1), using "[rt]x-internal-delay-ps" > are correct. > Or am I missing something here? You are correct. > > BTW, it's still not clear to me why the inversion would be needed. > Cfr. Andrew's comment: > > | So with rgmii-rxid, what is actually passed to the PHY? Is your > | problem you get twice the delay in one direction, and no delay in the > | other? Yes, it was the problem I got. The PHY I use have RX delay enabled by default, currently the PHY driver does not support delay configuration, therefore I let the MAC handle TX delay. I have stumbling over that legacy/wrong DTS on the old Kernel. Regards, Köry