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=1796082478; b=uv8qkIOM+2ws9eo4UVlW9oVJIzw/5HOZu9uUktvfoWzk+U8ljNJzveBmkw8A9uVMYfqB +13FhxT5mIYr1GXQLqarJGzrLRbVzTPdVEH7vgv/M+Uw58nWwZlFuw6kShsAsp340ww97 MV9ghYi3BQmNlsxQEZCEjCSTrLZf1NTUcm0wTamT1uu6Yso+Ibv9mJSo0MX+OhZUkw6hL CSGToR3fvTgfc58R2iwzQhEdV9D9OyjrflCWX5gKpKBRGdluJxB70PaySEoD+uIn0epPb vBLZnhRWbQH6WfueF2hOk9HePWn3hA+tbYzg5QEUgQiH3QUL9LJptJOHLs3X0kPWhYg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796082478; 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=48Rsd/ZG6m01INHGBaYbyyzg7WfQTl3FMIQPE6hdCYA=; b=N2seGqD1LkPsQzUuFxxgowEwAla3nOtOpDA1iWarfQLrE+eQH7ltE8qMKS6QLAGN6CS7 koQVtGOTW12H+u07cq1njybhr4Aw/VEBRMLPKrQugRA4R1osV3s56AM3mVDgFYgc7Qf+q jHwkegs6cSOY/h67PzohCkA4zsK44tsu0Y2ySHdDIxSVfpx9h0ZFFWbMCpce3abRCjDN3 28uaHsq6fiBnJdXEu1a9Zo29bs3SNK9f0AaoqSBh6VhUWQREdXix2Je/wLh14TvkgudHS 1tnFuRRHtgPI/mZiOOxV3WpwSZr/B6rillHgbcY92PLelrrUnfsMLeMZFmF11hwuCXw== 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=XgwxsxUK; 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 B9E22606A6B6; Mon, 30 Nov 2026 23:47:58 +0000 (UTC) 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=XgwxsxUK Received: by smtp.kernel.org (Postfix) with ESMTPSA id A11D41F00898; Mon, 30 Nov 2026 23:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796082478; bh=48Rsd/ZG6m01INHGBaYbyyzg7WfQTl3FMIQPE6hdCYA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=XgwxsxUKAOvdAyAI1+sfNLt2xnO1R2Kxi1gCvqIkZLMjBosP0WwzF7zKdJCyTgVyu MLS4Du0Tj3i187qRElSZacOP+eU9C8XdmNicubNQhs9HRGSSGshuKHglAyeRMo6x8m 3s19sN3ehH2z+zk8icUfBO/vydJcc/XJAd7efLl9ui6VFcvyXEfHJuFZlgg3Ug7Cb/ GYsWcKY4PhXQFw2VjJz+ZKr17NNg6a01WjGwhBa3+iB2ZO0pV+B0B/TlyVEQ2vryu7 klpjf2uzgxr6734h5VoU/JgARZ9DtSSn/b1txXKf+Rpk33tTWayO+OVQDRlzANF5IG ldoQKQlIhWJHQ== Subject: Re: [PATCH net-next v23 13/15] dt-bindings: net: pcs: Document support for Airoha Ethernet PCS From: netdev-bot+sashiko@kernel.org To: ansuelsmth@gmail.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, willemb@google.com, horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org, lorenzo@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk, maxime.chevallier@bootlin.com, p.zabel@pengutronix.de, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, rmk+kernel@armlinux.org.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, llvm@lists.linux.dev, zhengping.zhang@airoha.com Date: Mon, 30 Nov 2026 23:47:56 +0000 Message-ID: <179608247620.3146.50273369832406405@kernel.org> In-Reply-To: <20261129230558.612526-14-ansuelsmth@gmail.com> References: <20261129230558.612526-14-ansuelsmth@gmail.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: llvm@lists.linux.dev 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 5 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 2 · Low: 3 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] The airoha,an7581-pcs-pcie binding makes the PCS node own the PCIe SerDes analog and per-lane PMA blocks. - [Medium] The binding defines no `resets`/`reset-names` and sets `additionalProperties: false` (airoha,pcs.yaml line 176), so any DT… - [Low] The airoha,an7581-pcs-pcie variant sets "#pcs-cells" to const 1 (Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml, line… - [Low] The commit message and the binding `description` (airoha,pcs.yaml lines 12-15) list "10BASE-R" as a supported interface. - [Low] No MAINTAINERS entry covers the new file Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml, at this… -- dt-bindings: net: pcs: Document support for Airoha Ethernet PCS This commit adds a YAML binding for the Airoha AN7581 PCS blocks, with four compatibles for the Ethernet, PON, PCIe-shared and USB-shared SerDes ports. The PCIe variant describes two PCS instances and uses #pcs-cells = <1>. The other variants use #pcs-cells = <0>. > diff --git a/Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml b/Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml > new file mode 100644 > index 0000000000000..9c1d116c1b016 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml > @@ -0,0 +1,261 @@ [ ... ] > +maintainers: > + - Christian Marangi [Severity: Low] Should this new file also get a MAINTAINERS entry? The series adds an ETHERNET PCS SUBSYSTEM entry, but it only lists: F: Documentation/networking/pcs.rst F: drivers/net/pcs/pcs.c F: include/linux/pcs/pcs-provider.h F: include/linux/pcs/pcs.h No entry covers airoha,pcs.yaml or drivers/net/pcs/airoha/. The other bindings in this directory (renesas,rzn1-miic.yaml, rockchip,rk3568-xpcs.yaml, snps,dw-xpcs.yaml) each have an F: line. As it stands, checkpatch will warn, and get_maintainer.pl will not list the author for later changes to this binding. > + > +description: > + Airoha AN7581 SoC expose multiple Physical Coding Sublayer (PCS) for > + the various Serdes port supporting different Media Independent Interface > + (10BASE-R, USXGMII, 2500BASE-X, 1000BASE-X, SGMII). [Severity: Low] This isn't a bug, but should 10BASE-R be 10GBASE-R? The driver sets PHY_INTERFACE_MODE_10GBASER for this mode. The commit message has the same text. The description also reads as if every SerDes port supports the whole list. Is that true for airoha,an7581-pcs-usb? That variant has no usxgmii or pcs_pma regions, and airoha_pcs_probe() only sets the 10GBASE-R and USXGMII bits for the ETH, PON and PCIE port types: case AIROHA_PCS_ETH: case AIROHA_PCS_PON: case AIROHA_PCS_PCIE: __set_bit(PHY_INTERFACE_MODE_10GBASER, ...); __set_bit(PHY_INTERFACE_MODE_USXGMII, ...); fallthrough; case AIROHA_PCS_USB: The commit message also calls this an Ethernet PCS binding. It does not mention the PCIe-shared variant (two PCS instances, #pcs-cells = <1>) or the USB-shared variant (needs a USB PHY via phys, no SCU). [ ... ] > + - if: > + properties: > + compatible: > + contains: > + const: airoha,an7581-pcs-pcie > + > + then: > + properties: [ ... ] > + reg-names: > + items: [ ... ] > + - const: pcs_ana > + - const: pcs_pma0 > + - const: pcs_pma1 > + > + phys: false [Severity: Medium] Do these regions overlap with the existing PCIe PHY node? The example for this compatible puts pcs_ana, pcs_pma0 and pcs_pma1 at 0x1fa5a000, 0x1fa5b000 and 0x1fa5c000. The pciephy node in arch/arm64/boot/dts/airoha/en7581.dtsi already claims the same blocks. That node is not disabled by default: pciephy: phy@1fa5a000 { compatible = "airoha,en7581-pcie-phy"; reg = <0x0 0x1fa5a000 0x0 0xfff>, <0x0 0x1fa5b000 0x0 0xfff>, <0x0 0x1fa5c000 0x0 0xfff>, Both drivers map these regions with devm_platform_ioremap_resource_byname(): - airoha_pcie_phy_probe() maps "csr-2l", "pma0" and "pma1". - airoha_pcs_pcie_alloc_maps()->airoha_pcs_init_named_regmap() maps "pcs_ana", "pcs_pma0" and "pcs_pma1". Suppose a board enables an airoha,an7581-pcs-pcie node laid out like the example. Would the second device to probe fail with -EBUSY? That breaks either the PCIe controllers or the Ethernet PCS. Because of phys: false, the PCS node also cannot refer to the PCIe PHY. The USB variant, by contrast, requires phys and leaves the PMA to the USB PHY. Could the binding model the SerDes as one resource owned by one node? Or could it at least document that pciephy must be disabled when this variant is used? > + > + "#pcs-cells": > + const: 1 [Severity: Low] What does the single #pcs-cells argument cell mean? The binding does not say. airoha_pcs_xlate() treats it as a PCS port index that must be below num_port, so 0 or 1 for the pcs_mac0 and pcs_mac1 instances: case AIROHA_PCS_PCIE: if (pcsspec->nargs != 1) { ... if (pcsspec->nargs) index = pcsspec->args[0]; if (index >= priv->data->num_port) { This becomes DT ABI once merged. Should the cell be described here? On the consumer side, the series does not change pcs-handle in Documentation/devicetree/bindings/net/ethernet-controller.yaml: pcs-handle: $ref: /schemas/types.yaml#/definitions/phandle-array items: maxItems: 1 Its description also still says the property points to a PCS PHY device on an MDIO bus. The airoha,en7581-eth GMAC ports reference ethernet-controller.yaml with unevaluatedProperties: false. Would an entry like pcs-handle = <&pcs_pcie 1>; then be checked against a schema that only allows a bare phandle? The runtime parser in drivers/net/pcs/pcs.c, used by fwnode_pcs_get() and fwnode_phylink_pcs_count(), does expect argument cells: return fwnode_property_get_reference_args(fwnode, "pcs-handle", "#pcs-cells", 0, index, out_args); I could not verify whether dt-validate actually rejects this, because that depends on how dtschema splits pcs-handle phandle-arrays. Still, the commit message says "This follow the new PCS provider with the use of #pcs-cells property", while the documented contract only seems to work for #pcs-cells = <0>. > + > + required: > + - airoha,scu [ ... ] > +additionalProperties: false [Severity: Medium] Should the binding document resets and reset-names? There is no resets property, and additionalProperties is false, so a node that provides reset lines fails validation. The PCS driver added later in this series requests them in airoha_pcs_probe(): priv->rsts[0].id = "mac"; priv->rsts[1].id = "phy"; ret = devm_reset_control_bulk_get_optional_exclusive(dev, ARRAY_SIZE(priv->rsts), priv->rsts); airoha_pcs_setup_scu() then asserts and deasserts them after it switches the SCU interface select, on every interface mode setup. On a DT that follows this binding, the optional getter returns no-op controls. Doesn't that mean the MAC/PHY reset around a mode change is silently skipped? A DT that adds the "mac" and "phy" resets the driver expects would instead be rejected by dt_binding_check and dtbs_check. include/dt-bindings/reset/airoha,en7581-reset.h already exports lines that look suitable: EN7581_XPON_PHY_RST, EN7581_XPON_MAC_RST, EN7581_XSI_MAC_RST, EN7581_XSI_PHY_RST, EN7581_DUAL_HSI0/1_RST, EN7581_DUAL_HSI0/1_MAC_RST, EN7581_HSI_RST and EN7581_HSI_MAC_RST. [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129230558.612526-1-ansuelsmth%40gmail.com