From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 599F0606A32D for ; Fri, 4 Dec 2026 11:09:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=cqHpsVk5; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=P0sRnqd6; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=ubcOQLWQ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=lLJJ34wLquS3T96Btk/kSGddvx3HD6+XdM7D6jM5qho=; b=cqHpsVk5aPZ7rF uykTNbF+iWXzgVkQFekX6HyagAO4c8qOMtY2GR88bRpBL1gzqIAOSoWliU8pAGa257E4xWD/U7yXs LjxgxRzEJS8lXFMCxk+KkmVhBJ59Pr13PTdiwnpP4PbhuTZd7HIaqDkGwM3R7f11Q1+6+OXUOz8+X Wt6G0dB0K9ghd08ooRq5FlCx3KhwjtVZZ3yBeLmnZmEShjTZJr+eprtLcOXLS3/wtygpyOY+xVZ49 hK9Hjwyzd7HQAC64o60Syau3/Blgd+LNE7dyIomL9zrUw6upaDh8rpJeIJF9mg9rWQ3ismBMC7a62 wb4dqbeOZJJ+OTD6NfWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZR9t-00000000516-2KNV; Fri, 04 Dec 2026 11:08:57 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZR9a-000000004oi-495g for linux-arm-kernel@bombadil.infradead.org; Fri, 04 Dec 2026 11:08:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=lLJJ34wLquS3T96Btk/kSGddvx3HD6+XdM7D6jM5qho=; b=P0sRnqd6gqDWXt9CNO+EhjxKxH piUxF5xXN7Bq18zOSHST32ll1Plyd1dXKqSTCvPh3Vw1oe9WjwRu8YvQLZfehe/th9DPTRucsWzFV zwZ6nJi7qshuhaknDsUXhKoO07XhcGSAdyfcgev/+4XOO1xqxXyt6nVhR4wx3u6k1WZBwAon0M2OH oY9K5Mc6mxlj+MDnSnGU676QE6Fa4UG22UM5mGO2mmdUrtqNa2NxgNl0qKd3yBRZBzsHXU6mCjUM0 s6+vus5UAQrwyqrixyQPTYQHtGOo/4kqPiZOVDeKCZa3hHcMKlBhddwP7zhpmXnXdUrhzzlfvbvZA nCZiVXSw==; Received: from smtpout-04.galae.net ([185.171.202.116]) by desiato.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZR9Y-0000000EIv8-0iSY for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 11:08:37 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 6E8BBC026D7; Fri, 4 Dec 2026 11:08:40 +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-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_110836_149436_701B7E6E X-CRM114-Status: GOOD ( 17.52 ) X-Spam-Score: -0.2 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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