From: Aleksei Sviridkin <f@lex.la>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Aleksei Sviridkin <f@lex.la>,
netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>
Subject: PHY ports: combo port with a MAC-side GPIO mux on a DSA switch?
Date: Thu, 24 Sep 2026 01:59:08 +0300 [thread overview]
Message-ID: <20260923225909.1649267-1-f@lex.la> (raw)
Hi Maxime,
I have a board where one switch port can use either an SFP cage or a
separate copper PHY, picked by a GPIO mux. I would like to know whether
the PHY ports work is meant to cover it, and how to describe such a
port in devicetree until then.
The board is a Keenetic KN-1012 (MT7981B) with an MT7531 switch. Port 5
is a DSA user port, lan4, in 2500base-x. Its SerDes goes through a mux
on GPIO 27 either to an SFP cage or to an Airoha EN8811H 2.5G copper
PHY, one at a time. SFP presence is on GPIO 23.
OpenWrt handles it downstream with two devicetree overlays. The copper
one gives port 5 a phy-handle to the EN8811H. The SFP one gives it
sfp = <&sfp1> and managed = "in-band-status". The mux is set by an
OpenWrt-only gpio-export node, and a chainloaded U-Boot reads the SFP
presence pin at each boot and picks the overlay. Changing media needs a
reboot.
The PHY ports code in net-next covers an SFP that the PHY drives itself,
with marvell10g as the user. Here the choice sits between the SerDes on
the MAC side and two separate media, a cage and a separate PHY. So my
questions:
1. Is a MAC-side mux like this in scope for the PHY ports work?
2. If it is, what devicetree shape should a board use today so it does
not have to change later?
3. If it is not, is describing a single medium the accepted way for now?
I can test patches on this board. Writing the framework part is beyond
what I can take on myself.
next reply other threads:[~2026-09-23 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 22:59 Aleksei Sviridkin [this message]
2026-09-24 7:06 ` PHY ports: combo port with a MAC-side GPIO mux on a DSA switch? Maxime Chevallier
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=20260923225909.1649267-1-f@lex.la \
--to=f@lex.la \
--cc=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.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