From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796366428; b=rSubYqaC+55yKtDvdXtGBNW+mdgmk8a0gNivnLabP8Xc7nRikID1APlnpRhgPS4wJfUJ IEx3+zhv9CwMq663EhDt5Jd3ZenG39c5vg/7CjsKsiwk64N0C4rGT8tJpb4oTvh53Aevk O0jLSp18cCdY8D3jV7/67ze5KKPqhta0VWgO9p42v2NqHr7nAlGC557g8tu1MN7WMqc76 +i/7Sh5nvaJaxwyxbSISnZj8DlzSnWy3JMtuo3qWklrr5HVkTCq+mZpd/GFVNBUxjR7nB 9+gkv20Q6tv8uysSQc86ZSN3idjRJ9H88KQLR2q4ODw1/jqt30aSXkeVTI6G8S/yrsg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796366428; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=xycbsn9HjVtZ+2o1WW8brPZbv36OZXD7ZrAbnR5ZxZ0=; b=s2I9y8zohSXENIDtXRvCvu4uzVWo+7rzHQph2tV0r60McZeEfoppRsVXWEo1Dj0P5DDN ZzJwclFDa4Wi3/+OmqlfoMP0qOVa6BSK9/WuOzJkg3olj2IC5aQbkLBHR+xnKbDBYA88Q r5nQ0krxbpcecpaG1Pv2kH7ndmTyzzmT99rMcRkcPV3xmBtTbGowpl83t/SugPEwQrwO6 ic4tht9TgLjlSIJUSGQQ1xvcGFGLKOysjf+4hh98447NqlMP3cLKz0xbraCwDskH6Dldh WOzYVa38Xf1jFqdMXTomyQ7MotYMI7vM98qGkxkEkgHw8Wjkj6cLA8EFEWSqX07tGbA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="NCoBXs/r"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 644E4606A322 for ; Fri, 4 Dec 2026 06:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NCoBXs/r Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2D4A1F000C2; Fri, 4 Dec 2026 06:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796366428; bh=xycbsn9HjVtZ+2o1WW8brPZbv36OZXD7ZrAbnR5ZxZ0=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=NCoBXs/rXp9GmN+NHqoiAyEZEFUgYzqZbtWfrmfSUCu+zdpPVZaXrsnj2bKFq2YRl afTJfMI5pEjr/CVnn6L6PPPqaXrNjzqXAmYNTitU7pLcno6ul30tbo16ER+yKoBJ69 80y39wbX5U7WIzqIskej02bm5av2tl1+0+6jBpsmguhkoCgShXlHN2g9jDwmpZG/p3 mQYNAA8hsSv3cE+dAOGyG6EWtcqXhsbw0yoSWGrLg0f22WVTH3wCjGpTMBpN22LN43 LObOFHp+8AkA3KsIO0T7JBzPUBwdKflMgLfOsFedXOaF7CnyW5y4h2OZEZKxxyTLD5 t22WO9ARs2XyQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 1/5] dt-bindings: nvmem: layouts: add Qualcomm eFuse Ethernet MAC layout Reply-To: sashiko-reviews@lists.linux.dev To: "Hongmei Xu" Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261204-nvmem-byte-mask-for-split-macaddr-v5-1-13c12a99383f@oss.qualcomm.com> References: <20261204-nvmem-byte-mask-for-split-macaddr-v5-0-13c12a99383f@oss.qualcomm.com> <20261204-nvmem-byte-mask-for-split-macaddr-v5-1-13c12a99383f@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 06:40:27 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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-e= th-mac.yaml b/Documentation/devicetree/bindings/nvmem/layouts/qcom,efuse-et= h-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 =3D <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 . 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 compact= ed > + 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 contiguou= s. [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 =3D <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 =3D "qcom,nord-qfprom", "qcom,qfprom"; > + reg =3D <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 =3D <1> and #size-cells =3D <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 =3D <0x360d4320 0x8>) fixes this. [ ... ] > + eth0_mac: eth0-mac@0 { > + reg =3D <0x0 0x6>; > + }; > + > + eth1_mac: eth1-mac@0 { > + reg =3D <0x0 0x7>; > + byte-mask =3D <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. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-nvmem-byte= -mask-for-split-macaddr-v5-0-13c12a99383f@oss.qualcomm.com?part=3D1