From: "Nazle Asmade, Muhammad Nazim Amirul" <muhammad.nazim.amirul.nazle.asmade@altera.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "dinguyen@kernel.org" <dinguyen@kernel.org>,
"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
"rmk+kernel@armlinux.org.uk" <rmk+kernel@armlinux.org.uk>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] net: stmmac: dwmac-socfpga: Add mac-mode DT property support
Date: Fri, 3 Jul 2026 08:10:49 +0000 [thread overview]
Message-ID: <f31704f2-cd98-481f-8290-203e3052b738@altera.com> (raw)
In-Reply-To: <e489be4a-5940-46e5-ae06-b78f1c919352@lunn.ch>
On 1/7/2026 10:43 pm, Andrew Lunn wrote:
> On Tue, Jun 30, 2026 at 06:31:08AM -0700, muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
>> From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
>>
>> Russell King's commit de696c63c1dc ("net: stmmac: socfpga: convert to
>> use phy_interface") replaced mac_interface with phy_interface in
>> socfpga_get_plat_phymode(), noting that no upstream DTS files set the
>> "mac-mode" property, making the two values identical.
>>
>> The Agilex5 SoCDK TSN Config2 board is an exception: its gmac1 TSN
>> port uses GMII internally in the MAC while the PHY-side interface is
>> RGMII, so mac-mode and phy-mode differ. Without restoring mac_interface
>> support, the MAC is configured with RGMII instead of GMII, causing
>> connectivity failures on this board.
>>
>> Add socfpga_of_get_mac_mode() to read the optional "mac-mode" DT
>> property and store it in a new mac_interface field. When the property
>> is absent, mac_interface falls back to phy_interface, preserving
>> the existing behaviour for all other boards.
>
> I don't actually see a need for mac-mode. From what you are saying,
> there is no choice. The MAC is hard wired to the converter block. So
> you can just look at the compatible. You are going to need to use the
> compatible anyway, to mask the phy-mode to handle the "MAC" doing the
> RGMII delays.
>
> Andrew
>
Hi Maxime, Andrew
Thanks for the reviews!
Hi Andrew,
The challenge with using compatible is that the TSN Config2 board has
two ports — only gmac1 uses the GMII-to-RGMII converter, while gmac2
connects directly to its PHY. A board-level compatible check would need
additional logic to know which port to apply the GMII override to.
With mac-mode, the configuration is per-port in the DTS — consistent
with how altr,emac-splitter works today. I also addressing Maxime's
feedback in v2 by unifying the splitter and mac-mode code paths.
BR,
Nazim
next prev parent reply other threads:[~2026-07-03 8:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 13:31 [PATCH 0/3] arm64: dts/net: stmmac: Add Agilex5 SoCDK TSN Config2 board support muhammad.nazim.amirul.nazle.asmade
2026-06-30 13:31 ` [PATCH 1/3] dt-bindings: arm: altera: Add Agilex5 SoCDK TSN Config2 board board muhammad.nazim.amirul.nazle.asmade
2026-07-02 7:16 ` Krzysztof Kozlowski
2026-06-30 13:31 ` [PATCH 2/3] arm64: dts: socfpga: agilex5: Add SoCDK TSN Config2 board muhammad.nazim.amirul.nazle.asmade
2026-06-30 13:58 ` Andrew Lunn
2026-06-30 14:39 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-30 15:25 ` Andrew Lunn
2026-07-01 1:54 ` Nazle Asmade, Muhammad Nazim Amirul
2026-07-01 12:47 ` Andrew Lunn
2026-07-03 7:04 ` Nazle Asmade, Muhammad Nazim Amirul
2026-07-03 13:12 ` Andrew Lunn
2026-07-02 7:17 ` Krzysztof Kozlowski
2026-07-03 5:28 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-30 13:31 ` [PATCH 3/3] net: stmmac: dwmac-socfpga: Add mac-mode DT property support muhammad.nazim.amirul.nazle.asmade
2026-06-30 14:02 ` Andrew Lunn
2026-06-30 14:04 ` Maxime Chevallier
2026-06-30 15:13 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-30 15:42 ` Maxime Chevallier
2026-07-01 1:32 ` Nazle Asmade, Muhammad Nazim Amirul
2026-07-01 6:49 ` Maxime Chevallier
2026-07-01 14:43 ` Andrew Lunn
2026-07-03 8:10 ` Nazle Asmade, Muhammad Nazim Amirul [this message]
2026-07-03 13:15 ` Andrew Lunn
2026-06-30 13:53 ` [PATCH 0/3] arm64: dts/net: stmmac: Add Agilex5 SoCDK TSN Config2 board support Maxime Chevallier
2026-07-01 2:09 ` Nazle Asmade, Muhammad Nazim Amirul
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=f31704f2-cd98-481f-8290-203e3052b738@altera.com \
--to=muhammad.nazim.amirul.nazle.asmade@altera.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--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