From patchwork Sat Jan 28 11:11:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 49845 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1293948wrn; Sat, 28 Jan 2023 03:15:12 -0800 (PST) X-Google-Smtp-Source: AK7set8MkZuyV7IuMC17O7YEO8gkAaeM4hhyYx7Ql8NtJCqH8++UQaXZ/ORY6AebjfVDWq8XxLjG X-Received: by 2002:a05:6402:35d6:b0:4a2:2e8a:14d8 with SMTP id z22-20020a05640235d600b004a22e8a14d8mr750185edc.30.1674904512192; Sat, 28 Jan 2023 03:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674904512; cv=none; d=google.com; s=arc-20160816; b=LJngK1iqskweJ2LyoXInmybhJrWPKj27jZu2uQzC344k89/KLZLI8/HF0fYKiswzzA IUhuJ2c05YPNOkyWQ3VlM7NpFOcA0vtt44NQwqmim45t5SBU/R6Gq0CqytxQYBHYXFPC HaST3/VmC3OM38je67sSrrZ2/BK2XBmPzSM5IAMsw9iaXViqcB8jM4KeHFG6v4IMHQJG y2qiEuP046xo6jhC5Q8oxfCTRadsEHBps4qlg7QogAKt4Y21tr3SpmFHtd5rQUEZ1AYH aN4rmZOsMaP508GUcqw/4ehRE5asyVOWKcXqrlRAIFxbsG+300WL1P6igABsrPrI5olR expw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=Kk810rg+RVOB5XK0ZliSwtvtlzIioFE7/7PlCxDb0yo=; b=APqrXQxVz1laSH0SJcJhuxJJftw2SnpgdT87qeTnFWJDvmm2Cfzi4GE49QHrDhbqmu Od5hbGdLNE7WI0qjDCl8gYC5eUoq2mH74Na+vx+szperHFHhavmR3iUV4dpNk1kyY3mX +5Xax+CAIA1BFSL3ILAB2c2Ulf8Crsq2rjlk6uWQ5OMJ4QPprk+kBbnQUubRhMP6vBcB 0UElZMckFhL1okYWRZetJnv1EqS5PwAnphl5Dexeelo2uI0T7EVHb9cAz2lRAtsDDXfP e7qKeWD/W/tZjWlJUpeYq9XGLk9sdoWKuOjesp6LBkSqPGmUgtI3yv711FCnL27ib9w7 wipQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm3 header.b=BZs0REhp; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=nsfXtrfL; 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 bq21-20020a056402215500b0049e376ac999si8428841edb.529.2023.01.28.03.14.48; Sat, 28 Jan 2023 03:15:12 -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=fm3 header.b=BZs0REhp; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=nsfXtrfL; 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 S233975AbjA1LLg (ORCPT + 99 others); Sat, 28 Jan 2023 06:11:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233836AbjA1LLd (ORCPT ); Sat, 28 Jan 2023 06:11:33 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20E541EFC5; Sat, 28 Jan 2023 03:11:33 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 909FC3200645; Sat, 28 Jan 2023 06:11:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 28 Jan 2023 06:11:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1674904291; x= 1674990691; bh=Kk810rg+RVOB5XK0ZliSwtvtlzIioFE7/7PlCxDb0yo=; b=B Zs0REhpeGi4qAgvF6M6jxcZnfiWEABCXp03lhPKPgJkEbrADRSn+UyrdT6oScv9M wb8LgaWVgpalFa4HFICIJZuWjqeE++0OQGbbzIuLASByVVJKHpq6E1cPJ42Z/ib0 G4nnEDLj+ysAxf3Bd9t/8wE+0ABHjuf3HcNXDWX8/Ti3qzd913RpxLILujCTTGnQ bAQgxhAXoMKHT4c6n+C5JdNsfRW7Dlll3BO9ZRj94Cb2gKUoVXjSTf+ySrs6YYYF 4pcixC3LrpcNZqL3cBnRjVBJo1x/4BOnm7M440EhuyX6bn1DSmUL3z3KZNEM+/Dn QCmZ0ZfdTEC48yTlHCcZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674904291; x=1674990691; bh=Kk810rg+RVOB5 XK0ZliSwtvtlzIioFE7/7PlCxDb0yo=; b=nsfXtrfLzur4tjURrL3Hnf5V90fMq /G3PtcWdvN2frV/qb0+XbtkqIi3DhcMRls7MLzQAUA8+YZ+jQr75ZOLJYkjVBf0/ zHJlkNcRcrJOzZdmoJ2V9vOfGf+yCCjIEpD7uK4BGodIEqEUA58YpzJa2OOjus9A NugYi+On2f77w4FH/WF9dQVa63jCYbzGCbanrW7h6euJmtzD4iRY6596Rxe7l1HL 3a0ljOcQnlWUKPXRJjpTv7crJ1lxNcyw9CwOJ4enbH7Ms6qVlIZV19NNKrte0KLZ o7Xi50+CpDLl3/mMNXMKG2f9ZOX1I+wQ1qayE6PBSTvs9Wu24LmgtA38g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvkedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufhvvghn ucfrvghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtth gvrhhnpeejieehheekgedvjefhveekjefguddtfefhteehtdeiffelkeeiuedufeelkeej geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvh gvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Jan 2023 06:11:28 -0500 (EST) From: Sven Peter To: Hector Martin , Sven Peter , Rob Herring , Krzysztof Kozlowski Cc: 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 1/4] dt-bindings: iommu: dart: Add t8103-usb4-dart compatible Date: Sat, 28 Jan 2023 12:11:11 +0100 Message-Id: <20230128111114.4049-2-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20230128111114.4049-1-sven@svenpeter.dev> References: <20230128111114.4049-1-sven@svenpeter.dev> 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 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?1756264673670382132?= X-GMAIL-MSGID: =?utf-8?q?1756264673670382132?= This DART variant is found in the t8103 (M1) SoCs and used for the USB4/Thunderbolt PCIe ports. Unlike the regular t8103 DART these support up to 64 SIDs and require a slightly different MMIO layout. This variant is only found on the M1 SoCs. Signed-off-by: Sven Peter Acked-by: Hector Martin --- Documentation/devicetree/bindings/iommu/apple,dart.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iommu/apple,dart.yaml b/Documentation/devicetree/bindings/iommu/apple,dart.yaml index 903edf85d72e..f9c1843c074d 100644 --- a/Documentation/devicetree/bindings/iommu/apple,dart.yaml +++ b/Documentation/devicetree/bindings/iommu/apple,dart.yaml @@ -24,6 +24,7 @@ properties: compatible: enum: - apple,t8103-dart + - apple,t8103-dart-usb4 - apple,t8110-dart - apple,t6000-dart From patchwork Sat Jan 28 11:11:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 49849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1294485wrn; Sat, 28 Jan 2023 03:16:33 -0800 (PST) X-Google-Smtp-Source: AK7set9FzqlTwR0LTsYupN9krUIIdiL0HYn5VrvrSaMh/y12wxpMaIRqW5phmMCiltDULt+bVIbj X-Received: by 2002:aa7:d310:0:b0:4a2:1618:d702 with SMTP id p16-20020aa7d310000000b004a21618d702mr4892081edq.18.1674904593250; Sat, 28 Jan 2023 03:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674904593; cv=none; d=google.com; s=arc-20160816; b=PYyOW7+XqgUoqTw1wwUCc1XyljLAgGXnz91/F47ZPel8rQdoENlA2jtNvLGCGMDHkl ChIquy3CYB4dRHAnR6iz9OAjin368jn3dztkB0J88d/wapnzReAuHcHw6ZGrhPfWkcb1 Pj6UteRchn5Tu3s6EL77/5yKGo0sbbOk1ON4KO58bo9+ed399bkM6VoXy5eOl2Viu+PW a5Yt/XFZRG3GhEIr4mSWhuOVScwd+f7P4CjvD08ggyt/eOGcGA3j6TPzea8FZr46zCLM IuyaEoJ9zRN6Zqb6UwSrdRbb7Ziw1hVkK5IgIGcVE2LicD6M32yYRWFeDNH88FGjBlWX jA2Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=q5YiyykUrJZCR2wH4YUrGX/fn5nsnR9BnsXm4VxP70I=; b=RCZrXf2QQLOB8xNVccTG2oq3EmuNL47CtydAGf2Q3z1B8qDmYd7bh5H1568PVlL/tR wgsVAA4ak5EWewNZOfQ9OfbbnMcdTCu/upDxfImvxzA86lQZn3Ne4ysBpa3a2gApT2mH xAHYz874ezZUd/uirW1rDoq991E/36Gojqr3iaE3CMcMknAGJk1IsNuqXDI5OAMJR1+t vvW+qO7ZCkRVOBkyxxmJKO0AfkyVtIg0Q7EvdUU2fj13UzlneNQjIImT+KpCAnykkcau C6O3Z02TjQj0sOm6ds3ugjit5AJNB9mkRhYtM4dDKqvHJEJX6d0dP0nlFbBtsvbRht/t z9+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm3 header.b=M5hIrXK9; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dwMlyRe7; 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 t16-20020a508d50000000b0049e165b5feasi7922716edt.16.2023.01.28.03.16.08; Sat, 28 Jan 2023 03:16:33 -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=fm3 header.b=M5hIrXK9; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dwMlyRe7; 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 S234243AbjA1LLn (ORCPT + 99 others); Sat, 28 Jan 2023 06:11:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233836AbjA1LLi (ORCPT ); Sat, 28 Jan 2023 06:11:38 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586EA7B421; Sat, 28 Jan 2023 03:11:37 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B7BB53200437; Sat, 28 Jan 2023 06:11:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 28 Jan 2023 06:11:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1674904295; x= 1674990695; bh=q5YiyykUrJZCR2wH4YUrGX/fn5nsnR9BnsXm4VxP70I=; b=M 5hIrXK9KxWDyNn15dh2pSalCeHuM/TcV9xP7KRvPBobzBysKiF7758ZXp7kU1ZIE gcOsxPukGSmJVUSeI+g4+GNGRIDvVZ5YFIlzYKIuX0ivxovODZUrHE34ReHfHSGe P8pLqFFvZcz71UCd1Q2D6J+ARmV6V9m1L6gmBCwUAqZ4Rl6HVG7RIYPgShTKoiCT I/x4C+FiIIrEOCRiP+YFh/Rxd+WKEvrBCP76CtTTnw36XFu1gVgf1OGWseyTILF3 VHnCv6umtK2jiXVLnxQSMx68DI6hH9wA4DeYHknptnzyBLlp+4yLhPm8ic5BqdRX 9TKscmI7s6agZCokw8wPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674904295; x=1674990695; bh=q5YiyykUrJZCR 2wH4YUrGX/fn5nsnR9BnsXm4VxP70I=; b=dwMlyRe75uk6OXBC6Fo6AA4vYoq7o qy21TzeJ7FYEXjGlPi7JgVFy7ohmr0LNxUI86EhLr3YcBTjeNnOdfPnCNWLoTEC2 E4GK3jFuOVFgvtXYAAeGqd0BmukKcTjttFRKsHSdK5W//9NAEgOWN+i862eW4FcO B1nrh9RyxOg50nuXYFNYDXq1WMJIUTMiJoGqaHhIdzWUs00Y48YJ+uRetUG+Ya+J wvGj6ULQ8ZDqObaiL14XANwIUAdL9ljSVVRZojsyteCYtJ+nrP/UUKUWa2lrEILV iZk3YwV+/XDNectwbw+iQ+WPvaWVXlyKKphmcVcvmJyv2o69xuU1j3HYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvkedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufhvvghn ucfrvghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtth gvrhhnpeejieehheekgedvjefhveekjefguddtfefhteehtdeiffelkeeiuedufeelkeej geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvh gvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Jan 2023 06:11:33 -0500 (EST) From: Sven Peter To: Hector Martin , Sven Peter , Joerg Roedel , Will Deacon , Robin Murphy Cc: Rob Herring , Krzysztof Kozlowski , Alyssa Rosenzweig , 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 2/4] iommu: dart: Add flag to override bypass support Date: Sat, 28 Jan 2023 12:11:12 +0100 Message-Id: <20230128111114.4049-3-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20230128111114.4049-1-sven@svenpeter.dev> References: <20230128111114.4049-1-sven@svenpeter.dev> 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 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?1756264758524962804?= X-GMAIL-MSGID: =?utf-8?q?1756264758524962804?= The USB4 PCIe DARTs claim to support bypass but we never want to allow that on externally facing ports. Signed-off-by: Sven Peter Acked-by: Hector Martin --- drivers/iommu/apple-dart.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 42666617803d..7d8b2b90cdb6 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -182,6 +182,8 @@ struct apple_dart_hw { u64 ttbr_addr_field_shift; u64 ttbr_shift; int ttbr_count; + + bool disable_bypass; }; /* @@ -1075,6 +1077,9 @@ static int apple_dart_probe(struct platform_device *pdev) dart->pgsize = 1 << FIELD_GET(DART_PARAMS1_PAGE_SHIFT, dart_params[0]); dart->supports_bypass = dart_params[1] & DART_PARAMS2_BYPASS_SUPPORT; + if (dart->hw->disable_bypass) + dart->supports_bypass = 0; + switch (dart->hw->type) { case DART_T8020: case DART_T6000: From patchwork Sat Jan 28 11:11:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 49847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1294059wrn; Sat, 28 Jan 2023 03:15:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXtg6HWIVwVJknz2VuJPRTzXpAmo9DnfDI5QaY90Rrg5l+gc0jlnRb2iGIZbv5k75nkgIVXJ X-Received: by 2002:a05:6402:1f85:b0:45c:835c:eab7 with SMTP id c5-20020a0564021f8500b0045c835ceab7mr47044450edc.37.1674904531707; Sat, 28 Jan 2023 03:15:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674904531; cv=none; d=google.com; s=arc-20160816; b=U/AjZaEnRiZvSX6B9wIh+NcYiaLGAvSqsGLNmtZAUul2YQsoARmyIVYZTtO08yz7mL kINbe71xpiDMIh8xYOS9kQyw/xszo6+2FRbgyLW/mg3+ZIFtZrjr/+c/IOOtnm20zzCx uNTPcqg54hz9Z7VJQ3BM6A9n7FjSm84ilKTF6C+kAQz1guJNJiEfXVoSXxx+2394V2KS rp+pbpA0XJbVRwehyyCdXkcanVQzz0zmgBfWtvXf/evEMlzij0Mq0CjGkyPkSZFbm8/1 Afv2cUAA3SeW3WK0mOVbIi7HNf/x/TnWWGNZtbVWuI/BorvysowssSSO/MWbeve+dFE0 xqkg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=95cFYESovP/5VNc+cPvOHG0EQFnShh8vh/vZRQA6QEE=; b=Es/nZnkdanLX90OBb11FRUfspkBltjkvYhQKnwS5RjJEyfRJSKNyl2em6xKaPCEus0 JCDBhhowzch2z54Acjj+7pgxhZlijxBc5PeuJ0vaP7fd50pBqf65B0wB2jQNhMkw063y kY/bPp8pNLL3lF4gZjMOEm8NfPtfcZC7qgndvXPxEdbN2riV0osJkkMYU0GAwbiBJnj7 GkCbcpLcjzrCf/PKMF7E4it6f7vmzzH7VDLhyfVFuNWX9sDJQoktnZEb01Enbp84o7rT eyw0D6xaq6q2nlRajnOb7Sj2h1uLL8EHK08TkcbXNEKuzgtlwCWauv0NkMwzh3I5LEXu Zu2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm3 header.b=dzeyfbiW; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ROaUUwA6; 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 fy15-20020a1709069f0f00b007ae0e8f697fsi8194397ejc.652.2023.01.28.03.15.08; Sat, 28 Jan 2023 03:15:31 -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=fm3 header.b=dzeyfbiW; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ROaUUwA6; 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 S234012AbjA1LLx (ORCPT + 99 others); Sat, 28 Jan 2023 06:11:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232323AbjA1LLo (ORCPT ); Sat, 28 Jan 2023 06:11:44 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13567518DD; Sat, 28 Jan 2023 03:11:41 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 769B73200437; Sat, 28 Jan 2023 06:11:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 28 Jan 2023 06:11:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1674904299; x= 1674990699; bh=95cFYESovP/5VNc+cPvOHG0EQFnShh8vh/vZRQA6QEE=; b=d zeyfbiWH4qMpOpayK7ptqs/ng+h+UgBQdxg/M4/Mz7jQPHAh/1PCYaBYJIM3sFXS 8nlSvqzTb+0krb/EMFEDzd7lw0nQPwC3T+/xbt4EPVmb1cU8FThiW99FA/h/6nOW nPbgsE0YeWFmP05XvIP4BCGnHg0e9slquaog6aKjpJlvYPAshVFKj7DMqQAA7gQW JrybH740/n8ns0hpT/SWhxVOI1R2PCpREIs40xJao2DKG2zTGrXc/vNVwZtpBsXE 2b+bCnnOyKwAjzNLsA4ljovkKS8KQ+Ku+Ay6pHYxe/jL5COFdgKG5VYh2aU1+yy3 coBtuvkoUGsPauhpxnJVg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674904299; x=1674990699; bh=95cFYESovP/5V Nc+cPvOHG0EQFnShh8vh/vZRQA6QEE=; b=ROaUUwA60NdlI0CcuJvUlvx9txZuX hlp6qf5PB7wiihk5tUJVba2gOwg8WcyArMzhnlL8+2B1oHYaOaDbqDbST8gPB87t mwmIskktVbBlrOnzr5wfCUD//megIbNXEsQYbQRvQxwcd+yz4WmGxAnPxKDb4tU4 e5D28B+Ni0fwjAmh0rUC/B8O9XxUFYUJWlaDgzhnM4UHfPL0hwbzoq9Do6aw9oQW rASYPbPnyvRtg/8TYN4f6SBGDtaC90ueRt02HZaDX6UsjNn4l/7/co2s24BWKY7y i3J1AxOp6sjcxdigYbd6izvIyuMIgPFVY63S8qG1zVIBmrBFgL9Djsswg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvkedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufhvvghn ucfrvghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtth gvrhhnpeejieehheekgedvjefhveekjefguddtfefhteehtdeiffelkeeiuedufeelkeej geenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvh gvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Jan 2023 06:11:37 -0500 (EST) From: Sven Peter To: Hector Martin , Sven Peter , Joerg Roedel , Will Deacon , Robin Murphy Cc: Rob Herring , Krzysztof Kozlowski , Alyssa Rosenzweig , 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 3/4] iommu: dart: Write to all DART_T8020_STREAM_SELECT Date: Sat, 28 Jan 2023 12:11:13 +0100 Message-Id: <20230128111114.4049-4-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20230128111114.4049-1-sven@svenpeter.dev> References: <20230128111114.4049-1-sven@svenpeter.dev> 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 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?1756264694088749372?= X-GMAIL-MSGID: =?utf-8?q?1756264694088749372?= We're about to add support for a DART variant that use more than 16 streams and requires writing to two separate stream select registers when issuing TLB flushes. Signed-off-by: Sven Peter Acked-by: Hector Martin --- drivers/iommu/apple-dart.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 7d8b2b90cdb6..7579c97a9062 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -372,12 +372,14 @@ apple_dart_t8020_hw_stream_command(struct apple_dart_stream_map *stream_map, u32 command) { unsigned long flags; - int ret; + int ret, i; u32 command_reg; spin_lock_irqsave(&stream_map->dart->lock, flags); - writel(stream_map->sidmap[0], stream_map->dart->regs + DART_T8020_STREAM_SELECT); + for (i = 0; i < BITS_TO_U32(stream_map->dart->num_streams); i++) + writel(stream_map->sidmap[i], + stream_map->dart->regs + DART_T8020_STREAM_SELECT + 4 * i); writel(command, stream_map->dart->regs + DART_T8020_STREAM_COMMAND); ret = readl_poll_timeout_atomic( From patchwork Sat Jan 28 11:11:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 49848 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1294333wrn; Sat, 28 Jan 2023 03:16:11 -0800 (PST) X-Google-Smtp-Source: AK7set/URRUjs4p72nOkP9xkO3UrMMZYm1RRioWlt72Nz6R6A+w0aJhM4NgdLIzMcBe72yL3T89d X-Received: by 2002:a05:6402:530a:b0:49f:f60d:1692 with SMTP id eo10-20020a056402530a00b0049ff60d1692mr18414949edb.24.1674904571676; Sat, 28 Jan 2023 03:16:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674904571; cv=none; d=google.com; s=arc-20160816; b=xZs7Pjb5O46Md0ZavhW2RpE412h1HSaDeXoZA2svbuvmWHQd6d8Ja+aEnyxUpeFndv NQi8kxt3JvKXYWYWbERTdvUjecU5dj103fERY77dvoKkbEJ962o6TbJ4RYvKv91k/gHp voYO5g8Ab+rdTnJ2TbWe8JbuFWAkDWLmuu+PjoLxnHe2nXpmJHtBKc/+AypA9Ofzf1oa 0iQnP1PhTF8IOjVIvIPEavh3wNfDH/aO67Aq7QD6HymCbMfLmhg+hV62pEYAPlfBsmFl 3ESFNbuvkNpuraIH/oXo5mjb3c0HyHCZ1vorRDdFhRv4s1uGytLDBeIdGMirzTxuHK4f 5lRQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=493UH9whhEk1w0ep2M9HRG0EP8+U1OlA4AfdHG/OFhw=; b=s35N3bkjFmmCa9rKlWjFtZPrb/q8ARsMNeaEcLw9MrnP9jFIhl5/p1Fd+BKkIWpn0s 3qfjTfDOVz6iihkmFXeZwydc9O3CXZbl1qcJmEhjUOMm9LeCs9IOoVPpABRyEp7cV06F ROTUQDSZZ1R+DeitM1d55HYkSutU3G8GBvNy4ryDV+2QOjdTER0XyRIN8kGktU2/R2jM 2MKu94cGCPV6AN0jv1i+nacZAI5c3gE5nDvXgr3oxpJIzlMaisephXNXTMQ5lboFqDFG HEVzhVXcjcPsaF64awsO/wRY564QmhMoUkhDaMHQq0zdjNja3yZU5Zn3+Myq5m/jyYbH 5Prg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm3 header.b=de1jlgU3; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="PiC/NiSw"; 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 b12-20020a50cccc000000b0049e89e692e8si8802689edj.190.2023.01.28.03.15.48; Sat, 28 Jan 2023 03:16:11 -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=fm3 header.b=de1jlgU3; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="PiC/NiSw"; 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 S234024AbjA1LMJ (ORCPT + 99 others); Sat, 28 Jan 2023 06:12:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234360AbjA1LLw (ORCPT ); Sat, 28 Jan 2023 06:11:52 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07FF46DFE8; Sat, 28 Jan 2023 03:11:44 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 501583200437; Sat, 28 Jan 2023 06:11:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 28 Jan 2023 06:11:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1674904302; x= 1674990702; bh=493UH9whhEk1w0ep2M9HRG0EP8+U1OlA4AfdHG/OFhw=; b=d e1jlgU34CGxuCvyj8cZMBK6/bWoiFIZZ14RcjZHMjYqEeQhToEkBt90vb4EG/Fzv ptuZ1dki+TmLwHkSUoHsw/FQCSC6jrAX9gtJYcucp/E7FKWkWXAJzF7bxBbC9PBf ZbeWNtztp4wUs0FvUdASrT+bk2cN1Ftkf0lK9rgdiGj2/6ljdFsXfTuKFgh2T1lp 3MzKs3vpVbXcuCzTKOj9Qv3W8h6Ly2u/zzWsJxF3zaPcJ0EhNtcsnUMZDigSMDaN Yl9dC/aSurjv2YkLsul5saJgHY43Oejy9rL7z/3WqMQXou/vOhmDLiIqNEjx6q/a hn9I43GvOxJ7j3OqSLagA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674904302; x=1674990702; bh=493UH9whhEk1w 0ep2M9HRG0EP8+U1OlA4AfdHG/OFhw=; b=PiC/NiSwFoLtaE5G9J5ld6e2XJUJc 15KN4gg4UVQFlPLMuT1t7H0mzQXqsehV8LNDs+cfarFaZBfPwgl2ZfE5uyS+IKUG w5Xj+QbmPDj5d/aby83veig5W0liEQ15XRFOI76cpcQsPv3VDuevHTVcwZbbsQJg knsaiOTyyk7zmCokE591nRt84XTYNhtmfc+9EmYqwx4ilwTgOAE30/unrQd6IOyZ cH8E8u6PSa1EqImcI4ROrNHxk3daX0GksTtT75G0BzufUlaQfA8yAoQydiY2Enef Y9R+AFqB+Cv5GYRQ0tkiBUzTQyXREMPA4Sh6NI8pTVFbUrbr5CsEFrhfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvkedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufhvvghn ucfrvghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtth gvrhhnpeejieehheekgedvjefhveekjefguddtfefhteehtdeiffelkeeiuedufeelkeej geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvh gvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Jan 2023 06:11:40 -0500 (EST) From: Sven Peter To: Hector Martin , Sven Peter , Joerg Roedel , Will Deacon , Robin Murphy Cc: Rob Herring , Krzysztof Kozlowski , Alyssa Rosenzweig , 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 4/4] iommu: dart: Add support for M1 USB4 PCIe DART Date: Sat, 28 Jan 2023 12:11:14 +0100 Message-Id: <20230128111114.4049-5-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20230128111114.4049-1-sven@svenpeter.dev> References: <20230128111114.4049-1-sven@svenpeter.dev> 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 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?1756264735936015825?= X-GMAIL-MSGID: =?utf-8?q?1756264735936015825?= This variant of the regular t8103 DART is used for the two USB4/Thunderbolt PCIe controllers. It supports 64 instead of 16 streams which requires a slightly different MMIO layout. We also disallow bypass support since these DARTs will only ever be used for externally facing devices on the USB4 ports. Signed-off-by: Sven Peter Acked-by: Hector Martin --- drivers/iommu/apple-dart.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 7579c97a9062..a1304ba3639b 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -81,6 +81,7 @@ #define DART_T8020_TCR_BYPASS_DAPF BIT(12) #define DART_T8020_TTBR 0x200 +#define DART_T8020_USB4_TTBR 0x400 #define DART_T8020_TTBR_VALID BIT(31) #define DART_T8020_TTBR_ADDR_FIELD_SHIFT 0 #define DART_T8020_TTBR_SHIFT 12 @@ -1184,6 +1185,35 @@ static const struct apple_dart_hw apple_dart_hw_t8103 = { .ttbr_shift = DART_T8020_TTBR_SHIFT, .ttbr_count = 4, }; + +static const struct apple_dart_hw apple_dart_hw_t8103_usb4 = { + .type = DART_T8020, + .irq_handler = apple_dart_t8020_irq, + .invalidate_tlb = apple_dart_t8020_hw_invalidate_tlb, + .oas = 36, + .fmt = APPLE_DART, + .max_sid_count = 64, + + .enable_streams = DART_T8020_STREAMS_ENABLE, + .lock = DART_T8020_CONFIG, + .lock_bit = DART_T8020_CONFIG_LOCK, + + .error = DART_T8020_ERROR, + + .tcr = DART_T8020_TCR, + .tcr_enabled = DART_T8020_TCR_TRANSLATE_ENABLE, + .tcr_disabled = 0, + .tcr_bypass = 0, + + .ttbr = DART_T8020_USB4_TTBR, + .ttbr_valid = DART_T8020_TTBR_VALID, + .ttbr_addr_field_shift = DART_T8020_TTBR_ADDR_FIELD_SHIFT, + .ttbr_shift = DART_T8020_TTBR_SHIFT, + .ttbr_count = 4, + + .disable_bypass = true, +}; + static const struct apple_dart_hw apple_dart_hw_t6000 = { .type = DART_T6000, .irq_handler = apple_dart_t8020_irq, @@ -1276,6 +1306,7 @@ DEFINE_SIMPLE_DEV_PM_OPS(apple_dart_pm_ops, apple_dart_suspend, apple_dart_resum static const struct of_device_id apple_dart_of_match[] = { { .compatible = "apple,t8103-dart", .data = &apple_dart_hw_t8103 }, + { .compatible = "apple,t8103-dart-usb4", .data = &apple_dart_hw_t8103_usb4 }, { .compatible = "apple,t8110-dart", .data = &apple_dart_hw_t8110 }, { .compatible = "apple,t6000-dart", .data = &apple_dart_hw_t6000 }, {},