From patchwork Mon Apr 1 10:40:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10879695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0390C1708 for ; Mon, 1 Apr 2019 10:41:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFC66286A2 for ; Mon, 1 Apr 2019 10:41:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3C63287D4; Mon, 1 Apr 2019 10:41:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64C81286A2 for ; Mon, 1 Apr 2019 10:41:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbfDAKk4 (ORCPT ); Mon, 1 Apr 2019 06:40:56 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36561 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfDAKkz (ORCPT ); Mon, 1 Apr 2019 06:40:55 -0400 Received: by mail-wm1-f68.google.com with SMTP id h18so10802188wml.1; Mon, 01 Apr 2019 03:40:54 -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=7GevwntDVhSZ+fFuiuMye419avBI3XRhevXvsThsYhw=; b=t/W32oZ2T9ZsFL2FOZe2vJEkSVHPjUUsR948xEt0+nntjEDpcUjlgCT/oFiPuWBdni UxTxYdxG8jW4vb5W59Ztq2kHci9Q7W9W9pRLmYmlA1DEGOZ0FJTyT5wLyu4alNzATz+T X4RsO00bugp/t108vHoYimBVYKhRritkngYA6gcdjKuVUwRE8JV80057SWcQqHeRyoo3 /tQyGb8FBkzFYZLXYI6OO3k7/FWYAf/0wpW8YDdgORz+ZW3ZA/r5N9aFZzwwnL9vNQc9 8jqM0F3KB/RXp1g+wF1AvcWyXfT4U6oRrxxDipAAaXzOJIOlTlnUvcGj/q3Md4++NBVn pNRA== 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=7GevwntDVhSZ+fFuiuMye419avBI3XRhevXvsThsYhw=; b=aDyOEq9s4WAqPpB/AhLAD/uUS/gXq2+J88aW75qjlc4n7jp1hWK6VcSv2ypJKTfi20 Up8QgWr7WQ1Xn8dIopSYhwMWkQYvHoVeRSD4EEBIYxHWYSNzXWbIah8j4RqH8jF3vWLc e3cIV73jFptvSdPzvRRn8PtWgmsTgNZPFi7zLIHx05C1rCbm1TsPLpmte1Cax3trJnPJ tkyp1GNJQNRPFXT1dmKWs+8vwpgtxbmDYULXjsMqHLzVLLNXrZ2cP8+P9O3GJXMpDCLf rdGTxcFxQf5Tr/iDKziKfwCJppCpvvwtj4utWZp5722ybdj/ZPi6apNR6RmxniqVJsrv BdCg== X-Gm-Message-State: APjAAAXLoiLVxTRwYNQDJVWjWo8xB7UbMxgZYlQPW5QWNI4gaN7EejxR IIvYRLcKX5nAS6PzkVVvLVE= X-Google-Smtp-Source: APXvYqz005BIpoimL/qfJSxuSaeVV5oCdsyUWYmMsQmHheneRZ7j7oEQpeLdFiG7/7WgCcKJ/OSLIg== X-Received: by 2002:a1c:67c1:: with SMTP id b184mr7563425wmc.12.1554115253553; Mon, 01 Apr 2019 03:40:53 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id v190sm26818483wme.18.2019.04.01.03.40.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 03:40:53 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman , Thierry Reding Cc: Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , JC Kuo Subject: [PATCH v2 1/6] dt-bindings: usb: xhci-tegra: Add Tegra186 support Date: Mon, 1 Apr 2019 12:40:45 +0200 Message-Id: <20190401104050.31355-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104050.31355-1-thierry.reding@gmail.com> References: <20190401104050.31355-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Extend the bindings to cover the set of features found in Tegra186. Reviewed-by: Rob Herring Reviewed-by: JC Kuo Signed-off-by: Thierry Reding --- .../devicetree/bindings/usb/nvidia,tegra124-xusb.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt index 4156c3e181c5..5bfcc0b4d6b9 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt @@ -10,6 +10,7 @@ Required properties: - Tegra124: "nvidia,tegra124-xusb" - Tegra132: "nvidia,tegra132-xusb", "nvidia,tegra124-xusb" - Tegra210: "nvidia,tegra210-xusb" + - Tegra186: "nvidia,tegra186-xusb" - reg: Must contain the base and length of the xHCI host registers, XUSB FPCI registers and XUSB IPFS registers. - reg-names: Must contain the following entries: @@ -59,6 +60,8 @@ For Tegra210: - avdd-pll-uerefe-supply: PLLE reference PLL power supply. Must supply 1.05 V. - dvdd-pex-pll-supply: PCIe/USB3 PLL power supply. Must supply 1.05 V. - hvdd-pex-pll-e-supply: High-voltage PLLE power supply. Must supply 1.8 V. + +For Tegra210 and Tegra186: - power-domains: A list of PM domain specifiers that reference each power-domain used by the xHCI controller. This list must comprise of a specifier for the XUSBA and XUSBC power-domains. See ../power/power_domain.txt and @@ -78,6 +81,7 @@ Optional properties: - Tegra132: usb2-0, usb2-1, usb2-2, hsic-0, hsic-1, usb3-0, usb3-1 - Tegra210: usb2-0, usb2-1, usb2-2, usb2-3, hsic-0, usb3-0, usb3-1, usb3-2, usb3-3 + - Tegra186: usb2-0, usb2-1, usb2-2, hsic-0, usb3-0, usb3-1, usb3-2 Example: -------- From patchwork Mon Apr 1 10:40:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10879693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 248E91708 for ; Mon, 1 Apr 2019 10:41:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A7F8286A2 for ; Mon, 1 Apr 2019 10:41:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3084287D4; Mon, 1 Apr 2019 10:41:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 846D4286A2 for ; Mon, 1 Apr 2019 10:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726588AbfDAKk7 (ORCPT ); Mon, 1 Apr 2019 06:40:59 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53247 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbfDAKk5 (ORCPT ); Mon, 1 Apr 2019 06:40:57 -0400 Received: by mail-wm1-f67.google.com with SMTP id a184so9847124wma.2; Mon, 01 Apr 2019 03:40:55 -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=bUXqxWaP1QEJrooDO//E7+eG5MEjnbpAMHL7QOP4WX0=; b=SHbIPvaXzpVm3nlRN9UarxkKY9GWQoGj0T/Ozo171XaHbzZPpcsmgrz/XdeeEMPMGX +h+tqBT9mwkPWs+h7vmLmH1HNbFhQ3dCP4BRuY/tyiq96oKQioDcQcRXGJGQ6jEdGDHq OJp4jimerkHPtOOn5cnTK48Y91+GRMczTbGRoaGRaRJ9NeOoZnCpWVxsnWqp9BOFVniK h4lJLPcJKJb72EZIuj8GOM4uTZTRbw97PMlAhfX7oCjZC6liuFguEIYtDns4U56z8EDB 2leqpD37kXV0yao7UQhaC7d0kbLTPSdVbVgXUbgDy9PGERiGqPC7eMbn2t5pMNAclMpy WCcw== 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=bUXqxWaP1QEJrooDO//E7+eG5MEjnbpAMHL7QOP4WX0=; b=fqHU7Da/dWU6LABKvUUn5uE71xzCVy34K1R/w63U1r/Vk5DZaByz11RHJhZ2deIt9U v62qRQfz29RsKUe4T8C1chbs+sW9quyGw5uPKRJcrVkUlzeIBFDGuuCtJZscT8RZuQCf Mp6GyDUUtyI2dyrGAf8vvYYbaKZNELWa/WT/mbh6M+w4AZ+KHDMvflSutMJLxHjqtvoF AbHtM+GiHFaPUV99Ah/UXBh0G4EYAVxESoZkNUPLjyMjvXy3jSa/87T1cPqiLKj0VCVq TIVueKgb9NeqDDex/bqLlEFYFpJrg3UKfZDA1i6F/eFM6D9QAS2pinF7braHzwKZIvT/ LUTw== X-Gm-Message-State: APjAAAXODoEbSA5K+JI5pHssBwVPkus3oFzN+fnHjt5vOlOqAWEZc28h rpuWPHGsW+2CeP4ykgqpfAs= X-Google-Smtp-Source: APXvYqzF4ceVgyZGopY47+G2CF2QM/ESA6QLlkucKDEbeadyOiw3XBtbRFos3yHx2LeG5l7VkiljRg== X-Received: by 2002:a1c:c707:: with SMTP id x7mr12021888wmf.149.1554115254978; Mon, 01 Apr 2019 03:40:54 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id e9sm16178025wrp.35.2019.04.01.03.40.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 03:40:54 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman , Thierry Reding Cc: Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Mathias Nyman Subject: [PATCH v2 2/6] usb: host: xhci-tegra: Selectively program IPFS Date: Mon, 1 Apr 2019 12:40:46 +0200 Message-Id: <20190401104050.31355-3-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104050.31355-1-thierry.reding@gmail.com> References: <20190401104050.31355-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: JC Kuo Starting with Tegra186, the XUSB controller no longer has the IPFS wrapper. This commit adds a "has_ipfs" field to struct tegra_xusb_soc that can be used to declare the existence of the IPFS wrapper. For the existing chips (i.e. Tegra124 and Tegra210), the new field is set to true. A future patch adding support for Tegra186 will set it to false. Signed-off-by: JC Kuo Acked-by: Mathias Nyman Signed-off-by: Thierry Reding --- drivers/usb/host/xhci-tegra.c | 43 +++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index efb0cad8710e..4d133bbabdda 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -161,6 +161,7 @@ struct tegra_xusb_soc { } ports; bool scale_ss_clock; + bool has_ipfs; }; struct tegra_xusb { @@ -637,16 +638,18 @@ static irqreturn_t tegra_xusb_mbox_thread(int irq, void *data) return IRQ_HANDLED; } -static void tegra_xusb_ipfs_config(struct tegra_xusb *tegra, - struct resource *regs) +static void tegra_xusb_config(struct tegra_xusb *tegra, + struct resource *regs) { u32 value; - value = ipfs_readl(tegra, IPFS_XUSB_HOST_CONFIGURATION_0); - value |= IPFS_EN_FPCI; - ipfs_writel(tegra, value, IPFS_XUSB_HOST_CONFIGURATION_0); + if (tegra->soc->has_ipfs) { + value = ipfs_readl(tegra, IPFS_XUSB_HOST_CONFIGURATION_0); + value |= IPFS_EN_FPCI; + ipfs_writel(tegra, value, IPFS_XUSB_HOST_CONFIGURATION_0); - usleep_range(10, 20); + usleep_range(10, 20); + } /* Program BAR0 space */ value = fpci_readl(tegra, XUSB_CFG_4); @@ -661,13 +664,15 @@ static void tegra_xusb_ipfs_config(struct tegra_xusb *tegra, value |= XUSB_IO_SPACE_EN | XUSB_MEM_SPACE_EN | XUSB_BUS_MASTER_EN; fpci_writel(tegra, value, XUSB_CFG_1); - /* Enable interrupt assertion */ - value = ipfs_readl(tegra, IPFS_XUSB_HOST_INTR_MASK_0); - value |= IPFS_IP_INT_MASK; - ipfs_writel(tegra, value, IPFS_XUSB_HOST_INTR_MASK_0); + if (tegra->soc->has_ipfs) { + /* Enable interrupt assertion */ + value = ipfs_readl(tegra, IPFS_XUSB_HOST_INTR_MASK_0); + value |= IPFS_IP_INT_MASK; + ipfs_writel(tegra, value, IPFS_XUSB_HOST_INTR_MASK_0); - /* Set hysteresis */ - ipfs_writel(tegra, 0x80, IPFS_XUSB_HOST_CLKGATE_HYSTERESIS_0); + /* Set hysteresis */ + ipfs_writel(tegra, 0x80, IPFS_XUSB_HOST_CLKGATE_HYSTERESIS_0); + } } static int tegra_xusb_clk_enable(struct tegra_xusb *tegra) @@ -1015,10 +1020,12 @@ static int tegra_xusb_probe(struct platform_device *pdev) if (IS_ERR(tegra->fpci_base)) return PTR_ERR(tegra->fpci_base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 2); - tegra->ipfs_base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(tegra->ipfs_base)) - return PTR_ERR(tegra->ipfs_base); + if (tegra->soc->has_ipfs) { + res = platform_get_resource(pdev, IORESOURCE_MEM, 2); + tegra->ipfs_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(tegra->ipfs_base)) + return PTR_ERR(tegra->ipfs_base); + } tegra->xhci_irq = platform_get_irq(pdev, 0); if (tegra->xhci_irq < 0) @@ -1208,7 +1215,7 @@ static int tegra_xusb_probe(struct platform_device *pdev) goto disable_rpm; } - tegra_xusb_ipfs_config(tegra, regs); + tegra_xusb_config(tegra, regs); err = tegra_xusb_load_firmware(tegra); if (err < 0) { @@ -1380,6 +1387,7 @@ static const struct tegra_xusb_soc tegra124_soc = { .usb3 = { .offset = 0, .count = 2, }, }, .scale_ss_clock = true, + .has_ipfs = true, }; MODULE_FIRMWARE("nvidia/tegra124/xusb.bin"); @@ -1411,6 +1419,7 @@ static const struct tegra_xusb_soc tegra210_soc = { .usb3 = { .offset = 0, .count = 4, }, }, .scale_ss_clock = false, + .has_ipfs = true, }; MODULE_FIRMWARE("nvidia/tegra210/xusb.bin"); From patchwork Mon Apr 1 10:40:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10879691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BDAE15AC for ; Mon, 1 Apr 2019 10:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D83286A2 for ; Mon, 1 Apr 2019 10:41:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79596287D4; Mon, 1 Apr 2019 10:41:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 103EF286A2 for ; Mon, 1 Apr 2019 10:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726624AbfDAKk7 (ORCPT ); Mon, 1 Apr 2019 06:40:59 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:33998 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726544AbfDAKk6 (ORCPT ); Mon, 1 Apr 2019 06:40:58 -0400 Received: by mail-wm1-f66.google.com with SMTP id r186so1259273wmf.1; Mon, 01 Apr 2019 03:40:57 -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=PzMPSMusIBN2kUBwXbKhbx8a3kFNesUVRcOMpGCnO3A=; b=dXSKu/O3BMmznVABq9H5PFKJz0sK9imZbcE3QRskqqJMa+00fYExlst1V/qrK9Btmi eWoeXLojYVik0SkgOkKBmEQwLbj5jabNSConNbE/f/RJ7Uf35aWrtSZNAilCHRoV5G4v f96J5fTTn35TWd6I3IGkQkGI3VZe0NzexRUSfFb05Hd6sT6c3SpnzbxdDwjMp9Kz+tN8 fL3neqnlXzHjhEKaRP6bazLrN8d4uihBpbsYVLsCKl2M/3ULgFl64zveVcol2a01x1XP yczx5Raw776kGKEfvU+QTRWzwNJdLcZbREKBU6oI3RPVGMjz5IwuHeATO/NhTduTZ8k4 AZFQ== 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=PzMPSMusIBN2kUBwXbKhbx8a3kFNesUVRcOMpGCnO3A=; b=tfbtj2+hoQ0hmRsnvTi1IHi97keurqRYshf189KqBOvIv48KVx6O/A7t6RuownDSFw op+5vTGtL8VTb+tixq+5xAqmbQ+KJQInqxgu3Xe2A85AulEX2pEM/Yn9vsALxeTwPsPb 8xtxuZojPHDZMw17n4NyA8Q8z8n+lryQJ/Kk+4lF3mrzaMHMvrqGM/ZZN/uVLXqCVuDk worc8Sx4LXOrAp/kCLRQdT2KdFEVWkQYTI1p6wGTgPl/01l7nwxMXRfSpItdPSvUGH+f pz6pYwmv650Pzd0IZK37ruv/ut8qs/ZeLlBeAUXchi+BnN8WhwUv8q6yvcxaE6rurzZi VW1g== X-Gm-Message-State: APjAAAXfXNrV/lSv0GYQGw+CCR2G2ABr4NOTJ7Nt/XztaeyS3hYG0111 pkVVUyZY9vwHkuj8nzqtKiA= X-Google-Smtp-Source: APXvYqzzGKEjGzla6ZIsM9x4C9t9wyHAC0U2P2fEWAmNSNLjdVJR6M5F4xGj8dgv5VRj/ESTVqIB3g== X-Received: by 2002:a7b:c92f:: with SMTP id h15mr12567961wml.115.1554115256469; Mon, 01 Apr 2019 03:40:56 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id h131sm21677770wmh.1.2019.04.01.03.40.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 03:40:55 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman , Thierry Reding Cc: Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Mathias Nyman Subject: [PATCH v2 3/6] usb: host: xhci-tegra: Add Tegra186 XUSB support Date: Mon, 1 Apr 2019 12:40:47 +0200 Message-Id: <20190401104050.31355-4-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104050.31355-1-thierry.reding@gmail.com> References: <20190401104050.31355-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: JC Kuo This commit adds Tegra186 XUSB host mode controller support. This is very similar to the existing support for Tegra124 and Tegra210, except that the number of ports and PHYs differs and the IPFS wrapper being gone. Signed-off-by: JC Kuo Acked-by: Mathias Nyman Signed-off-by: Thierry Reding --- drivers/usb/host/xhci-tegra.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 4d133bbabdda..294158113d62 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -1423,9 +1423,34 @@ static const struct tegra_xusb_soc tegra210_soc = { }; MODULE_FIRMWARE("nvidia/tegra210/xusb.bin"); +static const char * const tegra186_supply_names[] = { +}; + +static const struct tegra_xusb_phy_type tegra186_phy_types[] = { + { .name = "usb3", .num = 3, }, + { .name = "usb2", .num = 3, }, + { .name = "hsic", .num = 1, }, +}; + +static const struct tegra_xusb_soc tegra186_soc = { + .firmware = "nvidia/tegra186/xusb.bin", + .supply_names = tegra186_supply_names, + .num_supplies = ARRAY_SIZE(tegra186_supply_names), + .phy_types = tegra186_phy_types, + .num_types = ARRAY_SIZE(tegra186_phy_types), + .ports = { + .usb3 = { .offset = 0, .count = 3, }, + .usb2 = { .offset = 3, .count = 3, }, + .hsic = { .offset = 6, .count = 1, }, + }, + .scale_ss_clock = false, + .has_ipfs = false, +}; + static const struct of_device_id tegra_xusb_of_match[] = { { .compatible = "nvidia,tegra124-xusb", .data = &tegra124_soc }, { .compatible = "nvidia,tegra210-xusb", .data = &tegra210_soc }, + { .compatible = "nvidia,tegra186-xusb", .data = &tegra186_soc }, { }, }; MODULE_DEVICE_TABLE(of, tegra_xusb_of_match); From patchwork Mon Apr 1 10:40:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10879689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40BAF1708 for ; Mon, 1 Apr 2019 10:41:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2981C286A2 for ; Mon, 1 Apr 2019 10:41:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DB6E287D4; Mon, 1 Apr 2019 10:41:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20E4C286A2 for ; Mon, 1 Apr 2019 10:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfDAKlN (ORCPT ); Mon, 1 Apr 2019 06:41:13 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:33504 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbfDAKlA (ORCPT ); Mon, 1 Apr 2019 06:41:00 -0400 Received: by mail-wm1-f65.google.com with SMTP id z6so15195045wmi.0; Mon, 01 Apr 2019 03:40:58 -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=81AiQ9vJV3H3L7/Zx78hl4rSbFofhbhEAQ46xWedx2U=; b=hStaL1nxAqvElLFCIKUNqWRF6dCD5MKgfZrbim9MA06whbe+UFmsd4UNZ3YtcKm1HT mK3Z/v5/ThJX6cBUamcHQF6aBfXo7+06ueQ0wHl8dWFB1XEbSP3FQldZNWDX3F71zK2J 2RKssVtHLDoluDk744pLUt3ssQxw+AVOT9x0EJrnsiigVRsCFmHrlukecmfVzL0KEHYW m4aqF3PONM069zBgRgcDpx9shPNZvaAu3j9Tn593rZVE8V0zWH/qSF9arTObi8MBljsN 6a5ht3wCNB+AqXeUJ5VxS7qoaO0gTA/ErZWP7JHWqt33jCOy+HzgJKgnL2gEmRpztCxf LgTg== 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=81AiQ9vJV3H3L7/Zx78hl4rSbFofhbhEAQ46xWedx2U=; b=lFluKVZEqUVX1EXalV5GQvYj6qS0Xs/agVOtItsYdat8b4xxJWeR1ApG3oWYLvaaC9 V/8UcJRmmYd3nQk0s5uClSYHbs0y3EUhOsBta+3Nqj/ZKXVtIX1JbNPuPXs0X4iAQB7p gkAvRxGMLBWKHp/LS2BoYLbKLsyoXeOnr8V30Z4CY2hw5gSge65r6b+IH9wEc6hvzJHg bOA1vvM0NtLDAusR/b6jPYK9pGOJi9oryzTzG4Tvm4BibediO1FpYdPFi/rqnYE6I/DE tS+5d6T1WyipJjA4aTJulyCYeOm6GZfi6y1ROHBrNw89zHZ61T3a9M+V8b2LlmCWWako y/5g== X-Gm-Message-State: APjAAAUL3KjFSEkJKe7mRs5G1Via8LX10STzEcYJp3M4fBJXRdNh1xM/ yq4PTHirE6oU7kVXsC3dR3w= X-Google-Smtp-Source: APXvYqyNBRz15CS6+CeqQJqQSNgcssaPVLehw8ubiEStZ70XZpIaQZBqLv8xP7R852Q/nY8tuGJDHw== X-Received: by 2002:a7b:cc91:: with SMTP id p17mr12023330wma.38.1554115257864; Mon, 01 Apr 2019 03:40:57 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id a126sm10079160wmh.4.2019.04.01.03.40.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 03:40:57 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman , Thierry Reding Cc: Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, JC Kuo Subject: [PATCH v2 4/6] arm64: tegra: Add XUSB and pad controller on Tegra186 Date: Mon, 1 Apr 2019 12:40:48 +0200 Message-Id: <20190401104050.31355-5-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104050.31355-1-thierry.reding@gmail.com> References: <20190401104050.31355-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Adds the XUSB pad and XUSB controllers on Tegra186. Reviewed-by: JC Kuo Signed-off-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 135 +++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index 97aeb946ed5e..c444b6fa304c 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi @@ -340,6 +340,141 @@ status = "disabled"; }; + padctl: padctl@3520000 { + compatible = "nvidia,tegra186-xusb-padctl"; + reg = <0x0 0x03520000 0x0 0x1000>, + <0x0 0x03540000 0x0 0x1000>; + reg-names = "padctl", "ao"; + + resets = <&bpmp TEGRA186_RESET_XUSB_PADCTL>; + reset-names = "padctl"; + + status = "disabled"; + + pads { + usb2 { + clocks = <&bpmp TEGRA186_CLK_USB2_TRK>; + clock-names = "trk"; + status = "disabled"; + + lanes { + usb2-0 { + status = "disabled"; + #phy-cells = <0>; + }; + + usb2-1 { + status = "disabled"; + #phy-cells = <0>; + }; + + usb2-2 { + status = "disabled"; + #phy-cells = <0>; + }; + }; + }; + + hsic { + clocks = <&bpmp TEGRA186_CLK_HSIC_TRK>; + clock-names = "trk"; + status = "disabled"; + + lanes { + hsic-0 { + status = "disabled"; + #phy-cells = <0>; + }; + }; + }; + + usb3 { + status = "disabled"; + + lanes { + usb3-0 { + status = "disabled"; + #phy-cells = <0>; + }; + + usb3-1 { + status = "disabled"; + #phy-cells = <0>; + }; + + usb3-2 { + status = "disabled"; + #phy-cells = <0>; + }; + }; + }; + }; + + ports { + usb2-0 { + status = "disabled"; + }; + + usb2-1 { + status = "disabled"; + }; + + usb2-2 { + status = "disabled"; + }; + + hsic-0 { + status = "disabled"; + }; + + usb3-0 { + status = "disabled"; + }; + + usb3-1 { + status = "disabled"; + }; + + usb3-2 { + status = "disabled"; + }; + }; + }; + + usb@3530000 { + compatible = "nvidia,tegra186-xusb"; + reg = <0x0 0x03530000 0x0 0x8000>, + <0x0 0x03538000 0x0 0x1000>; + reg-names = "hcd", "fpci"; + + interrupts = , + , + ; + + clocks = <&bpmp TEGRA186_CLK_XUSB_HOST>, + <&bpmp TEGRA186_CLK_XUSB_FALCON>, + <&bpmp TEGRA186_CLK_XUSB_SS>, + <&bpmp TEGRA186_CLK_XUSB_CORE_SS>, + <&bpmp TEGRA186_CLK_CLK_M>, + <&bpmp TEGRA186_CLK_XUSB_FS>, + <&bpmp TEGRA186_CLK_PLLU>, + <&bpmp TEGRA186_CLK_CLK_M>, + <&bpmp TEGRA186_CLK_PLLE>; + clock-names = "xusb_host", "xusb_falcon_src", "xusb_ss", + "xusb_ss_src", "xusb_hs_src", "xusb_fs_src", + "pll_u_480m", "clk_m", "pll_e"; + + power-domains = <&bpmp TEGRA186_POWER_DOMAIN_XUSBC>, + <&bpmp TEGRA186_POWER_DOMAIN_XUSBA>; + power-domain-names = "xusb_host", "xusb_ss"; + nvidia,xusb-padctl = <&padctl>; + + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + }; + fuse@3820000 { compatible = "nvidia,tegra186-efuse"; reg = <0x0 0x03820000 0x0 0x10000>; From patchwork Mon Apr 1 10:40:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10879687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC0311708 for ; Mon, 1 Apr 2019 10:41:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4855286A2 for ; Mon, 1 Apr 2019 10:41:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9835C287D4; Mon, 1 Apr 2019 10:41:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A9C5286A2 for ; Mon, 1 Apr 2019 10:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726866AbfDAKlM (ORCPT ); Mon, 1 Apr 2019 06:41:12 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50540 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726722AbfDAKlB (ORCPT ); Mon, 1 Apr 2019 06:41:01 -0400 Received: by mail-wm1-f66.google.com with SMTP id z11so9916577wmi.0; Mon, 01 Apr 2019 03:41:00 -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=qtOljbgD60w4rDQWGk6iiVe3bNFL+0B2Nck7DSRFzv8=; b=KXvvL2AXca1Saofs84AZ9Lw326SyoDUvLhdLtXcQpT64chKjLYRflEnwt8uishMFag bf8fY0rWij4f+3OnB+hX2nWc9Tr29sprhEZqcHhILpDgsnbwrG5UowLNyKhRolQUq3b8 oKBGYO5JULYD862+IkSCBfH40P09QFZQ+h6XFIBXI7YpBenTCYYbHDw5xSgwKVP+ZKC7 owZnXRAvAqPbuubCtnGidYzdUWP2nIJCMQD26EzcwQZEp+vUR8z0Ci75HYLSkh3y8rJF sokkGzP5fCslrKL8aI1Nh4l15sxyJ/cQ21AmlXsNUm8EbN/tFtNx12WZWywa6RkGNTWQ WT0g== 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=qtOljbgD60w4rDQWGk6iiVe3bNFL+0B2Nck7DSRFzv8=; b=tQJrGmPYvnOKcCxbVRBRhVnPWPpkIcJSiXvFKCX3CFeIdRX6x/x8PWNSXsL6yp9qMZ GWhIkUNkSpBJB+pYMCRLLePkm/CWYJ8huUIYe/6JVJ8avvlriQ6Qk97Hrs6qX3uY+Whm I+ZpZiaUbudIK0lyH6ZFDmXcNyryN5k3gNaRbdMzL/R6GOXJxilnr2e2Or2nVnPJ9QIE kSeuP1r88e0/p7AWScNkXOZWg4JD743VFzvjPJMBjF5/ot06AeMxEVDVzLA6bxTsZFJr PZK2kBQXOiFRKHMJgj1Ab5RyHSCLBqa6GpzXQcxr+fWvbo7b7lFiGcQWzrtBX6ZbocB8 KmmA== X-Gm-Message-State: APjAAAX3u7GLdd3DX4K25JTXxkvi6pXblCLNPEilt6cC6H7tzw0H/okw +gATlu/2Z/nTpBVBr9q8WL0= X-Google-Smtp-Source: APXvYqzRSbhYAmI1LQJBCIefp68E1uT0FZzGncTjvXpH/sALM1896xUwKq9jua8K7dmv52tzY6kSFQ== X-Received: by 2002:a1c:e70b:: with SMTP id e11mr11317019wmh.17.1554115259338; Mon, 01 Apr 2019 03:40:59 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id l12sm11264446wrt.31.2019.04.01.03.40.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 03:40:58 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman , Thierry Reding Cc: Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/6] arm64: tegra: Enable XUSB on P2771 Date: Mon, 1 Apr 2019 12:40:49 +0200 Message-Id: <20190401104050.31355-6-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104050.31355-1-thierry.reding@gmail.com> References: <20190401104050.31355-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Enable the relevant pads for XUSB support on P2771-0000 and hook up the USB supply voltage regulators to the ports. Signed-off-by: Thierry Reding --- .../boot/dts/nvidia/tegra186-p2771-0000.dts | 115 ++++++++++++++++++ .../arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 19 ++- 2 files changed, 130 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts index 31457f32e4d0..75ee6cf1e1b4 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts @@ -58,6 +58,93 @@ status = "okay"; }; + padctl@3520000 { + status = "okay"; + + avdd-pll-erefeut-supply = <&vdd_1v8_pll>; + avdd-usb-supply = <&vdd_3v3_sys>; + dvdd-pex-supply = <&vdd_pex>; + dvdd-pex-pll-supply = <&vdd_pex>; + hvdd-pex-supply = <&vdd_1v8>; + hvdd-pex-pll-supply = <&vdd_1v8>; + vclamp-usb-supply = <&vdd_1v8>; + vddio-hsic-supply = <&gnd>; + + pads { + usb2 { + status = "okay"; + + lanes { + usb2-0 { + nvidia,function = "xusb"; + status = "okay"; + }; + + usb2-1 { + nvidia,function = "xusb"; + status = "okay"; + }; + + usb2-2 { + nvidia,function = "xusb"; + status = "okay"; + }; + }; + }; + + usb3 { + status = "okay"; + + lanes { + usb3-0 { + nvidia,function = "xusb"; + status = "okay"; + }; + + usb3-1 { + nvidia,function = "xusb"; + status = "okay"; + }; + + usb3-2 { + nvidia,function = "xusb"; + status = "okay"; + }; + }; + }; + }; + + ports { + usb2-0 { + status = "okay"; + mode = "otg"; + + vbus-supply = <&vdd_usb0>; + }; + + usb2-1 { + status = "okay"; + mode = "host"; + + vbus-supply = <&vdd_usb1>; + }; + + usb3-0 { + nvidia,usb2-companion = <1>; + status = "okay"; + }; + }; + }; + + usb@3530000 { + status = "okay"; + + phys = <&{/padctl@3520000/pads/usb2/lanes/usb2-0}>, + <&{/padctl@3520000/pads/usb2/lanes/usb2-1}>, + <&{/padctl@3520000/pads/usb3/lanes/usb3-0}>; + phy-names = "usb2-0", "usb2-1", "usb3-0"; + }; + pcie@10003000 { status = "okay"; @@ -182,5 +269,33 @@ vin-supply = <&vdd_5v0_sys>; }; + + vdd_usb0: regulator@102 { + compatible = "regulator-fixed"; + reg = <102>; + + regulator-name = "VDD_USB0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio TEGRA_MAIN_GPIO(L, 4) GPIO_ACTIVE_HIGH>; + enable-active-high; + + vin-supply = <&vdd_5v0_sys>; + }; + + vdd_usb1: regulator@103 { + compatible = "regulator-fixed"; + reg = <103>; + + regulator-name = "VDD_USB1"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio TEGRA_MAIN_GPIO(L, 5) GPIO_ACTIVE_HIGH>; + enable-active-high; + + vin-supply = <&vdd_5v0_sys>; + }; }; }; diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi index 89a2da46efae..952062f0b9a9 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi @@ -291,7 +291,7 @@ regulator-boot-on; }; - ldo0 { + vdd_1v8_pll: ldo0 { regulator-name = "VDD_1V8_AP_PLL"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; @@ -360,10 +360,21 @@ #address-cells = <1>; #size-cells = <0>; - vdd_5v0_sys: regulator@0 { + gnd: regulator@0 { compatible = "regulator-fixed"; reg = <0>; + regulator-name = "GND"; + regulator-min-microvolt = <0>; + regulator-max-microvolt = <0>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_5v0_sys: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "VDD_5V0_SYS"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; @@ -371,9 +382,9 @@ regulator-boot-on; }; - vdd_1v8_ap: regulator@1 { + vdd_1v8_ap: regulator@2 { compatible = "regulator-fixed"; - reg = <1>; + reg = <2>; regulator-name = "VDD_1V8_AP"; regulator-min-microvolt = <1800000>; From patchwork Mon Apr 1 10:40:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10879685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6DE015AC for ; Mon, 1 Apr 2019 10:41:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A01D6286A2 for ; Mon, 1 Apr 2019 10:41:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 940E8287D4; Mon, 1 Apr 2019 10:41:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33E52286A2 for ; Mon, 1 Apr 2019 10:41:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbfDAKlG (ORCPT ); Mon, 1 Apr 2019 06:41:06 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37307 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726754AbfDAKlC (ORCPT ); Mon, 1 Apr 2019 06:41:02 -0400 Received: by mail-wr1-f65.google.com with SMTP id w10so11327733wrm.4; Mon, 01 Apr 2019 03:41:01 -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=lJhTRFrOMYpm5uCm9mt9lBn0z5i7LEmRQsVTVMus07I=; b=n7P+iXmpvxrk8wsAjujP0XWkMqDMGZ5ZirtqhHL+REpyDQkvsppWq5Q5FwvMZYVpho 9bgfyQVb0/zxpem076tsAr1TBmuFEeDg6mYNQxAvnIFJlB7Z5856yTMtQ6Rkt5P9nGSD FSZSrq8IFBq+uaOUGC1iNHzqWjYZc3ThrTTHwSBvdUHSuu3+c0WzK/IbafVBFUDmieh9 FenmOfVMAdtYQwqBEkU3cD3XJaRkZBJAmbXISHe2SEbCML020l78t+wG6IHjyvkFs4p1 U1NY7Zaj+RW2V+vvFpNhm2H+HADCdkMFlZpb014/kJjNJjxeQDbYI3M8ERe16ck1p0te GfSA== 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=lJhTRFrOMYpm5uCm9mt9lBn0z5i7LEmRQsVTVMus07I=; b=lbnxgSx8yBj4QXso0IyuCsHEZQglKRjU0MgXQrsNVvxRrIzRnxd16NgW3M1/wf2kSI vb+p/MOcXpxCGo7isJJcT47JedMTmPOCU5WPopQRA2tttimtEcTr2m0X+9Lle19QvWgw 5Odq46eegCaB5VoUo3ZjAK8HUfiwHb9F6gX/iWByiVAsSHoSunQYDEnK6QoDJoaMVk7J sgY//ZLNrORCK+mK2OmZj8ozBAL4O9hNDD36sbxCD3LzJJxSMu5qcq8WBkNZiRpBYsIT u15j4xZO9+6fKzaSHwFEL8eLWOHzzUakwPUt9EL1FPFu2l2pF7G0YSfey4LT4KMSe4m0 Z08w== X-Gm-Message-State: APjAAAUtGj4RlEZRn4mN/TSKtIBsO+CfaNPrFzUXk2wo7L0d2pwyDAnl Xl2skDjDnkZa/pzycBKFcb6neDlz X-Google-Smtp-Source: APXvYqxSyS2xpYO1Yu/2SVAbPmKs13jXzn0g1EXoRiHIXmDeSjeZicUt61a6bv8qxaNMOkMR/UR1Dw== X-Received: by 2002:a5d:4683:: with SMTP id u3mr39556023wrq.200.1554115261008; Mon, 01 Apr 2019 03:41:01 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id y5sm7932907wrw.23.2019.04.01.03.41.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 03:41:00 -0700 (PDT) From: Thierry Reding To: Greg Kroah-Hartman , Thierry Reding Cc: Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] arm64: tegra: Remove regulator hacks on Jetson TX2 Date: Mon, 1 Apr 2019 12:40:50 +0200 Message-Id: <20190401104050.31355-7-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104050.31355-1-thierry.reding@gmail.com> References: <20190401104050.31355-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Various regulators were marked as always-on for Jetson TX2. At this point, all of the regulators are properly hooked up, so this workaround is no longer required. Signed-off-by: Thierry Reding --- .../arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi index 952062f0b9a9..64686b033c38 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi @@ -268,43 +268,30 @@ regulator-name = "AVDD_DSI_CSI_1V2"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; }; vdd_1v8: sd2 { regulator-name = "VDD_1V8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; }; vdd_3v3_sys: sd3 { regulator-name = "VDD_3V3_SYS"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; }; vdd_1v8_pll: ldo0 { regulator-name = "VDD_1V8_AP_PLL"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; }; ldo2 { regulator-name = "VDDIO_3V3_AOHV"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - /* XXX */ regulator-always-on; regulator-boot-on; }; @@ -331,18 +318,12 @@ regulator-name = "VDD_HDMI_1V05"; regulator-min-microvolt = <1050000>; regulator-max-microvolt = <1050000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; }; vdd_pex: ldo8 { regulator-name = "VDD_PEX_1V05"; regulator-min-microvolt = <1050000>; regulator-max-microvolt = <1050000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; }; }; }; @@ -390,10 +371,6 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; - /* XXX */ - regulator-always-on; - regulator-boot-on; - gpio = <&pmic 1 GPIO_ACTIVE_HIGH>; enable-active-high;