[PATCH v5 1/5] dt-bindings: nvmem: layouts: add Qualcomm eFuse Ethernet MAC layout
From: Hongmei Xu
Date: Fri Dec 04 2026 - 01:22:45 EST
Add a device tree binding for the Qualcomm eFuse Ethernet MAC address
NVMEM layout driver. The layout handles cells whose bytes in the QFPROM
may not be contiguous.
Each cell node specifies the physical eFuse offset and size via reg.
An optional byte-mask property selects which physical bytes contribute
to the 6-byte output MAC address; selected bytes are compacted in
ascending bit-index order. Without byte-mask the cell is read as a
plain contiguous 6-byte block.
Also add qcom,nord-qfprom to the QFPROM compatible list; this SoC uses
the layout and its compatible is referenced in the binding example.
Signed-off-by: Hongmei Xu <hongmei.xu@xxxxxxxxxxxxxxxx>
---
.../bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml | 87 ++++++++++++++++++++++
.../devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
2 files changed, 88 insertions(+)
diff --git a/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml b/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml
new file mode 100644
index 000000000000..545aeb1741ce
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/layouts/qcom,efuse-eth-mac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Ethernet MAC address NVMEM layout
+
+maintainers:
+ - Hongmei Xu <hongmei.xu@xxxxxxxxxxxxxxxx>
+
+description:
+ Layout for reading Ethernet MAC addresses from Qualcomm eFuse (QFPROM).
+ Each cell node declares the physical eFuse offset via reg. An optional
+ byte-mask property selects which physical bytes contribute to the 6-byte
+ output MAC; selected bytes are compacted in ascending bit-index order and
+ unset positions are zero-filled. Without byte-mask the cell is read as a
+ plain contiguous 6-byte block.
+
+select: false
+
+properties:
+ compatible:
+ const: qcom,efuse-eth-mac
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+patternProperties:
+ "^eth[0-9]+-mac@[0-9a-f]+$":
+ type: object
+ description: Ethernet MAC address cell
+
+ properties:
+ reg:
+ maxItems: 1
+ description:
+ Physical span within the NVMEM device as <offset size>. The
+ driver uses byte-mask to determine the actual read length;
+ size is informational and conventionally set to the physical
+ span of the MAC bytes in the eFuse.
+
+ byte-mask:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Bitmask where bit i means physical byte i in the eFuse span
+ contributes to the output MAC address. Valid bytes are compacted
+ in ascending bit-index order; output positions beyond
+ hweight(byte-mask) are zero-filled. The number of set bits must
+ not exceed ETH_ALEN (6). Absent when all 6 bytes are contiguous.
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ efuse: efuse@360d4320 {
+ compatible = "qcom,nord-qfprom", "qcom,qfprom";
+ reg = <0x0 0x360d4320 0x0 0x8>;
+
+ nvmem-layout {
+ compatible = "qcom,efuse-eth-mac";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eth0_mac: eth0-mac@0 {
+ reg = <0x0 0x6>;
+ };
+
+ eth1_mac: eth1-mac@0 {
+ reg = <0x0 0x7>;
+ byte-mask = <0x5f>;
+ };
+ };
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 566304ed4c78..d7f48d4ed1ba 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -42,6 +42,7 @@ properties:
- qcom,msm8976-qfprom
- qcom,msm8996-qfprom
- qcom,msm8998-qfprom
+ - qcom,nord-qfprom
- qcom,qcm2290-qfprom
- qcom,qcs404-qfprom
- qcom,qcs615-qfprom
--
2.34.1