[PATCH v4 1/3] dt-bindings: nvmem: add byte-mask property for non-contiguous byte selection
From: Hongmei Xu
Date: Wed Dec 02 2026 - 06:36:46 EST
Add the byte-mask property to the fixed-cell binding. This allows
selecting non-contiguous physical bytes from an NVMEM region to form
a logical cell value.
Some SoCs (e.g. Qualcomm efuse controllers) store a logical value such
as a MAC address across non-contiguous physical bytes, with one or more
bytes in between reserved or unused. byte-mask lets the DT describe this
directly in the fixed-cell binding without requiring a device-specific
provider for a common pattern.
Bit N set in byte-mask means physical byte N relative to the cell's
base offset is included in the output; selected bytes are packed into
the output buffer in ascending byte order. The number of set bits must
not exceed the cell's logical size given by reg. byte-mask and bits are
mutually exclusive. Cells using byte-mask are read-only.
Signed-off-by: Hongmei Xu <hongmei.xu@xxxxxxxxxxxxxxxx>
---
.../bindings/nvmem/layouts/fixed-cell.yaml | 21 +++++++++++++++++++++
.../devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
2 files changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
index 38e3ad50ff4f..46e1101ee98a 100644
--- a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
+++ b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
@@ -34,6 +34,20 @@ properties:
description:
Size in bit within the address range specified by reg.
+ byte-mask:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ description: >
+ Bitmask selecting which physical bytes within the NVMEM device region
+ contribute to this cell's output. Bit N set means physical byte N
+ relative to the cell's base offset is included; selected bytes are
+ packed into the output buffer in ascending byte order. Byte positions
+ are relative to the cell's base offset and limited to a 32-byte window.
+ The highest set bit must not reference a byte beyond the device size.
+ The number of set bits must not exceed the cell's logical size given by
+ reg. Cannot be used together with bits. Cells using byte-mask are
+ read-only; write operations are not supported.
+
allOf:
- if:
properties:
@@ -48,6 +62,13 @@ allOf:
const: 1
required:
- "#nvmem-cell-cells"
+ - if:
+ required: [ byte-mask ]
+ then:
+ properties:
+ bits: false
+ description:
+ byte-mask and bits are mutually exclusive.
required:
- reg
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