From patchwork Tue Jun 23 14:55:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1315307 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=IG2STyNa; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49rq8Y1LVJz9sRR for ; Wed, 24 Jun 2020 00:55:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732851AbgFWOzi (ORCPT ); Tue, 23 Jun 2020 10:55:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732738AbgFWOzi (ORCPT ); Tue, 23 Jun 2020 10:55:38 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19F7C061573; Tue, 23 Jun 2020 07:55:36 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id w6so10617000ejq.6; Tue, 23 Jun 2020 07:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZoNn/kpfy4EOqV/F84P2FYlfojkZZi4ZcYifbOpUmbc=; b=IG2STyNaS325DioJWbHdwVE6LZvETJb0OUG5l9W9w2Liu4rVS/E8Q8Kgdr2+acpGgk INk4bWbnxbcEVwQrG6BayYgEWHiwDp/tThbKDtfCGS5p+fHpW3QNDyp5CHB3KUGDTj5F UNMCcPOepb9Rer4lDnDltiyyoUduB1erVERoTTBzYl+Iw+UTz5foiu6pUiFZrIHx5sXW SuLdztptajl3XvO4CYGuwoIDqzbu4h980Pe+2TAw86pnIkdcgiNYXAWfXGuJhQMBCMS2 ljnZDw2+ZQ3C9KnaQnzbMckqDOkXgBRkJ0NI+IDel6nLkvb9ehQX+/tQCSU7IlNFyHO/ x2qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZoNn/kpfy4EOqV/F84P2FYlfojkZZi4ZcYifbOpUmbc=; b=PnT+C1KVT/XpbPEoXd48hycS4uSFwsTctqsqinKUtYNGcqlRSL+CAPX5QnRdiBBd6S Phwd7ICS8WmWo6P5S8HYsc8GdT2/qwEN2OqnPfdRhHuK48d7LN5OZU1U4RZsw/QBiDzB Khxp0mw8765GElV+NGgj31sQ1b2otS751eHwgNj8+BuXzZ0u80hfvkahvPxeHUIH4KM5 uudz4pcjPS7ROjhYchBgNL1eE3roR33lzHU5m8DwjJl9K1TsYI3xIr2zCbn6pZi4a16a 5jHX8QMvDh9XTPPFp5A14Jh+2EG7kDK2ltrvRrEgD2UOqKg+JlcHpM/EugXwYq9T3PTE MDug== X-Gm-Message-State: AOAM530/q8Nmp00815lF1jJa5N2NItXsuLsyDhcFiqUpxrML+mtYbXmw YkovaSsRw3Oz1JFVBkbSIwg= X-Google-Smtp-Source: ABdhPJzCdsyT1/vZeG/XK8ILBOHjer3JOHBRVsmSyxl0EED/uDPBfyTUsGQBKt4o8AaU9VPsUkni9g== X-Received: by 2002:a17:906:3e15:: with SMTP id k21mr21576565eji.525.1592924135087; Tue, 23 Jun 2020 07:55:35 -0700 (PDT) Received: from localhost (pd9e51079.dip0.t-ipconnect.de. [217.229.16.121]) by smtp.gmail.com with ESMTPSA id js3sm13649354ejb.65.2020.06.23.07.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 07:55:30 -0700 (PDT) From: Thierry Reding To: Lorenzo Pieralisi , Bjorn Helgaas , Rob Herring Cc: Jon Hunter , linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: pci: tegra: Remove PLL power supplies Date: Tue, 23 Jun 2020 16:55:27 +0200 Message-Id: <20200623145528.1658337-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Thierry Reding The XUSB pad controller, which provides access to various USB, PCI and SATA pads (or PHYs), needs to bring up the PLLs associated with these pads. In order to properly do so, it needs to control the power supplied to these PLLs. Remove the PLL power supplies from the PCIe controller because it does not need direct access to them. Instead it will only use the configured pads provided by the XUSB pad controller. Signed-off-by: Thierry Reding Reviewed-by: Rob Herring --- Hi Rob, I already made this change as part of the conversion series, but wanted to send this out as part of this subseries since it addresses a fairly long-standing issue that I'd like to clean up irrespective of the DT binding conversion. Since it looks like the conversion series will take a bit longer, I think it makes sense to send this out separately. Thierry .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt index 7939bca47861..d099f3476ccc 100644 --- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt @@ -112,28 +112,16 @@ Power supplies for Tegra124: - Required: - avddio-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V. - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. - - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must - supply 1.05 V. - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks. Must supply 3.3 V. - - hvdd-pex-pll-e-supply: High-voltage supply for PLLE (shared with USB3). - Must supply 3.3 V. - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must supply 2.8-3.3 V. - - avdd-pll-erefe-supply: Power supply for PLLE (shared with USB3). Must - supply 1.05 V. Power supplies for Tegra210: - Required: - - avdd-pll-uerefe-supply: Power supply for PLLE (shared with USB3). Must - supply 1.05 V. - hvddio-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks. Must supply 1.8 V. - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. - - dvdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must - supply 1.05 V. - - hvdd-pex-pll-e-supply: High-voltage supply for PLLE (shared with USB3). - Must supply 3.3 V. - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must supply 1.8 V. From patchwork Tue Jun 23 14:55:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1315309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jiyFd4W4; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49rq8Z6h5Sz9sSF for ; Wed, 24 Jun 2020 00:55:42 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732874AbgFWOzj (ORCPT ); Tue, 23 Jun 2020 10:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732738AbgFWOzj (ORCPT ); Tue, 23 Jun 2020 10:55:39 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9F7EC061573; Tue, 23 Jun 2020 07:55:38 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id e15so6199444edr.2; Tue, 23 Jun 2020 07:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rSShYoiZuyH2JUu2VPJiVE0CBFdCwj/MFQetEFw6dJk=; b=jiyFd4W4DRKlvqYwkPpgQ/YkwtO+fIZhekR3JeOrDCN8/Loe2VTtvOpNYa2UZLC4hX 2/SQnFNAfcGwU4e/pssylpBEi7SaFVqunARH0O1JodnptajCy0Tb+mTdzDwVg8B1DH5Q fFbxlqjiD+N1WzQPC/lqiX5PeNF2qUpkAyrXhrUz5Dlxn96XT/HSbwpRw5imt8dzEtH2 J63Jf+rEEKu3Kf6sW41UyAYF929po29gXgE70JhrZWeDS6zgUUYvNtyKvx3jKBD9VZSE UC8Uc8sBPc/0c8rW3s/MeWVcU2ogUTgyP4QceBMg6bBX61c8f9sflRrvBGlmNn15g5zh cVWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rSShYoiZuyH2JUu2VPJiVE0CBFdCwj/MFQetEFw6dJk=; b=hxaOUQR95l5A6TwpXws6CfRR0bVedOC62IHbe4yQZ1e1+FDowuslSJZNSY3gKxOSxg eolMYBOsvCQdowFaBlzeZtf8J3sc0STwDcVTtV0HShw/s3+Th3vO+xIsrV6MeEqI6tF6 /vxfgvUjMiwQFXFMgC8xyCHjQUyqejhIQ6cxkat3f0uko8OeyToo4I/Y4PjP5M4zaoDw w7ytOf7+RwoEbQ2M/bR9WcblxBmE/tfnWFjwP1WD5AQ51VXJtVebwlDowHHxwNa6Y7hy mKMUn1pzbQYzexTaHIrJIHwuRaLp8L8BisJQOcGNmyXAOjmeifTn5TQWuCDNM1odGS2F L9mg== X-Gm-Message-State: AOAM530K+YImEr9DnCA82I9aNqzevc8QBoPPSKa9oYdY1F6D0Bu5ygdb MI/egnxo5/EGaMcLR22hrc4/J+E8 X-Google-Smtp-Source: ABdhPJz+jiX/nfuajM9vf5i0JXam3TM9ozBPu0Fj4NKu9j2mgDF2CaG5HvOzfeu2fJioF+Y3gsCS4A== X-Received: by 2002:a05:6402:1481:: with SMTP id e1mr22264556edv.113.1592924137559; Tue, 23 Jun 2020 07:55:37 -0700 (PDT) Received: from localhost (pd9e51079.dip0.t-ipconnect.de. [217.229.16.121]) by smtp.gmail.com with ESMTPSA id q7sm8693452eja.69.2020.06.23.07.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 07:55:35 -0700 (PDT) From: Thierry Reding To: Lorenzo Pieralisi , Bjorn Helgaas , Rob Herring Cc: Jon Hunter , linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 2/2] PCI: tegra: Remove PLL power supplies Date: Tue, 23 Jun 2020 16:55:28 +0200 Message-Id: <20200623145528.1658337-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623145528.1658337-1-thierry.reding@gmail.com> References: <20200623145528.1658337-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Thierry Reding The Tegra PCI controller driver doesn't need to control the PLL power supplies directly, but rather uses the pads provided by the XUSB pad controller, which in turn is responsible for supplying power to the PLLs. Signed-off-by: Thierry Reding Reviewed-by: Rob Herring --- drivers/pci/controller/pci-tegra.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 235b456698fc..f87a09d21eb0 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -2025,7 +2025,7 @@ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask) pcie->supplies[i++].supply = "hvdd-pex"; pcie->supplies[i++].supply = "vddio-pexctl-aud"; } else if (of_device_is_compatible(np, "nvidia,tegra210-pcie")) { - pcie->num_supplies = 6; + pcie->num_supplies = 3; pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies, sizeof(*pcie->supplies), @@ -2033,14 +2033,11 @@ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask) if (!pcie->supplies) return -ENOMEM; - pcie->supplies[i++].supply = "avdd-pll-uerefe"; pcie->supplies[i++].supply = "hvddio-pex"; pcie->supplies[i++].supply = "dvddio-pex"; - pcie->supplies[i++].supply = "dvdd-pex-pll"; - pcie->supplies[i++].supply = "hvdd-pex-pll-e"; pcie->supplies[i++].supply = "vddio-pex-ctl"; } else if (of_device_is_compatible(np, "nvidia,tegra124-pcie")) { - pcie->num_supplies = 7; + pcie->num_supplies = 4; pcie->supplies = devm_kcalloc(dev, pcie->num_supplies, sizeof(*pcie->supplies), @@ -2050,11 +2047,8 @@ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask) pcie->supplies[i++].supply = "avddio-pex"; pcie->supplies[i++].supply = "dvddio-pex"; - pcie->supplies[i++].supply = "avdd-pex-pll"; pcie->supplies[i++].supply = "hvdd-pex"; - pcie->supplies[i++].supply = "hvdd-pex-pll-e"; pcie->supplies[i++].supply = "vddio-pex-ctl"; - pcie->supplies[i++].supply = "avdd-pll-erefe"; } else if (of_device_is_compatible(np, "nvidia,tegra30-pcie")) { bool need_pexa = false, need_pexb = false;