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 068F0CAC5B0 for ; Fri, 3 Oct 2025 17:22:09 +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: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:References: List-Owner; bh=j2DGA3Bok6OxXF04sWu7pIRi9GIVarqqtQ8WUMH2D0E=; b=HKlCMjU5yWiSj6 REWsFdqa7CNKlSysS6+ZfE614IHVHXYWfhAUzbmoya62n+GGT9oWaEpnT9kW/VsenetcxhKII5EUo 1ajVRCvvP2/xylKdJaSbWspPv6Kbw36EN+enZi9ynLOY1X48630Hui2S3IjjCaFQXodpEiMAVYMOO c1x8xaPqVuEjkko1/QIpq804YsiDzuzqvNLGrzj63s5XEFGV4E5yiJk2c6S6sH3buqsUg5OJyqB3Z iePo5167XipC+J6kqYDYwOo3rAT29U7JfNJhFfbzrpXFu1tuqk5JclGn/ErzUUuR0XbA8pldZ+9t7 GyClP9BM4KIuVmHeK70A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v4jTm-0000000Cp8S-0taG; Fri, 03 Oct 2025 17:22:02 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v4jTj-0000000Cp7t-0BxN for linux-arm-kernel@lists.infradead.org; Fri, 03 Oct 2025 17:22:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 59A7C409B4; Fri, 3 Oct 2025 17:21:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CAA7C4CEF5; Fri, 3 Oct 2025 17:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759512118; bh=gJyCL8uxswVnUfA7Rwci8BgxqWn7pX8aafHn3LwvUy4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Th30eFDgAR9AWh5/pYf4m8ToHxrvKDRYPxME7aMWPS78o9w6gaabq4RznHz9NaAnS enA90sfpO8CF4nZDNrI2p9vx6Lxa0w8WyWiyKWt9qPLhqwDRlKue3a2Ztc4IuizavR 3grRXBqmsYav+iOJPUZMm/yL6sxnnD4sT7ULhx1jO4XpwMMVwJp0Ry9Ao6mIhIMp2b z1fVIFXRsKi03U4uoop5AHsw6kYxWdbiFeHGugBOH/VIvdWIuMiy3L/tX77YCFWJR/ Hymy2LuptIJQ3z3E6sgLQKSyEmAhn8sypAVkhCU64Wav5pqtBza9OWr/uET8lAK97p cGMcNG+TdjDkQ== Date: Fri, 3 Oct 2025 12:21:56 -0500 From: Bjorn Helgaas To: Frank Li Cc: Hongxing Zhu , "jingoohan1@gmail.com" , "l.stach@pengutronix.de" , "lpieralisi@kernel.org" , "kwilczynski@kernel.org" , "mani@kernel.org" , "robh@kernel.org" , "bhelgaas@google.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "imx@lists.linux.dev" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 2/2] PCI: imx6: Add a method to handle CLKREQ# override active low Message-ID: <20251003172156.GA357448@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251003_102159_127471_28C680AB X-CRM114-Status: GOOD ( 42.18 ) 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 Fri, Sep 26, 2025 at 06:46:28PM -0400, Frank Li wrote: > On Fri, Sep 26, 2025 at 03:25:21PM -0500, Bjorn Helgaas wrote: > > On Fri, Sep 26, 2025 at 03:08:30AM +0000, Hongxing Zhu wrote: > > > > -----Original Message----- > > > > From: Bjorn Helgaas > > > > > > On Fri, Sep 26, 2025 at 02:19:37AM +0000, Hongxing Zhu wrote: > > > > > > -----Original Message----- > > > > > > From: Bjorn Helgaas On Tue, Sep 23, 2025 at > > > > > > 03:39:13PM +0800, Richard Zhu wrote: > > > > > > > The CLKREQ# is an open drain, active low signal that is > > > > > > > driven low by the card to request reference clock. It's an > > > > > > > optional signal added in PCIe CEM r4.0, sec 2. Thus, this > > > > > > > signal wouldn't be driven low if it's reserved. > > > > > > > > > > > > > > Since the reference clock controlled by CLKREQ# may be > > > > > > > required by i.MX PCIe host too. To make sure this clock is > > > > > > > ready even when the CLKREQ# isn't driven low by the card(e.x > > > > > > > the scenario described above), force CLKREQ# override active > > > > > > > low for i.MX PCIe host during initialization. > > > > > > > > > > > > > > The CLKREQ# override can be cleared safely when > > > > > > > supports-clkreq is present and PCIe link is up later. > > > > > > > Because the CLKREQ# would be driven low by the card at this > > > > > > > time. > > > > > > > > > > > > What happens if we clear the CLKREQ# override (so the host > > > > > > doesn't assert it), and the link is up but the card never > > > > > > asserts CLKREQ# (since it's an optional signal)? > > > > > > > > > > > > Does the i.MX host still work? > > > > > > > > > > The CLKREQ# override active low only be cleared when link is up > > > > > and supports-clkreq is present. In the other words, there is a > > > > > remote endpoint device, and the CLKREQ# would be driven active > > > > > low by this endpoint device. > > > > > > > > Assume an endpoint designed to CEM r2.0. CLKREQ# doesn't exist in > > > > CEM r2.0, so even if the endpoint is present and the link is up, > > > > the endpoint will not assert CLKREQ#. > > > > > > > > Will the i.MX host still work? > > > > > Yes, i.MX host still work. > > > If the endpoint designed to CEM r2.0, and CLKREQ# is reserved. The > > > property suppots-clkreq wouldn't present in this scenario. Thus, the > > > CLKREQ# override active low set by host driver wouldn't be cleared > > > later, although the link is up and an endpoint is present. > > > > Do you mean 'supports-clkreq' describes the *endpoint*, and you need > > to change the devicetree depending on which endpoint is connected? > > It is NOT descript *endpoint*. supports-clkreq descript the board design, > which connect CLKREQ# signal. Because standard slot's CLKREQ# (PIN12) is > reserved in beggin, so some old PCIe card have not pull down this signal as > latest spec requirement. > > PCIe Standard slot with INTEL E2000 1G ethernet card, which is producted > around 10 year ago, PIN12 is reserved. > > So we don't set supports-clkreq for stardard PCI slot, only set it for > M.2 slot. So stardard PCI slot in imx95 evk can support most cards. We have > not vendor card lists, which already connect/not connect CLKREQ#, so we > have to fallback to disconnect CLKREQ# situation by clarm our evk board > have not connect CLKREQ# to make all card works, eventhough it lost power > save feature. work is more impantant then power saving. > > > The schema says 'supports-clkreq' tells us whether CLKREQ# signal > > routing exists, not whether the downstream device actually supports > > CLKREQ#: > > > > https://github.com/devicetree-org/dt-schema/blob/4b28bc79fdc552f3e0b870ef1362bb711925f4f3/dtschema/schemas/pci/pci-bus-common.yaml#L155 > > > > I don't see 'supports-clkreq' in any devicetree related to imx6, so > > I'm not sure this patch is needed yet. Does it fix an existing > > problem? > > The patch adding 'supports-clkreq' in dts is on going. No funtional broken > because it just impact l1ss power saving features. > > > If it enables some future functionality, maybe we should defer it > > until we're actually ready to enable that functionality? > > Actually, it fixes i.MX95 19x19 EVK second slot problem. At least > INTEL E2000 1G ethernet card can't work at i.MX95 EVK boards at main > stream kernel without this patch. I deferred these two patches so we have time to tidy these up: - Coordinate with adding 'supports-clkreq' in devicetrees. - Fix the imx95 refclk enable that was missed in the v5 series. - Consider making imx95 refclk enable parallel to the other versions, e.g., by using .enable_ref_clk() instead of doing it in imx95_pcie_init_phy(). - Describe the "i.MX95 19x19 EVK second slot problem" in the commit log. Possibly split that into a second patch if it can be separated from the CLKREQ# override. It sounds like this part doesn't depend on 'supports-clkreq' in a devicetree? Maybe we can also figure out how to explain why CLKREQ# override is an issue for imx6 but not for other DWC-based drivers. Bjorn