From patchwork Thu Jul 8 10:39:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12364917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81BAEC07E96 for ; Thu, 8 Jul 2021 10:38:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E7F961447 for ; Thu, 8 Jul 2021 10:38:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E7F961447 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=75q17NZnRbiR5GGRAv2S4DCcTNxAsxItiwKzZIlezp8=; b=WOvIGjAUyKK2Q+ WbvvzFL8mJ8MBF7tYr3+95xyxQmMPlRCixjxV/M9PMTIv2nm9U5kSi0gPiQSZTMhALAskTitVCeVc pKAQGVdaJwS8ByhUoxCko17kxYH8Bi7d/1/y1tpMY6fhG0SMZ6j8wpXI/VAqzS21ZPvRWdpMCF50M XPOWOWvQucQX3zZYDX5l3SisuGU5/FvubFV7rlF+8qJPVIKouxQQ/MBGRJP5zhgP1BeI9lqexMqkH 9VR0AxeSj2qI2tYVerD4cxg2jWf6uowd4xEC/aPHV+hrZCAgzU1PXpqsFcW1VV5UpJXdPeRlxC0BB JDs+vESxo623rLX8x8Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1RP0-00GdhT-RW; Thu, 08 Jul 2021 10:37:07 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1ROw-00GdgN-PR for linux-arm-kernel@lists.infradead.org; Thu, 08 Jul 2021 10:37:04 +0000 Received: by mail-wm1-x336.google.com with SMTP id n33so3765944wms.1 for ; Thu, 08 Jul 2021 03:37: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:mime-version :content-transfer-encoding; bh=sKIAzp43GPHBSu1FCv0hVUbO8ZG1NpGSHhgylht/1Zg=; b=FjPQAn+m6ILUXNh+Na1REYIshgD/NFG2dbp9OYC2BVYZqVQBTWCGmTnA/LHDczIsCo pgKFdkG2fKMzIebZEMjVrHOmHzoZ7r1VurqG6cuMGyx4OUGSzDCPy+PgIl8zZ/4qEO+q AdSfox6wvUd+08pc7sTjgAThD2raXTIBpdp66ORJrEI/iWlTncDqyZ12G3dZ9h0H/sCX 2p1e2/KQtba0aJZL/dYHxR8RpfcWvpwYgiXqzbqQdIHcM35RcHg0awli5tTOq9DIcRo2 VD7s933iqOa6HbsKH/SX5swCq53ZyIvqnHRWmshri6u79E1sUKRNtAihlzYp6BUeEJAd dGeA== 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=sKIAzp43GPHBSu1FCv0hVUbO8ZG1NpGSHhgylht/1Zg=; b=hrSkC/IrzmfvR2SHRSczczaXiPaZynaESNgS9NcsqKVosEDXqfp1l1OjDk0xlWtrqB CRADJ1BvEMr4NSUv1pZXrnxD/A6CAih4tDaaPb8D0e4MCKwANuLUulJnaCckpNhZ3tb/ fHSX9qYVuKqh0ybzytVAk0KlwuSqMMafaDdQV/7Z7KOcXw/sAJf9nrFKU+VWg1cFusC4 9n453+B3l4wpMGhLcda6j/9d9IP6RbJHIIbPMYUZY8GqqaNuBSFrzLrAXWdpyt89p/tl zfWG/8Fyz9jeofRdBFybjrfiwnJL/I43v23LtBF800amv5Kgn7xJeZJ18GGaXm3Dh2KJ RO3Q== X-Gm-Message-State: AOAM533HtFg9FLzKJTtatDUXtczG7L5E9bU5A33eDmcI6/7EbxIRaR6w VlZUmsTn4h+Bt4THAcmG1RU= X-Google-Smtp-Source: ABdhPJwnX/VYXrJPRKoCMtY0t3Yd5CgpNauyTx3NQvPaA6T5p96cJfRbEQzLuM5OzxfNounD6Adm9g== X-Received: by 2002:a1c:de88:: with SMTP id v130mr8505389wmg.98.1625740620562; Thu, 08 Jul 2021 03:37:00 -0700 (PDT) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id a22sm1888751wrc.66.2021.07.08.03.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 03:36:59 -0700 (PDT) From: Thierry Reding To: Thierry Reding Cc: Jon Hunter , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: tegra: Enable SMMU support for USB on Tegra194 Date: Thu, 8 Jul 2021 12:39:32 +0200 Message-Id: <20210708103932.1691306-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210708_033702_891665_7954833A X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding As of commit c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194"), SMMU support is enabled system-wide on Tegra194. However, there was a bit of overlap between the SMMU enablement and the USB support addition, so the USB device tree nodes are missing the iommus and interconnects properties. This in turn leads to SMMU faults for these devices, since by default the ARM SMMU will fault. Add the iommus and interconnects properties to the XUSB and XUDC device tree nodes to restore their functionality. Fixes: c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194") Signed-off-by: Thierry Reding Reviewed-by: Jon Hunter --- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi index 07e61f084123..7cc6dc19ff9f 100644 --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi @@ -952,6 +952,10 @@ usb@3550000 { <&bpmp TEGRA194_CLK_XUSB_SS>, <&bpmp TEGRA194_CLK_XUSB_FS>; clock-names = "dev", "ss", "ss_src", "fs_src"; + interconnects = <&mc TEGRA194_MEMORY_CLIENT_XUSB_DEVR &emc>, + <&mc TEGRA194_MEMORY_CLIENT_XUSB_DEVW &emc>; + interconnect-names = "dma-mem", "write"; + iommus = <&smmu TEGRA194_SID_XUSB_DEV>; power-domains = <&bpmp TEGRA194_POWER_DOMAIN_XUSBB>, <&bpmp TEGRA194_POWER_DOMAIN_XUSBA>; power-domain-names = "dev", "ss"; @@ -981,6 +985,10 @@ usb@3610000 { "xusb_ss", "xusb_ss_src", "xusb_hs_src", "xusb_fs_src", "pll_u_480m", "clk_m", "pll_e"; + interconnects = <&mc TEGRA194_MEMORY_CLIENT_XUSB_HOSTR &emc>, + <&mc TEGRA194_MEMORY_CLIENT_XUSB_HOSTW &emc>; + interconnect-names = "dma-mem", "write"; + iommus = <&smmu TEGRA194_SID_XUSB_HOST>; power-domains = <&bpmp TEGRA194_POWER_DOMAIN_XUSBC>, <&bpmp TEGRA194_POWER_DOMAIN_XUSBA>;