From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FEE5CD4F4D for ; Thu, 5 Sep 2024 06:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SXUz4MgRjBmCdGyakKTM0s1Hi4SCe8jtuEJe91xFEzE=; b=GKzQykK/ifPOrHbXslIVJ/v3al VdFno/c8WuPKUVKbqYFFpQOk4Wf2xabECTfI7dYwNdgbi/XTLLzJM7VXp7ITjJrzlp1uXOYuTXB5E A95XAnTTAs7LCfapcZtJxsxmbjAiRKHKNuOECmKnMw1NnS/MnotCMB0M/r+kGvTBRA7iyrEeTOe2D u7/MsjseOKrCPYnKBumrocbmBUSgKiw/LRZged/OJqWxdlmh/s0GteEHbKJqYx4UJhGW1CRN7xnAQ 71ShqAnVH+aGxLF0jR69XqNUBKnjniCQsuQkxenfED6TCheKL+4RiSlHTccES4F5OYC4GiaNve909 WeD+gEzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm6Kr-00000007FrG-1lYm; Thu, 05 Sep 2024 06:51:19 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm6Ju-00000007Fix-39rc for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 06:50:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id AD0C7A440EB; Thu, 5 Sep 2024 06:50:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94AEFC4CEC4; Thu, 5 Sep 2024 06:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725519017; bh=EGQxqnD+kJTdbSpDiqWezPqJO4plr2uZvSabvaxYSOI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k6FStA63hzOsr16OqGVMLzQIX3CqKwHZn87UzgA0l/RYmuNvEpHhxiqKpgFUe0ENW d9JFokRO/q/UJpjckbVXfaEunkJuqL1G8wHwwXX5o7Yi5tsm6FlxPdLdLzRgFrzn3l VtCGqy240WtYMHxbaaeU4jpGW88PJHFWUGVkLU6xehFdB7T66Drr+1ZVA8BTKVfRK2 F6s1VdEUtOOsHL4HfrC+BNsj76QBcx8uP7K2zXT7Bu7r2bNFgi+qSDy88VZez+bwf5 yjh7FySKpXZfngB8qWKH9hljPIkVigcd7AUvNb0TB0vIPYH1deXhbsJm3lrOoRups9 TlsDQIRHRrmqw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sm6KB-000000001Md-17n0; Thu, 05 Sep 2024 08:50:35 +0200 Date: Thu, 5 Sep 2024 08:50:35 +0200 From: Johan Hovold To: Shashank Babu Chinta Venkata Cc: Manivannan Sadhasivam , Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jingoo Han , Chuanhua Lei , Marek Vasut , Yoshihiro Shimoda , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, abel.vesa@linaro.org, johan+linaro@kernel.org Subject: Re: [PATCH v6 3/4] PCI: qcom: Add equalization settings for 16.0 GT/s Message-ID: References: <20240904-pci-qcom-gen4-stability-v6-0-ec39f7ae3f62@linaro.org> <20240904-pci-qcom-gen4-stability-v6-3-ec39f7ae3f62@linaro.org> <20240904155233.zm3m6x3wvco35g6t@thinkpad> <941d1bfb-965e-43e4-9f34-edaf2de5d661@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <941d1bfb-965e-43e4-9f34-edaf2de5d661@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_235018_882472_3F7AC781 X-CRM114-Status: GOOD ( 11.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 04, 2024 at 01:46:09PM -0700, Shashank Babu Chinta Venkata wrote: > On 9/4/24 08:52, Manivannan Sadhasivam wrote: > > On Wed, Sep 04, 2024 at 11:39:09AM +0200, Johan Hovold wrote: > >> On Wed, Sep 04, 2024 at 12:41:59PM +0530, Manivannan Sadhasivam via B4 Relay wrote: > >>> From: Shashank Babu Chinta Venkata > >>> + /* > >>> + * GEN3_RELATED_OFF register is repurposed to apply equalization > >>> + * settings at various data transmission rates through registers namely > >>> + * GEN3_EQ_*. RATE_SHADOW_SEL bit field of GEN3_RELATED_OFF determines > >>> + * data rate for which this equalization settings are applied. > >>> + reg |= FIELD_PREP(GEN3_RELATED_OFF_RATE_SHADOW_SEL_MASK, 0x1); > >> > >> How does 0x1 map to gen4/16 GT? > GEN3_RELATED_OFF has been repurposed to use with multiple data rates. > RATE_SHADOW_SEL_MASK on GEN3_RELATED_OFF value decides the data rate > of shadow registers namely GEN3_EQ_* registers. Per documentation 0x0 > maps to 8 GT/s, 0x1 maps to 16 GT/s and 0x2 maps to 32 GT/s. Thanks for clarifying. Perhaps these should become defines eventually (or the comment could be extended). There are a lot of "magic" constants in here. Johan