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 5989AC3DA45 for ; Thu, 11 Jul 2024 15:27:03 +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=YGIW/Vx8HzQ+wbnotFUYU6SkJgDBJDLpbLvh5NfbH1U=; b=MeLI6aD4ByTZ4Z9BAy042KDCw1 Qq6lRBI5tZnj+0YL44xhRxg3AeglwVaxv66PIwjxX7weQqJkGtys1uIxoT8kw/Ts+o7rJF5ehZChp BCV1zcWFmcLetZtECjV8JinCXCBG8Yz5A3Pzkrjk9HbP5/uka4EgvfceM6rypqs0G8CP222sINspJ N8YpWa5kPaesmObnkS4vNzadsg11mjma6Eq7sQHv2etk5zDJY0Obtm0z0iWQ3pSKpWvE2ZkSDVsAd W3iNOwvtisVIJtceD4MxBSby4AkfrsRZJXjU01qwLHguQVXYJEqY+Oas9GJh7Ju0nC3yn+xy7MjVl Gg6OurLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRvh2-0000000EV7k-1MGv; Thu, 11 Jul 2024 15:26:48 +0000 Received: from mail11.truemail.it ([217.194.8.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRvfy-0000000EUxH-0jAe for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2024 15:26:30 +0000 Received: from francesco-nb (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 026BB1FE38; Thu, 11 Jul 2024 17:25:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1720711535; bh=YGIW/Vx8HzQ+wbnotFUYU6SkJgDBJDLpbLvh5NfbH1U=; h=From:To:Subject; b=aqiA9ufASPnH6b6V4P6BPI7AB+4uEnEMqaPoC0ArVsGTNSvRFxhySQnZ602RrPPvf Dzu2CXVJVDeZ07XVJcyL0Acuu6pVSV4D07PqaqT8STbAAg7T1zR0IvzXyAoJXbKzTU vnrT3supUY50qsvdN5fqHY41lghet08QeFgwL7pobq8oOILfGN0V1/Is+duFHOWIw3 7Xocx9RS+ehnRRPmAXIw0BGr+6kv4S6s0be11CPsy5pxXzPlIUxLrAzBbekJeY6+fE fb5rOXCjVDlZzyWcpo5CnKI8WTBRRgBClUkHz8ecxeR/mRzcN/hfIC9qkBYxLkGwmV ghvNkBLJWASEw== Date: Thu, 11 Jul 2024 17:25:31 +0200 From: Francesco Dolcini To: Niklas Cassel Cc: Francesco Dolcini , Rob Herring , Krzysztof Kozlowski , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Conor Dooley , Siddharth Vadapalli , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Francesco Dolcini , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v1 0/2] PCI: ti: k3: Fix TI J721E PERST# polarity Message-ID: <20240711152531.GA35875@francesco-nb> References: <20240703100036.17896-1-francesco@dolcini.it> 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-20240711_082542_976751_B5DC5D3C X-CRM114-Status: GOOD ( 21.00 ) 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 Hello Niklas, On Thu, Jul 11, 2024 at 04:21:34PM +0200, Niklas Cassel wrote: > On Wed, Jul 03, 2024 at 12:00:34PM +0200, Francesco Dolcini wrote: > > From: Francesco Dolcini > > > > Fix PCIe PERST# signal polarity in TI J721E used on TI K3 machines. > > > > PCIe PERST# needs to be de-asserted for PCIe to work, however, the driver is > > doing the opposite and the device tree files are defining the signal with the > > wrong polarity to cope with that. Fix both the driver and the affected DT > > files. > > While I understand why you want to fix this, > I'm not sure if you can actually do so without breaking device tree backwards > compatibility. I understand this, and at the same time I know that this was done in the past for exactly the same reason, see for example commit 87620512681a ("PCI: apple: Fix PERST# polarity"). This patch was send not because the issue was noticed analyzing the code, but because during a bring-up of a new platform (based on k3-j784s4) using this PCIe controller driver the PCIe was not working and this lead to some time consuming debugging on both the hardware/software before finding this issue. That was worked around just by describing the HW incorrectly in the DT (the device tree of this board is not in mainline - yet). With that said I cannot 100% judge the exact impact, I know most (but not all) of the boards and I think that making the change is beneficial despite what you correctly write. Most of the boards affected are from Texas Instruments (eval boards), plus one beagle and one board from Siemens. Let's see what these folks think about this change, these boards are all relatively recent. > Perhaps you could add a comment in the driver and the DTS files explaining > that the DTS is actually wrong, but cannot be changed because of DT backwards > compatibility. As I wrote my concern is on new boards. BTW, the RS485 polarity for the UART used on all TI platform (including the very old ones) have a similar bug [1], however this bug is so old and deep into the code that we'll have to live with it. [1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/ Francesco