public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Viken Dadhaniya <quic_vdadhani@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <andi.shyti@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <gregkh@linuxfoundation.org>,
	<jirislaby@kernel.org>, <broonie@kernel.or>,
	<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>, <quic_msavaliy@quicinc.com>,
	<quic_anupkulk@quicinc.com>
Subject: Re: [PATCH v2 2/8] dt-bindings: i2c: qcom,i2c-geni: Add support for selecting data transfer mode
Date: Fri, 24 Jan 2025 17:52:24 +0530	[thread overview]
Message-ID: <da7b9678-76cc-4e45-89e9-4e8d9c9a2005@quicinc.com> (raw)
In-Reply-To: <r4zfoaub3dwkirdbsolbl56xxa7ax5eusb2256c7ezlyl2s3vh@hit4g5cpzijw>



On 1/24/2025 4:48 PM, Dmitry Baryshkov wrote:
> On Fri, Jan 24, 2025 at 04:23:03PM +0530, Viken Dadhaniya wrote:
>> Data transfer mode is fixed by TrustZone (TZ), which currently restricts
>> developers from modifying the transfer mode from the APPS side.
>>
>> Document the 'qcom,xfer-mode' properties to select the data transfer mode,
>> either GPI DMA (Generic Packet Interface) or non-GPI mode (PIO/CPU DMA).
>>
>> I2C controller can operate in one of two modes based on the
>> 'qcom,xfer-mode' property, and the firmware is loaded accordingly.
> 
> Is it possible to load the firmware after it being loaded by TZ? Is it
> possible to change the mode at runtime too?

No, firmware can be loaded either from the TZ side or APPS side.

In non-GPI mode, the transfer mode will change runtime between PIO and 
CPU DMA based on the data length.

We need to update the device tree property(qcom,xfer-mode) to change the 
mode between non-GPI and GPI.

> 
>>
>> Co-developed-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
>> Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
>> Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
>> ---
>>
>> v1 -> v2:
>>
>> - Drop 'qcom,load-firmware' property and add 'firmware-name' property in
>>    qup common driver.
>> - Update commit log.
>>
>> v1 Link: https://lore.kernel.org/linux-kernel/20241204150326.1470749-2-quic_vdadhani@quicinc.com/
>> ---
>> ---
>>   .../devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml        | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
>> index 9f66a3bb1f80..68e4bf0c84d1 100644
>> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
>> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
>> @@ -66,6 +66,12 @@ properties:
>>     required-opps:
>>       maxItems: 1
>>   
>> +  qcom,xfer-mode:
>> +    description: Set the value to 1 for non-GPI (FIFO/CPU DMA) mode and 3 for GPI DMA mode.
>> +      The default mode is FIFO.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    enum: [1, 3]
>> +
>>   required:
>>     - compatible
>>     - interrupts
>> @@ -142,5 +148,6 @@ examples:
>>           interconnect-names = "qup-core", "qup-config", "qup-memory";
>>           power-domains = <&rpmhpd SC7180_CX>;
>>           required-opps = <&rpmhpd_opp_low_svs>;
>> +        qcom,xfer-mode = <1>;
> 
> What does <1> mean? Please provide corresponding defines.

Do we need to add a string instead of a number, like 
include/dt-bindings/dma/qcom-gpi.h?

> 
>>       };
>>   ...
>> -- 
>> 2.34.1
>>
> 

  reply	other threads:[~2025-01-24 12:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24 10:53 [PATCH v2 0/8] Add support to load QUP SE firmware from Viken Dadhaniya
2025-01-24 10:53 ` [PATCH v2 1/8] dt-bindings: qcom: geni-se: Add 'firmware-name' property for firmware loading Viken Dadhaniya
2025-01-24 11:00   ` Krzysztof Kozlowski
2025-01-24 11:33     ` Viken Dadhaniya
2025-01-24 10:53 ` [PATCH v2 2/8] dt-bindings: i2c: qcom,i2c-geni: Add support for selecting data transfer mode Viken Dadhaniya
2025-01-24 11:18   ` Dmitry Baryshkov
2025-01-24 12:22     ` Viken Dadhaniya [this message]
2025-01-24 15:03       ` Dmitry Baryshkov
2025-01-24 15:16         ` Viken Dadhaniya
2025-01-27  6:58           ` Krzysztof Kozlowski
2025-01-24 10:53 ` [PATCH v2 3/8] spi: dt-bindings: " Viken Dadhaniya
2025-01-27  6:59   ` Krzysztof Kozlowski
2025-01-24 10:53 ` [PATCH v2 4/8] dt-bindings: serial: " Viken Dadhaniya
2025-01-27  7:02   ` Krzysztof Kozlowski
2025-01-27 14:27     ` Dmitry Baryshkov
2025-01-27 16:24       ` Krzysztof Kozlowski
2025-01-27 17:50         ` Konrad Dybcio
2025-01-28 11:40           ` Konrad Dybcio
2025-01-29  2:21         ` Dmitry Baryshkov
2025-01-29  7:23           ` Krzysztof Kozlowski
2025-01-29  8:18           ` neil.armstrong
2025-02-09 10:11             ` Viken Dadhaniya
2025-02-09 10:19               ` Krzysztof Kozlowski
2025-02-10  7:01                 ` Viken Dadhaniya
2025-02-09 10:27         ` Viken Dadhaniya
2025-01-24 10:53 ` [PATCH v2 5/8] soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem Viken Dadhaniya
2025-01-27  7:06   ` Krzysztof Kozlowski
2025-03-03 12:47     ` Viken Dadhaniya
2025-01-27 12:07   ` Mukesh Kumar Savaliya
2025-01-24 10:53 ` [PATCH v2 6/8] i2c: qcom-geni: Load i2c qup Firmware from linux side Viken Dadhaniya
2025-01-24 15:04   ` Dmitry Baryshkov
2025-01-24 15:24     ` Viken Dadhaniya
2025-01-24 15:55       ` Dmitry Baryshkov
2025-01-27  5:40         ` Viken Dadhaniya
2025-01-24 10:53 ` [PATCH v2 7/8] spi: geni-qcom: Load spi " Viken Dadhaniya
2025-01-24 10:53 ` [PATCH v2 8/8] 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=da7b9678-76cc-4e45-89e9-4e8d9c9a2005@quicinc.com \
    --to=quic_vdadhani@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=broonie@kernel.or \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.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=quic_anupkulk@quicinc.com \
    --cc=quic_msavaliy@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