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/2026…%40motor-comm.com