From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: Re: [PATCH] ARM: imx6: Fix PCIe reset gpio polarity on Toradex Apalis Date: Tue, 19 Apr 2016 19:48:55 -0500 Message-ID: <20160420004855.GG17863@localhost> References: <1459514508-8557-1-git-send-email-ynezz@true.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1459514508-8557-1-git-send-email-ynezz@true.cz> Sender: linux-pci-owner@vger.kernel.org To: Petr =?utf-8?Q?=C5=A0tetiar?= Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring , Sascha Hauer , Shawn Guo , Richard Zhu , Lucas Stach , Bjorn Helgaas , linux-pci@vger.kernel.org, Tim Harvey , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Fabio Estevam , Marcel Ziswiler , stefan@agner.ch List-Id: devicetree@vger.kernel.org On Fri, Apr 01, 2016 at 02:41:46PM +0200, Petr =C5=A0tetiar wrote: > In commit 5c5fb40de8f14 "PCI: imx6: Add support for active-low reset = GPIO" > I've made GPIO reset polarity aware, which made the PCIe working on A= palis SoM > (reset active-high), but it has broken PCIe on several other i.MX6 bo= ards > (reset active-low) due to wrong logic level. It has made the default = reset > logic active-high, but it was active-low since beginning due to the b= ug in the > reset code: >=20 > gpio_set_value_cansleep(imx6_pcie->reset_gpio, 0); > msleep(100); > gpio_set_value_cansleep(imx6_pcie->reset_gpio, 1); >=20 > This breakage couldn't be fixed correctly by fixing the reset code sn= ippet > mentioned above and fixing the broken DTBs, as we can't touch the DTB= s, so the > 5c5fb40de8f14 commit is going to be reverted, making PCIe reset broke= n on > Apalis modules again. >=20 > As suggested by Fabio, to fix this situation in backward compatible m= anner, we > should introduce new boolean DT property reset-gpio-active-high, whic= h would > set PCIe reset GPIO polarity as needed. This patch series tries to do= so. I applied both of these (the original Toradex Apalis Ixora DTS fix and the v3 "Add reset-gpio-active-high" change) to pci/host-imx6 for v4.7, with Lucas' Reviewed-by, Rob's Acked-by, and Tim's Tested-by. Thanks, Petr!