From: Trilok Soni <trilokkumar.soni@oss.qualcomm.com>
To: Junhao Xie <bigfoot@radxa.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mtd@lists.infradead.org, Xilin Wu <sophon@radxa.com>
Subject: Re: [PATCH v2 0/2] mtd: devices: Qualcomm SCM storage support
Date: Wed, 28 Jan 2026 13:43:05 -0800 [thread overview]
Message-ID: <dd89949a-11da-4c57-9b1a-2fba181988cc@oss.qualcomm.com> (raw)
In-Reply-To: <20260126-scm-storage-v2-v2-0-fa045c7e7699@radxa.com>
On 1/26/2026 3:44 AM, Junhao Xie wrote:
> This patch series adds support for accessing storage devices managed by
> Qualcomm TrustZone firmware via SCM (Secure Channel Manager) by
> introducing a new MTD driver.
>
> On some Qualcomm platforms, firmware or BIOS-related storage (typically
> SPI NOR flash) is not directly accessible from the non-secure world.
> All read, write, and erase operations must be performed through SCM
> interfaces provided by the secure firmware. As a result, existing MTD
> SPI NOR drivers cannot be used directly on these systems.
>
> This series introduces a new MTD device driver that exposes such
> firmware-managed storage as a standard MTD device in the Linux kernel.
> The driver is built on top of the existing Qualcomm SCM infrastructure
> and integrates with the MTD subsystem to provide a uniform interface to
> userspace.
>
> This driver has been tested on Radxa Dragon Q6A, based on the Qualcomm
> QCS6490 SoC, with a Winbond W25Q256JWPIQ SPI NOR flash device.
>
> Note that this platform previously used the standard Qualcomm Linux
> firmware, which allowed direct access to the QSPI controller without
> needing this driver. However, we plan to migrate to a Windows-compatible
> firmware which is more feature-complete but restricts direct access.
> Device tree changes for this transition will be sent separately.
>
> If kernel boots with EL2, access to the SCM storage will be denied. This
> needs more investigation.
So you plan to enable this driver only w/ the Gunyah based configuration
and disable for the KVM one through the devicetree overlay ? I just
don't want to break the KVM boot flow on other platforms supporting
qcs6490.
>
> Changes in v2:
> - Convert enum qcom_scm_storage_result to macro definitions
> - Use __qcom_scm_is_call_available() instead of a machine allowlist
> - Add missing __packed annotations and endianness handling
> - Introduce struct qcom_scm_storage_payload to improve readability
> - Always compiled-in qcom_scm_storage_send_cmd() and qcom_scm_storage_init()
> https://lore.kernel.org/lkml/F138514E18CB55B6+20251218180205.930961-1-bigfoot@radxa.com/
>
> Tested-by: Xilin Wu <sophon@radxa.com>
> Signed-off-by: Junhao Xie <bigfoot@radxa.com>
> ---
> Junhao Xie (2):
> firmware: qcom: scm: Add SCM storage interface support
> mtd: devices: Add Qualcomm SCM storage driver
>
> drivers/firmware/qcom/qcom_scm.c | 161 ++++++++++++++++++++
> drivers/firmware/qcom/qcom_scm.h | 3 +
> drivers/mtd/devices/Kconfig | 17 +++
> drivers/mtd/devices/Makefile | 1 +
> drivers/mtd/devices/qcom_scm_storage.c | 265 +++++++++++++++++++++++++++++++++
> include/linux/firmware/qcom/qcom_scm.h | 34 +++++
> 6 files changed, 481 insertions(+)
> ---
> base-commit: 63804fed149a6750ffd28610c5c1c98cce6bd377
> change-id: 20260126-scm-storage-v2-0a4f3e900b88
>
> Best regards,
next prev parent reply other threads:[~2026-01-28 21:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 11:44 [PATCH v2 0/2] mtd: devices: Qualcomm SCM storage support Junhao Xie
2026-01-26 11:44 ` [PATCH v2 1/2] firmware: qcom: scm: Add SCM storage interface support Junhao Xie
2026-01-28 13:39 ` Konrad Dybcio
2026-01-30 10:58 ` Junhao Xie
2026-01-26 11:44 ` [PATCH v2 2/2] mtd: devices: Add Qualcomm SCM storage driver Junhao Xie
2026-01-29 19:01 ` Miquel Raynal
2026-01-28 13:26 ` [PATCH v2 0/2] mtd: devices: Qualcomm SCM storage support Konrad Dybcio
2026-01-28 14:13 ` Miquel Raynal
2026-01-28 20:31 ` Bjorn Andersson
2026-01-29 18:38 ` Miquel Raynal
2026-01-29 13:05 ` Junhao Xie
2026-01-28 20:42 ` Bjorn Andersson
2026-01-30 13:39 ` Junhao Xie
2026-01-30 14:10 ` Miquel Raynal
2026-01-30 16:45 ` Junhao Xie
2026-02-03 14:20 ` Miquel Raynal
2026-03-13 10:16 ` Val Packett
2026-01-28 21:43 ` Trilok Soni [this message]
2026-01-29 12:47 ` Junhao Xie
2026-01-29 14:17 ` Konrad Dybcio
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=dd89949a-11da-4c57-9b1a-2fba181988cc@oss.qualcomm.com \
--to=trilokkumar.soni@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=bigfoot@radxa.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=sophon@radxa.com \
--cc=vigneshr@ti.com \
/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