From patchwork Tue Jun 9 19:40:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11596501 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ACE2692A for ; Tue, 9 Jun 2020 19:41:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88E3720734 for ; Tue, 9 Jun 2020 19:41:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="Uw+KzPzO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389312AbgFITk5 (ORCPT ); Tue, 9 Jun 2020 15:40:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389297AbgFITkk (ORCPT ); Tue, 9 Jun 2020 15:40:40 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DEDDC08C5C9 for ; Tue, 9 Jun 2020 12:40:39 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id n141so22059767qke.2 for ; Tue, 09 Jun 2020 12:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xhsbcv6ELYs8gtPa7Zn2QEWCa6cPXNXWT2fgZku/yEM=; b=Uw+KzPzOaqBIlyyAEazcDBTydcQvlpNfQHYQNwVPBNq2ynBZwbsVyd5y8Qr5PsdHAn zdVMjtvxpvBBJ8KzyVx3nq+AC1mp+DlaHAg0XWcYIsT1PMyhtDhpED/wfXT78Fxx1cNF OqOVr8V3c1wqCui1QBge5TWaUHCiwXrs9ZPNWsBcrxIUW8v1e7PICTO1uOnvoL2dS1c4 CS4+Y2PfVKU7gOTRdI6k18rDscn952InsaGF+r9j2Mq7MYMtPoMQAIQdmawG8TMeg7Zu +rTabLAql/e5IqPMSnk+E7cQpFyu/7IJ+hdmJaiWU/8J2nCyy7WwFkTuv/m+4LK0nTs3 FSSg== 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=Xhsbcv6ELYs8gtPa7Zn2QEWCa6cPXNXWT2fgZku/yEM=; b=G95EXB3AN67/2GiTG1JZQd9G68LN5F0d4vR3zkgmbu6fH93dHLV1Ygsf5ssRDrnaCY n7ZAluHWVEvTGYVwQRRI5KZH5d5fDSWDyYWbCQmlTrZYAakq31hmazjP6OWpYIk51r3G XyPxOWt+N7ZExxzYtVjT/oiHdq7ILnyydfmESzhDYepau9LDRSn5L+uij6PNnxBkHXG7 w8IJbassu+bC7tB14JTQVviv5cCL+sbLA1yJOjXKattQK5H27zjB44rux3nFi3zdCy0Z FxLRvs6hC/4n+T5+LlARnYU+Ay0Zjye4pMo6+/ILeE7dGQWLkDWynJVFyjjuHYNllTXV vZ8A== X-Gm-Message-State: AOAM53140pemk7CGS1k4QIzKV7mKX9DWfYVvKTePRMAdRbr7EY+v7KsT HEG6mxgib8XSebEu5bf5DveLPw4YCpafLQ== X-Google-Smtp-Source: ABdhPJy6lTAflgRnSHpZVTx3Z6KE7cW5oFIiORIVj7tAXTrZSAMfzhaLj0wfhk608cOXcqojcODG1w== X-Received: by 2002:a37:9581:: with SMTP id x123mr28672959qkd.163.1591731638458; Tue, 09 Jun 2020 12:40:38 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id v8sm10513181qto.21.2020.06.09.12.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 12:40:37 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 4/8] arm64: dts: qcom: sm8250: add apps_smmu node Date: Tue, 9 Jun 2020 15:40:22 -0400 Message-Id: <20200609194030.17756-5-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200609194030.17756-1-jonathan@marek.ca> References: <20200609194030.17756-1-jonathan@marek.ca> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the apps_smmu node for sm8250. For UFS, now that the kernel initializes the iommu, the stream mappings set by the bootloader are cleared. Adding the iommus property is required so that new mappings are created for UFS. Signed-off-by: Jonathan Marek --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 107 +++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 2f99c350c287..035f4552a0ff 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -323,6 +323,8 @@ ufs_mem_hc: ufshc@1d84000 { power-domains = <&gcc UFS_PHY_GDSC>; + iommus = <&apps_smmu 0x0e0 0>, <&apps_smmu 0x4e0 0>; + clock-names = "core_clk", "bus_aggr_clk", @@ -428,6 +430,111 @@ tlmm: pinctrl@f100000 { wakeup-parent = <&pdc>; }; + apps_smmu: iommu@15000000 { + compatible = "qcom,sm8250-smmu-500", "arm,mmu-500"; + reg = <0 0x15000000 0 0x100000>; + #iommu-cells = <2>; + #global-interrupts = <2>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + intc: interrupt-controller@17a00000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>;