[PATCH v3 1/2] dt-bindings: net: constrain number of 'reg' in ethernet ports

From: Krzysztof Kozlowski
Date: Wed Nov 02 2022 - 12:22:49 EST


'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@xxxxxxxxxx>
Reviewed-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

---

Changes since v2:
1. Drop changes to switches.
2. Add Rb tag.

Changes since v1:
1. Drop change to non-accepted renesas,r8a779f0-ether-switch.
---
Documentation/devicetree/bindings/net/asix,ax88178.yaml | 4 +++-
Documentation/devicetree/bindings/net/microchip,lan95xx.yaml | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/asix,ax88178.yaml b/Documentation/devicetree/bindings/net/asix,ax88178.yaml
index 1af52358de4c..a81dbc4792f6 100644
--- a/Documentation/devicetree/bindings/net/asix,ax88178.yaml
+++ b/Documentation/devicetree/bindings/net/asix,ax88178.yaml
@@ -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

diff --git a/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml b/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
index cf91fecd8909..3715c5f8f0e0 100644
--- a/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
+++ b/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
@@ -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

--
2.34.1