From patchwork Sun Nov 26 15:16:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 13468873 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 B5CEEC4167B for ; Sun, 26 Nov 2023 15:17:52 +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=qEN9PIWXvsAkrz95ohIyJm0P4E17hdzEUiJu6I4ckcM=; b=z4ZLZm/mMJP4uS 676lA8HNg6A2TKuCJZnaYdqnkXMQkE4xGw+tWLrOzpfGeKmr66gQkFlAl9q857hvOzsGeOOdCx1pO EvedsTf6HymOP4qnl7q1ealQipx961tk5Zjza6d34P8ZSAtp6HDikuR+ZE/UlLHbaMZuBMa0/7Svb wQCFlPQmLwWPUw0J1/08vZ7gKSMVw4Gj8bGuSNtDJdah0SPtXA2fFlM38LVZeVbMww340f1/UMZvm hBwAK8CU738v52YGLJXY8MupGNm9Gq/q+yGdxBwMNWGM70vB0j3eMtDf2LwIOyL0ZfazFTjkkPBVw 6G5Pv+Drn7W2TbPqOuVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7Gss-00CE1L-1Z; Sun, 26 Nov 2023 15:17:22 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7Gsp-00CDtx-00 for linux-arm-kernel@lists.infradead.org; Sun, 26 Nov 2023 15:17:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 180905C0112; Sun, 26 Nov 2023 10:17:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 26 Nov 2023 10:17:13 -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=fm1; t=1701011833; x=1701098233; bh=QF o1C7nf0MwnRndvr35f92S5FiUlHM7+325TxLkWkMo=; b=e9CvtPcbMsXDV7nN2s 33kDEtKN1YM4Fe6zqjOGHuIo1MNEbN5KXxsxjbcJA83Yh3+qeNS1kU0yGLpVKFJ0 Ui0lbztiYsLtXgJwwX/Wqw1SW/+V9EOYJf18IlxlM8RJ/UUEvIyMjLAM4JZAOb2V x2aJZGtailchpXo6fDBkc6gFuWb8G5dytf2j2xo6hWKM1XiacyCmfngVhLm6h0kT cie56h/lBEAZEqfjg8gh9RiSBnr3pawI3KxO/RWmt1VrUujOGXxCmR0ZCGEetNVd Z+wnxqd0sPM9nsfI6HTQBdA21TN82l0OOFmCIEjUhvllzB+JqEw4Sxya+v1vKJMr IPmw== 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=fm1; t=1701011833; x=1701098233; bh=QFo1C7nf0MwnR ndvr35f92S5FiUlHM7+325TxLkWkMo=; b=qRKwNWyXT8W10kHBnVo1h/CL/ADES LTNBm/q6spdLF6gZbVjH54HwV5b/vtrGHraeqTysT0RuZMcmljAYx6Vls0ZeSunE Ut5Brwx0Ptsh9xraQuo9zhewwHw+fhm7SJOvoppLvWzNBW117XS3iVIJLgfcQJDs 6JPVQQy1SHs6mCF3CGVZmlaemI4bL239g6zOtCnxWPfGpmHnXDynshDts51LhrkM SK6siQtV9zkyds1hLuM1LnjpC+iWM5inyTjpdwsvxHfVk0BNWqpv9MjMaIPb6XLv fpZpo0BdCKu5zlNTX6/8smP9bwftyduLJDGBoNvkG8f6UL7Q8HmD9w6TA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehledgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufhvvghnucfr vghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtthgvrh hnpeeludffieehueevtdffvedtueelleejuddugfettdevhfefffdvgffhjeehgfelleen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvhgvnh esshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 Nov 2023 10:17:10 -0500 (EST) From: Sven Peter To: Hector Martin , Sven Peter Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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 v4 0/3] Apple M1 USB4/Thunderbolt DART support Date: Sun, 26 Nov 2023 16:16:58 +0100 Message-Id: <20231126151701.16534-1-sven@svenpeter.dev> X-Mailer: git-send-email 2.39.3 (Apple Git-145) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231126_071719_159222_5B518D15 X-CRM114-Status: UNSURE ( 8.72 ) 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 v3: none 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(-) Reviewed-by: Neal Gompa