From nobody Fri Dec 19 19:00:32 2025 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 B682730C616 for ; Tue, 14 Oct 2025 11:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760441181; cv=none; b=MvsB9tPssH2H3r7V72sSKyFjw9JyWRgOPKqyjIVBdbwAfpGP4AsPr7cYU0b5+6/E2rL+VlG9w8QqbKylXKj4HcqnCqTITQl0hJq6dEpDFLk+471Li5PmU3fPaQmol76mdVZTWpC/WN+rAzYd7Hv79N5QCFK5e69q4g/7abKv/dA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760441181; c=relaxed/simple; bh=8/E7FaSI5rvegjTI/px7hhRjnssIUlowQQTI/mbFRnM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jp0ZMJBCE74mJrhDY0iSSjuQU5xP+XEQ6kWApdHMaCSAV4iqmBFeGHAPUnNfWTqJDOxNAFzYL48B70J2zzfZvmqPZt7cv3Fq/3LvJhmMp4sCHr+8B4BcMJS5+JKyU/YV5jI0NeQe/GwS2e9tKCPrPSuEYXb2g/R15ZsFbwQiHNs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PSJnFxwO; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PSJnFxwO" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-42568669606so3812935f8f.2 for ; Tue, 14 Oct 2025 04:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760441178; x=1761045978; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xApoXVfM1p1GuVFpta8JwNFasmoABdjSNWmH1bTovrs=; b=PSJnFxwOqXX/fQ5fmKpU8t6ykGhCLTteNtRwKwrMTLAE4v2A3Yi9GAuBKXOW0/HP1f GC9XN/jtZN0jN+wT3q6XuYPVzDOkKzM8o9OtUpSNAxQNEbeaQscCOUXOKp6OpqM9Ln9i c+2tSKKPl3lpCSQJExbj++azHTlIM0xDbNo4K+m0eGvFp0BsRldZK1T68hLdH9ZucFI1 XvW3Nhz9W1tR11/zMOmNc+qKHsIxTshY7o2mc/epeV32bbchXZ2EFy0UFuxY0c28YtTG iwzw05/Jx13SHFvc0KCsoiYMIAxyYi43KfG+GJV80Cf+hxQjSI+VzqO/kLumghvrCe6m HbCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760441178; x=1761045978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xApoXVfM1p1GuVFpta8JwNFasmoABdjSNWmH1bTovrs=; b=R5vP9GFmVKyIPhsWA9tsqc5S4RKe4RHMmrz7JS1WZ88AzeWajZCimKnoQd6bNwNUZc yT0x40wTYBkxABrkZevCHC4xvG5hgqumonEkUTds+2SFXlpmNlB+yeu+4hkIFQxKBZMN HUhcK5M5f9zlO/HnPa8fgKugpDu5jH1PFabaetCSlwt0VHYiHLaXTF8WwQiposBor8VC /k8r91rKYRTg+runFV3TgvZfaa2uUeywNE2FBiUQ3/InOrrszqqjxfl3hh4Zb/EdELA0 g7mp+nKthzvDE4uoIOif6KFusRxb267M8Lbm0USXH+jGlJr8Qj2LavW/goMFuGp9T1Hu BONg== X-Forwarded-Encrypted: i=1; AJvYcCWoQHXd49sXsP31roC2zPa3CPRUH1p4q9GPMQgbFNUbF/39oKwOE6r34BklizMZa6nY+VrNziCQutJb/O8=@vger.kernel.org X-Gm-Message-State: AOJu0YyV2D1Ysb9tpAmp4jCrzAACrZIh41jHjxkmfjvtiM+Bjvi1ARci lA7IcdYrad7IOLOBsCC7RsMarV4KU4gYHv6iH41AfVUKGsB1FO6N5DYN X-Gm-Gg: ASbGncs++R0ExnjFtUgOp8Qk8cRxcYfsqGpDO47D2/ips2E78nRwwucU6RYzYUjgMYD YD+MnpAHIbR2R89/fowgvpdn7Rt2DCxCuCgdKpM0hI2EW6bdlWVr7Ia/s+d4mWTfRkzy0S7hszF p0bKbiXpjRtHRkUDFwshQnFyW74SGiuPWU6fh8eKea/qDjAFFWy2yp706Zb/hGeRZSFq4riF47s th4+J4TIYU8bwC5LjEWBjn6AFZK4mwyP9fStC1ZbTkmnjtYa3LMkqquVKR2FeOFupgm29KxkDC4 BTXpMsmRbP1E80eFT50oWQt+b2gQlrHYLRKKsxWkgJHHNunlYhtffccFOdlOWBNRzUQpl8LKyDe zxWnh4owgLFO1SJusOUnFVhGYfJWEjDVBky4rR9YebU/fsO3iqJlz9DwWpg== X-Google-Smtp-Source: AGHT+IFWfNp+34zVC9dyzLTduZDnm2B91QRnGbKyuERKSKeyuloo/OgmgzHaIpkTTHvWA+zGZeVCaQ== X-Received: by 2002:a05:6000:4027:b0:426:eed2:728e with SMTP id ffacd0b85a97d-426eed272a1mr1517873f8f.29.1760441177966; Tue, 14 Oct 2025 04:26:17 -0700 (PDT) Received: from vitor-nb (bl19-170-125.dsl.telepac.pt. [2.80.170.125]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46fb492e6ddsm265829845e9.0.2025.10.14.04.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:26:17 -0700 (PDT) From: Vitor Soares To: Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kishon Vijay Abraham I Cc: Vitor Soares , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ivitro@gmail.com Subject: [PATCH v1 1/2] dt-bindings: PCI: ti,j721e-pci-host: Add optional regulator supplies Date: Tue, 14 Oct 2025 12:25:48 +0100 Message-ID: <20251014112553.398845-2-ivitro@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251014112553.398845-1-ivitro@gmail.com> References: <20251014112553.398845-1-ivitro@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Vitor Soares Add optional regulator supply properties for PCIe endpoints on TI SoCs. Some boards provide dedicated regulators for PCIe devices, such as 1.5V (miniPCIe), 3.3V (common for M.2 or miniPCIe), or 12V (for high-power devices). These supplies are now described as optional properties to allow the driver to control endpoint power where supported. Signed-off-by: Vitor Soares --- .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b= /Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml index c704099f134b..a20b03406448 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml @@ -110,6 +110,18 @@ properties: interrupts: maxItems: 1 =20 + vpcie1v5-supply: + description: 1.5V regulator used to power PCIe interfaces, + typically present on miniPCIe slots. + + vpcie3v3-supply: + description: 3.3V regulator used to power PCIe interfaces + or endpoint connectors such as M.2 or miniPCIe. + + vpcie12v-supply: + description: 12V regulator used to power PCIe slots that + require higher-voltage devices (e.g. full-size cards). + allOf: - $ref: cdns-pcie-host.yaml# - if: @@ -202,5 +214,7 @@ examples: ranges =3D <0x01000000 0x0 0x10001000 0x00 0x10001000 0x0 0x= 0010000>, <0x02000000 0x0 0x10011000 0x00 0x10011000 0x0 0x7f= ef000>; dma-ranges =3D <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>; + vpcie3v3-supply =3D <&pcie_3v3>; + vpcie12v-supply =3D <&pcie_12v>; }; }; --=20 2.51.0 From nobody Fri Dec 19 19:00:32 2025 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 661F630CDA5 for ; Tue, 14 Oct 2025 11:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760441184; cv=none; b=SKSKlMdMzpJykAs4qAVqjW5Xl0jkTcgTzxEoaotiUG3nOIJ2XcZVN9rlPZ4SH1d/Y3ZjKs4Y/azx64LADLP9GbAi5U3fyiwvNAH2w+iS/K7Cd/8bt08iEtLRXQpO9GMEK5yGjicrs3oGUIGre4q/CCktDcc0+8K0vZBxQo1aNEU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760441184; c=relaxed/simple; bh=WBNPAOl1IiO5eOs4BLPmth1N0JvusJem9fVKugbEi0w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pQcGjFLUtXRBptQXvzOxxwNAjhAmmHtNb8mwkdsngAub16AGP6AhJWx9e6E5IgGitc/v57db7hekWRwj2Aa9kXNIyv9ta8DI90jf2t2Ya5n5ul/S4NvjZRppp6/1fzMXRmMpkn2vb62iQeP3vYSNZJmRkae6NyqNa2vaVD5Rklo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WfRUCQeJ; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WfRUCQeJ" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-46e4f2696bdso52598855e9.0 for ; Tue, 14 Oct 2025 04:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760441181; x=1761045981; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EbYmHynLeWlw8u23NecrRWs1rFP/nnkTB1+gQnuvcng=; b=WfRUCQeJz/EQhr0GFi0+c8JpNb5W1PvgyGqLwmPyxI6XKo/Fh21ZWEgYBTEgy8eazz XkTsIoivhJzCbrm2BKaCLOUzY6v40vViafiTFxHf/LnJTkmOBy1eQlIIc/uj3Tke27Ev R8eSuYCNbGVaVq4b+t4GuRm/20UFZxUl1/UQ9JEsTl0WwMSEh3AuOEujAokfemtHbbCP r6Zx+VprRTQU+lSlLzLVaT8JaEiHg6wZBilGITHZViclqJcKGWcfyYrra0SmqZXokS15 BZ5XmAd2MrSXb0hn/L6q+uSafm3FuHl7V+AhqSisMhU2NFaWMcRthYo/Zbxj+Proj4OD JYHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760441181; x=1761045981; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EbYmHynLeWlw8u23NecrRWs1rFP/nnkTB1+gQnuvcng=; b=ublKxmQ6AKlvJLbLoGS52h+o0cjko+UfV3PMc1c4PfJp/bT0H/VHw+vCqI+vZW0f+U CKq1K33gSWWI2Yr2THP47y6VOoqbeWDa+aywGXy3RmDElScjD5vo4b1cqzFReOttLx23 BlwaSLI5T0UTgZ8yFMbGyyDswxgY3A/KL6E563ra/afmqUFzpoPHav1Zlj4ch2VqOplf bhUUDwUNIONnj5Wwe1LCefQVJmFpz7XBQdsCYpCOhxSq9SkpCd0Mz3LWOAaTy0xXdbQ6 RM1qc8SA/hELpXWkaJ/ptWMESOqIh7+DlGr3/OeZqrRgNmmRReMhacfr0y+HrifdzJS+ 1Q+g== X-Forwarded-Encrypted: i=1; AJvYcCUQRGZmDsTO/GZsB2gBmeaH3xcBsJCs1g4suF5G8QbhdsHeHAISDNWbHzKvj1CIK2qJi3f7Ng21U1inf38=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2LvGNAA0GB6VDEyndxN9HVt/WS4mhYot/AfpYHKo+S8QSB6F5 nKNxbHRfYBmmc/0CFcXtHY/r5TmvlzEXBs2fqFFg7mNwxFGBHAr/dP4C X-Gm-Gg: ASbGncty1OzqBSAeP4b4nxT92/ntZtiTXLfIjFt89s2evo0ZGxwJ8pCFfnBB103fNZx XuNfRbgAbJ1hx79QUtue1+tSpdTc0d9Renuff8F+C0BC+LY/Ik3DfuOq1YkDxbj5ySwPIQM61UT /9cQFCcqgQyQ3kd5pxLUYYvVx2h+4I572esSrkK4T0kNSqCToAw59CAkivXF1+mhSo7+WS2ny/d exWjx0fOS5Tyr2OOCLizV0MhtEpuBF4VcAtMpbT+SUT2nk3K8c2iPHZfYSS91WSpV9lflVbKNnn ymUwfGpEvxybDTcZbA4Gk665v55vZq8wfRpn92p/f529hPPetX4R47BwZ+pmApwZaojPaGweEd9 w4WCf8zYrRxy5jiMjETfiD8J66/GVysrXoK/5YeLUI1OTMSmxpcADKClkhg== X-Google-Smtp-Source: AGHT+IFO2uKjeUaYUKbnwXbbO+Xo/HgCqYDDA6YUTOMYT5kkkih/xh4BWfPVSZJs7SLyBcg2m31Icw== X-Received: by 2002:a05:600c:4745:b0:46d:cfc9:1d0f with SMTP id 5b1f17b1804b1-46fa9af30e5mr188941035e9.19.1760441180577; Tue, 14 Oct 2025 04:26:20 -0700 (PDT) Received: from vitor-nb (bl19-170-125.dsl.telepac.pt. [2.80.170.125]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46fb492e6ddsm265829845e9.0.2025.10.14.04.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:26:20 -0700 (PDT) From: Vitor Soares To: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas Cc: Vitor Soares , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ivitro@gmail.com Subject: [PATCH v1 2/2] PCI: j721e: Add support for optional regulator supplies Date: Tue, 14 Oct 2025 12:25:49 +0100 Message-ID: <20251014112553.398845-3-ivitro@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251014112553.398845-1-ivitro@gmail.com> References: <20251014112553.398845-1-ivitro@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Vitor Soares Some boards require external regulators to power PCIe endpoints. Add support for optional 1.5V, 3.3V, and 12V supplies, which may be defined in the device tree as vpcie1v5-supply, vpcie3v3-supply, and vpcie12v-supply. Use devm_regulator_get_enable_optional() to obtain and enable each supply, so it will be automatically disabled when the driver is removed. Signed-off-by: Vitor Soares --- drivers/pci/controller/cadence/pci-j721e.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/contr= oller/cadence/pci-j721e.c index 5bc5ab20aa6d..f29ce2aef04e 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -21,6 +21,7 @@ #include #include #include +#include =20 #include "../../pci.h" #include "pcie-cadence.h" @@ -467,6 +468,10 @@ static const struct of_device_id of_j721e_pcie_match[]= =3D { }; MODULE_DEVICE_TABLE(of, of_j721e_pcie_match); =20 +static const char * const j721e_pcie_supplies[] =3D { + "vpcie12v", "vpcie3v3", "vpcie1v5" +}; + static int j721e_pcie_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; @@ -480,6 +485,7 @@ static int j721e_pcie_probe(struct platform_device *pde= v) struct gpio_desc *gpiod; void __iomem *base; struct clk *clk; + unsigned int i; u32 num_lanes; u32 mode; int ret; @@ -565,6 +571,13 @@ static int j721e_pcie_probe(struct platform_device *pd= ev) if (irq < 0) return irq; =20 + for (i =3D 0; i < ARRAY_SIZE(j721e_pcie_supplies); i++) { + ret =3D devm_regulator_get_enable_optional(dev, j721e_pcie_supplies[i]); + if (ret < 0 && ret !=3D -ENODEV) + return dev_err_probe(dev, ret, "can't enable regulator %s\n", + j721e_pcie_supplies[i]); + } + dev_set_drvdata(dev, pcie); pm_runtime_enable(dev); ret =3D pm_runtime_get_sync(dev); --=20 2.51.0