From patchwork Tue Jun 9 19:40:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 188572 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=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UPPERCASE_50_75, USER_AGENT_GIT autolearn=unavailable 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 28673C433E0 for ; Tue, 9 Jun 2020 19:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 012EC206C3 for ; Tue, 9 Jun 2020 19:42:23 +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="gx5cb55v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729105AbgFITmH (ORCPT ); Tue, 9 Jun 2020 15:42:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389292AbgFITki (ORCPT ); Tue, 9 Jun 2020 15:40:38 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131EBC08C5C7 for ; Tue, 9 Jun 2020 12:40:38 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id c185so22045681qke.7 for ; Tue, 09 Jun 2020 12:40:38 -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=Y/sac6ctBvw3WfcduAEIFRDP2awvJiB1QH+ESuGkwsM=; b=gx5cb55v+/w5yIn64UAhEjcONp8eemLuU1dmTA+jQpuIQVRpYGE7LR0U2pzXzYupyH epV7DOsQj22Tm68Ycau+OqfaeAu67cuGmbEHs9oWVP4JD/pGitbjhEybuZpX/qlKG8fC XW87hO+lfFuYeps1qy3Lle2hW9uXLw3+pbgETPBG0HdiqVqdIya+SmPz40bL7shijEy4 dgqMknktlCm7+4FQXiK9gi0qvJ86JGiwlCHEZ8qmq7GncpnoCWilprXUZ4Iuouhez0xe apXykXSV6EnjDnul8OrVDiggGR+6K8YT6Jo9KxJbVgiu6W5195LRK4D1uWT1l33h/4UJ gPag== 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=Y/sac6ctBvw3WfcduAEIFRDP2awvJiB1QH+ESuGkwsM=; b=jj0mtiUhJAMK6pSeQ2+X2+bUOy7dVRzi1i5DVXVofRk3BBx2OHohM2WeiQrX4dkC3y XUTuUmf5CzuouvWdcK1RRlyULvA542VtGnCHC7QJt9fEBfPTnYVnO5nVHwLiRSuBO5ND JOGa7BXLxIM2cFi96l58yb+dO+RGFrYoyfXlbJagaOguP8gW8QcNQQRruj7C/2cpkk0f mWeazJ7+6v/NX1Kz+6r/XKzvD0gyZ4T01U6snGzrdXnE30gyDbM7/9imoRcxURbsuVR2 laOUD8+Ga5DLPxRz9NpZ+UcSk0Mr6W28vHmB24FEWLJqIM3BZ6xhWNFG0iBibk2+kwIH FkEQ== X-Gm-Message-State: AOAM531ND6vo5YonL9JmTbuoIjzMlmHhojcLVsdqAvMD357l20HkQr8i inP/A0OaIYg1C3o6/gg6lrqx67UpBG9gTw== X-Google-Smtp-Source: ABdhPJwxQNtPcYFkhmiQ71J4CYqd8qvzOaOoy8RPyNhzZ9S8EIkd8R1RkX79SAHqiii+kGVoMsfpRQ== X-Received: by 2002:a37:4c6:: with SMTP id 189mr27651576qke.301.1591731637056; Tue, 09 Jun 2020 12:40:37 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id v8sm10513181qto.21.2020.06.09.12.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 12:40:36 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Sai Prakash Ranjan , 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 3/8] arm64: dts: qcom: sm8150: add apps_smmu node Date: Tue, 9 Jun 2020 15:40:21 -0400 Message-Id: <20200609194030.17756-4-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 sm8150. 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 Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index a36512d1f6a1..5b48dbaee2d8 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 { resets = <&gcc GCC_UFS_PHY_BCR>; reset-names = "rst"; + iommus = <&apps_smmu 0x300 0>; + clock-names = "core_clk", "bus_aggr_clk", @@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 { compatible = "snps,dwc3"; reg = <0 0x0a600000 0 0xcd00>; interrupts = ; + iommus = <&apps_smmu 0x140 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; phys = <&usb_1_hsphy>, <&usb_1_ssphy>; @@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 { cell-index = <0>; }; + apps_smmu: iommu@15000000 { + compatible = "qcom,sm8150-smmu-500", "arm,mmu-500"; + reg = <0 0x15000000 0 0x100000>; + #iommu-cells = <2>; + #global-interrupts = <1>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + remoteproc_adsp: remoteproc@17300000 { compatible = "qcom,sm8150-adsp-pas"; reg = <0x0 0x17300000 0x0 0x4040>;