Netdev List
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>,
	Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 3/9] net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass
Date: Mon, 31 Aug 2026 19:01:04 +0200	[thread overview]
Message-ID: <b36109c3-00e5-434e-a9b7-46049b0bff40@bootlin.com> (raw)
In-Reply-To: <apU8Yx08/PJiS9Xw@oss.qualcomm.com>

Hi Mohd,

On 8/31/26 10:33, Mohd Ayaan Anwar wrote:
> Hi Andrew,
> 
> On Tue, Jun 16, 2026 at 10:02:51PM +0530, Mohd Ayaan Anwar wrote:
>> On Mon, Jun 15, 2026 at 06:48:55PM +0200, Andrew Lunn wrote:
>>>>> I'm curious how this works at the moment? Do no boards make use of
>>>>> RGMII ID? Are all current boards broken?
>>>>
>>>> Searching through the DTS, I found that we have two boards using "rgmii"
>>>> (qcs404-evb-4000.dts and sa8155-adp.dts) and another board using
>>>> "rgmii-txid" (sa8540p-ride.dts). No board which uses RGMII ID.
>>>
>>> So this causes problems. We cannot break existing boards, yet it would
>>> be good to fix the current broken behaviour.
>>
>> I am trying to track down the sa8155-adp and sa8540p-ride boards. The
>> EMAC on QCS404 is extremely similar to QCS615 Ride [0], and I got that
>> board to work with this series (with RGMII ID mode). So I am fairly
>> confident that QCS404 would not break (if its even booting up with the
>> upstream kernel currently). Also, I think we could change the phy-mode
>> for QCS404 to "rgmii-id" from "rgmii" if these fixes go in.
>>
>>> It could be the best way forward is that you issue a warning when
>>> "rgmii" is found and pass rgmii-id to the PHY. And you also change the
>>> two boards to use rgmii-id. Lets think about the rgmii-txid case once
>>> we better understand it.
>>>
>>
>> As Konrad mentioned, it would be great to know if we can test out these
>> boards. Looking at the different versions of the ETHQOS programming
>> guide, stopping MAC side delay should be as simple as what we are doing
>> in this commit. But whether the two boards work directly with the
>> default PHY delays is unknown.
>>
> 
> So I did find the sa8540p-ride board but have so far been unsuccessful
> in getting it to boot. While that goes on, I would like to proceed with
> a series to fix RGMII on qcom-ethqos due to the following reasons:
> 
>  1. All versions of programming guides give a programming sequence for
>  MAC-side delay or PHY-side delay. There is no concept of "rgmii-txid".
> 
>  2. I also found some downstream code that was using "rgmii" phy-mode to
>  program MAC-side delays on the sa8540p-ride board. So it looks like
>  "rgmii-txid" was a workaround to enable ethernet while support for
>  this board was being upstreamed.
> 
>  3. I have been able to test this patch on a variety of boards now,
>  including:
>      - Shikra CQ/IQ variants (with the TI DP83867 PHY)
>      - QCS615 Ride (with the Micrel KSZ9031 PHY)
>      - Talos EVK (again with the Micrel KSZ9031 PHY)
>      - Talos Lyra (with the TI DP83867 PHY)
>  These platforms cover the two RGMII configurations that Qualcomm has
>  typically deployed.

I've been able to get my hands on a qualcomm devkit for ipq8064 :

Compex WPQ864 6A02, has the IPQ8064 connected to a QCA8337 switch
through both the ports, one using RGMII (no ID), and one with SGMII.

The DT is downstream, in OpenWRT :

https://git.openwrt.org/openwrt/openwrt/tree/target/linux/ipq806x/dts/qcom-ipq8064-ap148.dts#n198

happy to help in some testing as well if needed, this board is going
in my CI for stmmac stuff.

