From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
To: andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, gregkh@linuxfoundation.org,
jirislaby@kernel.org, andersson@kernel.org,
konradybcio@kernel.org, johan+linaro@kernel.org,
dianders@chromium.org, agross@kernel.org,
linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-spi@vger.kernel.org
Cc: mukesh.savaliya@oss.qualcomm.com, quic_anupkulk@quicinc.com,
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Subject: [PATCH v5 3/5] i2c: qcom-geni: Load i2c qup Firmware from linux side
Date: Tue, 24 Jun 2025 15:21:00 +0530 [thread overview]
Message-ID: <20250624095102.1587580-4-viken.dadhaniya@oss.qualcomm.com> (raw)
In-Reply-To: <20250624095102.1587580-1-viken.dadhaniya@oss.qualcomm.com>
Add provision to load firmware of Serial engine for I2C protocol from
Linux Execution Environment on running on APPS processor.
Co-developed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
---
Dependencies:
This patch depends on patch 2 of this series.
v4 -> v5:
- Updated the email domain from 'quic' to 'oss'.
v4 Link: https://lore.kernel.org/all/20250503111029.3583807-4-quic_vdadhani@quicinc.com/
v3 - >v4:
- Add a patch dependency note.
v3 Link: https://lore.kernel.org/linux-arm-msm/20250303124349.3474185-8-quic_vdadhani@quicinc.com/
v2 -> v3:
- Load firmware only if the protocol is invalid.
v2 Link: https://lore.kernel.org/linux-arm-msm/20250124105309.295769-7-quic_vdadhani@quicinc.com/
v1 -> v2:
- No change.
v1 Link: https://lore.kernel.org/linux-arm-msm/20241204150326.1470749-6-quic_vdadhani@quicinc.com/
---
drivers/i2c/busses/i2c-qcom-geni.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 13889f52b6f7..11f1089edf37 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -870,7 +870,13 @@ static int geni_i2c_probe(struct platform_device *pdev)
goto err_clk;
}
proto = geni_se_read_proto(&gi2c->se);
- if (proto != GENI_SE_I2C) {
+ if (proto == GENI_SE_INVALID_PROTO) {
+ ret = geni_load_se_firmware(&gi2c->se, GENI_SE_I2C);
+ if (ret) {
+ dev_err_probe(dev, ret, "i2c firmware load failed ret: %d\n", ret);
+ goto err_resources;
+ }
+ } else if (proto != GENI_SE_I2C) {
ret = dev_err_probe(dev, -ENXIO, "Invalid proto %d\n", proto);
goto err_resources;
}
--
2.34.1
next prev parent reply other threads:[~2025-06-24 9:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 9:50 [PATCH v5 0/5] Add support to load QUP SE firmware from Viken Dadhaniya
2025-06-24 9:50 ` [PATCH v5 1/5] dt-bindings: qcom: se-common: Add QUP Peripheral-specific properties for I2C, SPI, and SERIAL bus Viken Dadhaniya
2025-06-24 9:50 ` [PATCH v5 2/5] soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem Viken Dadhaniya
2025-06-28 3:42 ` kernel test robot
2025-07-16 23:27 ` Bjorn Andersson
2025-08-22 7:43 ` Viken Dadhaniya
2025-06-24 9:51 ` Viken Dadhaniya [this message]
2025-07-02 18:02 ` [PATCH v5 3/5] i2c: qcom-geni: Load i2c qup Firmware from linux side Andi Shyti
2025-06-24 9:51 ` [PATCH v5 4/5] spi: geni-qcom: Load spi " Viken Dadhaniya
2025-06-24 9:51 ` [PATCH v5 5/5] serial: qcom-geni: Load UART " Viken Dadhaniya
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=20250624095102.1587580-4-viken.dadhaniya@oss.qualcomm.com \
--to=viken.dadhaniya@oss.qualcomm.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=johan+linaro@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=quic_anupkulk@quicinc.com \
--cc=robh@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®