Skip to contentSkip to conversation

dt-bindings: net: brcm,bcm4329-fmac: add nvmem-cells for MAC address

PATCH In review Rosen Penev 3 participants 3 messages Aug 11 – Aug 16

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

PATCH v2 1/1 dt-bindings: net: brcm,bcm4329-fmac: add nvmem-cells for MAC address

The nvmem-cells and nvmem-cell-names properties are used to supply a MAC address to the brcmfmac wireless controller. Nodes such as bcm4709-linksys-ea9200.dts fail dtbs_check with:

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

nvmem-consumer.yaml cannot be referenced from the common network-class.yaml because it does not constrain the number of entries or their names, and not all network devices use the same cell names. Each binding that uses nvmem must therefore define its own nvmem-cells/nvmem-cell-names constraints, like ethernet-controller.yaml and qca,ath9k.yaml already do.

Add the single-cell, mac-address-only constraints to the brcm,bcm4329-fmac binding.

Assisted-by opencode:deepseek-v4-flash-free

---
v2: don't use nvmem-consumer.yaml

 .../bindings/net/wireless/brcm,bcm4329-fmac.yaml           | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml +7 -0
index 81fd3e37452a..88d0099871b1 100644
@@ -57,6 +57,13 @@ properties:
           - pci14e4,4434  # BCM4388
           - pci14e4,449d  # BCM43752
 
+  nvmem-cells:
+    maxItems: 1
+    description: Reference to an nvmem node for the MAC address
+
+  nvmem-cell-names:
+    const: mac-address
+
   reg:
     description: SDIO function number for the device (for most cases
       this will be 1) or PCI device identifier.
Signature · 1 line
2.55.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The patch claims to fix a dtbs_check failure in bcm4709-linksys-ea9200.dts by updating the…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch claims to fix a dtbs_check failure in bcm4709-linksys-ea9200.dts by updating the brcm,bcm4329-fmac wireless binding. However, the bcm4709-linksys-ea9200.dts device tree does not contain any brcm,bcm4329-fmac nodes. The actual nvmem-cells property triggering the validation error in that file is located in a DSA ethernet switch port node (port@4 of &srab). As a result, the patch completely fails to fix the cited validation error and its justification is misattributed. --

--- Patch [1]: [PATCHv2] dt-bindings: net: brcm,bcm4329-fmac: add nvmem-cells for MAC address --- commit 9d4080c22265cf928d39764eafdb9bcf9fa9f241
Author: Rosen Penev <[email protected]>

dt-bindings: net: brcm,bcm4329-fmac: add nvmem-cells for MAC address

This commit adds constraints for nvmem-cells and nvmem-cell-names to the brcm,bcm4329-fmac binding. It aims to resolve dtbs_check failures related to unevaluated properties.

Quoted 6 lines

The nvmem-cells and nvmem-cell-names properties are used to supply a MAC address to the brcmfmac wireless controller. Nodes such as bcm4709-linksys-ea9200.dts fail dtbs_check with:

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

[Severity: Medium]
The commit message claims this patch fixes a dtbs_check failure in bcm4709-linksys-ea9200.dts, but is this accurate?

Looking at arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts, the nvmem-cells property causing the error is located in a DSA ethernet switch port node, not a wireless controller:

		port@4 {
			label = "wan";

			nvmem-cells = <&et2macaddr 1>;
			nvmem-cell-names = "mac-address";
		};

Since the bcm4709-linksys-ea9200.dts device tree does not contain any brcm,bcm4329-fmac nodes, updating the brcm,bcm4329-fmac wireless binding will not fix the cited dtbs_check error.

Should the commit message be updated to cite a different device tree, or should this fix be applied to the DSA switch port binding instead?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
In reply to Rosen Penev
Quoted 14 lines · Rosen Penev

The nvmem-cells and nvmem-cell-names properties are used to supply a MAC address to the brcmfmac wireless controller. Nodes such as bcm4709-linksys-ea9200.dts fail dtbs_check with:

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

nvmem-consumer.yaml cannot be referenced from the common network-class.yaml because it does not constrain the number of entries or their names, and not all network devices use the same cell names. Each binding that uses nvmem must therefore define its own nvmem-cells/nvmem-cell-names constraints, like ethernet-controller.yaml and qca,ath9k.yaml already do.

Quoted 4 lines

Add the single-cell, mac-address-only constraints to the brcm,bcm4329-fmac binding.

Assisted-by opencode:deepseek-v4-flash-free

Probably for this v2 it is better to say:

Quoted 5 lines

---
v2: don't use nvmem-consumer.yaml

  .../bindings/net/wireless/brcm,bcm4329-fmac.yaml           | 7 +++++++
  1 file changed, 7 insertions(+)