From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XxRp5pKd Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2332E1F00936; Sat, 5 Dec 2026 12:18:23 +0000 (UTC) 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== Subject: Re: [PATCH net-next 01/12] dt-bindings: net: Add Ethernet MII multiplexers From: netdev-bot+sashiko@kernel.org To: maxime.chevallier@bootlin.com 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 Date: Sat, 05 Dec 2026 12:18:22 +0000 Message-ID: <179647310262.3146.1000393445396503445@kernel.org> In-Reply-To: <20261204110622.1106492-2-maxime.chevallier@bootlin.com> References: <20261204110622.1106492-2-maxime.chevallier@bootlin.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 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