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 3/3] arm64: dts: qcom: Add eFuse nvmem cells for Ethernet MAC addresses
Date: Wed, 02 Dec 2026 11:55:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-245643@kernel.org> (raw)
In-Reply-To: <20261202-nvmem-byte-mask-for-split-macaddr-v4-3-039f1b0afeca@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] arm64: dts: qcom: nord: efuse@360d4320 maps 8-byte register
slice as qfprom
- [Low] arm64: dts: qcom: unaligned 6-byte mac-addr0 cell logs dev_err()
on boot
- [Low] arm64: dts: qcom: efuse@360d4320 placed out of unit-address
order in soc@0
- [Low] arm64: dts: qcom: unnecessary #address-cells/#size-cells on
efuse@360d4320
--
commit 0e88df0ea7f12e01b6e2d01adae2774d3c1a1151
Author: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
arm64: dts: qcom: Add eFuse nvmem cells for Ethernet MAC addresses
This commit adds a QFPROM eFuse node to nord.dtsi to expose the EMAC0 and
EMAC1 Ethernet MAC addresses stored in OEM_CONFIG8/9 as nvmem cells.
> diff --git a/arch/arm64/boot/dts/qcom/nord.dtsi b/arch/arm64/boot/dts/qcom/nord.dtsi
> index fdbe290350ddd..cfe1f39648fbc 100644
> --- a/arch/arm64/boot/dts/qcom/nord.dtsi
> +++ b/arch/arm64/boot/dts/qcom/nord.dtsi
> @@ -1471,6 +1471,28 @@ rng: rng@10c3000 {
> reg = <0x0 0x010c3000 0x0 0x1000>;
> };
>
> + efuse: efuse@360d4320 {
> + compatible = "qcom,nord-qfprom", "qcom,qfprom";
> + reg = <0x0 0x360d4320 0x0 0x8>;
[Severity: Medium]
Should this node describe the QFPROM corrected region at its block base
address (0x360d4000) with the MAC address cells at offset 0x320, rather
than mapping only the 8-byte OEM_CONFIG8/9 register slice at 0x360d4320?
In Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml, the reg
property represents the QFPROM corrected region as a whole, with
individual fuses defined as child cells at their register offsets.
Modeling an 8-byte fuse slice as its own qcom,nord-qfprom device prevents
adding other fuse cells from the same QFPROM block later without breaking
the Devicetree ABI or instantiating multiple qcom,qfprom devices for the
same hardware block.
> + #address-cells = <1>;
> + #size-cells = <1>;
[Severity: Low]
Are #address-cells and #size-cells needed on efuse@360d4320 itself?
Because the cells are placed inside the nvmem-layout child node (which
has no reg or ranges property and defines its own #address-cells and
#size-cells), building the DTB with W=1 triggers a dtc
avoid_unnecessary_addr_size warning on efuse@360d4320.
> +
> + nvmem-layout {
> + compatible = "fixed-layout";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + mac_addr0: mac-addr0@0 {
> + reg = <0x0 0x6>;
> + };
[Severity: Low]
Does registering mac-addr0 log an unaligned raw_len error via dev_err() on
every boot?
qfprom_probe() sets word_size = 4, and for a word-aligned cell offset
qfprom_fixup_dt_cell_info() leaves cell->nbits as 0:
drivers/nvmem/qfprom.c:qfprom_fixup_dt_cell_info() {
unsigned int byte_offset = cell->offset % sizeof(u32);
cell->bit_offset += byte_offset * BITS_PER_BYTE;
cell->offset -= byte_offset;
if (byte_offset && !cell->nbits)
cell->nbits = cell->bytes * BITS_PER_BYTE;
}
In nvmem_cell_info_to_nvmem_cell_entry_nodup(), cell->raw_len is only
rounded up to nvmem->word_size ahead of the alignment check when
cell->nbits or cell->byte_mask is non-zero. Because mac-addr0 has neither
bits nor byte-mask, cell->raw_len remains 6 and hits the !IS_ALIGNED()
dev_err() path ("cell mac-addr0 raw len 6 unaligned to nvmem word size
4").
> +
> + mac_addr1: mac-addr1@0,1 {
> + reg = <0x0 0x6>;
> + byte-mask = <0x5f>;
> + };
> + };
> + };
> +
> ufs_mem_hc: ufshc@1d44000 {
> compatible = "qcom,nord-ufshc",
> "qcom,ufshc",
[Severity: Low]
This isn't a bug, but efuse@360d4320 (0x360d4320) is placed between
rng@10c3000 (0x010c3000) and ufshc@1d44000 (0x01d44000). To keep the
nodes under soc@0 sorted by unit address, it should be placed after
system-cache-controller@21800000.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-nvmem-byte-mask-for-split-macaddr-v4-0-039f1b0afeca@oss.qualcomm.com?part=3
prev parent reply other threads:[~2026-12-02 11:55 UTC|newest]
Thread overview: 6+ 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
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
2026-12-02 11:55 ` sashiko-bot [this message]
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-245643@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