[PATCH net-next 12/12] ARM: dts: turris-omnia: Describe the WAN port multiplexer

From: Maxime Chevallier

Date: Fri Dec 04 2026 - 06:08:38 EST


The Turris Omnia's WAN port has a mux between the MAC and both an SFP
cage and a 88E1514 PHY. The mux is a high-speed analog switch (NXP
CBTL02042A), whose select line is driven by the cage's mod_def0 signal:
it switches to the cage as soon as a module is plugged.

We couldn't deal with that so far. The devicetree only describes the
PHY, and relies on the bootloader to enable the sfp node and drop the
phy-handle when a module is found at boot. Modules plugged or removed
later on aren't taken into account.

Now that we have a binding for these muxes, let's describe that one. The
sfp node is always enabled, and we follow the module at runtime.

Signed-off-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
---
.../dts/marvell/armada-385-turris-omnia.dts | 29 ++++++++++++-------
1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
index 83fe00abd652..0501686e2642 100644
--- a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
@@ -103,13 +103,24 @@ sfp: sfp {
los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>;
maximum-power-milliwatt = <3000>;
+ };

- /*
- * For now this has to be enabled at boot time by U-Boot when
- * a SFP module is present. Read more in the comment in the
- * eth2 node below.
- */
- status = "disabled";
+ wan_mux: mii-mux {
+ compatible = "mii-mux-auto";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ sfp = <&sfp>;
+ takes-precedence;
+ };
+
+ port@1 {
+ reg = <1>;
+ phy-handle = <&phy1>;
+ phy-mode = "sgmii";
+ };
};

gpio-keys {
@@ -199,16 +210,12 @@ &eth2 {
* eth2 is connected via a multiplexor to both the SFP cage and to
* ethernet-phy@1. The multiplexor switches the signal to SFP cage when
* a SFP module is present, as determined by the mode-def0 GPIO.
- *
- * Until kernel supports this configuration properly, in case SFP module
- * is present, U-Boot has to enable the sfp node above, remove phy
- * handle and add managed = "in-band-status" property.
*/
status = "okay";
phy-mode = "sgmii";
phy-handle = <&phy1>;
+ mii-mux-handle = <&wan_mux>;
phys = <&comphy5 2>;
- sfp = <&sfp>;
buffer-manager = <&bm>;
bm,pool-long = <2>;
bm,pool-short = <3>;
--
2.56.1