From patchwork Fri Aug 3 05:29:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 10554561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79A77139A for ; Fri, 3 Aug 2018 05:29:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BB382C37C for ; Fri, 3 Aug 2018 05:29:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ED642C3B0; Fri, 3 Aug 2018 05:29:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 500CA2C37C for ; Fri, 3 Aug 2018 05:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject: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=U+ddsit49Xs+//gjpalkcR4hmzcjbYAjGGefh55DpXg=; b=UWv EVtUG4quzJq0wfVjVMge1Q8FDWIV0Q6kMGcz1H1EnIPVVELzod7VebwMp3B6wdXc0P8gsh9S4BTgx fBdrR1oYaxUcqGLKSizoC2tPQvAxGKjBtphXPeXQ/8PC1DOVU0zixNydl10+QnjkFDYcqu9yHJonK rS/sLV3pA0b1UTZ9JfTfqLEyxH3X8FVUj5RQiCwPj9jeoAhKbiY0V/PUjwHY8suajhAf3jSU99ZTW oOJtii/bv/6puiQh6+aryMCy5BpBkP1xdiYlA1LwfCP69EY1oeOZs7xi8EKCUJ7/o9ab2vrMWA/YW JXbbc8S6CmpctLma/OQSpFtuyZ01ZpQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flSeu-0006M4-Vn; Fri, 03 Aug 2018 05:29:52 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flSej-0006AD-9w for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2018 05:29:43 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1flSeP-00004x-AI; Fri, 03 Aug 2018 07:29:21 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.91) (envelope-from ) id 1flSeO-0000EE-9C; Fri, 03 Aug 2018 07:29:20 +0200 From: Oleksij Rempel To: Shawn Guo , Fabio Estevam , Rob Herring , Mark Rutland , "A.s. Dong" , Vladimir Zapolskiy , Jassi Brar Subject: [PATCH v10 0/4] add mailbox support for i.MX7D Date: Fri, 3 Aug 2018 07:29:15 +0200 Message-Id: <20180803052919.820-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.18.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180802_222941_511030_DB9CDF55 X-CRM114-Status: GOOD ( 14.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oleksij Rempel , dl-linux-imx , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 20180803 changes v10: - imx-mailbox: apply Vladimir's review 20180802 changes v9: - DT: remove notes about shmem - imx-mailbox: reword changelog - imx-mailbox: use tasklet instead of workqueue - imx-mailbox: remove imx_mu_last_tx_done - imx-mailbox: move irq_desc to probe - imx-mailbox: change (const == var) to (var == const) 20180731 changes v8: - imx-mailbox & DT: rework driver from 4 channel bidirectional mode to 16 channel unidirectional mode. 8 extra channels are implemented on top of General Purpose Interrupt bits provided by this MU. 20180726 changes v7: - DT: add i.MX6SX and i.MX7S to the documentation. - imx-mailbox: don't use devm_ functions for startup and shutdown. - imx-mailbox: rename imx_mu_rmw to imx_mu_xcr_rmw and add locks - imx-mailbox: pass of_property_read_bool directly to side_b 20180722 changes v6: - include one more patch provided by Aisheng - DT: add fall back compatible fsl,imx6sx-mu - imx-mailbox: for now, use only fsl,imx6sx-mu 20180721 changes v5: - DT: revert most of the changes from previous version - imx-mailbox: remove struct imx_mu_cfg - imx-mailbox: remove !! from imx_mu_last_tx_done() 20180718 changes v4: - DT: change fsl,mu-side-a to fsl,mu-side-b - DT: split the patches. - DT: add all currently known SoCs. - imx-mailbox: free allocated irq name on channel shutdown - imx-mailbox: rename *_imx7 functions to *_generic 20180715 changes v3: - DT: remove prosaic part of documentation. It describes software or firmware specific usage and not relevant for HW description. - DT: use -mu instead of -mu- and add fsl,mu-side-a parameter. - DT: add most of know i.MX variants with MU - imx-mailbox: use macros instead of precalculated bit index. - imx-mailbox: remove warning message for clk. - imx-mailbox: use imx_mu_chan[%idx] for devm_request_irq. - imx-mailbox: depend on ARCH_MXC instead of SOX_IMX7 20180615 changes v2: - DT: use mailbox@ instead of mu@ - DT: change interrupts description - clk: use imx_clk_gate4 instead of imx_clk_gate2 - imx-mailbox: remove last_tx_done support - imx-mailbox: fix module description This patches are providing support for mailbox (Messaging Unit) for i.MX7D. Functionality was tested on PHYTEC phyBOARD-Zeta i.MX7D with Linux running on all cores: ARM Cortex-A7 and ARM Cortex-M4. Both parts of i.MX messaging Unit are visible for all CPUs available on i.MX7D. Communication worked independent of MU side in combination with CPU. For example MU-A used on ARM Cortex-A7 and MU-B used on ARM Cortex-M4 or other ways around. Dong Aisheng (1): dt-bindings: arm: fsl: add mu binding doc Oleksij Rempel (3): dt-bindings: mailbox: imx-mu: add generic MU channel support ARM: dts: imx7s: add i.MX7 messaging unit support mailbox: Add support for i.MX messaging unit .../devicetree/bindings/mailbox/fsl,mu.txt | 54 +++ arch/arm/boot/dts/imx7s.dtsi | 19 + drivers/mailbox/Kconfig | 6 + drivers/mailbox/Makefile | 2 + drivers/mailbox/imx-mailbox.c | 358 ++++++++++++++++++ 5 files changed, 439 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/fsl,mu.txt create mode 100644 drivers/mailbox/imx-mailbox.c