Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1664996pxb; Thu, 16 Sep 2021 12:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy83p6ijevfV6LZTK6DbKa3w8X9VhrXOnVO+gy70ij6hYReB47e89Ue9f48ClrB/if56YkE X-Received: by 2002:a05:6402:2317:: with SMTP id l23mr8321252eda.265.1631820261350; Thu, 16 Sep 2021 12:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631820261; cv=none; d=google.com; s=arc-20160816; b=j0b/u6hbii3ljPScU3R/Eyy5wcSmC5OMykIn1FUkiX8wGRMClz4hQnvwFFqh2wZwxv /v5Yekzo+sOWjO+FAJu+p4vmJbYhZ1D105ggJCROxnFRCPcdr09QG5UdkXwC7hqZxTHR lmAtzvCpAqOIswWyM0GdRqqI/1zX2qxC15QHtZgoBf3HLcE7mhv/BMIm4NpWOpz7wPZ/ w+VfZNCAWWm6UlAEBaBkTADY6iYJXiJ6M+NsehzczTr8qpQp/HzMohHtwcpTD8T069Y9 XTLtRgO1ctY8fXQkA0ZLE5FKsy++5KvLuSpM/N1DEgVfY4TXXZOvdRLh/EVZicOa5GiE KMhA== 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 :dkim-signature:dkim-signature; bh=BNA7XueGS4EcjJpb+FohU751G4Q7+7zTT639WGDJM7g=; b=mWmXF6tvgCuGxO6pBLaS7dVfe6b/3ATkbZgViuhqJbiIjZNNk8tpXNsNSkIxzgQVyD GosImx8vGAlxsypf9k/5bcfMDrw440kLmiIPvdcsq7P468hCur6eAh/nW6Laq7nZUE5/ Xw0/JxaRkWwR+bRDWOcvVZb27hFl2J39WUWz4Kef3AWfNoqxaKimCt9rPFRPP2BHsIeu Ju02Pny4kVemyiOzHqzkbzQ/NjMrQlyXDwUSb2AD+22gUmTcJQ6+Az6zncnYM859l35j Y/tjdPq+yqhtnLH7NhYeK0onDsX27MIyQhnXNCqy5qVMH26BKv1lmeQABF/+9Hq77LPA iKpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=WLnhqLOX; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JDCTqI4F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e29si4901471ejl.320.2021.09.16.12.23.55; Thu, 16 Sep 2021 12:24:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=WLnhqLOX; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JDCTqI4F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240238AbhIPPvN (ORCPT + 99 others); Thu, 16 Sep 2021 11:51:13 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:59435 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239976AbhIPPuz (ORCPT ); Thu, 16 Sep 2021 11:50:55 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 77AF5580E7D; Thu, 16 Sep 2021 11:49:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 16 Sep 2021 11:49:34 -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=fm2; bh=BNA7XueGS4Ecj Jpb+FohU751G4Q7+7zTT639WGDJM7g=; b=WLnhqLOXsryMiXOAprTv33BBt27e2 GM684KPYillnTvvMgWZB5QdXqboVi4k4ZdX4Ky8plYHdh2IqxUZ1d8cOWhxHOS4U oov0BhPhiD2AH1AgxU4BlSi3jpmxmgppX8sQX+mA6QOOSexBSgPL66aSz0kF7SWl Z0wgLt1bZbT/PKV2kVLEPQ6/ux6/spSUw8LNAQDQj3PgeMd6EeKDyofyDxoSO7fi mVuKt/ZO1SXj7xN221Q/uoZZG96t3yzGJb0DSdGleSmTEBBcqeeNojcEJtc5Eu1V vUt4CMWfOX/b3M+tHietSfTcKHta1guZxRiskKjsCDRrKEB7zCPmNu0NQ== 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= fm3; bh=BNA7XueGS4EcjJpb+FohU751G4Q7+7zTT639WGDJM7g=; b=JDCTqI4F d66G9QzRTzEum0XYlmwkgbJW23OTEnFk56mpJhEdir67JdixorUijkbixJXa5cU8 e/YFHScsA+1JFcNridJGnXl/TVFMNoKKGRScvMY/SnjQ67JpHhoqMy7qs05cdpOb sq+/Oy/A4xrnImnokdE0cOlBoDp3kCPGFJGo8g6CF1kQEpSrjPl0Kwc6AI12YSOJ PHcwIuR/2YyMYDH2oZoGiIH1n5NfRbkD9XkHwNNHToYQORcvAqQ4OR1G2m3lqM9m b0hT2Ovc0STY3nMv2ZUQevtgvFQIuXuKxHvDFVtAPhwrOrw3GvYiolNn7k6dVEsI P1uV0Rr6NZmTvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcu rfgvthgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvg hrnheptefgjedtjeejffelleejleehtdetvedujeelhffgieehgeduueehhfegueeuhfdv necuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghdpohhfthgtrdhnvghtpdhgih hthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 11:49:31 -0400 (EDT) From: Sven Peter To: Jassi Brar Cc: Sven Peter , Rob Herring , Mark Kettenis , Hector Martin , Alyssa Rosenzweig , Mohamed Mediouni , Stan Skowronek , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Kettenis Subject: [PATCH v2 1/2] dt-bindings: mailbox: Add Apple mailbox bindings Date: Thu, 16 Sep 2021 17:49:10 +0200 Message-Id: <20210916154911.3168-2-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210916154911.3168-1-sven@svenpeter.dev> References: <20210916154911.3168-1-sven@svenpeter.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Apple mailbox controller are found on the M1 and are used for communication with various co-processors. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Mark Kettenis Signed-off-by: Sven Peter --- .../bindings/mailbox/apple,mailbox.yaml | 84 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 85 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml diff --git a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml new file mode 100644 index 000000000000..79b0cef08232 --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/apple,mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple Mailbox Controller + +maintainers: + - Hector Martin + - Sven Peter + +description: + The Apple mailbox consists of two FIFOs used to exchange 64+32 bit + messages between the main CPU and a co-processor. Multiple instances + of this mailbox can be found on Apple SoCs. + One of the two FIFOs is used to send data to a co-processor while the other + FIFO is used for the other direction. + Various clients implement different IPC protocols based on these simple + messages and shared memory buffers. + +properties: + compatible: + oneOf: + - description: + ASC mailboxes are the most common variant found on the M1 used + for example for the display controller, the system management + controller and the NVMe coprocessor. + items: + - const: apple,t8103-asc-mailbox + + - description: + M3 mailboxes are an older variant with a slightly different MMIO + interface still found on the M1. It is used for the Thunderbolt + co-processors. + items: + - const: apple,t8103-m3-mailbox + + reg: + maxItems: 1 + + interrupts: + minItems: 4 + items: + - description: send fifo is empty interrupt + - description: send fifo is not empty interrupt + - description: receive fifo is empty interrupt + - description: receive fifo is not empty interrupt + + interrupt-names: + minItems: 4 + items: + - const: send-empty + - const: send-not-empty + - const: recv-empty + - const: recv-not-empty + + clocks: + description: + Reference to the clock gate phandle(s) if required for this mailbox. + Optional since not all mailboxes are attached to a clock gate. + + "#mbox-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - interrupt-names + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + mailbox@77408000 { + compatible = "apple,t8103-asc-mailbox"; + reg = <0x77408000 0x4000>; + interrupts = <1 583 4>, <1 584 4>, <1 585 4>, <1 586 4>; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index cad1289793db..47de27282c98 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1720,6 +1720,7 @@ C: irc://irc.oftc.net/asahi-dev T: git https://github.com/AsahiLinux/linux.git F: Documentation/devicetree/bindings/arm/apple.yaml F: Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml +F: Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml F: arch/arm64/boot/dts/apple/ F: drivers/irqchip/irq-apple-aic.c -- 2.25.1