From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796025462; b=2wNTZuhKXl4tX9vqMPEmottbYn5vDp/53ghLyl+29dmJEIw4kY8/O3LaZz8HPf0eJMCQ 9984mgjSEI8F4O9m5P34OAhP3ZHA2H1fGvHMFGJ93Swdio/vpJEwrG+wKaqJFD5NkiTlJ t/qf0R7DYMaq6eaBS0TNPcjLWRFT8xGx+2rO6H0RW9jAMsW+h2C6Pct+AktDYMyxvUV6M F9p6bXXMPSQ1MjVLMH+zaIFvd0IkV/M6za+yzj21rzV4+PRidE3yPkiJ1esp8kbqHHOA7 DHA1HSMaFZEXAKiSvQ64qnT2saQAv1cvkGzCRG70FxEJ+I2YlgM8pLF6lcuUlVYBHTA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796025462; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=CVpG39z0sWKzx7BceQSPYDovD+oy9c1a4KP1k10jXNo=; b=WfUS6WaAcpuUMnflFZJkc9Uc/l5cuY580LN++6GDbsoh+Rf3n061zd3tv1H+ct7zNS55 EStf2FQZ1Eufb74F+vAaGqy4aVZN0HqRedrdNfQTkO+wFt1nq2hn0qU0FIf105kH/GCiq licnGh2x+pZzPhkwvz/djfw7le2EpUQhQok5XLiEIE/GC0EaiyYvr/2SAIAMZ+ru8RyLt cPcOO9J+4zzUicEHk6GivfLvW85WV+zqIRfPPHULrN6zjcH/dbxQZEYUIRd9BErCtxcc3 kyU2n/j8BNDTvXL+kh4VGySvFpj6KAaQn3EAbKbX313F9d4Z3KiRQIAI370TDL2+x7g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X0ZlZ9BW; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A1C7606A31C; Mon, 30 Nov 2026 07:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=X0ZlZ9BW 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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> 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 -- மணிவண்ணன் சதாசிவம்