πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5874

Re: [PATCH net-next v27 1/3] dt-bindings: net: Document Motorcomm YT8824 PHY package

#5874
From: netdev-bot+sashiko
Date: Wed, 21 Oct 2026 05:21
88 lines
11164 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 Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml,
  the package 'reg' is redefined as the absolute MDIO address of the…

--

dt-bindings: net: Document Motorcomm YT8824 PHY package

This commit adds a DT binding schema for the Motorcomm YT8824, a package
of four PHYs, built on ethernet-phy-package.yaml. It adds a
motorcomm,package-mode property and defines the package reg as the MDIO
address of the shared top extend register block. It also adds the new
file and a second maintainer to the MOTORCOMM PHY DRIVER entry 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 000000000000..4c67f8afcf27
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/motorcomm,yt8824.yaml

[ ... ]

> +  reg:
> +    description:
> +      The absolute MDIO address of the YT8824 shared top extend
> +      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.
> +
> +required:
> +  - compatible
> +  - motorcomm,package-mode
> +  - reg
> +
> +unevaluatedProperties: false

[Severity: Low]
Does the schema enforce "fixed at 9" for internal mode anywhere? I could
not find an allOf/if-then on motorcomm,package-mode that sets reg to
const 9. So a node with package-mode = "internal" and any reg in the
0..31 range inherited from ethernet-phy-package.yaml would still pass
dt_binding_check.

