From: Demeter Barna via B4 Relay <devnull+me.fromdisposition.org@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Srinivas Kandagatla <srini@kernel.org>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org,
Demeter Barna <me@fromdisposition.org>
Subject: [PATCH 3/5] nvmem: qfprom: Add the SM8350 keepout regions
Date: Thu, 05 Nov 2026 13:30:02 +0000 [thread overview]
Message-ID: <20261105-b4-sm8350-gpu-v1-3-a7175cdd6512@fromdisposition.org> (raw)
In-Reply-To: <20261105-b4-sm8350-gpu-v1-0-a7175cdd6512@fromdisposition.org>
From: Demeter Barna <me@fromdisposition.org>
Some SM8350 fuse ranges are protected by the XPU, so the AP cannot read
them: a read in 0x0-0x11f, 0x128-0x147, 0x640-0x8df or 0x2110-0x216f
resets the SoC. The nvmem file in sysfs is readable by every user, so
once the QFPROM is described, anyone who reads the whole file resets the
device.
Keep those regions out, as for SC7180 and SC7280, which share the
0x128-0x147 one; they read as zeros.
The regions were measured on a Razer Edge 5G one 32-bit word at a time,
and each boundary was checked from both sides.
Signed-off-by: Demeter Barna <me@fromdisposition.org>
---
drivers/nvmem/qfprom.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index 1de3435df..24958ed79 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -124,6 +124,18 @@ static const struct qfprom_soc_compatible_data sc7280_qfprom = {
.nkeepout = ARRAY_SIZE(sc7280_qfprom_keepout)
};
+static const struct nvmem_keepout sm8350_qfprom_keepout[] = {
+ {.start = 0x0, .end = 0x120},
+ {.start = 0x128, .end = 0x148},
+ {.start = 0x640, .end = 0x8e0},
+ {.start = 0x2110, .end = 0x2170}
+};
+
+static const struct qfprom_soc_compatible_data sm8350_qfprom = {
+ .keepout = sm8350_qfprom_keepout,
+ .nkeepout = ARRAY_SIZE(sm8350_qfprom_keepout)
+};
+
/**
* qfprom_disable_fuse_blowing() - Undo enabling of fuse blowing.
* @priv: Our driver data.
@@ -460,6 +472,7 @@ static const struct of_device_id qfprom_of_match[] = {
{ .compatible = "qcom,qfprom",},
{ .compatible = "qcom,sc7180-qfprom", .data = &sc7180_qfprom},
{ .compatible = "qcom,sc7280-qfprom", .data = &sc7280_qfprom},
+ { .compatible = "qcom,sm8350-qfprom", .data = &sm8350_qfprom},
{/* sentinel */},
};
MODULE_DEVICE_TABLE(of, qfprom_of_match);
--
2.53.0
next prev parent reply other threads:[~2026-11-05 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 13:29 [PATCH 0/5] SM8350 GPU: memory bandwidth vote and speed bins Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 1/5] arm64: dts: qcom: sm8350: Vote the GPU memory bandwidth Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 2/5] dt-bindings: nvmem: qfprom: Add SM8350 compatible Demeter Barna via B4 Relay
2026-11-19 22:13 ` Rob Herring (Arm)
2026-11-05 13:30 ` Demeter Barna via B4 Relay [this message]
2026-11-05 13:30 ` [PATCH 4/5] drm/msm/adreno: Add speedbins for A660 GPU Demeter Barna via B4 Relay
2026-11-05 13:30 ` [PATCH 5/5] arm64: dts: qcom: sm8350: Add the GPU speed bins Demeter Barna via B4 Relay
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=20261105-b4-sm8350-gpu-v1-3-a7175cdd6512@fromdisposition.org \
--to=devnull+me.fromdisposition.org@kernel.org \
--cc=abelvesa@kernel.org \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=me@fromdisposition.org \
--cc=robh@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--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®