From: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
To: "Srinivas Kandagatla" <srini@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Rafał Miłecki" <rafal@milecki.pl>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Hongmei Xu <hongmei.xu@oss.qualcomm.com>
Subject: [PATCH v4 3/3] arm64: dts: qcom: Add eFuse nvmem cells for Ethernet MAC addresses
Date: Wed, 02 Dec 2026 19:36:20 +0800 [thread overview]
Message-ID: <20261202-nvmem-byte-mask-for-split-macaddr-v4-3-039f1b0afeca@oss.qualcomm.com> (raw)
In-Reply-To: <20261202-nvmem-byte-mask-for-split-macaddr-v4-0-039f1b0afeca@oss.qualcomm.com>
Add a QFPROM eFuse node to expose the Ethernet MAC addresses for
EMAC0 and EMAC1 as nvmem cells.
The MAC addresses are stored in OEM_CONFIG8/9 registers starting at
0x360d4320:
bytes 0-4 shared by both EMACs
byte 5 last octet of EMAC0 MAC address
byte 6 last octet of EMAC1 MAC address
EMAC0 reads six consecutive bytes (0-5), requiring no byte selection.
EMAC1 shares bytes 0-4 but takes byte 6 as its last octet, skipping
byte 5. A byte-mask of 0x5F (0b01011111) is used to select bytes
0,1,2,3,4,6 and compact them into the six-byte output buffer.
Only 8 bytes are mapped to avoid overlapping with adjacent QFPROM
devices in the register space.
Signed-off-by: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/nord.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/nord.dtsi b/arch/arm64/boot/dts/qcom/nord.dtsi
index fdbe290350dd..cfe1f39648fb 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>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ mac_addr0: mac-addr0@0 {
+ reg = <0x0 0x6>;
+ };
+
+ mac_addr1: mac-addr1@0,1 {
+ reg = <0x0 0x6>;
+ byte-mask = <0x5f>;
+ };
+ };
+ };
+
ufs_mem_hc: ufshc@1d44000 {
compatible = "qcom,nord-ufshc",
"qcom,ufshc",
--
2.34.1
prev parent reply other threads:[~2026-12-02 11:36 UTC|newest]
Thread overview: 4+ 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:36 ` [PATCH v4 2/3] nvmem: core: add byte-mask support for non-contiguous cell bytes Hongmei Xu
2026-12-02 11:36 ` Hongmei Xu [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=20261202-nvmem-byte-mask-for-split-macaddr-v4-3-039f1b0afeca@oss.qualcomm.com \
--to=hongmei.xu@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafal@milecki.pl \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
/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
all inboxes | Powered by JetHome®