Re: [PATCH net-next v24 01/10] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch

From: netdev-bot+sashiko

Date: Thu Oct 01 2026 - 00:45:35 EST


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]
Documentation/devicetree/bindings/net/dsa/airoha,an8855-switch.yaml…

--

dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch

This commit adds a YAML binding for the Airoha AN8855 5-port Gigabit
Switch. The binding references the generic DSA ethernet-ports
definition and adds a single compatible string.

> diff --git a/Documentation/devicetree/bindings/net/dsa/airoha,an8855-switch.yaml b/Documentation/devicetree/bindings/net/dsa/airoha,an8855-switch.yaml
> new file mode 100644
> index 0000000000000..5ad9b9e139831
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/airoha,an8855-switch.yaml

[ ... ]

> +description: >
> + Airoha AN8855 is a 5-port Gigabit Switch.
> +
> + It does expose the 5 Internal PHYs on the MDIO bus and each port
> + can access the Switch register space by configuring the PHY page.
> +
> +$ref: dsa.yaml#/$defs/ethernet-ports

[Severity: Low]
Should the port unit addresses be limited to what the hardware has?

This binding inherits the generic port node pattern from
dsa.yaml#/$defs/ethernet-ports without narrowing it:

Documentation/devicetree/bindings/net/dsa/dsa.yaml:
"^(ethernet-)?port@[0-9a-f]+$":

The AN8855 has 6 ports. Ports 0-4 are user ports with internal PHYs and
port 5 is the CPU port, and the driver later in the series sets
ds->num_ports = AN8855_NUM_PORTS.

As a result, a DT with port@7 or port@1f still passes dt_binding_check
and dtbs_check. It is only rejected at probe time, and then the whole
switch fails to probe:

net/dsa/dsa.c:dsa_switch_parse_ports_of() {
...
if (reg >= ds->num_ports) {
dev_err(ds->dev, "port %pOF index %u exceeds num_ports (%u)\n",
...
}

Other DSA bindings with a fixed port count narrow the pattern under
ports: patternProperties. For example, mediatek,mt7530.yaml and
qca8k.yaml use "^(ethernet-)?port@[0-6]$", and renesas,rzn1-a5psw.yaml
uses "^(ethernet-)?port@[0-4]$".

Would something like "^(ethernet-)?port@[0-5]$" make sense here? This
file is unchanged at the end of the series.

[ ... ]

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260928194511.41878-1-ansuelsmth%40gmail.com