Skip to contentSkip to conversation

dt-bindings: net: add nvmem-consumer reference to network-class

PATCH In review Rosen Penev 2 participants 2 messages Aug 2 – Aug 11

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: net: add nvmem-consumer reference to network-class

The nvmem-cells and nvmem-cell-names properties are used to supply MAC addresses to both wired and wireless network controllers. The wired hierarchy already allows them through ethernet-controller.yaml, but the wireless hierarchy (wireless-controller.yaml -> network-class.yaml) does not. As a result, brcm,bcm4329-fmac nodes using nvmem (e.g. bcm4709-linksys-ea9200.dts) failed dtbs_check with:

Unevaluated properties are not allowed ('nvmem-cell-names', 'nvmem-cells' were unexpected)

Each wireless driver otherwise has to add the nvmem-consumer reference individually (qca,ath9k and mediatek,mt76 already declare their own nvmem-cells/nvmem-cell-names).

Add the nvmem-consumer reference to network-class.yaml so all network nodes inherit the properties at once. Wired controllers keep the tighter single-cell, mac-address-only constraints via ethernet-controller.yaml, which still apply alongside the relaxed class-level properties.

Assisted-by opencode:big-pickle
---
 Documentation/devicetree/bindings/net/network-class.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/net/network-class.yaml +3 -0
index 06461fb92eb8..f7c8e24016f7 100644
@@ -43,4 +43,7 @@ properties:
       maximum frame size (there\'s contradiction in the Devicetree
       Specification).
 
+allOf:
+  - $ref: /schemas/nvmem/nvmem-consumer.yaml#
+
 additionalProperties: true
Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 30 lines · Rosen Penev

The nvmem-cells and nvmem-cell-names properties are used to supply MAC addresses to both wired and wireless network controllers. The wired hierarchy already allows them through ethernet-controller.yaml, but the wireless hierarchy (wireless-controller.yaml -> network-class.yaml) does not. As a result, brcm,bcm4329-fmac nodes using nvmem (e.g. bcm4709-linksys-ea9200.dts) failed dtbs_check with:

Unevaluated properties are not allowed ('nvmem-cell-names', 'nvmem-cells' were unexpected)

Each wireless driver otherwise has to add the nvmem-consumer reference individually (qca,ath9k and mediatek,mt76 already declare their own nvmem-cells/nvmem-cell-names).

Add the nvmem-consumer reference to network-class.yaml so all network nodes inherit the properties at once. Wired controllers keep the tighter single-cell, mac-address-only constraints via ethernet-controller.yaml, which still apply alongside the relaxed class-level properties.

Assisted-by opencode:big-pickle
---
 Documentation/devicetree/bindings/net/network-class.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/net/network-class.yaml +0 -0
index 06461fb92eb8..f7c8e24016f7 100644

Documentation/devicetree/bindings/net/network-class.yaml properties: · line 47

Quoted 5 lines
Documentation/devicetree/bindings/net/network-class.yaml +2 -0
@@ -43,4 +43,7 @@ properties:
       maximum frame size (there\'s contradiction in the Devicetree
       Specification).
 
+allOf:
+  - $ref: /schemas/nvmem/nvmem-consumer.yaml#

This is not correct as I explained in the prior patch.

Rob