Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382510; b=eu52acDiPhfFEpFwapM3S6AQkqSBGID/N9Enh+xPUe7N23agRCCeDh0vtbu1CDRbalpa /f4TPU9Ogy7ZdHt/iFjNmMqEknv9rxKMLxOJrsQf5zuf0mK3UOG1ZVkImeVk1SbtRsJfL g9vdeHxq25Yo9o9LN1BKRcwkpu9vXp3pI6JQLv/zcya79obJC5w9jdBcSoPO4bXARcomp v/pJq7CkOfSx6+6Xz/y/7CHyt2dXUUB+XnJ0pZUOCEzk1Sht70rDRmDi4zVulaURUQWps Qn7t/7yPC1UARaHXKQMJRBnPQ7JzQG6jQkbcGdSDLuqeOO2smBDuvP67t+RO4JEh+cQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382510; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=lLJJ34wLquS3T96Btk/kSGddvx3HD6+XdM7D6jM5qho=; b=dw+wGBV9mufGaa90s25ROne0kkzHkKtefudjdysSXw/jvlE15eqE5TZDL7+Oar1MdyP4 1UWNegRLp+1lzjIM5OGsnJurBH9r+CNROagc6IXimuN5yAcb2PvZlIMOjKLuN4YBf4Es8 hIp/ldwRVxDGRTxhVMI3iqLKeySjmPTKqxFgoz+tO3/U+N/J+RCMu64h0dVBgfWDswZHb YRyWF2gEgzQqhIqdXZFcOq743NmYtHT5G+FTmgZT4QGl1MkVpyI6tQn6ykQc6Q9Z/nO7k Ed8XQlid7PBq9KTfsGuY+aSuAMChTXTh+z2iQEnyndy4h4Odjz9UEa21HgYffp/RyYQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=ubcOQLWQ; arc=none smtp.remote-ip=185.246.84.56 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B2C6606A33B; Fri, 4 Dec 2026 11:08:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2B2C6606A33B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=ubcOQLWQ Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id C5F331A1947; Fri, 4 Dec 2026 11:08:28 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 99B6F603C4; Fri, 4 Dec 2026 11:08:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4E5B811EA18F6; Fri, 04 Dec 2026 12:08:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796382506; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=lLJJ34wLquS3T96Btk/kSGddvx3HD6+XdM7D6jM5qho=; b=ubcOQLWQHydp76Ddg2PSCWYuaCIm+ziWBlM404AsSk/tc5VDivhVz7BViV4Tf5NUO5Fk2t coBI+F5TSTI/srdd/WOl9olG9S/59SRPmddaQtmwxaNGnzSbkdKJ5qfmLOS1lM3X6IjF0A Or5s3MMaYBKtyHteK4IqhucMjLfOEzXTC6CFxDMLTJ8MOwPPA+9q+MLKdIrMHltDqwOVX8 kOlSO4LztvCgRZ/jHKIiECaaNl78LuwnlZOdx014wZw/Cve158EFnGNCjKbclT/NjbPYrA CxXSON78/N2Y3VlcleX8ct8juMYeL2VTBKfNg0Og2JjQAUK+X27gGgBKvjpeiw== From: Maxime Chevallier To: davem@davemloft.net, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Willem de Bruijn , Paolo Abeni , Russell King , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Sebastian Hesselbarth , Gregory Clement , Heiner Kallweit Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@bootlin.com, devicetree@vger.kernel.org, Conor Dooley , Krzysztof Kozlowski , Rob Herring , Christophe Leroy , Herve Codina , Florian Fainelli , Vladimir Oltean , =?UTF-8?q?K=C3=B6ry=20Maincent?= , Oleksij Rempel , =?UTF-8?q?Nicol=C3=B2=20Veronese?= , Simon Horman , marcin.s.wojtas@gmail.com, Daniel Golle , Dimitri Fedrau , Frank Wunderlich , Pietro Ameruoso , Aleksei Sviridkin Subject: [PATCH net-next 12/12] ARM: dts: turris-omnia: Describe the WAN port multiplexer Date: Fri, 4 Dec 2026 12:06:21 +0100 Message-ID: <20261204110622.1106492-13-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204110622.1106492-1-maxime.chevallier@bootlin.com> References: <20261204110622.1106492-1-maxime.chevallier@bootlin.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 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 --- .../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 @@ ð2 { * 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