From: sashiko-bot@kernel.org
To: "Hongmei Xu" <hongmei.xu@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 1/3] dt-bindings: nvmem: add byte-mask property for non-contiguous byte selection
Date: Wed, 02 Dec 2026 11:45:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-245630@kernel.org> (raw)
In-Reply-To: <20261202-nvmem-byte-mask-for-split-macaddr-v4-1-039f1b0afeca@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: nvmem: byte-mask redefines reg size and reads
beyond reg
- [Medium] dt-bindings: nvmem: byte-mask added to fixed-cell against
maintainer direction
- [Low] dt-bindings: nvmem: unrelated qcom,nord-qfprom addition in
qcom,qfprom.yaml
--
commit 4a212237811eb974de49d8b89d27971b7e08603b
Author: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
dt-bindings: nvmem: add byte-mask property for non-contiguous byte selection
This commit adds the byte-mask property to the fixed-cell NVMEM layout
binding to support selecting non-contiguous physical bytes for a cell,
and adds the qcom,nord-qfprom compatible string to qcom,qfprom.yaml.
> diff --git a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
> index 38e3ad50ff4fb..46e1101ee98ae 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.
> +
[Severity: Medium]
Does byte-mask redefine reg from the cell's physical address range to its
logical output size?
In Devicetree bindings and in fixed-cell.yaml (where bits selects a sub-range
"within the address range specified by reg"), reg = <offset size> describes
the physical address span occupied in the parent NVMEM device. For any
non-contiguous selection of K bytes, the highest set bit spans at least K + 1
physical bytes.
If a DT author sets the reg size to the logical size K, physical reads extend
beyond the declared [offset, offset + K) reg range and hide physical address
overlaps between sibling cells. If the author instead sets the reg size to
the full physical span M > K, this description leaves the contents of the
trailing M - K output bytes unspecified, and consumers expecting an exact
K-byte cell (such as a 6-byte MAC address) receive an M-byte buffer.
> 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
[Severity: Medium]
As reported by Srinivas Kandagatla on v3 [1], should non-contiguous byte
selection be handled by an NVMEM layout driver rather than adding a
byte-mask property to fixed-cell.yaml?
The NVMEM layout infrastructure already supports custom multi-byte cell
extraction and post-processing callbacks without extending the generic
fixed-cell binding ABI.
> diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
> index 566304ed4c786..d7f48d4ed1ba7 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
[Severity: Low]
Should the addition of qcom,nord-qfprom to qcom,qfprom.yaml be split into a
separate patch? It is unrelated to the generic fixed-cell byte-mask property
and is not mentioned in the commit message.
[1] https://lore.kernel.org/r/ef5c8902-2a55-4879-8deb-5109f7bd3cd2@kernel.org
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-nvmem-byte-mask-for-split-macaddr-v4-0-039f1b0afeca@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-12-02 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 11:36 [PATCH v4 0/3] nvmem: Add byte-mask support for non-contiguous byte selection Hongmei Xu
2026-12-02 11:36 ` [PATCH v4 1/3] dt-bindings: nvmem: add byte-mask property " Hongmei Xu
2026-12-02 11:45 ` sashiko-bot [this message]
2026-12-02 11:36 ` [PATCH v4 2/3] nvmem: core: add byte-mask support for non-contiguous cell bytes Hongmei Xu
2026-12-02 11:36 ` [PATCH v4 3/3] arm64: dts: qcom: Add eFuse nvmem cells for Ethernet MAC addresses Hongmei Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-245630@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hongmei.xu@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.