From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF3F7606A31C for ; Mon, 30 Nov 2026 07:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zOR/va3p; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X0ZlZ9BW 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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=CVpG39z0sWKzx7BceQSPYDovD+oy9c1a4KP1k10jXNo=; b=zOR/va3pei/khsg7Ay+L1871yh DFpx9X09seSaHHG4sX2awewIpHD4/3XVcSoEJHLAlZJju0hc4uJ+J7uC++pPAr5YUzXEmMELpF+hX bxaSn35+aTyz3nd6qBqs7FNLoTcIvsTwEAu7jt+GCH2x/V9x9cG90FbnGEcaafxkUGH5PcYJCUZJe vVWetcQSbq05Qs7ciXnY1DfWo7X7ccICa9aLepNiAboCoAhsuiLaDILoy/Rf8Zq0TIog+5uqPlEM0 hWH6E5vS9N5XqXz9ak43lkbJKJi55UajpE+/xQKuamsJ92BeCnYi2K0NeR0AxTS8nAukFk8NQHhR+ 3dM9Ph0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXwGf-00000003fI8-0laP; Mon, 30 Nov 2026 07:57:45 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXwGc-00000003fHp-3xBl; Mon, 30 Nov 2026 07:57:43 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 15C10605F0; Mon, 30 Nov 2026 07:57:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30F901F000C1; Mon, 30 Nov 2026 07:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796025461; bh=CVpG39z0sWKzx7BceQSPYDovD+oy9c1a4KP1k10jXNo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=X0ZlZ9BWdpht2xrvW/GKtOYIMqaceKIBQfF4rWE7HWvoRKS2nKM7kXZFkq4UHsjsH lSZwm966KI3D1vcddTTnLaZB2fGpxdaWlXvkQsXNiRoYgvjBQwdm/mJZXJYHbmCgRl VoSVkLFU2eJZlS4wNaNliibicWFqRcObMTtnjuPMekK3P7H4wnKVEMFoBqseZnmqXN o1NrfNOMA/cNAQO+sMcAkWQURxSGYE1vzR2Jl/tBPKf3GYh2N427qaJdb5kxFCCO0F feKkYbs+uOQP+kgbZRrB2fVWhNPjmmUcNJSVmx8YpKgq2ZxKzf8beRAV3Hd1JXDgSv Fqf31OLmrRPmQ== Date: Mon, 30 Nov 2026 13:27:31 +0530 From: Manivannan Sadhasivam To: Igor Velkov Cc: Enrique =?utf-8?Q?Hern=C3=A1ndez?= Bello , shawn.lin@rock-chips.com, lpieralisi@kernel.org, kwilczynski@kernel.org, bhelgaas@google.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, dlemoal@kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/2] PCI: rockchip-host: Make the PERST# inactive delay configurable Message-ID: References: <20261104215848.2087944-1-ehbello@gmail.com> <20261104215848.2087944-3-ehbello@gmail.com> <179596114526.2288.5995800864070065544.b4-reply@b4> <20261129-rockchip-pcie-ltssm-order-1@iav.lv> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261129-rockchip-pcie-ltssm-order-1@iav.lv> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Sun, Nov 29, 2026 at 08:20:36PM +0200, Igor Velkov wrote: > On 2026-11-29 19:35 +0530, Manivannan Sadhasivam wrote: > > Basically, I just moved the LTSSM start after PERST# deassert and increased the > > status check to 1s as per the spec. > > The diff does not move the start of training: rockchip_pcie_init_port() > already sets PCIE_CLIENT_LINK_TRAIN_ENABLE for the RC, in the > PCIE_CLIENT_CONFIG write before the core resets are released. The moved > write only sets the bit again, so the 1 s timeout is the only change. Ah, I didn't look into the implementation of rockchip_pcie_init_port(). But it feels super weird to start the LTSSM in two successive places without a comment in the code. > To start training after PERST#, init_port() would have to clear the bit > for the RC (PCIE_CLIENT_LINK_TRAIN_DISABLE). > > Enrique, a test on the ROCK Pi 4C that needs no register change: > move msleep(PCIE_T_PVPERL_MS) to before rockchip_pcie_init_port(). > The pulse stays ~100 ms, but training starts only just before PERST# > is released. > That reduces the delay window, which can help. But ideally, LTSSM should be started after PERST# deassert. But doing so would require some code reorg and need to ensure that the sequence mentioned in the hardware manual is not disturbed. Perhaps, Rockchip folks should make such a change? Shawn, comments? - Mani -- மணிவண்ணன் சதாசிவம்