The current description indicates that the 'dsa,member' property cannot
be set for a switch that is not part of any cluster. Vladimir thinks
that this is a case where the actual technical limitation was poorly
transposed into words when this restriction was first documented, in
commit 8c5ad1d6179d ("net: dsa: Document new binding").The true technical limitation is that many DSA tagging protocols are topology-unaware, and always call dsa_conduit_find_user() with a switch_id of 0. Specifying a custom "dsa,member" property with a non-zero switch_id would break them. Therefore, for topology-aware switches, it is fine to specify this property for them, even if they are not part of any cluster. Our NETC switch is a good example which is topology-aware, the switch_id is carried in the switch tag, but the switch_id 0 is reserved for VEPA switch and cannot be used, so we need to use this property to assign a non-zero switch_id for it. Suggested-by: Vladimir Oltean <[email protected]> Signed-off-by: Wei Fang <[email protected]> --- Documentation/devicetree/bindings/net/dsa/dsa.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml index 2abd036578d1..801e1411e5c2 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml @@ -28,7 +28,11 @@ properties: A two element list indicates which DSA cluster, and position within the cluster a switch takes. <0 0> is cluster 0, switch 0. <0 1> is cluster 0, switch 1. <1 0> is cluster 1, switch 0. A switch not part of any cluster - (single device hanging off a CPU port) must not specify this property + (single device hanging off a CPU port) does not usually need to specify + this property, and then it becomes cluster 0, switch 0. For a topology + aware switch, its switch index can be specified through this property, + even if it is not part of any cluster. Also, topology-unaware switches + must always be defined as index 0 of their cluster. $ref: /schemas/types.yaml#/definitions/uint32-array additionalProperties: true -- 2.34.1
