From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382511; b=Bh6CFJMor+bs8ixgUkWZGh6Uj9oa1KMVZi3xJnBgntDSfd9eQGM+lu4373GEDD/IJJgg Ch1E26fZFaP/2MUK+PIUn1gRJ8lOVIcN91Lv+Y+yA0VQY0czC/MFx0WVfUSXbUqRkTtAg bxFuzsCn3gIWPRif7Dii9SCdQhRcSNCgzSkqNP1Ny1e6qAnur+z7wvhb30cO3A/thUe6B Qr4wVxVPUThSwRFrruptAOjQjVukdhdaYMegnkZFBP1+qh3DzR7D/z9BBXx7vPiI6GcUt 7/ZboRSaY6aW1QaPDFMk6rN2ZgLO+59b+eEx+jO4uI6B8nzRrZw0qQoRMt4mMHmCvJg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382511; 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=H7a0BvrvWDRaU/juSn19kSUmQMyXAeB/5nA6JBgPbot3Wh7Jp4E1qbdpK6L6UphxDFMI jV+cIcwb8Ktu9QlC9+V/cC8lSWj8XRUJxgGIlp43wJyTq55zTfTpR3sIpsCVrY6+Y1UMv ni1Yp9kHXLb3IJP1BVhCl9T/dU1UO3voLdBUizAsRf6BFZbZzzBm0oEnKpsP5bxh1SdXN w7t/OWpJky3vWXWB6Y8C8zPKt/oQNlD7UAI9DufL6F7CtuWNjgSuTExb0YxaIrKcsyCJV BueSiedSkCjnPfgS0dYSUhL4Ze+FG8Vh3c+e3B3FdDVNTxzKDGl4XSVJvVhyDrnIobA== 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.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 2B1CF606A33A for ; Fri, 4 Dec 2026 11:08:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2B1CF606A33A 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-03.galae.net (Postfix) with ESMTPS id CE1744E4187C; 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: netdev@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