From patchwork Sat Mar 11 13:38:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 13170833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B8942C6FD1C for ; Sat, 11 Mar 2023 13:40:12 +0000 (UTC) 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=wFAUqnq9SU7Vk06uI7PIhrqSoXRHIrTHcvvDSy0NQb0=; b=RAsuSAbXeGyziJ EiIbRysXJLi8mJtrBFfLpvWpDaPFS11cKZEC/g3+ehtmGrXJFxTx6OhuNFX3sA9g72SINS3OEaKVp FjZxA3t+xyDSov5xR5WL6IpTjp5eApcsfNCGMXlISAxXIVCX751jt8wIU87xK9CUf5vaPxq/APU/n 7rvLKVWb2WLwFbh2HwbDA42iCeP5g7mhcfGLkOB0UL4vadnP54bIlUG5oCVJ/+TkO27LhCVKKf2ni m22ZDYZ+8UQfGo7D58ti152eGjYXV7dsa2WObtM30w2OVrTZTE+e94abRT/Xu3FClmLeH1nKMzR5t fD+q/8M0R03e5VGvh90A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pazRP-000clX-Ga; Sat, 11 Mar 2023 13:39:19 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pazRE-000cfj-N1 for linux-arm-kernel@lists.infradead.org; Sat, 11 Mar 2023 13:39:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 093D55C00E6; Sat, 11 Mar 2023 08:39:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 11 Mar 2023 08:39:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm2; t=1678541941; x=1678628341; bh=it VVtU9Drcg8BUr7cYlsI8p83sJPuETIMO1tPfSIU8I=; b=qh5Vg0pu/qeoEMsTJ/ 5uBEZS1YZaiM32R6f98WgOzx+cW2iUdiW+ia+nJ4bYNIc87BsM+0aKWvi7DxhZzW RQFXe6FHVD8Oz8dxOuCyF0Mvp0+ZFnztoYv8t1p26cmi/ELK5MxnVD7lqw0yz8x7 aPnTC16+641BekwZE1r2SxtupXthg6I5CGywBQCwRLVOiZVDPg6gspipqNhhVIhT vFd4lAcG6+060KN80QNrNH0/l8eSwX2NxYwQiwRcsGaqxsjcUkRoTLowW+2Nkj6w xwuQ7EPWCvde670yi42WxiUSnbtinrRxJOzbf56glZypEJGUabsB32AriNtx4BfG wnpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1678541941; x=1678628341; bh=itVVtU9Drcg8B Ur7cYlsI8p83sJPuETIMO1tPfSIU8I=; b=Gz0GYODrCPnfczSiw5q94odxrLvIh A3GbK2szijOCUNkDaKVBECc0C2tmGopgO33XrvtfTukX12HqmlfYrZjCJNgNJroG 9n8HL9HFlJ+kWYvwiHLtvyPNtQyOCOOvekF8mWvPQooRqj6bSb9zSLh98XJKWzFV Z7hUrXU/CB895rELDSSsOWo4mVc/OpGx0Fd5VludgY1Ntv4BBp/q2y+JfB1IDIeB l2bgYFN1+PpGqF2Ahceo+z3SLiG1t+fTBgBW7dPY5T0qyREIZPM3h6qkGcPeN/ND 8k0+it/pq1ktjPfVBexy9ocQV/UEiG3dikyg/G3tvol3ZiHqlA47FfdEg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvtddgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufhvvghnucfr vghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtthgvrh hnpeeludffieehueevtdffvedtueelleejuddugfettdevhfefffdvgffhjeehgfelleen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvhgvnh esshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Mar 2023 08:38:58 -0500 (EST) From: Sven Peter To: Hector Martin , Sven Peter Cc: Rob Herring , Krzysztof Kozlowski , Alyssa Rosenzweig , Joerg Roedel , Will Deacon , Robin Murphy , linux-arm-kernel@lists.infradead.org, asahi@lists.linux.dev, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] Apple M1 USB4/Thunderbolt DART support Date: Sat, 11 Mar 2023 14:38:53 +0100 Message-Id: <20230311133856.63840-1-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230311_053908_863349_ED194741 X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. 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 Hi, The M1 SoCs have a second slightly different variant of the regular DART used for the USB4 PCIe ports. It supports 64 instead of 16 streams which requires a minor change to the MMIO layout. There seems to be no way to tell them apart from the regular DARTs by just looking at the DART_PARAMs register so we have to add a new compatible for those. Changes since v2: - drop the manual bypass disable - added Rob's tag Changes since v1: - apple,t8103-usb4-dart instead of apple,t8103-dart-usb4 as the compatible - collected Hector's tags Best, Sven Sven Peter (3): dt-bindings: iommu: dart: Add t8103-usb4-dart compatible iommu: dart: Write to all DART_T8020_STREAM_SELECT iommu: dart: Add support for t8103 USB4 DART .../devicetree/bindings/iommu/apple,dart.yaml | 1 + drivers/iommu/apple-dart.c | 35 +++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-)