From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: Max Merchel <max.merchel@ew.tq-group.com>,
Tom Rini <trini@konsulko.com>,
u-boot@lists.denx.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFT] pci: imx: Properly support upstream Linux reset-gpios property
Date: Fri, 13 Mar 2026 09:14:51 +0100 [thread overview]
Message-ID: <02b1e588-1feb-484e-9f3c-f6c9f0b8e00c@oss.qualcomm.com> (raw)
In-Reply-To: <9e8aa4e7-72ab-4b1a-b324-4c78b13b9741@ew.tq-group.com>
On 13/03/2026 09:12, Max Merchel wrote:
>
> On 3/12/26 20:26, Krzysztof Kozlowski wrote:
>> The driver requests explicitly "reset-gpio" property, not the one with
>> "gpios" suffix but upstream Linux kernel deprecated it in 2021.
>> Existing upstream Linux kernel DTS is being changed to "reset-gpios"
>> property, thus update the driver to read that one too.
>>
>> Note that driver is probably broken already, because it parsed GPIO in
>> standard way respecting the flags and on top of that applied the
>> "reset-gpio-active-high" flag, thus "reset-gpio ACTIVE_LOW" with the
>> "reset-gpio-active-high" property would be double inverted.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
>>
>> ---
>>
>> 1. https://lore.kernel.org/linux-devicetree/20260312-dts-snps-reset-gpios-v2-12-0d5040eb4a1e@oss.qualcomm.com/
>> 2. See Linux kernel commit 42694f9f6407 ("dt-bindings: PCI: add snps,dw-pcie.yaml")
>> ---
>> drivers/pci/pcie_imx.c | 22 +++++++++++++++++++---
>> 1 file changed, 19 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
>> index 11c4ccbfc555..8d853ecf2c22 100644
>> --- a/drivers/pci/pcie_imx.c
>> +++ b/drivers/pci/pcie_imx.c
>> @@ -728,15 +728,31 @@ static int imx_pcie_dm_write_config(struct udevice *dev, pci_dev_t bdf,
>> static int imx_pcie_dm_probe(struct udevice *dev)
>> {
>> struct imx_pcie_priv *priv = dev_get_priv(dev);
>> + int ret;
>>
>> #if CONFIG_IS_ENABLED(DM_REGULATOR)
>> device_get_supply_regulator(dev, "vpcie-supply", &priv->vpcie);
>> #endif
>>
>> /* if PERST# valid from dt then assert it */
>> - gpio_request_by_name(dev, "reset-gpio", 0, &priv->reset_gpio,
>> - GPIOD_IS_OUT);
>> - priv->reset_active_high = dev_read_bool(dev, "reset-gpio-active-high");
>> + ret = gpio_request_by_name(dev, "reset-gpio", 0, &priv->reset_gpio,
>> + GPIOD_IS_OUT);
>> + if (!ret) {
>> + /*
>> + * Legacy property, invert assert logic based on
>> + * reset-gpio-active-high. This won't work if flags are not
>> + * matching the reset-gpio-active-high.
>> + */
>> + priv->reset_active_high = dev_read_bool(dev, "reset-gpio-active-high");
>
> A warning should also be issued when using the deprecated "reset-gpio"
> property.
>
> dev_warn(dev, "reset-gpio property deprecated, use
> reset-gpios\n");
>
Why? What would end user seeing this in their serial console do? The
deprecated property is not a mistake, it's just deprecated.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-03-13 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 19:26 Krzysztof Kozlowski
2026-03-13 8:12 ` Max Merchel
2026-03-13 8:14 ` Krzysztof Kozlowski [this message]
2026-03-13 8:28 ` Max Merchel
2026-03-13 14:53 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02b1e588-1feb-484e-9f3c-f6c9f0b8e00c@oss.qualcomm.com \
--to=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=max.merchel@ew.tq-group.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®