mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Köry Maincent" <kory.maincent@bootlin.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Andrew Lunn <andrew@lunn.ch>, netdev <netdev@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	Adam Ford <aford173@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Yang Yingliang <yangyingliang@huawei.com>
Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays
Date: Wed, 20 Oct 2021 10:53:28 +0200	[thread overview]
Message-ID: <20211020105328.411a712f@kmaincent-XPS-13-7390> (raw)
In-Reply-To: <CAMuHMdXiMhpU0vDV3KaOg4DY59cszAtoG1sDOgnTRY6C6cyitQ@mail.gmail.com>

Hello Geert, Thomas

On Tue, 19 Oct 2021 22:05:41 +0200
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> Hi Thomas,
> 
> On Tue, Oct 19, 2021 at 5:57 PM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> > On Tue, 19 Oct 2021 17:41:49 +0200
> > Andrew Lunn <andrew@lunn.ch> 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

  reply	other threads:[~2021-10-20  8:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 14:57 Kory Maincent
2021-10-19 15:13 ` Geert Uytterhoeven
2021-10-19 15:35   ` Köry Maincent
2021-10-19 15:41     ` Andrew Lunn
2021-10-19 15:57       ` Thomas Petazzoni
2021-10-19 20:05         ` Geert Uytterhoeven
2021-10-20  8:53           ` Köry Maincent [this message]
2021-10-20  9:05             ` Geert Uytterhoeven
2021-10-20 12:16             ` Andrew Lunn
2021-10-19 15:44     ` Geert Uytterhoeven
2021-10-19 15:47 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211020105328.411a712f@kmaincent-XPS-13-7390 \
    --to=kory.maincent@bootlin.com \
    --cc=aford173@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=s.shtylyov@omp.ru \
    --cc=sergei.shtylyov@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yangyingliang@huawei.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®