From patchwork Fri Jan 13 10:50:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 3976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp201107wrt; Fri, 13 Jan 2023 02:54:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXux0F5XWeXwaUiquar//6mdhP26PhmDRuH6ii/pFZdjgZgfFIA5/fi0zOKqjSWs3zSWuW7N X-Received: by 2002:a05:6a20:499d:b0:af:767a:a7e1 with SMTP id fs29-20020a056a20499d00b000af767aa7e1mr10600369pzb.23.1673607298349; Fri, 13 Jan 2023 02:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673607298; cv=none; d=google.com; s=arc-20160816; b=SjY3nk0iKY0P8VhSIZhIwmtTzbCHuU441EZjJRJyddbvP76TRY+7VeBhHKJqCUnnyH qGlk5cifhWCkeoSXsrp6QRyuVaq1i1fMO7epSfVPibKojREhyL6rMz/0yWlutthhLYY5 GmBVl2fexZcxJJge0KKn7XHhARswSBQmsgcHZp0DNSb+dg3XNZH6vp0FNFryqasI2N5i tcFgZwV9vgM4tuAWDxiEkdcwXKWzJh5Y1bETsSYIttKMGrlnpgolA7kF9mnD13Cp3KNn tWVSb/uHwpiYJKM9kLL7GMTrdZK7c2YPqVIwBKQs7D6tfNblxnlTeBTs+hBER9kEryic 8G6w== 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:dkim-signature; bh=btR4x+J0pUb3R9t9zXA0su404VOmFvLCPKIQhw1P9RE=; b=iGfH+AQ2PZMVA9XzsSJFz5XPFjaVP9mCJyeD/y0uUT8erNfhox6zNT/osSMQ6CPH8a QTJJ6mpdkG4CinDFayLHImiFGGTgdGxdvyiI7c8Qsp2mU/0O0q2Mv7utGj4gEftpdu6F iPsMMnB8bQeYxWN+ntomxb2BBsMbBDBCb8BFjiLGq0821Wqg775JY2p2T1v97nyfEyA7 3PGuvxhS8tJYJrH5Ba8Yg4qGrz2/yjmNJzEloy1UxN2/lbaOduCVRH9YhlS930O8MtUL 3iUOg1TZxUmb/ukQrsYxlu6NavauprLrjMR6hNM695MLhu1EQsoahKCEUlY2xfgR0Nml 1GRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b="pi/O7iWY"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n64-20020a632743000000b004bac51d63a6si5901370pgn.329.2023.01.13.02.54.46; Fri, 13 Jan 2023 02:54:58 -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=@marcan.st header.s=default header.b="pi/O7iWY"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241358AbjAMKxu (ORCPT + 99 others); Fri, 13 Jan 2023 05:53:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241303AbjAMKxL (ORCPT ); Fri, 13 Jan 2023 05:53:11 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8349117423; Fri, 13 Jan 2023 02:51:29 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 1EAFD42462; Fri, 13 Jan 2023 10:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1673607087; bh=tFvGULUm14+dr5KO0r2GXMUhnj28fQz3V85nCFyfxVI=; h=From:To:Cc:Subject:Date; b=pi/O7iWY9cFHNORSpJiiy9M8zhkG/X5AazwtO9IUn/A2ItgNETQzeMzCmRn84LvZn Z6nkOcTjBgYFpR8oawFJCANiQLg/HL6Tsaof8hgr3yzjEjVuHaRDpV1u7I/TqGrRbr y5PVQU1C9egFIIp+GVlDjGUs4kwqw+4zNEJbSeUvkpKYA2qBZqc8AzacSj0cgmyGWn DEyj3f/qZ3Ijv96IbpSotKdzgrEDCf6Tqyya5SrSkBdDEf84Qd16G4kv0M7j+CJPyo KDic7lt17YwKkHWOF+C/HC0KXbvpnjcmjG70bjeJ4nmRe48MimOrd15xuhGw6rDnUF vOvHuNQAsW3bQ== From: Hector Martin To: Joerg Roedel , Will Deacon , Robin Murphy Cc: Sven Peter , Alyssa Rosenzweig , Janne Grunau , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, iommu@lists.linux.dev, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hector Martin Subject: [PATCH 0/7] iommu: dart: Apple t8110 DART support Date: Fri, 13 Jan 2023 19:50:23 +0900 Message-Id: <20230113105029.26654-1-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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?1754904446307750735?= X-GMAIL-MSGID: =?utf-8?q?1754904446307750735?= Hi all, This series adds support for the T8110 DARTs used for the Thunderbolt controllers on T600x SoCs and everywhere on T8112 SoCs. This new DART revision shuffles the registers around and removes support for multiple TTBR registers per SID (which never made sense on 16K configurations), but otherwise works much like the existing DART hardware. The pagetable format is the same as t600x, so no changes are needed there. Once reviewed, I'd like to merge patch #1 through the Asahi-SoC tree so we can start using it in device trees right away, instead of waiting for one release cycle. Patches #2 onwards should go through the IOMMU tree. v2: Addressed minor review comments (style nits and minor fixes). Hector Martin (7): dt-bindings: iommu: dart: add t8110 compatible iommu: dart: Add suspend/resume support iommu: dart: Support >64 stream IDs iommu: dart: Support a variable number of TTBRs per stream iommu: dart: Fix DART_PARAMS1/2 bit define names iommu: dart: Support different variants with different registers iommu: dart: Add t8110 DART support .../devicetree/bindings/iommu/apple,dart.yaml | 1 + drivers/iommu/apple-dart.c | 557 ++++++++++++++---- 2 files changed, 448 insertions(+), 110 deletions(-) --- 2.35.1