Re: [PATCH net-next v2 2/4] dt-bindings: net: dsa: Add SoC-e SWIP switch
From: Andrew Lunn
Date: Mon Sep 07 2026 - 15:06:13 EST
> + patternProperties:
> + '^mdio@[0-9a-f]+$':
> + $ref: /schemas/net/mdio.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + maximum: 30
> + description:
> + MDIO controller output index, which must be lower than the
> + number of implemented switch ports.
Is there a relationship between an MDIO bus and a port?
I'm just wondering if the MDIO bus should be a property of the
port. There are switch which have an MDIO bus per port.
> +patternProperties:
> + '^(ethernet-)?ports$':
> + patternProperties:
> + '^(ethernet-)?port@[0-9a-f]+$':
> + $ref: dsa-port.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + maximum: 30
> + description:
> + Switch port index. Supported switch configurations have
> + up to 31 ports, numbered from 0 through 30.
30 seems odd. Is 31 something special?
> +examples:
> + - |
> + ethernet-switch@80020000 {
> + compatible = "soce,swip-00-04-0c-10";
> + reg = <0x80020000 0x10000>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + label = "lan0";
label is another thing in DSA which is today not best practice. I
would drop this.
Andrew