[PATCH 4/6] soc: qcom: geni-se: Define the QSPI firmware protocol
From: Jyothi Kumar Seerapu
Date: Fri Nov 06 2026 - 10:09:13 EST
Add GENI_SE_QSPI with firmware protocol ID 9. The GENI SPI driver uses
this value to request QSPI firmware and validate the protocol running
on a serial engine.
Extend the firmware loader's protocol-name table to accept QSPI.
Reject unused protocol IDs in the sparse table before looking up
firmware.
Signed-off-by: Jyothi Kumar Seerapu <jyothi.seerapu@xxxxxxxxxxxxxxxx>
---
drivers/soc/qcom/qcom-geni-se.c | 7 +++++--
include/linux/soc/qcom/geni-se.h | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 873bfbd6b2b7..396f3d81d292 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -122,7 +122,10 @@ struct geni_se_desc {
static const char * const icc_path_names[] = {"qup-core", "qup-config",
"qup-memory"};
-static const char * const protocol_name[] = { "None", "SPI", "UART", "I2C", "I3C", "SPI SLAVE" };
+static const char * const protocol_name[] = {
+ "None", "SPI", "UART", "I2C", "I3C", "SPI SLAVE",
+ [GENI_SE_QSPI] = "QSPI",
+};
/**
* struct se_fw_hdr - Serial Engine firmware configuration header
@@ -1557,7 +1560,7 @@ int geni_load_se_firmware(struct geni_se *se, enum geni_se_protocol_type protoco
enum geni_se_xfer_mode mode = GENI_SE_FIFO;
int ret;
- if (protocol >= ARRAY_SIZE(protocol_name)) {
+ if (protocol >= ARRAY_SIZE(protocol_name) || !protocol_name[protocol]) {
dev_err(se->dev, "Invalid geni-se protocol: %d", protocol);
return -EINVAL;
}
diff --git a/include/linux/soc/qcom/geni-se.h b/include/linux/soc/qcom/geni-se.h
index 29a53bbc0dd4..e96266631ae1 100644
--- a/include/linux/soc/qcom/geni-se.h
+++ b/include/linux/soc/qcom/geni-se.h
@@ -37,6 +37,7 @@ enum geni_se_protocol_type {
GENI_SE_I2C,
GENI_SE_I3C,
GENI_SE_SPI_SLAVE,
+ GENI_SE_QSPI = 9,
GENI_SE_INVALID_PROTO = 255,
};
--
2.34.1