The two address rules also don't line up. The internal mode example below
has the member PHYs at 4..7 and reg = <9>:

    ethernet-phy-package@9 {
        ...
        reg = <9>;

        motorcomm,package-mode = "internal";

        ethernet-phy@4 {

For that layout, the "base plus 4" rule from external mode would give 8.
Could the description explain why the top extend block sits at a different
offset in internal mode?

The reg value matters at runtime. Later in this series,
of_phy_package_join() in drivers/net/phy/phy_package.c reads the package
node's reg into base_addr:

    if (of_property_read_u32(package_node, "reg", &base_addr)) {

and ytphy_read_top_ext()/ytphy_write_top_ext() in drivers/net/phy/motorcomm.c
access offset 0 from that base:

    ret = __phy_package_write(phydev, 0, YTPHY_PAGE_SELECT, regnum);

With a wrong reg, every top extend access (page select, SerDes PLL control
and so on) would go to a member PHY or to an empty MDIO address.

Would it make sense to add an if/then on motorcomm,package-mode that
constrains reg to const 9 for internal mode?

[ ... ]

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020021929.3028490-1-kyle.switch%40motor-comm.com
Technical Details
Message-ID: <179256006385.3135.9820779006338159316@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349818-linux-kernel-netdev=dewy.ru
References: <20261020021929.3028490-2-kyle.switch@motor-comm.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349818-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v27 1/3] dt-bindings: net: Document Motorcomm
 YT8824 PHY package
Date: Wed, 21 Oct 2026 05:21:03 +0000
Organization: Usenet Network
Message-ID: <179256006385.3135.9820779006338159316@kernel.org>
References: <20261020021929.3028490-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="4037945"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:+fRCZrjKv0uN9T2RsbwtA656c8k= sha256:Bg3cverqdfPySzqCGXZSAzCnS2Nc9lYiWuZe1Rp+tYk=
	sha1:C6TWVXTtBh9B1yK3IKSxVu8dEw8= sha256:i5AmIqgnOvCsqtW+0fUthM5yNAvPhOHAXhTs+12q51A=
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 B19A3110F1D; Wed, 21 Oct 2026 08:23:13 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.728
X-Spam-Status: No, score=-3.728 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.329, 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, URIBL_BLOCKED=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 z3QBHVXlhd8j;
	Wed, 21 Oct 2026 08:23:09 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-349818-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 90DCF110F04; Wed, 21 Oct 2026 08:23:01 +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 3040165545; Wed, 21 Oct 2026 05:21:12 +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=1792560072;
	b=iCARBBw/9XN1JuO3YAl+TPHG/yalBxjg/5gE0N3Bc01HqOonI7fQCOX+4qc6sVIXxVnL
	 R9cQQf4H/GE0dVmfMvGpq2f53668/kYlwjtv8iR7Vf7VZo7j6w8YA6Stma1KhakkMYhTK
	 Lf4hQa6bBY8Te/xT1mYQ02xTvj52VfRErcTPV0N/PK2thhoi/UUokuT2xcX6EtRp7TX1s
	 F+0qdFN9pd1LhvdGCKzNeOxMr96zGU0fjc+MgfEqh1yT4OtAb/ZAO80DTJU80s6q85tJi
	 DFKSO3+FjHu0znekKCPJeQA6lgU4bNBSz+1Xo0+fKvcfX3I+tsz4t74S6RO2HJ+72xA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792560072;
	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=N1IkFkLJmopa22B4Ujdc/+lpdLepjyVDkGevXe28X7I=;
	b=Jkvpl0WJcViM5sPa9ShBJHFiPYVCaDsv3iRZ4L9F4s2meFVRpkdnDROICAE1yEhVcNm4
	 wVRMCyjSwc+wm4MJS+OG91wWQHD20Jo/WULm3NYUuUNXHDp2fep6DDvuyvqrpf0X8782n
	 K/XSZO36hIYK++uX4q2eCcSHNw5mMbJEuywPRt93Q8Lcw1nnfw0OfBE9fpg5gYS8mKlHV
	 s+TzEwKtNxQq5tu/j1+PWYK8TWrmL6hiq3oJm5exLh5IPVUvZBtHcdVsklpZfggcZRNXq
	 kU3g2YVX0bircy1NeNpP7V/UdOB6YAXsoBu774J6oDNrVvtl6KONUMcIPNqJOhen6zA==
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=O80iRg6z;
	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 DE08F606A321;
	Wed, 21 Oct 2026 05:21:11 +0000 (UTC)
X-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=O80iRg6z
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=1792560066;
	b=lu6MLy7SY4cyYzdU1lUpAJa2m12l1RaBLkAsz6yEMdRTPssefWco46GGcEY5w2nb8E/9
	 Jn0Dss4JgqScoiCEi19KqLpT7uwpBdSipQysBEubDJPnjU8SjD4JLp8uPXgOnqMIaEP+Q
	 63wmuCcKDEbxl+C+x6Tz0rp3k2j6JuzprP9Y8RN1w5iEiRolkjuac/EGEea9ZqqiNwnY6
	 ot8I3yu9rMXe+3V9Nc1E9Mc88CRvWaR5hxxm0zv3Y3UuNWT9zDA2Yg94OQpCFtuEu63bX
	 lGYys5tkKaEAW4siOcnrWEq4eHfz3gZWwxOUkoz7gvMFw3VzWUVB9P0SL684dkq7BMw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792560066;
	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=N1IkFkLJmopa22B4Ujdc/+lpdLepjyVDkGevXe28X7I=;
	b=YV2Wr0pN0FyrF8pRkFdeignYpfVfLFuaitlN4q2qSoP4IpauGvwUpbLokS4lzy008Qgs
	 L2hVrO4cZMEJWcJgEqDyhDzXgdOUtv6Df3Nvr16ppgqdO/ST3G6Hdk10bdPFpFD5Cu6ej
	 goQUVBWMSXI55cI6INHF3SnbWVJgCMsTqe4NRTBamhys1kLnaKFOO0DVaK/8RfSqN1lDb
	 u74Ek8b+igF+r8SeZRl7zwWVp6HWGpWDBsQImE9ztwu3L5RG7RshpLjQzVw46lSbDQ7ls
	 9ZCHfazGNpHdnltJ3KrqBjW0NTX0/tGiqC1xlLs/W33VwEuZNX+BPadX8mY5jUvDHmg==
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=O80iRg6z;
	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 B4C0C606A31B;
	Wed, 21 Oct 2026 05:21:05 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53B001F000CB;
	Wed, 21 Oct 2026 05:21:04 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792560065;
	bh=N1IkFkLJmopa22B4Ujdc/+lpdLepjyVDkGevXe28X7I=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=O80iRg6z5H1Pr/oZT1x/DLOhP8KI6ZZMfxTW+P2esfqgkubw4hhuicVE2UemUX1tX
	 3EXQK7F/XE3fULx1Y0YiEmB8ekLStOqiSD1Me5zMHsFw59IM97qTCgA6eYkQNN5sM0
	 YiPJeQnU0vKxp5jUpalr10pzryvExW1MUX3EdRrVOKtKPs6wkudW/edu5RegKyvflk
	 JCM1Nsc0e1lN8ErsB4kzuO8DBtYyTiu+dh42pDsNrsLjgGbPIVCQXazGv757U7dv5S
	 +V4NPkf2SOKHQO38R/Xe73rWus9O9RXmqZPgpm4vHYn8gjpeSdhG7YaoglfRGLbWWX
	 uZz1HkwG2XljA==
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: <20261020021929.3028490-2-kyle.switch@motor-comm.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