From patchwork Mon Oct 25 06:22:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 12580767 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 B8170C433F5 for ; Mon, 25 Oct 2021 06:23:45 +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 6CDBF60C4B for ; Mon, 25 Oct 2021 06:23:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6CDBF60C4B 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=Jwupj5GW+xD6M+Nuhr4x0AXz5M+tejx7hM8ksZu+U8c=; b=NX7rJmD2e/7Geu Vy1yYv8+mGYtnzAH0PQvMgTwbMilDgEIrhneGktvVCSQI7hsNv4NhxD57XFj2f5ifwpOD7xKFYF1w q5YpgFb47KFyMiwLT8eYZg4HjIWbUABrpXioR89YNnOYLOqLdvn968+fDOETCiXISLiAR+R3x09Jy 9iwtzeb8RF+Z+6+SQXKHLT+BGLGUvj8XiEyC+liybjmopymHXpWKTqU2KdkEdGBFSF1K0OLwyDXeg tTpATGsqArChQA2mjG0+DJRHXIaNN4auVRsbsyVyybdVIsaw4DaGwaanMsL8sCGQyWulJ+bl5VfqA L15jbHewNX/j6djj4mMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1metND-00FNwo-Fx; Mon, 25 Oct 2021 06:22:19 +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 1metN9-00FNvJ-Cm for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 06:22:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 79FC55806AD; Mon, 25 Oct 2021 02:22:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 25 Oct 2021 02:22:10 -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=9RV4sajVRAaiAxkMiEO963Z9/Y vQEWTOabZurBq9fI8=; b=kGnE+jYGDXymV4Xiq/7FGXrq+67VDY0XxdLHWYuMtH 1cKQ1cpf0U8X+B3KInfwu++Mm7WJUBMUSiDBMrE8Jo5ysrfmS7UMrE6SfyqyNLuA 5Y3xxQU7t07OE2d7cZ7TiSfs33vb5NgTDPxZccpA7VA4/8L5kG4JUpZ/fPNdxIWc RKum05p8hqtblBp0BBEwL8zbYIHX/quGV9mthxf9kOe0+S/ZVJhXKmwyMzheuzI2 eDXPGY2Ky5IP6WIA2dOrTcyjnaI/xMbE8eONIkGFoNuH2yJ0AjHLIRFUKkrn3wTl APEYiNf+WKyu54z/0JGFHCKlTqdaXYd0l3bZcEGOqWcg== 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=9RV4sajVRAaiAxkMi EO963Z9/YvQEWTOabZurBq9fI8=; b=MGLFb95lUZQ4zLy3lEE6UiV+ce1c1OVLf gmW6IucM6BQbnAC5HhqKxKI+k94l45jrJvFhqbQ0BpYqfNcCmiTAmeIigzLSlrG+ 0RIPVSh+D2WCAIFflT2Gn4fEfvV3DXuL8Cq2SKqhaXtT6/pXF+xbH1NUz7lsKGSS 6ERNQDMOL+W6dUdTrBR0lszjsu7GM4UgffpHWlY9d7rf4EShcxiA5jpjMyZ7k8U1 1jtRYMphBjzacLBAjr35gRFgrnWYDdoosTpbOdyCaqWxlX9wTwplgooBljtOBuMi 9h2asNz7FXkT4FoGSKlgigIlOLrUihIJItwCM1dI4T3qiQSYqGUPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefgedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufhvvghnucfr vghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtthgvrh hnpeefhedufedtvdfhhedvudehtdejjeehueduffdtgfdvkedvleelueevlefgfeelgfen ucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepshhvvghnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 02:22:07 -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 v4 0/3] Apple Mailbox Controller support Date: Mon, 25 Oct 2021 08:22:01 +0200 Message-Id: <20211025062204.1517-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-20211024_232215_532583_72D548B1 X-CRM114-Status: GOOD ( 14.33 ) 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 fourth 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/ v3: https://lore.kernel.org/lkml/20211017114054.67737-1-sven@svenpeter.dev/ Changes from v3 to v4: - dropped minItems: 4 from the bindings - added back of_xlate since the mailbox core only supports #mbox-cells = <1> but this mailbox uses #mbox-cells = <0> - Split of the MAINTAINERS changes to a separate file since we have quite a few changes in flight and there will likely be conflicts once the pull requests from various subsystems are sent to Linus 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 (3): MAINTAINERS: Add Apple mailbox files dt-bindings: mailbox: Add Apple mailbox bindings mailbox: apple: Add driver for Apple mailboxes .../bindings/mailbox/apple,mailbox.yaml | 77 ++++ MAINTAINERS | 3 + drivers/mailbox/Kconfig | 12 + drivers/mailbox/Makefile | 2 + drivers/mailbox/apple-mailbox.c | 384 ++++++++++++++++++ include/linux/apple-mailbox.h | 19 + 6 files changed, 497 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