Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp210087rdb; Thu, 1 Feb 2024 06:32:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRwwqlykHAHc6MllmvqwoA5HSbrm8bbfJ9pH1qyCGx93WtDfBJ1oqPb0yctnTC2wuphwH5 X-Received: by 2002:a05:6a00:99e:b0:6dd:a0a7:ad9a with SMTP id u30-20020a056a00099e00b006dda0a7ad9amr6446346pfg.25.1706797965050; Thu, 01 Feb 2024 06:32:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706797965; cv=pass; d=google.com; s=arc-20160816; b=z33JK+mLplZh00qdI58G3u0/shKhKwfypB/ZQEkT8mra0hm4uaen94Cv8VV31s/wcd PcDgVG0wdx78DL2GMDTaZHlMOqvdf9IO1t3loSm7ehoQoml2SHO53VqIiAh1+DgnPra4 PmgVYzZwBhvap/Ck2FAGEMYvPmlnHA5W0toNIr107E2UhBmREfwF5PcCNqK8pT22QQ6e QhMJFiFj/a3qVb1Tp5c0+dapkO+konqjJgcrzS/tJAmzTMXVxIfTZ/ryEfKsWJp16I36 7km6Ica0n9kDL4AoICfWhRO0dC36DRDY54WXXy/yVf+4QcfP6/Qhhx10YVkEnyJ4kUAd GKlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uObX+1erzfWInGW/FTy2MV6gMWO4poeSyhdEyYppfrw=; fh=31XlRWXa2rGlP9BOLKP15dTUxNqoyldOiRgKEIU5urI=; b=xMl8FejCBjA055cmrohdnuLh8Od9vDnlkbETHCrBsVOnR2bhcWWC+OOTV/U9OjzNtu Y1JstXgCeubEGadxI54c+3paag6HX478OFJ3j6noSVDKEw5GYQr4bxzasQSSgR+yyekh 6y1qz4v15ONS1FVk1mQilOA+9Y+/G5Ewq0KaC9i1/kUfnUZMz5ik2alg1qyUNfzzt/6t mgSSeWAgsov6ZO+kRmKGnIeb/4DW/sYgeBv5r/Z27EnaSIso/+FFCwOPzIvrXLXCnlPF tWzd9KUhInyotG2SKU2Pt5MPrEK/3QDYpp1nKOzE1if4NDvuAqEIMs3BvjcKF80j5xao +rwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JqeXuBJb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48311-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXiVqrkRhUqrtA5HD6/01nB+bHhTApiHsRDdmUQuVyH2Pa39ouJmZQ79NFeDhKyAq0Z2FkWGmjqkFAkaPAHFbYji/DhlBZ5wL2zdkkdaA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w27-20020a63af1b000000b005ce00003530si12034987pge.562.2024.02.01.06.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 06:32:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48311-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=@kernel.org header.s=k20201202 header.b=JqeXuBJb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48311-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 3969229185B for ; Thu, 1 Feb 2024 14:23:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44CA362160; Thu, 1 Feb 2024 14:22:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JqeXuBJb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63AD762151; Thu, 1 Feb 2024 14:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706797365; cv=none; b=e43Dpayau5qujjljYV2qKg8Vf3iVYYupYv2JMFKEGf2b5pk2cLO62Z83o+ULOGVFeZMRhI4IHDMio2lMAWSyFwMyneNEt+w7C31sxxDk5TLC+9nBNWMe7bZp7xAoiW7w82rdFFk+arbE73UxLmrl4xLeGYsbMWqYiTWrPljlt9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706797365; c=relaxed/simple; bh=MSTzW+hSPSJIFSo2SART8H4vNXAtz7vluaa2YvfXTrs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YKCUQBi05EbP/Ff9IAvhnVVV5/KqykvIo/XJdE0fgVpdMyAksG4qaoD13hVuHPzVkWnregt1DY5i0SqEMJfeCoETYmKCrXfEHOksJjLI7v00YYzrP273bv79XgYY+5GCRXHcV23oXSUEOfsvKqSNChzAuSKJbwgMlWjNePNUwZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JqeXuBJb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C53CC433F1; Thu, 1 Feb 2024 14:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706797364; bh=MSTzW+hSPSJIFSo2SART8H4vNXAtz7vluaa2YvfXTrs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JqeXuBJb13FjyDKxNkHzSrYx5UDHUajG05KdPPKWIwLpgcYfOHRIk4LE4VuisQr+f SJQnIXHCPpZwf2ZZnOzsVArUblsRwcWB4kxGVr8IyXzfArn7RP2ZJ2rgF1YVPoENuR eP9c48wb2JYz+xuzk2vBbT5Q2AsxU3b5PSdX2BsKlBNCoCupY/nMsOksezKsL6EMTo FfbbJjhiFHwkk9KSpKA6LhW4sRZ8bhrYxktpPjuI8OeDZOvhOlgJFvXufG6HN+mkUp 7I8FJpPyBAxr/45s/4vXp/dxaSysuzI/jwgu5L9cfap2SdTBnF064QnY0TFiI+it66 eNuOpPqtC0TrA== Date: Thu, 1 Feb 2024 15:22:40 +0100 From: Andi Shyti To: Viken Dadhaniya Cc: andersson@kernel.org, konrad.dybcio@linaro.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, Dmitry Baryshkov Subject: Re: [V3] i2c: i2c-qcom-geni: Correct I2C TRE sequence Message-ID: References: <20240201101323.13676-1-quic_vdadhani@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201101323.13676-1-quic_vdadhani@quicinc.com> Hi Viken, On Thu, Feb 01, 2024 at 03:43:23PM +0530, 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. > > Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") > Signed-off-by: Viken Dadhaniya as Dmitry has written, please, next time don't forget the tags: Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # qrb5165-rb5 You can also add mine: Reviewed-by: Andi Shyti Please make sure to Cc Dmitry who is raising his concerns and check on his comments. Andi PS just as a reminder, if Dmitry's concerns remain related only to the commit log, I gave you the option to agree with him in the e-mail thread without necessarily sending a v4. I can then update the commit log before pushing.