From patchwork Mon Nov 29 06:39:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen-KH Cheng X-Patchwork-Id: 12643687 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 C3423C433EF for ; Mon, 29 Nov 2021 06:40:33 +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=eCFlEaCXA3ftjbGJQov+lfe8xp6nf84d/TL01ArAmLM=; b=fizd3dTj2HY6tM AIHAiA0SyWJo50P4vVQOTN4vQmjGqZdPjzzLFbUzGcA4ve0SLZ6/dkOAMcYNB0ulzoDG302qp6fJP iXuobmVbktrrCwRhazV/8wb3j36kM2e680g91x2ZjzrNaPR4ZTnJjByz4wsFIZiJXMrt6MOyhmxB5 K36Hs8v6ySqhbpD9FM32caPYz9VRanp7RrMW2d7TjMctsp+UOWfRUY1N7VrqSK2ruon2Gliwh2Esl Ub951ENzfQDZ5fljFu0dIyvjUrK6XHR//0zwE65+FU0pTXU5qpHsY79dCR7c2QCKNsFfHgdDWB0mV PaVX3VNGtih/m9yBCHTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mraKu-00HTDE-1Q; Mon, 29 Nov 2021 06:40:24 +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 1mraKf-00HTAD-6j; Mon, 29 Nov 2021 06:40:12 +0000 X-UUID: 6a7a1abf5f8a45088cad817b1b996194-20211128 X-UUID: 6a7a1abf5f8a45088cad817b1b996194-20211128 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 1653550184; Sun, 28 Nov 2021 23:40:04 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 28 Nov 2021 22:40:02 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 Nov 2021 14:40:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 29 Nov 2021 14:40:00 +0800 From: allen-kh.cheng To: Mark Brown , Rob Herring , Matthias Brugger , Jassi Brar CC: Linux-ALSA , , , Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , , , , , , , Allen-KH Cheng Subject: [PATCH v7 0/3] This patches provide ADSP IPC support for MT8195 Date: Mon, 29 Nov 2021 14:39:51 +0800 Message-ID: <20211129063954.1616-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-20211128_224009_298712_3A4D2CBA X-CRM114-Status: GOOD ( 10.94 ) 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 v6: - dt-bindings: change example dtsi node. - change 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 (3): dt-bindings: mediatek: add adsp-mbox document firmware: mediatek: add adsp ipc protocol interface mailbox: mediatek: add support for adsp mailbox controller .../bindings/mailbox/mtk,adsp-mbox.yaml | 52 ++++++ drivers/firmware/Kconfig | 1 + drivers/firmware/Makefile | 1 + drivers/firmware/mediatek/Kconfig | 9 + drivers/firmware/mediatek/Makefile | 2 + drivers/firmware/mediatek/mtk-adsp-ipc.c | 138 ++++++++++++++ drivers/mailbox/Kconfig | 7 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mtk-adsp-mailbox.c | 175 ++++++++++++++++++ .../linux/firmware/mediatek/mtk-adsp-ipc.h | 70 +++++++ 10 files changed, 457 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/mtk,adsp-mbox.yaml create mode 100644 drivers/firmware/mediatek/Kconfig create mode 100644 drivers/firmware/mediatek/Makefile create mode 100644 drivers/firmware/mediatek/mtk-adsp-ipc.c create mode 100644 drivers/mailbox/mtk-adsp-mailbox.c create mode 100644 include/linux/firmware/mediatek/mtk-adsp-ipc.h