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: 12564191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1521BC433F5 for ; Sun, 17 Oct 2021 11:42:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C2CC260FE3 for ; Sun, 17 Oct 2021 11:42:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C2CC260FE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=svenpeter.dev Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=wK6pKQI7b84uZILTU2fnp0hSw41mwRIHzPrqy1J3geU=; b=cN/DTHW6WcoCxB UYjV2sdbcE00Itk0lpdyvPqBJoaz734B/ISuishAZEaBoqKCi/eQWIH2UmOv7hM77fluZmjw1+F3X smRPFCan54AaOWBfexDatJM25lU0CEDKT9Cz1vQjA6uvMcqykW0CkbUPv3T5EayQiafsRlTPJBh1R 7CX24k+uJreWN5LmgJVU1L9nPGu3egPx3aTHPDtNtZgsSXi2GVG0jDpwH7sFi8LGvzwwAVa1IZJeM M8IFVo43r2P8KzmwmxA2HbqXGOzCEM/Ry7SmVmaQfbpSvn2vxO0ydAcB9obLgTg46GXFmBqIDyRCk +dAhsqQFQUyKzmJDJyTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mc4XO-00CFgY-1f; Sun, 17 Oct 2021 11:41:10 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mc4XK-00CFf7-0u for linux-arm-kernel@lists.infradead.org; Sun, 17 Oct 2021 11:41:07 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211017_044106_160878_8736F644 X-CRM114-Status: GOOD ( 13.25 ) 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 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