Devicetree
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: kyle.switch@motor-comm.com
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
Subject: Re: [PATCH net-next V29 1/3] dt-bindings: net: Document Motorcomm YT8824 PHY package
Date: Fri, 04 Dec 2026 03:46:53 +0000	[thread overview]
Message-ID: <179635601335.3146.13283218503536356094@kernel.org> (raw)
In-Reply-To: <20261201094405.3036391-1-kyle.switch@motor-comm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

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] In motorcomm,yt8824.yaml, the description of the external
  (10g-qxgmii) mode says the address can vary, but the schema fixes it.

--

dt-bindings: net: Document Motorcomm YT8824 PHY package

This patch adds a binding for the Motorcomm YT8824 quad PHY package. It
builds on ethernet-phy-package.yaml and adds a new
motorcomm,package-mode property to choose internal or 10g-qxgmii mode.
It also adds a maintainer and an F: entry 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

[ ... ]

> +  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.

[ ... ]

> +  - if:
> +      properties:
> +        motorcomm,package-mode:
> +          const: 10g-qxgmii
> +    then:
> +      properties:
> +        reg:
> +          const: 4

[Severity: Medium]
Do the text and the schema agree for the 10g-qxgmii case?

The motorcomm,package-mode description says the member PHYs "start at the
base MDIO address" and the top block is "at base + 4". The reg description
says base is "typically 0x0". Both suggest the base can be something other
than 0.

This branch sets reg to const 4, so 0 is the only base that passes the
schema. The parent ethernet-phy-package.yaml allows any reg from 0 to 31:

  reg:
    minimum: 0
    maximum: 31

So the limit to 4 comes only from this binding.

Suppose an external YT8824 is strapped to a non-zero base, for example
PHYs at 8..11 with the top block at 12. Would its DT fail
dt_binding_check? It also seems that two external YT8824 packages could
never share one MDIO bus in a schema-valid DT.

The driver patch later in this series ("net: phy: Add driver for
Motorcomm Quad 2.5GbE phy") makes the same assumption.
yt8824_utp_shared_group() in drivers/net/phy/motorcomm.c hard-codes a base
of 0 for non-internal mode:

	if (priv->package_mode == PHY_INTERFACE_MODE_INTERNAL)
		base = 4;
	else
		base = 0;

	if (addr < base || addr >= base + YT8824_UTP_SHARED_GROUPS * 2)
		return -EINVAL;

The schema and the driver match each other, but neither matches the
binding text. The binding is unchanged at the end of the series.

This is new DT ABI, so which one is intended? If the hardware supports a
variable base, could reg be a range, with driver support for that base?
If the external base is hard-wired to 0, could the text say so and drop
the "base" and "typically 0x0" wording?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201094405.3036391-1-kyle.switch%40motor-comm.com

      parent reply	other threads:[~2026-12-04  3:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  9:44 [PATCH net-next V29 1/3] dt-bindings: net: Document Motorcomm YT8824 PHY package Kyle Switch
2026-12-01  9:44 ` Kyle Switch
2026-12-01  9:44 ` [PATCH net-next V29 2/3] net: phy: Add support for Template Control register for PMA Kyle Switch
2026-12-04  3:46   ` netdev-bot+sashiko
2026-12-01  9:44 ` [PATCH net-next V29 3/3] net: phy: Add driver for Motorcomm Quad 2.5GbE phy Kyle Switch
2026-12-04  3:46   ` netdev-bot+sashiko
2026-12-04  3:46 ` netdev-bot+sashiko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179635601335.3146.13283218503536356094@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=Frank.Sae@motor-comm.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jianmin.wang@motor-comm.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kyle.switch@motor-comm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ming.xu@motor-comm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=xiaolin.xu@motor-comm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox