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 v5 1/5] dt-bindings: nvmem: layouts: add Qualcomm eFuse Ethernet MAC layout
Date: Fri, 04 Dec 2026 06:40:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-249239@kernel.org> (raw)
In-Reply-To: <20261204-nvmem-byte-mask-for-split-macaddr-v5-1-13c12a99383f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 7 potential
issues to consider:
- [Medium] dt-bindings: nvmem: qcom,efuse-eth-mac.yaml unreferenced with
select false
- [Medium] dt-bindings: nvmem: duplicate @0 unit-address on
shared-offset MAC cells
- [Medium] dt-bindings: nvmem: example 4-cell reg lacks 2-cell parent
bus node
- [Medium] dt-bindings: nvmem: byte-mask lacks qcom vendor prefix and
minimum bound
- [Medium] dt-bindings: nvmem: reg size marked informational and leaks
driver terms
- [Medium] dt-bindings: nvmem: MAC-only layout blocks non-MAC cells and
splits QFPROM
- [Low] dt-bindings: nvmem: unused node labels in qcom,efuse-eth-mac
example
--
commit 83a0f7d91e8c47c792f2963b9b58a84133cc3b0f
Author: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
dt-bindings: nvmem: layouts: add Qualcomm eFuse Ethernet MAC layout
This commit adds a Device Tree binding schema for the Qualcomm eFuse
Ethernet MAC address NVMEM layout and adds the qcom,nord-qfprom
compatible to qcom,qfprom.yaml.
> 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 0000000000000..545aeb1741ce5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-eth-mac.yaml
> @@ -0,0 +1,87 @@
[ ... ]
> +select: false
[Severity: Medium]
Should qcom,efuse-eth-mac.yaml also be added to the oneOf list in
Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml?
With select: false, this schema is never applied directly, and
nvmem-layout.yaml validates nvmem-layout nodes against a closed oneOf
list with unevaluatedProperties: false. Without referencing it there,
make dt_binding_check fails on the example below.
[ ... ]
> +patternProperties:
> + "^eth[0-9]+-mac@[0-9a-f]+$":
[Severity: Medium]
Can two Ethernet MAC cells that share a starting eFuse byte offset avoid
a duplicate unit-address warning under this pattern?
Because nvmem-layout uses #address-cells = <1> and this pattern allows
only a single hex offset after @, sibling nodes starting at the same
offset (such as eth0-mac@0 and eth1-mac@0 in the example) share the
unit-address @0.
dtc checks unit-addresses across enabled siblings regardless of the
node-name prefix under -Wunique_unit_address_if_enabled, so
make dt_binding_check rejects this. A sub-qualifier like the one in
fixed-layout.yaml (@[a-f0-9]+(,[0-7])?$) would disambiguate them.
[ ... ]
> + 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.
[Severity: Medium]
Should the reg size cell bound the bits set in byte-mask rather than
being treated as informational?
Allowing byte-mask to determine the read length independently of reg
breaks standard reg semantics and lets a cell reference bytes past its
declared [offset, offset + size) span.
Also, this description and the byte-mask description below refer to
Linux driver behavior ("The driver uses byte-mask...") and kernel
symbols (hweight(byte-mask), ETH_ALEN), which writing-bindings.rst
asks bindings to avoid.
> +
> + 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.
[Severity: Medium]
Should byte-mask carry the qcom, vendor prefix and a minimum: 1 schema
constraint?
Because byte-mask is a custom property defined only in this
Qualcomm-specific binding, writing-bindings.rst requires a vendor prefix
(qcom,byte-mask). Omitting minimum: 1 also allows byte-mask = <0> to
pass validation even though zero set bits conflicts with the absent
property case (6 contiguous bytes).
[ ... ]
> +additionalProperties: false
[Severity: Medium]
Does restricting this layout exclusively to Ethernet MAC cells prevent
other QFPROM cells from coexisting on the same NVMEM device?
An NVMEM provider supports at most one nvmem-layout child node
(of_nvmem_layout_get_container()), and direct child cells under QFPROM
are deprecated by nvmem-deprecated-cells.yaml.
With patternProperties limited to ^eth[0-9]+-mac@[0-9a-f]+$ and
additionalProperties: false, no other QFPROM cells can live in the
layout, forcing a synthetic 8-byte qcom,qfprom node as in the example.
Supporting generic fixed cells alongside Ethernet MAC cells in one
Qualcomm QFPROM layout would keep the full QFPROM block in one node.
[ ... ]
> + efuse: efuse@360d4320 {
> + compatible = "qcom,nord-qfprom", "qcom,qfprom";
> + reg = <0x0 0x360d4320 0x0 0x8>;
[Severity: Medium]
Will this 4-cell reg property fail dt_binding_check without a 2-cell
parent bus node?
Top-level binding examples default to #address-cells = <1> and
#size-cells = <1>, so this reg is parsed as two entries
(<0x0 0x360d4320> and <0x0 0x8>).
That triggers a unit_address_vs_reg mismatch against @360d4320 and
violates qcom,qfprom.yaml, which only allows 1 or 4 reg entries.
Wrapping the node in a soc node with 2 address and size cells (or using
a 1-cell reg = <0x360d4320 0x8>) fixes this.
[ ... ]
> + eth0_mac: eth0-mac@0 {
> + reg = <0x0 0x6>;
> + };
> +
> + eth1_mac: eth1-mac@0 {
> + reg = <0x0 0x7>;
> + byte-mask = <0x5f>;
> + };
[Severity: Low]
This isn't a bug, but the efuse, eth0_mac, and eth1_mac labels are not
referenced anywhere in the example, which violates writing-schema.rst
and fails scripts/dtc/dt-check-style in strict mode.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-nvmem-byte-mask-for-split-macaddr-v5-0-13c12a99383f@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-12-04 6:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 6:22 [PATCH v5 0/5] nvmem: add Qualcomm eFuse Ethernet MAC address layout driver Hongmei Xu
2026-12-04 6:22 ` [PATCH v5 1/5] dt-bindings: nvmem: layouts: add Qualcomm eFuse Ethernet MAC layout Hongmei Xu
2026-12-04 6:40 ` sashiko-bot [this message]
2026-12-04 6:22 ` [PATCH v5 2/5] nvmem: layouts: add Qualcomm eFuse Ethernet MAC address layout driver Hongmei Xu
2026-12-04 6:53 ` sashiko-bot
2026-12-04 6:22 ` [PATCH v5 3/5] MAINTAINERS: add entry for Qualcomm Ethernet MAC nvmem " Hongmei Xu
2026-12-04 6:22 ` [PATCH v5 4/5] arm64: defconfig: enable NVMEM_LAYOUT_QCOM_ETH_MAC Hongmei Xu
2026-12-04 6:30 ` sashiko-bot
2026-12-04 6:22 ` [PATCH v5 5/5] arm64: dts: qcom: Add eFuse nvmem cells for Ethernet MAC addresses Hongmei Xu
2026-12-04 6:43 ` sashiko-bot
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-249239@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox