Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp174871lqk; Sat, 9 Mar 2024 05:32:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX5v2JebaF1+AH5RK7C7EZH3uR+vvXT64BzACEFS/kw834+27u2yJ+QLEZATOSfQ1dCU+zumAUsvOtppORkvh3AGizmyVF5KSk3Q7By2g== X-Google-Smtp-Source: AGHT+IE2l3mYxp3KXCS8Nza2/cBEDWCnvVKGIjd9eSVfbqLNI1X886k1WoJKwtHdQ4PbWx9hJaXd X-Received: by 2002:a05:620a:4694:b0:788:2fae:53b8 with SMTP id bq20-20020a05620a469400b007882fae53b8mr2599998qkb.60.1709991135893; Sat, 09 Mar 2024 05:32:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709991135; cv=pass; d=google.com; s=arc-20160816; b=yzT5ny7OJ5sPb530jOPT9BvzzLbRSexMzhdCGxVO1n0W3bHgOYBCiFZojYvN1mTB+Y F1AoJqc8DRT9DpOLb6EBEQ/mdee7DC3l+ZM+QRuBBg7RDlBvxxWTDcP6/f3rkGDLsVRX sYezlzhVT/wzTBBkJeLgHq7NZUMt9yG2NhD7MTRxXtGQrakfUJIxyJTFC6+oX52NjpDA FkcnRvK6g9IhyxuWtFKgZwWGk5mAadC2UqJ7/n7uw46AoqBVgbYWzRtFDHT+uH4rY1q2 RVy7pIQG/sc3UPzdmhk3CmLjJtuu8cRkVj+wMFE1G5d7SPN7CiHq/ykuf7PEtGL17qUe sSxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=HhZUYlRhQA4TRIHl3TIBSQxZHd0u1mWSXp3lOhorupc=; fh=liPxIh1ZAlo4NXkh/h1h+MkqQmHTfo5mw7a8aplRL4Q=; b=AISNas1zU8qyvteGHWpbeshQG7+oS+43RFqUupNXduvFpFaDNUZsE3OcoRu5eGWShE h3CJ8RwDmwvd177mjroRgtaC74aFl/wPywlys5rdEMAAnc7mTP2ebhiyvMdah8Q9PRVX aXddujZH67DS8gozX488A1TNbEOS61tjcbpqHhQwvaQFd7DwGPZ9HxVFxQmAk46v1QRU +IbncerHZkqsBFJMvuym3DCxwv0EJfur3LPW4i3uwp+PzNdoseo1rnPuuM0wsA4nzJLU l/6DFJbGy8y55ulzAotvfUfBP6stX4WYkMMOxBHNEIRAFbR1uMvTeQFTA0AxFkxQL4Ku eyQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tDVenmvL; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-97907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97907-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f13-20020a05620a12ed00b00788046fb447si1555372qkl.20.2024.03.09.05.32.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 05:32:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tDVenmvL; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-97907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97907-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9D56D1C20AB3 for ; Sat, 9 Mar 2024 13:32:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB5E64085F; Sat, 9 Mar 2024 13:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tDVenmvL" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19F0A3D3AC for ; Sat, 9 Mar 2024 13:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709991105; cv=none; b=YIR4F2JZ/BWbdWzyBw0bCj2/lIdudjSAyY8OgYDSnHRGNgnUQorosOO2eTgGsrFHfvRoV0/NjOPAHaMdfhm1hpCTtUdDWE4kCF1wkArbAlPiNYwq9yJDnbhFtoahHFUmVra+JMZwoBLZm3kvY8s88WdJ97chzyd+CFuWpXaFWYk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709991105; c=relaxed/simple; bh=ddTyXD0L1FluRMgAEy4AyF61rMcBg/kryptIgklrmCk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uNaSnzOmXM4A5Rc+YK3yTnqoOQe6qg21SrM2cPtBU3WXUyRJv79koBy1WfBzya6Cm8r+HRS/S9kNIJKjW4E47EeI4aHK7xWMpG7a2BrJ4Bf+07wWF0zm7a6Xmmv1PiVG/1ulHpJBmkdtiRZQXljZy2w8aONb5bQ842PrxV2cr3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tDVenmvL; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d3fae963a8so27716941fa.1 for ; Sat, 09 Mar 2024 05:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709991102; x=1710595902; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HhZUYlRhQA4TRIHl3TIBSQxZHd0u1mWSXp3lOhorupc=; b=tDVenmvLBxpMXEaCcZHKc36SL49ayUiTMZz4m3LVeKVWvLvZFX6k132NLspbxGtdyB FcYZJmuQrSrtj68Jmv8oMhM0Xut2rIiIpeIh8MQ5437q2xWz5GDNtvPemyUVfT4aww0+ rkJzy9db+qOjT2wANlgAcpC/T2DUpICPbIRW9aR/Zi5TQeTC+RKjTlNBtXwlxQ8gEdd3 AIWc/X0C0Wsg4e0ri9lLwLBuW4SKHT+AKaJ5TP3RzD5Wauv1CmxChSMe5Fk2Sx3A5IKV OXp/T4dgCcHchKThBx4pH7xJNNcYp6HmLox3F7UZcEJmmHjqWS8bR+/PdPMF71CkidX3 hsZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709991102; x=1710595902; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HhZUYlRhQA4TRIHl3TIBSQxZHd0u1mWSXp3lOhorupc=; b=dfewjnWmWEQghWXHZzDtNW75x4F3rIOxm988sKDq/j9sAMh1alr39iAvY6Q7aSnjxJ YaNTjmofCFIYNz4ei8LdNkU/n7h+f5+pbfm+Htiu38uS3KuH8Y6RdrSLADubMgmtFdEy ighZSP94qMfooD7eyizJsk8NQFEAYyXgR8FBhremDJmrl8GE4Yqh8CENG07kXb/oD0IG GEETwXs7PUW2zIl7u/ZdzeZK08YNIjHcKztUgvUpIl/iMTSWCXgsKheUvRQNeuo2OeBj auYXjcgukbLs4mw/GFtF6coLsInt2Rb0oF1FjBJ6BeXSAq6InglbiHsmhoNEPD0r7Njy eN4g== X-Forwarded-Encrypted: i=1; AJvYcCUvmY/3KgHiqFj1JawkY8LFqZOycyOsfSim9S84jubP/mckvP/rvg68kd7HEv4qaIqYoBDLpKdD/VtUMgmDXR5RLus46OstxShwpOEC X-Gm-Message-State: AOJu0YxsYw96ERz3AjGlkyR/6QGkOb1MlWT8g3wbemc9xz2e1EhIi04g YD7LAqGy8A6lva+P9yedkbu4DwlZsmP7y6kx4GjRr3k6v1xIvjH9vkS/x76HGrnJvC/DWGBvPio 6kAU= X-Received: by 2002:a2e:8610:0:b0:2d4:251f:c151 with SMTP id a16-20020a2e8610000000b002d4251fc151mr1150344lji.46.1709991102106; Sat, 09 Mar 2024 05:31:42 -0800 (PST) Received: from [10.167.154.1] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id t27-20020a2e8e7b000000b002d08f3640b5sm298524ljk.11.2024.03.09.05.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 05:31:41 -0800 (PST) From: Konrad Dybcio Date: Sat, 09 Mar 2024 14:31:10 +0100 Subject: [PATCH v2 2/2] arm64: dts: qcom: sc8280xp: Describe the PCIe SMMUv3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231219-topic-8280_smmuv3-v2-2-c67bd3226687@linaro.org> References: <20231219-topic-8280_smmuv3-v2-0-c67bd3226687@linaro.org> In-Reply-To: <20231219-topic-8280_smmuv3-v2-0-c67bd3226687@linaro.org> To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Johan Hovold , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709991097; l=1664; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=ddTyXD0L1FluRMgAEy4AyF61rMcBg/kryptIgklrmCk=; b=MnzEy58ojuKm7m/odlIGtrimc8a/DArIDyAiRUYU5/UBseU0wxX+NzrDP2hK/VAMJBFrgm0ii LP4n5g2+g6QB1tQLGFiAgVbGGdJNibptSFC5O+QIpYSck6J0euKhxTV X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= SC8280XP actually has a third SMMU, which can be seen in e.g. the IORT ACPI table and is used for the PCIe hosts. Unfortunately though, the secure firmware seems to be configured in a way such that Linux can't touch it, not even read back the ID registers. It also seems like the SMMU is configured to run in some sort of bypass mode, completely opaque to the OS. Describe it so that one can configure it when running Linux as a hypervisor (e.g with [1]) and for hardware description completeness. [1] https://github.com/TravMurav/slbounce Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index a5b194813079..28edd30a9c04 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -4648,6 +4648,22 @@ cci3_i2c1_sleep: cci3-i2c1-sleep-pins { }; }; + pcie_smmu: iommu@14f80000 { + compatible = "qcom,sc8280xp-smmu-v3", "arm,smmu-v3"; + reg = <0 0x14f80000 0 0x80000>; + interrupts = , + , + ; + interrupt-names = "eventq", + "gerror", + "cmdq-sync"; + #iommu-cells = <1>; + dma-coherent; + + /* The hypervisor prevents register access from Linux */ + status = "reserved"; + }; + apps_smmu: iommu@15000000 { compatible = "qcom,sc8280xp-smmu-500", "arm,mmu-500"; reg = <0 0x15000000 0 0x100000>; -- 2.44.0