From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CCDB3AE19F for ; Fri, 13 Mar 2026 14:53:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773413598; cv=none; b=nNLNpoSl/b1Fy3FkEUdrwSTpefse6t67r0++/mVsM4l1rYGrvVCOSv1uemUg6sbslyKE0ZbItHNbu7htR8TsHOKssJrE1Tw0qTJHI45f9eqcLA3DF0BIqYZGlZJFEkv7xFAn9sualxUdG+KfcODz75PqrteDBot9iJT98pUxRT4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773413598; c=relaxed/simple; bh=AGztY9vXRnpYiDMUR7JiIGmXAWXPGMlcLdGE4kk9Q+0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tDY+jNZp2ISKsqW0fcWsCp2/dpsxVU1XDdbRt5PRJsIldTpLneR3yF4yktHiBiX12aokUeJGHc1sDZzGAWjpyoHcbUZ5w/ML3kfKCFaxduls86QoioTb/DXY3TstrqvvEVbHfvl+aF5046Od4gMdFDXBgDIEBpqVRetmbL3q5T8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=konsulko.com; spf=pass smtp.mailfrom=konsulko.com; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b=OCylTfZM; arc=none smtp.client-ip=209.85.160.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=konsulko.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="OCylTfZM" Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-41706b23543so1498776fac.1 for ; Fri, 13 Mar 2026 07:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1773413594; x=1774018394; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=x+FdTahsHcvBlSTjItQipgPUyHJsYaYb5txmmcgFc80=; b=OCylTfZMdln+3QWDU9lrKtQ8ZFfin4LPYII+K/556xq6xU9GkVkVp1RGWQoiJlIltZ DKx0vuL4Ra5dSrM/5sIEvYdFzPgIw4X+7s1gVIllEgmwA/W7x8HJu32BxkWKnFdMLuKG 4zYLRtOQkzreH40cNOlUpoYCZ/7QltMI/fq6E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773413594; x=1774018394; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x+FdTahsHcvBlSTjItQipgPUyHJsYaYb5txmmcgFc80=; b=TObTHkRYLw5fPJlTNmBqBjcmsNf4n2GiITa+nYkAmWVBFIqim6nQV89lQ1Q2sroRAJ twy9lzBuLuCOejdblPs310egHhTmqqWZgOy/uuerFrxtEuTVq2r1CtZ54/wq736wHjOV 7UclBikVWm0JgRuo65qeCgsvSZ3BcSmv9AiowWaPve5z3jlC2g2Zp2CHdxNLNlL6qriz GbfUawQeJiA4K2HRlcfVzFreo5mFhPIimfi5MFJWU3luIlzpGTGGiKoeuEUVCKe9gCr/ lhmtQTkH2MoAkagCH4m0f0sb9fvjd9knF77y7YQIVgm4kzzrD/SZH1jQRDGlnMkGPqrX LNqQ== X-Forwarded-Encrypted: i=1; AJvYcCWili1yw+e7e4jRehTgoYss1dpw5sASEVjis1g1IFjyhsI3dE8tURZbGwK5TLw0/4IvxEsFTmRfbh8QNTg=@vger.kernel.org X-Gm-Message-State: AOJu0YxoMxpYiC5JgoRxSFqX3/GCCdARn8PlRboNtC8wsSdYZrRZ+tPU SJcD95uhhwBv7OC+hUuJk9cW+LD6w3tpseilgKRYawvxxf1XM6SJGyQr5s4zXL/ldU8= X-Gm-Gg: ATEYQzwOiImj2iPSu1y0lqLfPHc4UxHggsDv/rhnymy6xpmMd85F4gxSRMoELWnsiU6 SrWeFEonLDJIdPBBZD28hf2BtPZ1C2MXrvm3V+FnNykiIrLXojTXkvR+UyEl8cEtDV/P2t039BM N1ij1Al9LYMpuuxDwYCPNEEkw5hQlnvn8Ukt3WWzBfISnsU5nH4HiE3eEV1LRGELq0ffNMR2Xw0 S4ZiDRYJTRg0FF/HmS71Xl8qnT8o0YMWDXJEdKDa8EmXKzw56K2aPi+S6XyUO6mrnzIHfWfjyRu SGwmEr78I9Jg9LkCu+Hb+ejlOx546egLB306nEahHYfCNQ3tqzXJOJnNJ+FclY3+xP+H2XqXyC1 HL3EyBsPZzlF355mi8ns/FhQRbUt0a9/GBARUS9DZOjZJBtgP2PyZLYuzyYrEwT4m96J2NhQoRg j8xV28MsKEjgEmD4lyFRJrkudtOpPrux2YTuZUnoYkHG31stCtLGrpSZMLJS/tzZW8sQiSiV/ZD lNMKAaM1x01TiMX2SsY0UfUDrvXRHLG97CWDv4vNpAdhuAZ X-Received: by 2002:a05:6871:b13:b0:404:1ec2:562c with SMTP id 586e51a60fabf-41798e065eemr4201192fac.6.1773413593856; Fri, 13 Mar 2026 07:53:13 -0700 (PDT) Received: from bill-the-cat (fixed-189-203-97-235.totalplay.net. [189.203.97.235]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4177e25f037sm8340391fac.5.2026.03.13.07.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 07:53:13 -0700 (PDT) Date: Fri, 13 Mar 2026 08:53:11 -0600 From: Tom Rini To: Max Merchel Cc: Krzysztof Kozlowski , u-boot@lists.denx.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFT] pci: imx: Properly support upstream Linux reset-gpios property Message-ID: <20260313145311.GD502704@bill-the-cat> References: <20260312192605.131132-1-krzysztof.kozlowski@oss.qualcomm.com> <9e8aa4e7-72ab-4b1a-b324-4c78b13b9741@ew.tq-group.com> <02b1e588-1feb-484e-9f3c-f6c9f0b8e00c@oss.qualcomm.com> <435e08f1-77fd-476a-96ad-8648ae971e81@ew.tq-group.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="T/0i/r0MVQnzhAke" Content-Disposition: inline In-Reply-To: <435e08f1-77fd-476a-96ad-8648ae971e81@ew.tq-group.com> X-Clacks-Overhead: GNU Terry Pratchett --T/0i/r0MVQnzhAke Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 13, 2026 at 09:28:23AM +0100, Max Merchel wrote: >=20 > On 3/13/26 09:14, Krzysztof Kozlowski wrote: > > 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 w= ith > > > > "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. > > > >=20 > > > > 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. > > > >=20 > > > > Signed-off-by: Krzysztof Kozlowski > > > >=20 > > > > --- > > > >=20 > > > > 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 snp= s,dw-pcie.yaml") > > > > --- > > > > drivers/pci/pcie_imx.c | 22 +++++++++++++++++++--- > > > > 1 file changed, 19 insertions(+), 3 deletions(-) > > > >=20 > > > > 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 ud= evice *dev, pci_dev_t bdf, > > > > static int imx_pcie_dm_probe(struct udevice *dev) > > > > { > > > > struct imx_pcie_priv *priv =3D 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 =3D dev_read_bool(dev, "reset-gpio-active= -high"); > > > > + ret =3D gpio_request_by_name(dev, "reset-gpio", 0, &priv->reset_g= pio, > > > > + 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 =3D dev_read_bool(dev, "reset-gpio-activ= e-high"); > > > A warning should also be issued when using the deprecated "reset-gpio" > > > property. > > >=20 > > > =A0 =A0 =A0 =A0 =A0 =A0 dev_warn(dev, "reset-gpio property deprecat= ed, use > > > reset-gpios\n"); > > >=20 > > Why? What would end user seeing this in their serial console do? The > > deprecated property is not a mistake, it's just deprecated. >=20 > You're right. It's not a message for the end user, but for the developers. > Therefore, it would be better to add a debug message. Developers should be enabling OF_UPSTREAM and so that won't have slipped through? --=20 Tom --T/0i/r0MVQnzhAke Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCabQk0wAKCRAr4qD1Cr/k CorAAP4nz2WOuPJgnWCX5AusDPvllVgJY75XA9JEAfhrFWP8DAEAngFAv7ceZOc2 uMusBogoLEfFWZ3LEeKRMW2Wb5FnQgY= =yxLO -----END PGP SIGNATURE----- --T/0i/r0MVQnzhAke--