From: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
To: viken.dadhaniya@oss.qualcomm.com, andi.shyti@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
vkoul@kernel.org, Frank.Li@kernel.org, andersson@kernel.org,
konradybcio@kernel.org, dmitry.baryshkov@oss.qualcomm.com,
linmq006@gmail.com, quic_jseerapu@quicinc.com, agross@kernel.org,
linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
dmaengine@vger.kernel.org
Cc: krzysztof.kozlowski@oss.qualcomm.com,
bartosz.golaszewski@oss.qualcomm.com,
bjorn.andersson@oss.qualcomm.com, konrad.dybcio@oss.qualcomm.com,
Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
Subject: [PATCH v6 0/4] Enable multi-owner I2C support for QCOM GENI controllers
Date: Tue, 31 Mar 2026 17:17:38 +0530 [thread overview]
Message-ID: <20260331114742.2896317-1-mukesh.savaliya@oss.qualcomm.com> (raw)
The QUP-based GENI I2C controller driver currently assumes exclusive
ownership of the controller by a single system processor. This prevents
safe use of a single I2C controller by multiple system processors
(e.g. APPS and a DSP) running the same or different operating systems.
One practical example is an EEPROM connected to an I2C controller that
needs to be accessed independently by firmware running on a DSP and by
Linux running on the application processor, without causing bus-level
interference during transfers.
This series adds support for operating a QUP GENI I2C Serial Engine in a
multi-owner configuration. Each system processor uses its own dedicated
GPI instance (GPII) as the data path between the Serial Engine and the
GSI DMA engine. As a result, controller sharing is supported only when
the I2C controller operates in GPI mode; FIFO/CPU DMA modes are not
supported for this configuration.
To serialize access at the hardware level, the GPI DMA engine is used to
emit lock and unlock Transfer Ring Elements (TREs) around I2C transfers.
The lock is acquired before the first transfer and released after the
last transfer, ensuring uninterrupted access to the controller while a
processor owns it.
In addition, when a controller is shared, the GENI common layer avoids
placing the associated GPIOs into the pinctrl "sleep" state during
runtime suspend. This prevents disruption of transfers that may still
be in progress on another system processor using the same controller
pins.
The multi-owner behavior is enabled via a DeviceTree property,
`qcom,qup-multi-owner`, on the I2C controller node. This property must be
used only when the hardware configuration requires controller sharing
and when GPI mode is enabled.
Patch overview:
1. Document the `qcom,qup-multi-owner` DeviceTree property for GENI I2C.
2. Extend the QCOM GPI DMA driver to support lock and unlock TREs with a
simplified single-field API.
3. Update the GENI common layer to keep pinctrl active for shared
controllers during runtime suspend.
4. Enable multi-owner operation in the GENI I2C driver using the new
DeviceTree property and GPI lock/unlock support.
Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
---
Link to V5 : https://lore.kernel.org/lkml/20241129144357.2008465-2-mukesh.savaliya@oss.qualcomm.com/
Changes in V6:
- Addressed review feedback from Krzysztof Kozlowski and other reviewers, primarily
around clarifying the feature semantics and improving the DeviceTree flag naming.
- Renamed the DeviceTree property from qcom,shared-se to qcom,qup-multi-owner to
better describe the multi-owner controller use case.
- Updated the cover letter to clearly describe the multi-owner I2C design, the
GPI-only limitation, and the role of the new qcom,qup-multi-owner flag.
- Updated the DeviceTree binding documentation to reflect the new qcom,qup-multi-owner
property and refined its description for clarity and correctness.
- [Patch 2/4] Simplify the GPI I2C interface by replacing multiple shared SE related
state flags with a single internal lock/unlock control managed entirely in the GPI
driver - Suggested by Vinod Koul.
- [Patch 3/4] Updated the GENI common layer to avoid selecting the pinctrl “sleep”
state for multi-owner controllers, preventing disruption of transfers initiated by
another system processor during runtime suspend.
- [Patch 4/4] Updated the GENI I2C driver to:
- Detect the qcom,qup-multi-owner DeviceTree property.
- Mark the underlying serial engine as shared.
- Request GPI lock and unlock TRE sequencing around I2C transfers using the
simplified single field API.
- Clarified commit messages across all patches to avoid ambiguous terminology
(such as “subsystem”), expand abbreviations, and better explain functional
requirements rather than optimizations.
- Updated copyright headers across all files wherever applicable.
- Renamed variable shared_geni_se to multi_owner to match the DT property naming.
- Changed dev_err(print_log) during probe() to dev_err_probe().
---
Mukesh Kumar Savaliya (4):
dt-bindings: i2c: qcom,i2c-geni: Document multi-owner controller
support
dmaengine: qcom: gpi: Add lock/unlock TREs for multi-owner I2C
transfers
soc: qcom: geni-se: Keep pinctrl active for multi-owner controllers
i2c: qcom-geni: Support multi-owner controllers in GPI mode
.../bindings/i2c/qcom,i2c-geni-qcom.yaml | 7 +++
drivers/dma/qcom/gpi.c | 44 ++++++++++++++++++-
drivers/i2c/busses/i2c-qcom-geni.c | 27 +++++++++++-
drivers/soc/qcom/qcom-geni-se.c | 15 +++++--
include/linux/dma/qcom-gpi-dma.h | 18 ++++++++
include/linux/soc/qcom/geni-se.h | 2 +
6 files changed, 107 insertions(+), 6 deletions(-)
--
2.25.1
next reply other threads:[~2026-03-31 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 11:47 Mukesh Kumar Savaliya [this message]
2026-03-31 11:47 ` [PATCH v6 1/4] dt-bindings: i2c: qcom,i2c-geni: Document multi-owner controller support Mukesh Kumar Savaliya
2026-04-08 14:39 ` Rob Herring (Arm)
2026-03-31 11:47 ` [PATCH v6 2/4] dmaengine: qcom: gpi: Add lock/unlock TREs for multi-owner I2C transfers Mukesh Kumar Savaliya
2026-03-31 11:47 ` [PATCH v6 3/4] soc: qcom: geni-se: Keep pinctrl active for multi-owner controllers Mukesh Kumar Savaliya
2026-04-01 10:19 ` Konrad Dybcio
2026-04-23 6:38 ` Mukesh Savaliya
2026-03-31 11:47 ` [PATCH v6 4/4] i2c: qcom-geni: Support multi-owner controllers in GPI mode Mukesh Kumar Savaliya
2026-04-01 10:21 ` Konrad Dybcio
2026-04-23 6:38 ` Mukesh Savaliya
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=20260331114742.2896317-1-mukesh.savaliya@oss.qualcomm.com \
--to=mukesh.savaliya@oss.qualcomm.com \
--cc=Frank.Li@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linmq006@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_jseerapu@quicinc.com \
--cc=robh@kernel.org \
--cc=viken.dadhaniya@oss.qualcomm.com \
--cc=vkoul@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