* [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode
@ 2026-06-14 8:34 Pengyu Luo
2026-06-14 8:34 ` [PATCH 2/2] spi: qcom-geni: " Pengyu Luo
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Pengyu Luo @ 2026-06-14 8:34 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andy Gross, Bjorn Andersson
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel, Pengyu Luo
Some devices (such as gaokun3) do not disable FIFO mode, causing the
driver to fallback to FIFO mode by default. However, these platforms
also support GSI mode, which is highly preferred for certain
peripherals like SPI touchscreens to improve performance.
Introduce the "qcom,force-gsi-mode" device property to hint and force
the controller into GSI mode during initialization.
Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
.../devicetree/bindings/spi/qcom,spi-geni-qcom.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.yaml b/Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.yaml
index edf399681d7a..80e394c1c715 100644
--- a/Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.yaml
+++ b/Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.yaml
@@ -45,6 +45,11 @@ properties:
- const: tx
- const: rx
+ qcom,force-gsi-mode:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Use DMA (GSI) mode, even if FIFO mode is not disabled.
+
interconnects:
minItems: 2
maxItems: 3
--
2.54.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] spi: qcom-geni: Add property to force GSI mode
2026-06-14 8:34 [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode Pengyu Luo
@ 2026-06-14 8:34 ` Pengyu Luo
2026-06-14 21:18 ` Dmitry Baryshkov
2026-06-14 10:55 ` [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: " Mark Brown
2026-06-15 5:22 ` Krzysztof Kozlowski
2 siblings, 1 reply; 8+ messages in thread
From: Pengyu Luo @ 2026-06-14 8:34 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andy Gross, Bjorn Andersson
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel, Pengyu Luo
Some devices (such as gaokun3) do not disable FIFO mode, causing the
driver to fallback to FIFO mode by default. However, these platforms
also support GSI mode, which is highly preferred for certain
peripherals like SPI touchscreens to improve performance.
Introduce the "qcom,force-gsi-mode" device property to hint and force
the controller into GSI mode during initialization.
Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
drivers/spi/spi-geni-qcom.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 26e723cfea61..eece7312f780 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -102,6 +102,7 @@ struct spi_geni_master {
int irq;
bool cs_flag;
bool abort_failed;
+ bool force_gsi_mode;
struct dma_chan *tx;
struct dma_chan *rx;
int cur_xfer_mode;
@@ -655,6 +656,9 @@ static int spi_geni_init(struct spi_geni_master *mas)
mas->oversampling = 1;
fifo_disable = readl(se->base + GENI_IF_DISABLE_RO) & FIFO_IF_DISABLE;
+ if (mas->force_gsi_mode)
+ fifo_disable = 1;
+
switch (fifo_disable) {
case 1:
ret = spi_geni_grab_gpi_chan(mas);
@@ -1133,6 +1137,9 @@ static int spi_geni_probe(struct platform_device *pdev)
if (ret)
return ret;
+ if (device_property_read_bool(&pdev->dev, "qcom,force-gsi-mode"))
+ mas->force_gsi_mode = true;
+
ret = spi_geni_init(mas);
if (ret)
return ret;
--
2.54.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode
2026-06-14 8:34 [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode Pengyu Luo
2026-06-14 8:34 ` [PATCH 2/2] spi: qcom-geni: " Pengyu Luo
@ 2026-06-14 10:55 ` Mark Brown
2026-06-15 5:22 ` Krzysztof Kozlowski
2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-06-14 10:55 UTC (permalink / raw)
To: Pengyu Luo
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andy Gross,
Bjorn Andersson, linux-arm-msm, linux-spi, devicetree,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
On Sun, Jun 14, 2026 at 04:34:23PM +0800, Pengyu Luo wrote:
> Some devices (such as gaokun3) do not disable FIFO mode, causing the
> driver to fallback to FIFO mode by default. However, these platforms
> also support GSI mode, which is highly preferred for certain
> peripherals like SPI touchscreens to improve performance.
>
> Introduce the "qcom,force-gsi-mode" device property to hint and force
> the controller into GSI mode during initialization.
This is an optimisation not a fundamental part of how these devices
operate. The DT should describe whatever it is about these SoCs that
allows this mode, or this should be triggered based on the compatible
for the variant of the device that can do this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] spi: qcom-geni: Add property to force GSI mode
2026-06-14 8:34 ` [PATCH 2/2] spi: qcom-geni: " Pengyu Luo
@ 2026-06-14 21:18 ` Dmitry Baryshkov
2026-06-15 4:25 ` Pengyu Luo
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2026-06-14 21:18 UTC (permalink / raw)
To: Pengyu Luo
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andy Gross, Bjorn Andersson, linux-arm-msm, linux-spi, devicetree,
linux-kernel
On Sun, Jun 14, 2026 at 04:34:24PM +0800, Pengyu Luo wrote:
> Some devices (such as gaokun3) do not disable FIFO mode, causing the
> driver to fallback to FIFO mode by default. However, these platforms
> also support GSI mode, which is highly preferred for certain
> peripherals like SPI touchscreens to improve performance.
>
> Introduce the "qcom,force-gsi-mode" device property to hint and force
> the controller into GSI mode during initialization.
Ideally, this should be decided by the SPI controller based on the
requirements. Another option would be to prefer GSI for all transfers if
it is available, ignoring the FIFO even if it is not disabled.
>
> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> ---
> drivers/spi/spi-geni-qcom.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] spi: qcom-geni: Add property to force GSI mode
2026-06-14 21:18 ` Dmitry Baryshkov
@ 2026-06-15 4:25 ` Pengyu Luo
2026-06-15 11:42 ` Konrad Dybcio
2026-06-15 12:23 ` Dmitry Baryshkov
0 siblings, 2 replies; 8+ messages in thread
From: Pengyu Luo @ 2026-06-15 4:25 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andy Gross, Bjorn Andersson, linux-arm-msm, linux-spi, devicetree,
linux-kernel
On Mon, Jun 15, 2026 at 5:18 AM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Sun, Jun 14, 2026 at 04:34:24PM +0800, Pengyu Luo wrote:
> > Some devices (such as gaokun3) do not disable FIFO mode, causing the
> > driver to fallback to FIFO mode by default. However, these platforms
> > also support GSI mode, which is highly preferred for certain
> > peripherals like SPI touchscreens to improve performance.
> >
> > Introduce the "qcom,force-gsi-mode" device property to hint and force
> > the controller into GSI mode during initialization.
>
> Ideally, this should be decided by the SPI controller based on the
> requirements. Another option would be to prefer GSI for all transfers if
> it is available, ignoring the FIFO even if it is not disabled.
>
I have read reviews. Can we check if the compatible
"qcom,sm6350-gpi-dma" is in DT? If the gpi dma controller is
presented, then we enable GSI mode.
Best wishes,
Pengyu
> >
> > Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> > ---
> > drivers/spi/spi-geni-qcom.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
>
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode
2026-06-14 8:34 [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode Pengyu Luo
2026-06-14 8:34 ` [PATCH 2/2] spi: qcom-geni: " Pengyu Luo
2026-06-14 10:55 ` [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: " Mark Brown
@ 2026-06-15 5:22 ` Krzysztof Kozlowski
2 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-15 5:22 UTC (permalink / raw)
To: Pengyu Luo, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Bjorn Andersson
Cc: linux-arm-msm, linux-spi, devicetree, linux-kernel
On 14/06/2026 10:34, Pengyu Luo wrote:
> Some devices (such as gaokun3) do not disable FIFO mode, causing the
> driver to fallback to FIFO mode by default. However, these platforms
> also support GSI mode, which is highly preferred for certain
> peripherals like SPI touchscreens to improve performance.
>
> Introduce the "qcom,force-gsi-mode" device property to hint and force
> the controller into GSI mode during initialization.
You described the desired Linux feature or behavior, not the actual
hardware. The bindings are about the latter, so instead you need to
rephrase the property and its description to match actual hardware
capabilities/features/configuration etc.
And even differently named property does not feel correct here - just
choose GSI in the driver...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] spi: qcom-geni: Add property to force GSI mode
2026-06-15 4:25 ` Pengyu Luo
@ 2026-06-15 11:42 ` Konrad Dybcio
2026-06-15 12:23 ` Dmitry Baryshkov
1 sibling, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2026-06-15 11:42 UTC (permalink / raw)
To: Pengyu Luo, Dmitry Baryshkov, Mukesh Kumar Savaliya
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andy Gross, Bjorn Andersson, linux-arm-msm, linux-spi, devicetree,
linux-kernel
On 6/15/26 6:25 AM, Pengyu Luo wrote:
> On Mon, Jun 15, 2026 at 5:18 AM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
>>
>> On Sun, Jun 14, 2026 at 04:34:24PM +0800, Pengyu Luo wrote:
>>> Some devices (such as gaokun3) do not disable FIFO mode, causing the
>>> driver to fallback to FIFO mode by default. However, these platforms
>>> also support GSI mode, which is highly preferred for certain
>>> peripherals like SPI touchscreens to improve performance.
>>>
>>> Introduce the "qcom,force-gsi-mode" device property to hint and force
>>> the controller into GSI mode during initialization.
>>
>> Ideally, this should be decided by the SPI controller based on the
>> requirements. Another option would be to prefer GSI for all transfers if
>> it is available, ignoring the FIFO even if it is not disabled.
>>
>
> I have read reviews. Can we check if the compatible
> "qcom,sm6350-gpi-dma" is in DT? If the gpi dma controller is
> presented, then we enable GSI mode.
This hunk is very odd:
/*
* in case of failure to get gpi dma channel, we can still do the
* FIFO mode, so fallthrough
*/
dev_warn(mas->dev, "FIFO mode disabled, but couldn't get DMA, fall back to FIFO mode\n");
In my understanding, GSI DMA mode is always preferable. +Mukesh, do
you have any insights?
Konrad
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] spi: qcom-geni: Add property to force GSI mode
2026-06-15 4:25 ` Pengyu Luo
2026-06-15 11:42 ` Konrad Dybcio
@ 2026-06-15 12:23 ` Dmitry Baryshkov
1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2026-06-15 12:23 UTC (permalink / raw)
To: Pengyu Luo
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Andy Gross, Bjorn Andersson, linux-arm-msm, linux-spi, devicetree,
linux-kernel
On Mon, Jun 15, 2026 at 12:25:32PM +0800, Pengyu Luo wrote:
> On Mon, Jun 15, 2026 at 5:18 AM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >
> > On Sun, Jun 14, 2026 at 04:34:24PM +0800, Pengyu Luo wrote:
> > > Some devices (such as gaokun3) do not disable FIFO mode, causing the
> > > driver to fallback to FIFO mode by default. However, these platforms
> > > also support GSI mode, which is highly preferred for certain
> > > peripherals like SPI touchscreens to improve performance.
> > >
> > > Introduce the "qcom,force-gsi-mode" device property to hint and force
> > > the controller into GSI mode during initialization.
> >
> > Ideally, this should be decided by the SPI controller based on the
> > requirements. Another option would be to prefer GSI for all transfers if
> > it is available, ignoring the FIFO even if it is not disabled.
> >
>
> I have read reviews. Can we check if the compatible
> "qcom,sm6350-gpi-dma" is in DT? If the gpi dma controller is
> presented, then we enable GSI mode.
Can we just check for the dmas property? If it is present and if we
could get DMA channels, then GSI DMA is available.
>
> Best wishes,
> Pengyu
>
> > >
> > > Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> > > ---
> > > drivers/spi/spi-geni-qcom.c | 7 +++++++
> > > 1 file changed, 7 insertions(+)
> > >
> >
> > --
> > With best wishes
> > Dmitry
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-06-15 12:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-14 8:34 [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: Add property to force GSI mode Pengyu Luo
2026-06-14 8:34 ` [PATCH 2/2] spi: qcom-geni: " Pengyu Luo
2026-06-14 21:18 ` Dmitry Baryshkov
2026-06-15 4:25 ` Pengyu Luo
2026-06-15 11:42 ` Konrad Dybcio
2026-06-15 12:23 ` Dmitry Baryshkov
2026-06-14 10:55 ` [PATCH 1/2] spi: dt-bindings: qcom,spi-geni-qcom: " Mark Brown
2026-06-15 5:22 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox