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: 405531 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 14152C433C1 for ; Sat, 20 Mar 2021 15:21:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C78C761951 for ; Sat, 20 Mar 2021 15:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbhCTPUo (ORCPT ); Sat, 20 Mar 2021 11:20:44 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:47114 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhCTPUS (ORCPT ); Sat, 20 Mar 2021 11:20:18 -0400 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 Reply-To: 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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