From patchwork Sun Mar 28 07:40:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 12168875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C894C433C1 for ; Sun, 28 Mar 2021 07:42:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 990FF6196D for ; Sun, 28 Mar 2021 07:42:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 990FF6196D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=svenpeter.dev Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=oesPS2ttA36YD0i35n2hNVl6eNYbYLk1AvVfP1dTE1c=; b=RAAwDvYUZbusXAf5TtsXNjMPU MjoSxi0dFdOPmS8whAqnHQLqpndweZI/nmWo8/gAB/UET5zZoq81rE0ICk3fKcm4q0/qdfZmJkVUl SLHsfF82X9SeQ2yXV7D6F7k4nNL0q3Vx4TJFC9C9dA6DTJWnxHoVxpwyCkArcq9CEPiJiE576R1Yw CeLeY7ts+mjlXGDuE4wMhgMu+1msTi02yjsABi2SvGOQlx4VM8nsMnRYUbfMU9jsxpH62UrRoIQC0 OWfpGFjz66gXGJOLv+TGnRd9JzA4CtIeBvtK7gWbDtXpRMHWc/Fpq1fYicx8VsDRlP2qXfhX8ogGF 5Q6Fp1GCg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQQ2j-005yVI-VL; Sun, 28 Mar 2021 07:41:06 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQQ2N-005yTS-3u for linux-arm-kernel@lists.infradead.org; Sun, 28 Mar 2021 07:40:47 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 73EFF580836; Sun, 28 Mar 2021 03:40:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 28 Mar 2021 03:40:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=j4WtA/c99G3MW B2xtKbwx07LS76G+wGQ7cjL4klOJIc=; b=xrYi3SfvW8aBnh9hh/PojnH7f5ET7 PYua1UQ5hZUr/xP6I2ntLUHRvGl2BD6d3KBYId4Mj8QBcJJDyrOc6CeSVvRAO6Zh 34e+oyHSg40Br8u17I/qlohjprXZ9UZG7sZNmbhj3ltVqd1Ks1+LvJCiMDfuuJdQ 7Y5iO8fJPzLk3X6FnQTiBUxnZ1p80xrUbynmMoBe9OCPYwK9MMyrsE94rb6a+dTj 6wIXZtIcdak2e+TyMat7JFrL/87pwjVZuqfxfKm6B6m8Rjk3KMcowu0KWBdGGVSz /y+IK6G8HTfvan0gtYRHcqzxqzoxnHtjDJbDsEuYhuMooF2BwP7SmuHSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=j4WtA/c99G3MWB2xtKbwx07LS76G+wGQ7cjL4klOJIc=; b=OMYAYvBr oUItYXlkSL4/itO01lmVEhWwQ+Rr80AAkqwRR3GnVwHamShAf5sRwJszig+SvRP+ ZoUpMrJrmjuA036Dd4H/xZ0uXz2JfE+lgahkTHdz7qLEg0TRcLrWrNX4iUeyOvSl 0AcA4mWkX2UOostSZ7VILS0Ft0N4a54kn7FEOe/gEY1bMOvTzWNI0L/FyD/DJVhl bossRSoou8s6vlGVcazMXfc2o/F+K0ZxcnTxRcbHRscuSYDeGBlrEhPck2V4dD0k 29Sfx3r2muEl/MA6oI6YS7HtcAhU/d10Dy2kIR3yench0viSBg+qtqX7lwhxrTh/ YJn1tssWpy+qxg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudehhedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufhvvghn ucfrvghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtth gvrhhnpefhfeffjedvkeeliedtffeihffhffevffeijeetfeehuddtgffffedtjeehtdet heenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecukfhppedujeeirddule elrddvuddtrdduheeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepshhvvghnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: from localhost.localdomain (ip-176-199-210-156.hsi06.unitymediagroup.de [176.199.210.156]) by mail.messagingengine.com (Postfix) with ESMTPA id 8E4E4240057; Sun, 28 Mar 2021 03:40:39 -0400 (EDT) From: Sven Peter To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring Cc: Sven Peter , Arnd Bergmann , devicetree@vger.kernel.org, Hector Martin , linux-kernel@vger.kernel.org, Marc Zyngier , Mohamed Mediouni , Stan Skowronek , linux-arm-kernel@lists.infradead.org, Mark Kettenis , iommu@lists.linux-foundation.org Subject: [PATCH v2 2/3] dt-bindings: iommu: add DART iommu bindings Date: Sun, 28 Mar 2021 09:40:08 +0200 Message-Id: <20210328074009.95932-3-sven@svenpeter.dev> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210328074009.95932-1-sven@svenpeter.dev> References: <20210328074009.95932-1-sven@svenpeter.dev> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210328_084043_405019_36F98932 X-CRM114-Status: GOOD ( 14.11 ) 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 DART (Device Address Resolution Table) is the iommu found on Apple ARM SoCs such as the M1. Signed-off-by: Sven Peter --- .../devicetree/bindings/iommu/apple,dart.yaml | 81 +++++++++++++++++++ MAINTAINERS | 6 ++ 2 files changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/apple,dart.yaml diff --git a/Documentation/devicetree/bindings/iommu/apple,dart.yaml b/Documentation/devicetree/bindings/iommu/apple,dart.yaml new file mode 100644 index 000000000000..c0b43d90c157 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/apple,dart.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/apple,dart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple DART IOMMU + +maintainers: + - Sven Peter + +description: |+ + Apple SoCs may contain an implementation of their Device Address + Resolution Table which provides a mandatory layer of address + translations for various masters. + + Each DART instance is capable of handling up to 16 different streams + with individual pagetables and page-level read/write protection flags. + + This DART IOMMU also raises interrupts in response to various + fault conditions. + +properties: + compatible: + const: apple,t8103-dart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + description: + Reference to the gate clock phandle if required for this IOMMU. + Optional since not all IOMMUs are attached to a clock gate. + + '#iommu-cells': + const: 1 + description: + Has to be one. The single cell describes the stream id emitted by + a master to the IOMMU. + +required: + - compatible + - reg + - '#iommu-cells' + - interrupts + +additionalProperties: false + +examples: + - |+ + dart1: dart1@82f80000 { + compatible = "apple,t8103-dart"; + reg = <0x82f80000 0x4000>; + interrupts = <1 781 4>; + #iommu-cells = <1>; + }; + + master1 { + iommus = <&{/dart1} 0>; + }; + + - |+ + dart2a: dart2a@82f00000 { + compatible = "apple,t8103-dart"; + reg = <0x82f00000 0x4000>; + interrupts = <1 781 4>; + #iommu-cells = <1>; + }; + dart2b: dart2@82f80000 { + compatible = "apple,t8103-dart"; + reg = <0x82f80000 0x4000>; + interrupts = <1 781 4>; + #iommu-cells = <1>; + }; + + master2 { + iommus = <&{/dart2a} 0>, <&{/dart2b} 1>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 9ac46317840b..f5397328fa1f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1236,6 +1236,12 @@ L: linux-input@vger.kernel.org S: Odd fixes F: drivers/input/mouse/bcm5974.c +APPLE DART IOMMU DRIVER +M: Sven Peter +L: iommu@lists.linux-foundation.org +S: Maintained +F: Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml + APPLE SMC DRIVER M: Henrik Rydberg L: linux-hwmon@vger.kernel.org