public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: linux-mediatek@lists.infradead.org, Felix Fietkau <nbd@nbd.name>,
	John Crispin <john@phrozen.org>,
	Eric Woudstra <ericwouds@gmail.com>,
	Elad Yifee <eladwf@gmail.com>,
	Bo-Cun Chen <bc-bocun.chen@mediatek.com>,
	Sky Huang <skylake.huang@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	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>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next] net: ethernet: mtk_eth_soc: add support for MT7988 internal 2.5G PHY
Date: Tue, 29 Apr 2025 16:22:26 +0100	[thread overview]
Message-ID: <aBDusgnaJUmZrp_v@makrotopia.org> (raw)
In-Reply-To: <687380A7-A580-41EB-8278-73B9942E4280@public-files.de>

On Tue, Apr 29, 2025 at 04:12:19PM +0200, Frank Wunderlich wrote:
> Am 26. April 2025 01:08:16 MESZ schrieb Daniel Golle <daniel@makrotopia.org>:
> >On Fri, Apr 25, 2025 at 10:51:18PM +0100, Daniel Golle wrote:
> >> The MediaTek MT7988 SoC comes with an single built-in Ethernet PHY
> >> supporting 2500Base-T/1000Base-T/100Base-TX/10Base-T link partners in
> >> addition to the built-in MT7531-like 1GE switch. The built-in PHY only
> >> supports full duplex.
> >> 
> >> Add muxes allowing to select GMAC2->2.5G PHY path and add basic support
> >> for XGMAC as the built-in 2.5G PHY is internally connected via XGMII.
> >> The XGMAC features will also be used by 5GBase-R, 10GBase-R and USXGMII
> >> SerDes modes which are going to be added once support for standalone PCS
> >> drivers is in place.
> >> 
> >> In order to make use of the built-in 2.5G PHY the appropriate PHY driver
> >> as well as (proprietary) PHY firmware has to be present as well.
> >> 
> >> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> >> ---
> >> [...]
> >> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> index 88ef2e9c50fc..e3a8b24dd3d3 100644
> >> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> [...]
> >> @@ -587,6 +603,10 @@
> >>  #define GEPHY_MAC_SEL          BIT(1)
> >>  
> >>  /* Top misc registers */
> >> +#define TOP_MISC_NETSYS_PCS_MUX	0x84
> >
> >This offset still assumes topmisc syscon to start at 0x11d10000.
> >If the pending series[1] adding that syscon at 0x11d10084 gets merged
> >first, this offset will have to be changed to
> >#define TOP_MISC_NETSYS_PCS_MUX	0x0
> >
> >[1]: https://patchwork.kernel.org/project/linux-mediatek/patch/20250422132438.15735-8-linux@fw-web.de/
> 
> Imho this should be changed as well
> 
> #define USB_PHY_SWITCH_REG	0x218
> 
> To
> 
> 0x194
> 
> It is used in mtk_eth_path.c set_mux_u3_gmac2_to_qphy

This depends on how we define topmisc for MT7981, as the MTK_U3_COPHY_V2
capability flag is set only for the MT7981 SoC (and hence I would not touch
it in a commit regarding the MT7988 SoC).

In MediaTek's SDK, it is defined as
    topmisc: topmisc@11d10000 {
            compatible = "mediatek,mt7981-topmisc", "syscon";
            reg = <0 0x11d10000 0 0x10000>;
            #clock-cells = <1>;
    };

      reply	other threads:[~2025-04-29 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 21:51 [PATCH net-next] net: ethernet: mtk_eth_soc: add support for MT7988 internal 2.5G PHY Daniel Golle
2025-04-25 23:08 ` Daniel Golle
2025-04-29 14:12   ` Frank Wunderlich
2025-04-29 15:22     ` Daniel Golle [this message]

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=aBDusgnaJUmZrp_v@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bc-bocun.chen@mediatek.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eladwf@gmail.com \
    --cc=ericwouds@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=skylake.huang@mediatek.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