From patchwork Sun Oct 17 11:40:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 1542208 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=svenpeter.dev header.i=@svenpeter.dev header.a=rsa-sha256 header.s=fm2 header.b=agE/4yPW; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=dXoLsck6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HXJ471255z9s0r for ; Sun, 17 Oct 2021 22:41:11 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245559AbhJQLnP (ORCPT ); Sun, 17 Oct 2021 07:43:15 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:45985 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245557AbhJQLnO (ORCPT ); Sun, 17 Oct 2021 07:43:14 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 350085809EC; Sun, 17 Oct 2021 07:41:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 17 Oct 2021 07:41:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=oVwR6ZNCF0pl35RXfL/Vp70eAL gzGMiQJxoZOvGeINU=; b=agE/4yPWgJM2oer54f+GTUXuQPJh3csvRIkLwTGr1Q fQwlkVmP9XA7ZmMuLsDRiOw6SqV6mW4Arf+qiGXjaNucO3y0Q1oI9wCrikWGYaxn 3WKVyAfF4BIFVu/uazbeMnFXVW9xgJW6F5LAA61OwIrvjNLrEudfqYxQn6huT63w kD3qzm4q7K7m9fvW7gYIz/yBdp7bXcP//82UEKEVDhWr4QhduGnmMWDo+CYrF84z L7fup9piLr6LZBc9s+B4CCAEGQtHvADpA8IEen8/ZlSlzTLn35yRhlE/oYuEaNRD hMLUDcJdSoFFiN7WwQBJI7S9xgRKY1C64s46JoUkpGzQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=oVwR6ZNCF0pl35RXf L/Vp70eALgzGMiQJxoZOvGeINU=; b=dXoLsck6PSFmUmpHXxLay3tG8gxmDrTd9 pSrcEvwuU+uTIq4ocFY5MBGxdRBjaiENfnmRCoD0/xW7MaXaWYEplxNZw0f6d5/K GMD1bJPbX6S8tEu9h5iSYx4u/R3bgLVrfRCZ0gnXVWK+wynvlGAee5jZBkhoM/15 ttKhGoUuz0oq3gwR8sak8lxfK1lMb/pn5WtJeKxW53fB4HX4ELUTzCwb5EzrH9bF 4dVc09nmiZKf8kq3ZPif/gMB/hJ4v/FuzPZsSvuiAb8WHfVCRTHYEvj1de1S4tPo 5QRHqshjZwEfancVbO+TIUSnVKWMu+OpPd4BHLRcjZPJ6592QNk+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddukedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcurfgv thgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvghrnh epfeehudeftddvhfehvdduhedtjeejheeuudfftdfgvdekvdelleeuveelgfeflefgnecu ffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 17 Oct 2021 07:41:02 -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 Subject: [PATCH v3 0/2] Apple Mailbox Controller support Date: Sun, 17 Oct 2021 13:40:52 +0200 Message-Id: <20211017114054.67737-1-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, This is the second version of my series which adds support for the mailbox controllers found on the Apple M1. v1: https://lore.kernel.org/lkml/20210907145501.69161-1-sven@svenpeter.dev/ v2: https://lore.kernel.org/lkml/20210916154911.3168-1-sven@svenpeter.dev/ Thanks again to Jassi and Mark for the review. I've addressed your comments with the following changes from v2 to v3: - removed dma barriers since the mbox client will take care of these - moved the of_device_id table and related code to the bottom of the file - removed of_xlate - dropped clock handling from the code and the binding since we now understand that these are actually power domains Changes from v1 to v2: - switched to txdone_irq instead of introducing a new mode - switched to a threaded interrupt handler for receiving messages - added co-processor examples to the device tree binding - reformatted the register defines and clarified multiple comments Best, Sven Sven Peter (2): dt-bindings: mailbox: Add Apple mailbox bindings mailbox: apple: Add driver for Apple mailboxes .../bindings/mailbox/apple,mailbox.yaml | 79 ++++ MAINTAINERS | 3 + drivers/mailbox/Kconfig | 12 + drivers/mailbox/Makefile | 2 + drivers/mailbox/apple-mailbox.c | 374 ++++++++++++++++++ include/linux/apple-mailbox.h | 18 + 6 files changed, 488 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml create mode 100644 drivers/mailbox/apple-mailbox.c create mode 100644 include/linux/apple-mailbox.h