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: 6464 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp285108wrd; Sat, 11 Mar 2023 05:43:19 -0800 (PST) X-Google-Smtp-Source: AK7set+Q3YicRCNqhSRNvAOTPdgNY1gRmp9kMA43SjKTyuMdixCUD1OUppCuFacxDAKVXoq8h29E X-Received: by 2002:a17:902:db0f:b0:19e:7a2d:19f2 with SMTP id m15-20020a170902db0f00b0019e7a2d19f2mr36058419plx.19.1678542199541; Sat, 11 Mar 2023 05:43:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678542199; cv=none; d=google.com; s=arc-20160816; b=q5g0GGU62KkwmCiSI3JNqI24f38K6wt2ZYyiI5b7iQhTf7QKt089CdT/tFhVJGrYeg pXxX/hk2IkWgzvj3HwTdvdfkgNODI7cNr5p5JojdqJysfCS/jHUMWDWMC5CE54As/6Xn XUFCW+kCpBlmxqvllK26VywaTUVX8xSTTCkMXdRb1N7X+2So8lWaVvzE2JIMs7QS0g1A 1soibZEQCjsoX7ivwGubG+jVp3wLnxpgHA/kazGBhMJAmT3BxndGSEES6haL+2dbZO/F p9T/REco3Wwk99xkIeX6MduNYq39RZH1KSs1ftKJZPv+D8pf4QNoDARIi5HydXE2a7vu 7ZcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=itVVtU9Drcg8BUr7cYlsI8p83sJPuETIMO1tPfSIU8I=; b=hMJSNi/4HTCEtRkkJtEzCgubl5VczUTcZPDiq5jSRe5b3dYqSA0S4aq6Bi2SEu0OGS Cu2Ucfs4heJFlE34s2BISSxIuHX3Q3L0kpldONP72L94nCjhU3eJLaB3PVTNeNCMl/wo y/17d6VhzQoGwakGbj5i/cAV7xc4BhibqO+O6xtwBjgB/bN4JnZa8BnLkKgE4Le8yRay 9T+x1YZrPkzTADXDIK7Uz0ZOenVEQQhryFBQafkkdV2eJnmJW/sB117Hf7VJrQAyO7Td whZmETU0kVV0qP8Ou4CBBFFWRODTTTFWpOofaVvHWpjcLJeqmBqR3qlf180W3RqexJvQ j1EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=qh5Vg0pu; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Gz0GYODr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=svenpeter.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id le14-20020a170902fb0e00b0019e5fc3c7f0si2256789plb.420.2023.03.11.05.43.06; Sat, 11 Mar 2023 05:43:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=qh5Vg0pu; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Gz0GYODr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=svenpeter.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbjCKNjF (ORCPT + 99 others); Sat, 11 Mar 2023 08:39:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjCKNjC (ORCPT ); Sat, 11 Mar 2023 08:39:02 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9001911F6A3; Sat, 11 Mar 2023 05:39:01 -0800 (PST) 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760079065185551177?= X-GMAIL-MSGID: =?utf-8?q?1760079065185551177?= 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(-)