From patchwork Tue Jan 11 07:40:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen-KH Cheng X-Patchwork-Id: 12709570 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 228A7C433FE for ; Tue, 11 Jan 2022 07:40:54 +0000 (UTC) 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=EORZ+UoNRo27M1z+rTaGag0MR1MXKI8D7NMEFR6ZjrM=; b=bwlhKzq5Pof1Q8 rnLbnu9wd4aDteSC87xl8wWx4RIw52JKANyHFLjoz7WYgYIrP4h8YgLUx+bWMKS0myu2E/nhAGTjx dBDXhzkNF3000L7QjOmpRQ441uP6yKZCf1it5VzzQJbdqDTyaMXkfDDBoIM3zS6z2gO6edQ6Y/fP9 pm3YraYZ9rYPvd3I3nrFEFlWq8cDuMgzhGVceMW0o6FckdXpmFITm+hqwKnQZWOA/2f/OJX4sA4aX 9/9Jn9bOMJS26658vOv2RnOUrrei0Qy8h/dbswBg//ihFJIayTRy17rH4L8jcV5kfHoTZ1yEc2N/A Jm38SYl8BpV5eXWiIb7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7Blu-00F8PZ-5x; Tue, 11 Jan 2022 07:40:46 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7Blh-00F8Lv-9m; Tue, 11 Jan 2022 07:40:34 +0000 X-UUID: a8b9e2d7bb9746149a5108a130b49275-20220111 X-UUID: a8b9e2d7bb9746149a5108a130b49275-20220111 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 173154384; Tue, 11 Jan 2022 00:40:29 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 Jan 2022 23:40:27 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 11 Jan 2022 15:40:26 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 11 Jan 2022 15:40:26 +0800 From: allen-kh.cheng To: Jassi Brar , Rob Herring , Matthias Brugger CC: Linux-ALSA , , , Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , "Mark Brown" , Jaroslav Kysela , Takashi Iwai , , , , , , , Allen-KH Cheng Subject: [PATCH v11 0/2] This patches provide ADSP IPC support for MT8195 Date: Tue, 11 Jan 2022 15:40:23 +0800 Message-ID: <20220111074025.22633-1-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220110_234033_371758_3CB54576 X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen-KH Cheng Mediatek ADSP IPC is used to send notification or short message between processors with dsp.ยท It will place the message to the share buffer and will access the ADSP mailbox registers to kick dsp. Two mailboxes used to send notification or short message between processors with dsp changes since v10: - split up v9 into two separate submissions https://patchwork.kernel.org/project/linux-mediatek/patch/20220111071011.5964-1-allen-kh.cheng@mediatek.com/ changes since v9: - rename adsp_mbox_chan_ops to mtk_adsp_mbox_chan_ops changes since v8: - remove struct adsp_mbox_ch_info - add get_mtk_adsp_mbox_priv - use mtk_adsp_mbox_priv va_mboxreg address in adsp mbox driver - add struct mtk_adsp_mbox_cfg for DSP mbox register offset - remove adsp mbox register offset hard code define - remove mtk-adsp-ipc.h reference in adsp mbox driver changes since v7: - add mtk prefix for adsp ipc functions - rename adsp_mbox_ch_info to mtk_adsp_mbox_ch_info - remove incorrect reviewers in commit message changes since v6: - dt-bindings: change example dtsi node. - rename config MTK_ADSP_IPC_MBOX to MTK_ADSP_MBOX - remove unused variable - add reviewers changes since v5: - remove some redundant code changes since v4: - use switch ... case in adsp_ipc_recv - add error handling path for chan_name pointer - refine some code to be concise changes since v3: - reorder MTK_ADSP_IPC_MBOX config - remove some redundant code - remove lock in mtk-adsp-mailbox changes since v2: - separate adsp_mailbox into two instances changes since v1: - fix dt_binding_check error Allen-KH Cheng (2): dt-bindings: mediatek: add adsp-mbox document mailbox: mediatek: add support for adsp mailbox controller .../bindings/mailbox/mtk,adsp-mbox.yaml | 52 ++++++ drivers/mailbox/Kconfig | 7 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mtk-adsp-mailbox.c | 176 ++++++++++++++++++ 4 files changed, 237 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/mtk,adsp-mbox.yaml create mode 100644 drivers/mailbox/mtk-adsp-mailbox.c