From patchwork Sat Mar 20 15:20: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: 12152525 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=-14.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 autolearn=ham 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 0B2B6C433C1 for ; Sat, 20 Mar 2021 15:21:43 +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 77A8961951 for ; Sat, 20 Mar 2021 15:21:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77A8961951 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:Reply-To:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:From:To:Date:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5LWAUPQs5pm4e83KfM8y1wrOIh7MWS2rhqNJloiJa6A=; b=gO9oMlmjKP7qWD/8BuqdrlhVK MCONGHkSgFOnkpjzJVU/Y4GR8Z+971eavpnVGrjNhNiusmgkPySPi9Em+UYBLFTDIMUrn1oy4ZdbR hVvFsNAlds8HpIpWQf0uWXp0sBnA+0vNGAsJHlj5IkL7ufn7+EZNhloQiACaRfDgr3DM6bYCuXV3C UrImSYU/SOja6QZIyGYVdnRIuT4WN0ViRMAw8A0LLHUwB5gF9G2LCAWCvXqXMc6x0R4SldFs8IAC1 UiLbcxwW8ZKUZryy52NBrzoou2nAxymtulZMyzCrQUKoZNyi93DqLk8JSabltf3jfcpMwiAp7L9tC efDkgCk5A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNdOn-008yJb-7F; Sat, 20 Mar 2021 15:20:21 +0000 Received: from mail-40134.protonmail.ch ([185.70.40.134]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lNdOj-008yJ3-GY for linux-arm-kernel@lists.infradead.org; Sat, 20 Mar 2021 15:20:19 +0000 Date: Sat, 20 Mar 2021 15:20:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; s=protonmail3; t=1616253616; bh=GOagsrEw4SsLChHE8bqUY6XXHswLBJsU8M1xRpDR/Ds=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=KeSAi5xxj8JV35umMvuVdhLCnkXdNmc1FJg13DceRY9y+ke3LFGuKi940tD9QfctT 9cz7qsJouqCq2S7gqnwS2yysEs145gQe7Visufh2rB5j1KEpKoJxuY9dE5cxXueRGZ mwE95gf7pZaGSAeRxFX8dF4/O76TDSxwm/US4tOevxHYeZwjJpGXIZNQCTMI1I5dW+ Y6lUFwnyUnE5HzboyzKtYBXz+2V4UPOHmT4OnpMfANF5FosIDgQf2yshTj32Q0Wuoo 93iccrC3DxKRvbNZQkhPX0MIplCxahVX/bvRusvQjYuaaheeQVZWtcb6lzTIOD5tER xovotgbJ8Bb3A== To: iommu@lists.linux-foundation.org From: Sven Peter Cc: Joerg Roedel , Will Deacon , Robin Murphy , Rob Herring , Arnd Bergmann , Hector Martin , Mark Kettenis , Marc Zyngier , Mohamed Mediouni , Stan Skowronek , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Sven Peter Subject: [PATCH 2/3] dt-bindings: iommu: add DART iommu bindings Message-ID: <20210320151903.60759-3-sven@svenpeter.dev> In-Reply-To: <20210320151903.60759-1-sven@svenpeter.dev> References: <20210320151903.60759-1-sven@svenpeter.dev> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210320_152017_630477_48F1AD85 X-CRM114-Status: GOOD ( 13.37 ) 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: , Reply-To: Sven Peter 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 --- .../bindings/iommu/apple,t8103-dart.yaml | 82 +++++++++++++++++++ MAINTAINERS | 6 ++ 2 files changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml -- 2.25.1 diff --git a/Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml b/Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml new file mode 100644 index 000000000000..2ec2d905a2ea --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/apple,t8103-dart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple DART IOMMU Implementation + +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 external to the CPU. + + Each DART instance is capable of handling up to 16 masters + mapped to up tp 16 different virtual address spaces with + page-level read/write access control flags. + + This DART IOMMU also raises interrupts in response to various + fault conditions. + +properties: + compatible: + const: apple,t8103-dart + + reg: + const: 1 + + interrupts: + const: 1 + + clocks: + maxItems: 1 + + '#iommu-cells': + const: 1 + description: + The number of the master connected to this DART. + +required: + - compatible + - reg + - '#iommu-cells' + - interrupts + +additionalProperties: false + +examples: + - |+ + dart1: dart1@382f80000 { + compatible = "apple,t8103-dart"; + reg = <0x3 0x82f80000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + }; + + master1 { + iommus = <&dart1 0>; + }; + + - |+ + usb_dart0: usb_dart0@382f80000 { + compatible = "apple,t8103-dart"; + reg = <0x3 0x82f80000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + }; + + usbdrd_dwc3_0: dwc3@382280000 { + compatible = "snps,dwc3"; + reg = <0x3 0x82280000 0x0 0x100000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&usb_dart0 1>; + #address-cells = <1>; + #size-cells = <0>; + dr_mode = "peripheral"; + }; diff --git a/MAINTAINERS b/MAINTAINERS index d5e4d93a536a..1f9a4f2de88b 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