OSDN Git Service

dt-bindings: net: constrain number of 'reg' in ethernet ports
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 2 Nov 2022 16:15:11 +0000 (12:15 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2022 08:48:25 +0000 (08:48 +0000)
'reg' without any constraints allows multiple items which is not the
intention for Ethernet controller's port number.

Constrain the 'reg' on AX88178 and LAN95xx USB Ethernet Controllers.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/asix,ax88178.yaml
Documentation/devicetree/bindings/net/microchip,lan95xx.yaml

index 1af5235..a81dbc4 100644 (file)
@@ -27,7 +27,9 @@ properties:
           - usbb95,772b   # ASIX AX88772B
           - usbb95,7e2b   # ASIX AX88772B
 
-  reg: true
+  reg:
+    maxItems: 1
+
   local-mac-address: true
   mac-address: true
 
index cf91fec..3715c5f 100644 (file)
@@ -39,7 +39,9 @@ properties:
           - usb424,9e08   # SMSC LAN89530 USB Ethernet Device
           - usb424,ec00   # SMSC9512/9514 USB Hub & Ethernet Device
 
-  reg: true
+  reg:
+    maxItems: 1
+
   local-mac-address: true
   mac-address: true