Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp969164rdb; Fri, 9 Feb 2024 06:42:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyNKPdwoC+yfIAyKCxD+lnZ0FCxIhr/2Ho2amS0VfNhfJd8IUjjaghuojex1VD8be0Hloj X-Received: by 2002:a17:902:d487:b0:1d9:6c08:39bd with SMTP id c7-20020a170902d48700b001d96c0839bdmr2204461plg.28.1707489727435; Fri, 09 Feb 2024 06:42:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707489727; cv=pass; d=google.com; s=arc-20160816; b=KqA8YYAYkVylIt+/uWj7zKcEsyE+ANH4qVY4eKXFWPsQf0PxUKCEiF1kfOfWZThhmA V7UinewWPMZTT1coGDMqBHfQEihY/XuRTl5+sqLl2j6m/JbZL6YR5cYgf3QjiR+m+T6U m7xLnI1jUKzI1EBSBV6pcTQCMkyyrfv7sfeEMmG54xjnftQNoEnoNRxjUYp5/3dKFdJn QyAuIPL3Lke3/eIreQu5Relwz+yTlT0YMDpLW8vXc/tBybEY3g86F7wubJZi/ajmgBAx 14FxIoU93gCg3bYnSROywrZyVck03Z5xt4Rtc9BPr/J0rTvab7RuTy9P+9MOdjTYaGAQ PrMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=sHcakeR8gPCEeI7V8ObSzY3NEW4IWCujMtndFKNvu38=; fh=P+XfggCqyn9diieyxsWu5BQ8e1tWRRZ5qzEPCioa0pU=; b=y9US1HYnRljzo3+7sKLApOj2O8nX0ZckjIvugRCvU5gDxE4BLsRGtXwddud1UHnwqi YdhPam1W2+PvUhR5K871Y5KuKWeqlZ2yC4sdP9mg9dgmGLMYIh50Wc7iulLekm1EwD6N j9iXjBgscQFhLqHWmLjlZveJp7HDVZyIoAP/wOajdooGucAfXEYaI0ffGsoXY5RTD/FY ZlhCK2FO1KSvgYPagvx42TcFa7oy6M1NhCj8IIoH2EQmwDidaSiaqJ4XiPWLZKzQxaqr 9txZCmUucQg8g42iV7hmiIAhSsWFtCNN0WlqnUy+aC517N5iKk17Z9Gb0SMQGVnBolEe Ro2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PZP+vmwU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-59485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCVhdBrGt50wVoTi9KJpHSN4v8aqax+gBn59qziP4XKtmrd7tUwSwiDKLWiBoyhx0hHxO3OFG7sQLAy3KrcPRDrT7gHHbKu+6ZHknPjDIg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j11-20020a170902da8b00b001d783acb2bfsi1809715plx.363.2024.02.09.06.42.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 06:42:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PZP+vmwU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-59485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 171A2280DF0 for ; Fri, 9 Feb 2024 14:42:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45E086BFB6; Fri, 9 Feb 2024 14:41:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PZP+vmwU" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DD793D3AC for ; Fri, 9 Feb 2024 14:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707489711; cv=none; b=WwM6jcnxUH7YfOAIzkUvd1c03wOGifjxzGY2R2cC2HU+XfxcxUe86K9X4v1NQH8nU/DzyX+FE3Cy+UIcabM/+GEOwP0G7RKKgAgedCGKrk3Uw89QNHgp0SMSqE7/Lt/dv21Po3B8DBl6//ovAOXpsPZh2njWOignsTFD834ZcWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707489711; c=relaxed/simple; bh=O3fPupjybPNP/dAIj6BFB3nob2bLvZX2H43dvr8aJ7A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rdi3xKrOsuSlZBV1kIdDgUcC7Hz7o3eMsieTLbfAgYdC8byZMe0vZBkrY/0q5ZeSog3a9fHfo7X/d28k0ifMU+YH2AAf6yhCoryeTsolKXz0pSW2glG0AndZSqZ3EyMrx0DdUSK1/YlYL8uKLkcEBNcR7KbaUHBC1+FpUZbZzQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PZP+vmwU; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a3916c1f9b0so141468166b.1 for ; Fri, 09 Feb 2024 06:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707489707; x=1708094507; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=sHcakeR8gPCEeI7V8ObSzY3NEW4IWCujMtndFKNvu38=; b=PZP+vmwUkhlIFZxJlGrnn4bnIvEUblcfumX2OVdD8j4SR07btrcQzatqBkz4aToFZF v8CVTxb08j7VRoTpHb6LxNv8I4TsAPIj1rUjwbg8yUVO7RkhuqweVhodLNu5LFZ/6mS8 IhCt53XXzlhf2RbcqnkEEacFrGz3nKojtwYR8EePfH7KJEYdkAVbT9Fou1cUuWcCn3Tc Iv8rYbeOlJRp8QhY+dZcIBtGYjNMnlwqUWQy5SJnhCD31iL7d8iJblE1puiBjUNHWd9D GL9wQMO9XSQDMTInlQ9/FU+ndGJslGz+VQLvp/P8Ybiuc6NoiQYDVEtIw6rjHOFWtX8T 73ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707489707; x=1708094507; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sHcakeR8gPCEeI7V8ObSzY3NEW4IWCujMtndFKNvu38=; b=u+haZCyQKQIhALyAaPvoXPdNyHeUAO35rvw6Ndg95vDgFwCv61s5rICM4yr+dd0xgH irHxdYNhOd+7zglxi1W15M1pTLEmc1VBxEctJvxU+wbg+fwM3vPrwpsyJaxk1Zu3v8Oa /pB079lVRe2eIKNKw3SCa8kP0bYHk5E8+b4a8UcvPQZN01en495KXmPgbcSl64uCLg+Z ox3Tgx1yS3WoOCCI2OS1VZeArb0Wk31KcAlacla9HEvdd73Wo6OWTz1FXgZci6XUiDci +8BMRxJW7Gw+lmcgvCWXsNTkPIq92vwgaroHw8gdPVeLy0Oo3IyDq9H+YGNiuq/cHNvb ehaQ== X-Gm-Message-State: AOJu0YysXUfI9Bwqp1PVrvVtem0EhDQoAWx/CrAfTRtW2bgbf0O53xOq HYrIQAASOfsR4yUXax+wPosz9g0ocV6v6KNwmA9B1VkroGbrHi08cQkmEvCohgQ= X-Received: by 2002:a17:906:fa14:b0:a3b:ea1e:c395 with SMTP id lo20-20020a170906fa1400b00a3bea1ec395mr1215338ejb.28.1707489707353; Fri, 09 Feb 2024 06:41:47 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU/JYp/TUOFfArAHs9PgPg3ZetUV3f8hxfFPsKUwP/60xcfd5NQoc9u0sZq+2USXNgXmpA5X/AtCHcSoKyN2a1Ql92xg1/XFmkm+OIYTklYuHZmdRxL0BAah9qJdFnBPsTzAK6NagPzY7mN+jFCsm4rv/mU5kUZFwVxTCiyC1f43/faHtLQ4C/KJXsEO6SgXfrivgi84qJJb9oiyTZU1mvFcZL6AUPK9HU8wndvpBn6vJ7KYjQZLhHY73mstEnBI1/xohoiYEvudhJVq+7iwDB8DSLXP7wAfZXLK4lXWdYO0idIBSQ7rK7RPiw570KbS+7NImLKIJSdSjJ5UskJyE3z3gAK+RU+VG2NxAjIOnTNUtAjTgAkYwJmRJCjxvNjiy1IbASHsltaMYQ++fUwmzo0+scsksaPoporqnAEaJ9sbRzEng/B5DY54zKdzBJSMwD0gdLfVnVtkAE= Received: from [192.168.192.207] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id g19-20020a170906521300b00a3bb098ffcbsm827300ejm.89.2024.02.09.06.41.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Feb 2024 06:41:46 -0800 (PST) Message-ID: Date: Fri, 9 Feb 2024 15:41:43 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [V3] i2c: i2c-qcom-geni: Correct I2C TRE sequence To: Andi Shyti , Dmitry Baryshkov Cc: Viken Dadhaniya , andersson@kernel.org, linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, quic_bjorande@quicinc.com, manivannan.sadhasivam@linaro.org, bryan.odonoghue@linaro.org, quic_msavaliy@quicinc.com, quic_vtanuku@quicinc.com References: <20240201101323.13676-1-quic_vdadhani@quicinc.com> <60b5e755-352b-476d-8c6e-2170594ae80d@quicinc.com> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiid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 Content-Transfer-Encoding: 7bit On 8.02.2024 12:59, Andi Shyti wrote: > Hi Dmitry, > > On Thu, Feb 08, 2024 at 01:04:14PM +0200, Dmitry Baryshkov wrote: >> On Thu, 8 Feb 2024 at 12:02, Andi Shyti wrote: >>> >>> Hi Viken, Dmitry, >>> >>> On Fri, Feb 02, 2024 at 04:13:06PM +0530, Viken Dadhaniya wrote: >>>> >>>> On 2/1/2024 5:24 PM, Dmitry Baryshkov wrote: >>>>> On Thu, 1 Feb 2024 at 12:13, Viken Dadhaniya wrote: >>>>>> >>>>>> For i2c read operation in GSI mode, we are getting timeout >>>>>> due to malformed TRE basically incorrect TRE sequence >>>>>> in gpi(drivers/dma/qcom/gpi.c) driver. >>>>>> >>>>>> TRE stands for Transfer Ring Element - which is basically an element with >>>>>> size of 4 words. It contains all information like slave address, >>>>>> clk divider, dma address value data size etc). >>>>>> >>>>>> Mainly we have 3 TREs(Config, GO and DMA tre). >>>>>> - CONFIG TRE : consists of internal register configuration which is >>>>>> required before start of the transfer. >>>>>> - DMA TRE : contains DDR/Memory address, called as DMA descriptor. >>>>>> - GO TRE : contains Transfer directions, slave ID, Delay flags, Length >>>>>> of the transfer. >>>>>> >>>>>> Driver calls GPI driver API to config each TRE depending on the protocol. >>>>>> If we see GPI driver, for RX operation we are configuring DMA tre and >>>>>> for TX operation we are configuring GO tre. >>>>>> >>>>>> For read operation tre sequence will be as below which is not aligned >>>>>> to hardware programming guide. >>>>>> >>>>>> - CONFIG tre >>>>>> - DMA tre >>>>>> - GO tre >>>>>> >>>>>> As per Qualcomm's internal Hardware Programming Guide, we should configure >>>>>> TREs in below sequence for any RX only transfer. >>>>>> >>>>>> - CONFIG tre >>>>>> - GO tre >>>>>> - DMA tre >>>>>> >>>>>> In summary, for RX only transfers, we are reordering DMA and GO TREs. >>>>>> Tested covering i2c read/write transfer on QCM6490 RB3 board. >>>>> >>>>> This hasn't improved. You must describe what is the connection between >>>>> TRE types and the geni_i2c_gpi calls. >>>>> It is not obvious until somebody looks into the GPI DMA driver. >>>>> >>>>> Another point, for some reason you are still using just the patch >>>>> version in email subject. Please fix your setup so that the email >>>>> subject also includes the `[PATCH` part in the subject, which is there >>>>> by default. >>>>> Hint: git format-patch -1 -v4 will do that for you without a need to >>>>> correct anything afterwards. >>>>> >>>> >>>> At high level, let me explain the I2C to GPI driver flow in general. >>>> >>>> I2C driver calls GPI driver exposed functions which will prepare all the >>>> TREs as per programming guide and >>>> queues to the GPI DMA engine for execution. Upon completion of the Transfer, >>>> GPI DMA engine will generate an >>>> interrupt which will be handled inside the GPIO driver. Then GPI driver will >>>> call DMA framework registered callback by i2c. >>>> Upon receiving this callback, i2c driver marks the transfer completion. >>> >>> Any news about this? Dmitry do you still have concerns? We can >>> add this last description in the commit log, as well, if needed. >> >> I was looking for pretty simple addition to the commit message, that >> links existing commit message to the actual source code change: that >> geni_i2c_gpi(I2C_WRITE) results in the GO TRE and >> geni_i2c_gpi(I2C_READ) generates DMA TRE. But I haven't seen anything >> sensible up to now. So far we have a nice description of required >> programming sequence in terms of CONFIG, GO, DMA TREs and then source >> code change that seems completely unrelated to the commit message, >> unless one actually goes deep into the corresponding GPI DMA driver. > > Agree. I can't take this patch until the commit message has a > proper description and until Dmitry doesn't have any concerns > pending. And please, please, include the word PATCH in the square brackets in the subject, it's landing in the wrong email folders for a number of folks.. Konrad