Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Dragan Simic <dsimic@manjaro.org>
Cc: Tianling Shen <cnsztl@gmail.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>, Jonas Karlman <jonas@kwiboo.se>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Peter Geis <pgwipeout@gmail.com>
Subject: Re: [PATCH] arm64: dts: rockchip: change eth phy mode to rgmii-id for orangepi r1 plus lts
Date: Sun, 19 Jan 2025 17:05:50 +0100	[thread overview]
Message-ID: <5ce312f4-f496-4a62-bcda-5e6fbefde376@lunn.ch> (raw)
In-Reply-To: <ce15f141688c4c537ac3307b6fbed283@manjaro.org>

> >  &gmac2io {
> >  	phy-handle = <&yt8531c>;
> > -	tx_delay = <0x19>;
> > -	rx_delay = <0x05>;
> > +	phy-mode = "rgmii-id";
> 
> Shouldn't the "tx_delay" and "rx_delay" DT parameters be converted
> into the "tx-internal-delay-ps" and "rx-internal-delay-ps" parameters,
> respectively, so the Motorcomm PHY driver can pick them up and
> actually configure the internal PHY delays?

Maybe.

One problem is that tx_delay and rx_delay are really bad DT
bindings. They are basically values to be poked into a registers, with
no explanation of what they mean. Maybe 0x19 means 2ns? If so, that is
exactly what the PHY will do with rgmii-id, and you don't need any
additional properties.

The fact testing suggests this works does suggest these delay values
are around 2ns, so there is probably no need for
{rt}x-internal-delay-ps.

In general, i always suggest the PHY does the delay, just so that we
try to make all boards act in the same way. The fact this also removes
the use of these terrible tx_delay and rx_delay makes this patch even
better, if it can be shown to be reliable.

	Andrew


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2025-01-19 16:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-19  9:11 [PATCH] arm64: dts: rockchip: change eth phy mode to rgmii-id for orangepi r1 plus lts Tianling Shen
2025-01-19  9:54 ` Dragan Simic
2025-01-19 11:15   ` Tianling Shen
2025-01-19 11:36     ` Dragan Simic
2025-01-19 15:48       ` Tianling Shen
2025-01-24  6:28         ` Tianling Shen
2025-01-24  6:35           ` Dragan Simic
2025-01-31  9:01             ` Heiko Stuebner
2025-01-31  9:10               ` Dragan Simic
2025-01-19 16:05   ` Andrew Lunn [this message]
2025-02-03  8:15 ` Heiko Stuebner

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=5ce312f4-f496-4a62-bcda-5e6fbefde376@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cnsztl@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dsimic@manjaro.org \
    --cc=heiko@sntech.de \
    --cc=jonas@kwiboo.se \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=pgwipeout@gmail.com \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    /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