> 
> With this in mind, I was thinking of breaking up this patch series into
> separate ones to solve one problem at a time:
> 
>  1. Introduce support for "rgmii-id" using PHY-side delays rather than
>  MAC-provided delays. Also, issue a warning if any other phy-mode is
>  being used.
> 
>  2. Fix the DTS of the existing boards to use "rgmii-id".
> 
>  3. Once the DTS is fixed, remove the now-unused code handling non
>  RGMII-ID cases. This should also allow us to remove the whole
>  ethqos_emac_por code since it wouldn't be needed for RGMII-ID.

I'm wondering if we should add some temporary very loud warning for
boards that use "rgmii" before changing this, or even just keep the
actual "rgmii" behaviour which inserts the delays, as there seems to
be lots of such users...

This is going to be quite the breaking change.

> 
>  4. Add support for regulator voting in the DP83867 driver, mirroring
>  what Daniel Thompson/ Alex Elder did for QCA8081 [1]. This will help
>  in adding support for the Shikra/Talos Lyra boards which need the
>  supply for the PHY to be explicitly enabled.
> 
>  5. Support for Shikra can be added once these changes are in.
> 
> Does this plan sound reasonable? Thanks.
> 
> 	Ayaan
> ---
> [1] https://lore.kernel.org/netdev/20260605010022.968612-3-elder@riscstar.com/
> 

Maxime

  reply	other threads:[~2026-08-31 17:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 18:36 [PATCH RFC 0/9] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-06-11 18:36 ` [PATCH RFC 1/9] dt-bindings: net: qcom,ethqos: add qcom,shikra-ethqos compatible Mohd Ayaan Anwar
2026-06-11 18:36 ` [PATCH RFC 2/9] net: stmmac: qcom-ethqos: convert ethqos_rgmii_macro_init() to void Mohd Ayaan Anwar
2026-06-11 18:36 ` [PATCH RFC 3/9] net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass Mohd Ayaan Anwar
2026-06-11 20:54   ` Andrew Lunn
2026-06-15  3:54     ` Mohd Ayaan Anwar
2026-06-15 16:48       ` Andrew Lunn
2026-06-16 14:14         ` Konrad Dybcio
2026-06-16 16:32         ` Mohd Ayaan Anwar
2026-08-31  8:33           ` Mohd Ayaan Anwar
2026-08-31 17:01             ` Maxime Chevallier [this message]
2026-08-31 17:14               ` Andrew Lunn
2026-09-03 18:53               ` Mohd Ayaan Anwar
2026-06-11 18:37 ` [PATCH RFC 4/9] net: stmmac: qcom-ethqos: add per-platform NOC clock voting Mohd Ayaan Anwar
2026-06-15 12:13   ` Konrad Dybcio
2026-06-16 16:17     ` Mohd Ayaan Anwar
2026-06-11 18:37 ` [PATCH RFC 5/9] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-06-11 18:37 ` [PATCH RFC 6/9] arm64: dts: qcom: shikra: Add ethernet nodes Mohd Ayaan Anwar
2026-06-15  4:26   ` Mohd Ayaan Anwar
2026-06-11 18:37 ` [PATCH RFC 7/9] arm64: dts: qcom: shikra-cqm-evk: Enable ethernet0 Mohd Ayaan Anwar
2026-06-11 20:58   ` Andrew Lunn
2026-06-15  3:55     ` Mohd Ayaan Anwar
2026-06-11 18:37 ` [PATCH RFC 8/9] arm64: dts: qcom: shikra-cqs-evk: " Mohd Ayaan Anwar
2026-06-16  9:50   ` Konrad Dybcio
2026-06-16 16:50     ` Mohd Ayaan Anwar
2026-06-17  9:42       ` Konrad Dybcio
2026-06-17  9:48         ` Andrew Lunn
2026-06-11 18:37 ` [PATCH RFC 9/9] arm64: dts: qcom: shikra-iqs-evk: Enable both ethernet ports Mohd Ayaan Anwar
2026-09-01 11:41   ` Krzysztof Kozlowski

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=b36109c3-00e5-434e-a9b7-46049b0bff40@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andersson@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mohd.anwar@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@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