Article View: linux.kernel.netdev
Article #26305Re: [PATCH net-next v29 RESEND 1/3] dt-bindings: net: Document Motorcomm YT8824 PHY package
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 11:49
Date: Thu, 03 Dec 2026 11:49
169 lines
14302 bytes
14302 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
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] Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml
contradicts itself about the package reg in 10g-qxgmii (external) mode.
- [Low] The commit message says the new `motorcomm,package-mode` property
describes 'whether the package operates in internal or external mode',…
- [Low] motorcomm,yt8824.yaml says the hardware fixes the member PHY MDIO
addresses: 4..7 in internal mode (lines 25-28), and base..base+3…
--
dt-bindings: net: Document Motorcomm YT8824 PHY package
This commit adds a devicetree binding for the Motorcomm YT8824, a package
of four PHYs built on top of ethernet-phy-package.yaml. It adds a new
motorcomm,package-mode property and defines the package reg as the address
of the shared top extended register block. It also adds a maintainer and
the new binding file to the MOTORCOMM PHY DRIVER section in MAINTAINERS.
> diff --git a/Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml b/Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml
> new file mode 100644
> index 0000000000000..1065e5382670f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml
> @@ -0,0 +1,100 @@
[ ... ]
> + motorcomm,package-mode:
> + description: |
> + PHY package can be configured in 2 modes:
> + - internal: YT8824 is embedded in the switch, using
> + an internal interface to the MAC. The member PHYs are
> + fixed at MDIO addresses 4..7 and the shared top
> + extended register block is at address 9.
> + - 10g-qxgmii: YT8824 is a standalone external PHY,
> + connected via 10G QXGMII. The member PHYs start at
> + the base MDIO address and the shared top extended
> + register block is at base + 4.
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [ internal, 10g-qxgmii ]
> +
> + reg:
> + description:
> + The absolute MDIO address of the YT8824 shared top extended
> + register block.
> + For internal mode, this is fixed at 9;
> + For external mode, it is the base MDIO address of the four
> + member PHYs plus 4, where base is typically 0x0.
> + Note that this is NOT the reg of the first member PHY.
[Severity: Low]
This isn't a bug, but the wording here doesn't match the enum. The commit
message says the property is meant:
"to describe whether the package operates in internal or external mode."
This reg description also says "For external mode". The enum values are
internal and 10g-qxgmii, so there is no external value.
The driver later in the series checks these strings against phy_modes() in
yt8824_phy_package_probe_once():
} else if (phy_mode_check(mode, PHY_INTERFACE_MODE_10G_QXGMII)) {
package_mode = PHY_INTERFACE_MODE_10G_QXGMII;
So the property looks like a host interface selector, not an
internal/external switch. Could the commit message and the reg description
say that, or say 10g-qxgmii mode instead of external mode?
> +
> +required:
> + - compatible
> + - motorcomm,package-mode
> + - reg
> +
> +allOf:
> + - if:
> + properties:
> + motorcomm,package-mode:
> + const: internal
> + then:
> + properties:
> + reg:
> + const: 9
[Severity: Low]
The mode description says the member PHYs are fixed at MDIO addresses 4..7
in internal mode. In 10g-qxgmii mode they are at base..base+3, which is
reg - 4 .. reg - 1. Should the schema also constrain the child
ethernet-phy@N nodes?
The children only get the generic pattern from ethernet-phy-package.yaml:
patternProperties:
^ethernet-phy@[a-f0-9]+$:
$ref: ethernet-phy.yaml#
As a result, an internal mode DT with member PHYs at 0..3 or 10..13 still
passes dt_binding_check.
realtek,rtl8224-package.yaml uses the same base schema and limits the child
reg range relative to the package reg:
- if:
properties:
reg: { const: 4 }
then:
patternProperties:
"^ethernet-phy@[a-f0-9]+$":
properties:
reg: { minimum: 4, maximum: 7 }
Would a similar per-mode child reg constraint work here?
> + - if:
> + properties:
> + motorcomm,package-mode:
> + const: 10g-qxgmii
> + then:
> + properties:
> + reg:
> + const: 4
[Severity: Medium]
Does this conditional match the reg description above? The mode
description says that in 10g-qxgmii mode the member PHYs start at a base
MDIO address and the top block is at base + 4. The reg description adds
"where base is typically 0x0". With reg pinned to const 4, only base 0
passes dt_binding_check and dtbs_check.
Some boards may put a standalone YT8824 at a non-zero base. Two examples
are members at 8..11 with the top block at 12, or two YT8824 packages on
one MDIO bus. The schema would reject these, even though the text
describes that layout as valid.
The only way to get such a DT to validate would be to write reg = <4>.
But the driver later in the series uses the package reg directly as the
top block address. Both ytphy_read_top_ext() and ytphy_write_top_ext() do
this:
drivers/net/phy/motorcomm.c:ytphy_read_top_ext() {
...
ret = __phy_package_write(phydev, 0, YTPHY_PAGE_SELECT, regnum);
...
return __phy_package_read(phydev, 0, YTPHY_PAGE_DATA);
}
With that workaround, every shared top block access would go to the wrong
MDIO address.
If the hardware always puts the external base at 0, should the "typically"
and "base + 4" text be changed? If not, could the constraint be relaxed,
for example to minimum: 4 and maximum: 31?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202105259.3767612-1-kyle.switch%40motor-comm.com
Technical Details
Message-ID:
<179629856189.3146.749241867829105903@kernel.org>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376526-linux-kernel-netdev=dewy.ruReferences:
<20261202105259.3767612-2-kyle.switch@motor-comm.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376526-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v29 RESEND 1/3] dt-bindings: net: Document Motorcomm YT8824 PHY package Date: Thu, 03 Dec 2026 11:49:21 +0000 Organization: Usenet Network Message-ID: <179629856189.3146.749241867829105903@kernel.org> References: <20261202105259.3767612-2-kyle.switch@motor-comm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2476631"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:8rRsgSUyR8XlJBV948Jd0Wo3KPs= sha256:35pGwb+AAp5Vo5956RgLpnk1b6Z29UlEtQIZiM7EhT4= sha1:pMe/U3/kz0weCJ7B4ogid5v2aNk= sha256:G3X8PzEeo3BwmtS8VKgUsf+jFIWy0Hl1pX9Pb2+loIA= 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 9D9FC1178F9; Thu, 3 Dec 2026 14:49:43 +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=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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 wUWJVXeSg_LV; Thu, 3 Dec 2026 14:49:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376526-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 210F81178E8; Thu, 3 Dec 2026 14:49:30 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 1278B270B6; Thu, 3 Dec 2026 11:49:26 +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=1796298564; b=FxMjb3zkmA+aKUw/WGjXgfc8P1KjIGZp99w3x0HXdpItIwJSxckgTjcTK5436tt7MYxO TvpVk6qMsAR8rFHrzqO74e15JmGP4yqvISEWbnrwBlxzqRwlBmnt4nCI2pRKXAmrTjWi9 qZz9HRv5E0+iBhisQBMllAMGsKnf3HKhuFKDsTiscC3KJ74oKZwoK7vuzPjflf39ByZxT imgGK7ukv3ZF9VuNxEolsx//AjAE2AWOggE3drEVZ+M7CEtKzHeyap6EhOvLmaloxawXz kRuhFLY9CGeq8pZOSkom6Y5cMkVCkbalxyqnRv9WvibkVJ73wWU43FUgWGlqanG7Xqg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796298564; 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=uP1y80dnq6JXOrtvdOw7RKVipAhzXpbMAI3FeuJx/04=; b=FELifebB6KfdvkjRI+wI7TUNoTF8xygsq4kwozz9PWgHuLJmqX2gXSrBhd2RWVgkzj+X +4t0fJMClSA+GG3AKtIt2FEM+22YmEwwr43ry0YYryrmamxv6xVgUkhj0d7jsZtt7E1gB HTxkqQYL2XCNi7OgISn72ICbOBZPCa079BJtFiuwTjRN0QJA6X/JdXil34LRxLkLNmUYf L8z71znN5ZKS/6JM2fb5XR6vKbn0nmjSojrzD52w64IBVVxsa0efrICVErJx+3AA8k2DS VS1A/OG+86yved6zz01lCaWxRRqe33YHwAA0neeWbdMBvMo6he4tg0KHy68518/1Y/Q== 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=IKKW6qRh; 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 67546606A322; Thu, 3 Dec 2026 11:49:24 +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=IKKW6qRh 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=1796298563; b=WvrTm3cEzSWv31WZIDlRBpSH6Vivme/ZoxibOnlG+5Md8fKp0cov6y0b+hu0C/mxnboO Zhuvj/PZMD9gXI3lk4pCoaUDLGEvSsi8l9UzcGGcwplk4OZPHXRvFakOTHWmOrIu0nYzf N6kq24RjXKetOryuSEwKhCsXmJP1jzzN2GoeHIHwGzsnXgU8y6ROe6GhppcWBWZNF79V3 h2wJ5TpLDtwnqe+H9012acktmVCjdvJKVHwI6X7xW5on0qIrtSyCkdUZ3KwfbL4/Jo18o EMQ/W7lZjUaADl28NWUF9ilSHVXhen0TCyUcvJsU4P+yLPgeOzPnGdCfYUWWlDf6nHw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796298563; 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=uP1y80dnq6JXOrtvdOw7RKVipAhzXpbMAI3FeuJx/04=; b=B2i4RWu7iusJ0t+0w7PT98yqFesxYMekbiiCUg9dIyy2jCs94ypjE7EcPgPqmF9G852e zwcQ+gQrcjKap7h+vcj3iBaW6aXPxRubakYQotzYdEfgJ8aqWdHbQJz5i30/x7k1A4EEp 3maeeMJ5v4AoBhP2pv0Vnq3QBNgxM/czXEQJ2Q7NQff6pxi+O1OvjyrK6Cpc5jneOl2iE wo378tSKAccuuhVvUuklqCk9+MdH4BRTDbppxMOWecHoVH1j/JXOTXnGmdPRwOjXb54Za JddzJajquEqBu0+v5NAKlSEeAbFg/pv5cEdL0/mAuHLm2UrcoorHBQzevsfW9QevNlQ== 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=IKKW6qRh; 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 843F1606A32C; Thu, 3 Dec 2026 11:49:23 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F76C1F00893; Thu, 3 Dec 2026 11:49:22 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796298563; bh=uP1y80dnq6JXOrtvdOw7RKVipAhzXpbMAI3FeuJx/04=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=IKKW6qRhvEPZJ07AjqsDzPBh6NCOGTAdaEJA1TzAGzWlp9PFoUeJx4R9p9tK2EfEw K85ah7zXoSQKm6OCTv+7pCZX358TZsubjAhBzpmWmoLIzW1vlEtsKJ/25FPLZbYNsK yyngODxyWoGYHdz8p9heg67LmRxGXESDdCs9lFJDsnifb5AVNJtL7M5S/HW6+nT3+w L1ax4DFRivbEYMjy6AVT+lt4qJrppgbxS5pLrxTz7YIvRpCDMnO7eMuI+x2IatbhDz kevk6Wu2Bv9vyknlJKd9aAbaFDCkWVJzW+c/2LiYtUeVAfvQbR4RF+dtZavYCmz1Hk ++ralkW8Bu8qg== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, Frank.Sae@motor-comm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ming.xu@motor-comm.com, xiaolin.xu@motor-comm.com, jianmin.wang@motor-comm.com X-In-Reply-To: <20261202105259.3767612-2-kyle.switch@motor-comm.com> X-sashiko-severity: Medium 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