Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Chen-Yu Tsai <wens@csie.org>
Cc: "Jernej Škrabec" <jernej.skrabec@gmail.com>,
	"Andre Przywara" <andre.przywara@arm.com>,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	samuel@sholland.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: allwinner: h6: Add OrangePi 3 LTS DTS
Date: Tue, 29 Apr 2025 18:56:08 +0200	[thread overview]
Message-ID: <b98d6bab-d3bb-44d2-9dbf-623dfb673671@lunn.ch> (raw)
In-Reply-To: <CAGb2v66dF8hMmjjJMnpVxM+092q=ZYZ+kT316roZuty6i+rcXQ@mail.gmail.com>

> > The RX path looks O.K. RGMII-RXID means the PHY should be adding the
> > 2ns delay. The allwinner,rx-delay-ps = <0> should be redundant, that
> > should be the driver default. And there are no properties in the PHY
> > node about RX. All good.
> 
> The default action when the property is missing is to leave the hardware
> settings alone. I admit this doesn't match the bindings.

Please submit a patch fix the binding.

> > TX is the problem. The allwinner,tx-delay-ps = <700> causes the MAC to
> > add 700ps delay, and 'rgmii-rxid' means the PHY should not add any
> > delay. But 700ps is too low. It should be around 2000ps. So something
> > else is adding a delay, or the 700ps is not really 700ps.
> 
> Anything is possible. As was raised in a previous reply, it's possible
> instead of extending the delay range, the decreased the step size and
> added more steps. The problem is we don't really know.

By poking around with other configuration knobs, i hope we can
determine if this 700ps actually is 700ps.

> > You say the PHY is a YT8531C. These PHYs also accept
> > rx-internal-delay-ps and tx-internal-delay-ps properties in their DT
> > node.
> >
> > Try setting 'rgmii-id', allwinner,tx-delay-ps = <0>, and both
> > rx-internal-delay-ps and tx-internal-delay-ps in the PHY node to 1950.
> > If that does not work, try other values in the PHY node.
> 
> I don't get why we should ignore the strappings instead of using them
> as reference or even truth.

If you don't want the PHY to be reprogrammed pass:

* @PHY_INTERFACE_MODE_NA: Not Applicable - don't touch

rather than one of

 * @PHY_INTERFACE_MODE_RGMII: Reduced gigabit media-independent interface
 * @PHY_INTERFACE_MODE_RGMII_ID: RGMII with Internal RX+TX delay
 * @PHY_INTERFACE_MODE_RGMII_RXID: RGMII with Internal RX delay
 * @PHY_INTERFACE_MODE_RGMII_TXID: RGMII with Internal TX delay

However, if we do pass one of these RGMII modes, i expect the PHY to
follow them.

> If the strappings worked correctly w/ the
> generic PHY driver (that doesn't know how to configure the delay mode
> on the PHY side), isn't it working as intended?

The generic PHY driver is there as a fallback, for when the real PHY
driver is missing. It is nice if it works, but it often does not in
current systems.  What we really care about is that the real PHY
driver works, and the system as a whole follows the DT bindings.

	Andrew


  reply	other threads:[~2025-04-29 17:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-13 13:42 [PATCH 0/2] arm64: dts: allwinner: Support Orange Pi 3 LTS board Jernej Skrabec
2025-04-13 13:42 ` [PATCH 1/2] dt-bindings: arm: sunxi: Add " Jernej Skrabec
2025-04-15 21:56   ` Rob Herring (Arm)
2025-04-13 13:42 ` [PATCH 2/2] arm64: dts: allwinner: h6: Add OrangePi 3 LTS DTS Jernej Skrabec
2025-04-25  0:57   ` Andre Przywara
2025-04-25 12:54   ` Andre Przywara
2025-04-25 14:37     ` Chen-Yu Tsai
2025-04-25 15:34     ` Andrew Lunn
2025-04-26 18:00       ` Jernej Škrabec
2025-04-28 12:37         ` Andrew Lunn
2025-04-29 14:51           ` Jernej Škrabec
2025-04-29 15:09             ` Andrew Lunn
2025-04-29 15:24               ` Jernej Škrabec
2025-04-29 15:27                 ` Jernej Škrabec
2025-04-29 15:45                   ` Andrew Lunn
2025-04-29 15:52                     ` Chen-Yu Tsai
2025-04-29 16:56                       ` Andrew Lunn [this message]
2025-04-26 18:26     ` Jernej Škrabec

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=b98d6bab-d3bb-44d2-9dbf-623dfb673671@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andre.przywara@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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