From patchwork Mon May 8 10:45:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13234298 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4A78C77B75 for ; Mon, 8 May 2023 10:46:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235131AbjEHKqp (ORCPT ); Mon, 8 May 2023 06:46:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235052AbjEHKq2 (ORCPT ); Mon, 8 May 2023 06:46:28 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C03382C3EC for ; Mon, 8 May 2023 03:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=/52t7v/z2bjuNS cAobOGif1HPE5n1Q25yFrY/RjA0b0=; b=t06NfYZW23apf2nJJZd1BWICzCM3Qt DEHZxnFQB2q0GJe5q3y9reAgnUjm1pChQRAiTiAYE51UIl5QrCKIlls2c8CWf60t jEa1nVtk1umCHGjcimZKNN191UuUkoGb/pHhcZF7nqSvHe67GFMssKSl7i2uZ+Qt plOPKEqtwQwrY= Received: (qmail 1693272 invoked from network); 8 May 2023 12:46:09 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 8 May 2023 12:46:09 +0200 X-UD-Smtp-Session: l3s3148p1@x6G4WCz7noEujnsI From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Marek Vasut , Yoshihiro Shimoda , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/3] dt-bindings: PCI: rcar-pci-host: add optional regulators Date: Mon, 8 May 2023 12:45:55 +0200 Message-Id: <20230508104557.47889-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230508104557.47889-1-wsa+renesas@sang-engineering.com> References: <20230508104557.47889-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Support regulators found on the e.g. KingFisher board. Signed-off-by: Wolfram Sang --- Documentation/devicetree/bindings/pci/rcar-pci-host.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml b/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml index 8fdfbc763d70..23e44f78e62e 100644 --- a/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml @@ -68,6 +68,12 @@ properties: phy-names: const: pcie + vpcie1v5-supply: + description: The 1.5v regulator to use for PCIe. + + vpcie3v3-supply: + description: The 3.3v regulator to use for PCIe. + required: - compatible - reg @@ -121,5 +127,7 @@ examples: clock-names = "pcie", "pcie_bus"; power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; resets = <&cpg 319>; + vpcie1v5-supply = <&pcie_1v5>; + vpcie3v3-supply = <&pcie_3v3>; }; }; From patchwork Mon May 8 10:45:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13234300 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE068C77B75 for ; Mon, 8 May 2023 10:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235074AbjEHKqt (ORCPT ); Mon, 8 May 2023 06:46:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235075AbjEHKq3 (ORCPT ); Mon, 8 May 2023 06:46:29 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FFE22C3C8 for ; Mon, 8 May 2023 03:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=Su+LIM099dBNN5 I/2zqemLMlE9HMV3Yah2C6jRkZbDk=; b=iyP8TDXVUIrCjCS5ppDQZq5VQ7viSa g5ULeT4CgvfOXRExfuT4YfkL4WkKrTXJbLcPTJON2Hjf1g0bNpNrJjcJQs1oC3+Y g029BS/M/mZNlBbIk6mM5zxFjMhXq4pKUU0zMZn0IHM2H6e30roEoANk8/JTucTW iAwBgNzjjAeHk= Received: (qmail 1693319 invoked from network); 8 May 2023 12:46:10 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 8 May 2023 12:46:10 +0200 X-UD-Smtp-Session: l3s3148p1@5w7EWCz7tsMujnsI From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Marek Vasut , Yoshihiro Shimoda , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 2/3] PCI: rcar-host: add support for optional regulators Date: Mon, 8 May 2023 12:45:56 +0200 Message-Id: <20230508104557.47889-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230508104557.47889-1-wsa+renesas@sang-engineering.com> References: <20230508104557.47889-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The KingFisher board has regulators. They just need to be en-/disabled, so we can leave the handling to devm. Signed-off-by: Wolfram Sang --- drivers/pci/controller/pcie-rcar-host.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index e80e56b2a842..b0e4834176d2 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "pcie-rcar.h" @@ -992,6 +993,14 @@ static int rcar_pcie_probe(struct platform_device *pdev) pcie->dev = dev; platform_set_drvdata(pdev, host); + err = devm_regulator_get_enable_optional(dev, "vpcie3v3"); + if (err < 0 && err != -ENODEV) + dev_err_probe(dev, err, "error enabling 3.3V regulator"); + + err = devm_regulator_get_enable_optional(dev, "vpcie1v5"); + if (err < 0 && err != -ENODEV) + dev_err_probe(dev, err, "error enabling 1.5V regulator"); + pm_runtime_enable(pcie->dev); err = pm_runtime_get_sync(pcie->dev); if (err < 0) { From patchwork Mon May 8 10:45:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13234301 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 495EEC77B75 for ; Mon, 8 May 2023 10:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234968AbjEHKqx (ORCPT ); Mon, 8 May 2023 06:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234971AbjEHKqd (ORCPT ); Mon, 8 May 2023 06:46:33 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABEDD26EBC for ; Mon, 8 May 2023 03:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=BzUDahvBEhVYMi I5z+9pq3NWIK0k2jvHIEQ8e/rO2YY=; b=XTFDUUY+ADmZCeeL/+sN9uwj5jsoYW kCj7RdMPuJC1temr1CQMLKvUzshYoGgjyEKIOslInImCDZ5JWXY4K9SlIREc7psK /FGiU3EdnxVl/BJt8qquNTpmrTP0TNjTZISXTtnnOj7G1g2RAsOsX5JQWTzkRhej cIUih3HKkivc4= Received: (qmail 1693366 invoked from network); 8 May 2023 12:46:11 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 8 May 2023 12:46:11 +0200 X-UD-Smtp-Session: l3s3148p1@fR3RWCz7vMMujnsI From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 3/3] arm64: dts: renesas: ulcb-kf: add regulators for PCIe ch1 Date: Mon, 8 May 2023 12:45:57 +0200 Message-Id: <20230508104557.47889-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230508104557.47889-1-wsa+renesas@sang-engineering.com> References: <20230508104557.47889-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Without them, no power, so cards do not get recognized. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven --- arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi index efc80960380f..ff3a9ab6e6b0 100644 --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi @@ -52,6 +52,24 @@ hdmi_3v3: regulator-hdmi-3v3 { regulator-max-microvolt = <3300000>; }; + pcie_1v5: regulator-pcie-1v5 { + compatible = "regulator-fixed"; + regulator-name = "pcie-1v5"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + gpio = <&gpio_exp_77 15 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + pcie_3v3: regulator-pcie-3v3 { + compatible = "regulator-fixed"; + regulator-name = "pcie-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio_exp_77 14 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + snd_3p3v: regulator-snd_3p3v { compatible = "regulator-fixed"; regulator-name = "snd-3.3v"; @@ -335,6 +353,9 @@ &pciec0 { &pciec1 { status = "okay"; + + vpcie1v5-supply = <&pcie_1v5>; + vpcie3v3-supply = <&pcie_3v3>; }; &pfc {