Article View: linux.kernel.netdev
Article #27371Re: [PATCH net-next 01/12] dt-bindings: net: Add Ethernet MII multiplexers
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 12:18
Date: Sat, 05 Dec 2026 12:18
174 lines
14647 bytes
14647 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In mii-mux-auto.yaml, the description says the mux has two ports
and that exactly one of them takes precedence, but the schema enforces…
- [Low] ethernet-controller.yaml adds `mii-mux-handle` (lines 103-107) as
a bare phandle.
- [Low] mii-mux-auto.yaml defines `takes-precedence` (lines 29-33) as
"The multiplexer switches to this port by itself as soon as the port…
--
dt-bindings: net: Add Ethernet MII multiplexers
This adds mii-mux.yaml, a generic binding for an Ethernet MII
multiplexer and its ports. It also adds mii-mux-auto.yaml for two-port
muxes that the hardware switches by itself. A new mii-mux-handle
property in ethernet-controller.yaml lets a MAC point to the mux node.
> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> index 30b2a335116e9..e2836351cd7ad 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> @@ -100,6 +100,12 @@ properties:
> description:
> Specifies a reference to a node representing a PHY device.
>
> + mii-mux-handle:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Specifies a reference to a node representing an Ethernet MII
> + multiplexer.
> +
[Severity: Low]
How should mii-mux-handle interact with the MAC-level phy-handle, sfp,
fixed-link, managed and phy-mode properties?
Nothing here stops those properties from appearing next to
mii-mux-handle. The description also doesn't say which one wins. The mux
ports in mii-mux.yaml then define phy-handle, phy-mode and sfp again for
the same MAC-to-PHY link.
The mii-mux-auto.yaml example sets phy-mode = "sgmii" on both the MAC
and port@1. What does the MAC-level mode mean when the SFP port@0 is
selected? The port oneOf in mii-mux.yaml forbids phy-mode on that port.
Later in the series, phylink uses a precedence that this binding doesn't
describe. phylink_fwnode_phy_connect() returns early once a mux is
attached:
if (pl->mux)
return 0;
phy_fwnode = fwnode_get_phy_node(fwnode);
But phylink_attach_mux() returns without attaching a mux when the option
is disabled:
if (pl->mux || !IS_ENABLED(CONFIG_PHY_MUX))
return 0;
In that case the MAC-level phy-handle is used. The Turris Omnia DTS in
this series depends on this and keeps both on ð2:
phy-mode = "sgmii";
phy-handle = <&phy1>;
mii-mux-handle = <&wan_mux>;
Could the binding either forbid the conflicting MAC-level link
properties when mii-mux-handle is present, or say which level takes
precedence?
Separately, the RGMII rx/tx-internal-delay-ps conditional in the allOf
of ethernet-controller.yaml only checks the MAC-level phy-mode. Is there
a way to express delays for a port-level rgmii-* mode?
None of the later patches in the series change the binding files.
> diff --git a/Documentation/devicetree/bindings/net/mii-mux-auto.yaml b/Documentation/devicetree/bindings/net/mii-mux-auto.yaml
> new file mode 100644
> index 0000000000000..7a965f6e8dcce
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/mii-mux-auto.yaml
[ ... ]
> +patternProperties:
> + "^port@[0-9a-f]+$":
> + $ref: mii-mux.yaml#/$defs/port
> + unevaluatedProperties: false
> +
> + properties:
> + takes-precedence:
> + type: boolean
> + description:
> + The multiplexer switches to this port by itself as soon as the
> + port gets active, whatever the state of the other port.
[Severity: Low]
What does "gets active" mean here?
On the Turris Omnia, which the commit message uses as the example, the
select line is the SFP cage's mod_def0 signal. The hardware therefore
switches on module presence, not on link or LOS state.
For a PHY port, the binding gives "active" no defined meaning. Even so,
the schema accepts takes-precedence on either port, whether that port
has sfp or phy-handle.
The only driver is mii_mux_auto_check_ports() in
drivers/net/phy/mux/mii_mux_auto.c, added later in the series. It only
accepts the flag on the SFP port:
if (n_sfp != 1 || n_phy != 1 || n_prec != 1 || n_sfp_prec != 1)
return -EOPNOTSUPP;
So a DT with takes-precedence on the PHY port passes dt_binding_check
but then fails to probe.
Could the binding describe the trigger as module presence on the SFP
port, and only allow takes-precedence on the port that has sfp?
> +
> +required:
> + - compatible
> + - port@0
> + - port@1
> +
> +oneOf:
> + - properties:
> + port@0:
> + required:
> + - takes-precedence
> + - properties:
> + port@1:
> + required:
> + - takes-precedence
[Severity: Low]
The description calls this a two-port mux where exactly one port takes
precedence. Does the schema enforce either of those?
The "^port@[0-9a-f]+$" pattern accepts any number of ports. The required
list only asks for port@0 and port@1, and this oneOf only checks
takes-precedence on those two ports.
For example, this node passes dt_binding_check:
port@0 { reg = <0>; sfp = <&sfp0>; takes-precedence; };
port@1 { reg = <1>; phy-handle = <&phy0>; phy-mode = "sgmii"; };
port@2 { reg = <2>; sfp = <&sfp1>; takes-precedence; };
The port@0 branch matches and the port@1 branch fails, so oneOf is
satisfied. port@2 matches patternProperties, so unevaluatedProperties
never triggers.
Later in the series, mii_mux_auto_check_ports() rejects this layout at
probe time with -EOPNOTSUPP. The schema and the driver therefore
disagree.
Would restricting the pattern to "^port@[01]$" for this compatible make
the required list and the oneOf complete?
None of the later patches in the series change the binding files.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204110622.1106492-1-maxime.chevallier%40bootlin.com
Technical Details
Message-ID:
<179647310262.3146.1000393445396503445@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377975-linux-kernel-netdev=dewy.ruReferences:
<20261204110622.1106492-2-maxime.chevallier@bootlin.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377975-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 01/12] dt-bindings: net: Add Ethernet MII multiplexers Date: Sat, 05 Dec 2026 12:18:22 +0000 Organization: Usenet Network Message-ID: <179647310262.3146.1000393445396503445@kernel.org> References: <20261204110622.1106492-2-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3022978"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:shfl99iCjw/aJ7aicgSwzGpycCk= sha256:LTS5Z1+zLBG35oSKuAK6tnWnB62R2KeyQIXwPEa1ocA= sha1:UPf226rHdnNnNb6sGD45bRdmNUA= sha256:khktr5lUEY2I+95Zl7kyZGw9Aq3A3vl08kL7ZiG+S3Y= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id A9B8A117E10; Sat, 5 Dec 2026 15:18:48 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2dw67T4pUvW8; Sat, 5 Dec 2026 15:18:44 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377975-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 5AC69117E0F; Sat, 5 Dec 2026 15:18:32 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 310FE295D0; Sat, 5 Dec 2026 12:18:30 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796473106; b=DoKfbhksz02MXds+70pXY0h0pBytkTzoS8epIHepIjn69bCC266M0t6LryMVHVJBKhE9 mNAkX585lhf64OatsOVspsaDQOB+Cv6LmPvvwKYGR5l8JJiOQgaUXN3RxRDHhEpbCdIEo ZBKP5rb3I/Rn+0+MWYMK/v6QHL7prjwkGCWEwMfNBiixqrGabreDS7Vhw2cObWt42UzxK eQw2R9X4x5WvpmfhkloTOI41DRbBZ0TFgmwRK8e7JSRZVX8UmI3Wuq0E2HDJHVn6UsUKJ BCngoyhCXIAMJnvhjHMZ29axdf7HhnJGscjp4MPc14iSfFAHRLA1+qWhVPLK8N1J2HQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796473106; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=w4U7Z6HmU7Gqk7EoMIifSNCTL0m/hU4bbahMltq+qLc=; b=zcgY4bhAa5piSN8AQk07Tz8hFIe+azRvSqrGigchZaeTbiIASJitS7xaa1w8jzLhuq/c p/yBMmjPSLrvwFz+ajhu+DNiQrvyw/zJdVf4LbTvwUiCEqqTySPSJ4JPHfNuKW15MThBt 58kt0HK1KyCSiPjOjE/MBsWdMvJJGKlMQa6rJMqmOseZhzK1q05XFKMKgkeUdTIoJaCe5 wIpwdjQiPrk25Tm7Z/aZgc4LkGQP0gGB1A6erNOn7ZPfS3ThUAR2nhuw59gOyTnZPtvzq KbKtUaJt6TCAK+wJxr6MLpZrUdaGX6MkpzLgKQSru6SS8bPTzir/MACFM66L9HdHFhA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XxRp5pKd; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47271606A33F; Sat, 5 Dec 2026 12:18:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XxRp5pKd X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796473105; b=vWkwjcJxugPfk6jNhienN/LeGrQofxXfCjtfOuXcJ4yeoeZror1Bg8Hon/aD7bpUrTcs xrlV9NYvkuFArbOOTMPD9h36tgYR8xTDPawgDC31Gps1ntkdi/m2iKqhpO+KrqeBbi2aq gS0YgOBg1AObzT0dnxHHWQfeVLpuZ0oTUI2VZmmKAejx670RsziQCSvfyqmkUE1IMDQDU ePg0Q/WXFAn4ZYZ20O+dXTcJl9YQCgW65SIJBn3qCbzKK6ak2O6hbNN83KNmIUZl9U4w3 RxQh3i77mnRLLZOgfSRfqrlMkMxWh6js/euhGL+wVj9upRDJm3v9Y+0hCloq+vBNo4Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796473105; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=w4U7Z6HmU7Gqk7EoMIifSNCTL0m/hU4bbahMltq+qLc=; b=KfnzG7kngiFuu7dnv1wTPjLz9R0jDeSFlOV7I91XldNPGwfKVrUV1RRf99pL8nzjKIwd ydpUWiyhTUgI+7EHh/QQfPu9rXItqPTlVTazjhXX9aJLF+OwaolkcUaog10OLBDtwXcqO JqErOOojN/u5dKglv4enVtGSkDlahqKuirhDhqsNm22izIsw56Db1glD3bDJyn0+nxwq+ oUiddHcyOqIgeZk0DQUZh5sT79kzqmSia+X5uNkyymardid0bknlib2Y2fD6hwOJOkGVJ xAsu5zmtBRytYQCbTu90pqEMIKLPuW7LbRBhxpnc+y+QPQZci/m2+Vrbw07iXi3vAvA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XxRp5pKd; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EED0606A322; Sat, 5 Dec 2026 12:18:25 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2332E1F00936; Sat, 5 Dec 2026 12:18:23 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796473104; bh=w4U7Z6HmU7Gqk7EoMIifSNCTL0m/hU4bbahMltq+qLc=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=XxRp5pKdgpwBFNsBVJ623RePuKHYLXyWBMgHql2qJDsbyWt8j//HfiZp5q89QSpI4 s7Bn8qtuCgMR/Dt8IS74Ou+jnLc1eJhbS6iKPmqTyW1v4XhCK5Z/I10JXH2nmG5BBP bnxm3zEakRrLrWPV+I1ks8oSf+zjHesfBUv4cRE8JMFUpvdFjrEaCLEWbApFxjGA2u gH/gKHx0wV29UIxcVYjxmL/pb07heBIOAEoHW4/DF1H0xToExg75qbtbJqGrski1BL UPr8ZgtvOUAFyMkcneG0Fm5tgAdNNlaZ4NorUUbdjpIGnQEP5Ievcog9EcZceU6z/0 zthuRehEr80Wg== X-Cc: davem@davemloft.net, andrew+netdev@lunn.ch, kuba@kernel.org, edumazet@kernel.org, willemb@google.com, pabeni@redhat.com, linux@armlinux.org.uk, kabel@kernel.org, sebastian.hesselbarth@gmail.com, gregory.clement@bootlin.com, hkallweit1@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@bootlin.com, devicetree@vger.kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, christophe.leroy@csgroup.eu, herve.codina@bootlin.com, f.fainelli@gmail.com, vladimir.oltean@nxp.com, kory.maincent@bootlin.com, o.rempel@pengutronix.de, nicveronese@gmail.com, horms@kernel.org, marcin.s.wojtas@gmail.com, daniel@makrotopia.org, dimitri.fedrau@liebherr.com, frank.wunderlich@linux.dev, p.ameruoso@live.it, f@lex.la X-In-Reply-To: <20261204110622.1106492-2-maxime.chevallier@bootlin.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list