From patchwork Thu Jun 27 08:12:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 11019115 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 1C41D924 for ; Thu, 27 Jun 2019 08:12:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DA37289CE for ; Thu, 27 Jun 2019 08:12:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 020B6289F4; Thu, 27 Jun 2019 08:12:55 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 51415289CE for ; Thu, 27 Jun 2019 08:12:55 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: 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: List-Owner; bh=/q6F+Rko8xhfPdOphB2LcqgC09//VOu+lQxQY0N5Eos=; b=rTyyzgOKVKb1gF sKTFTNH2V6AcKDIU0vnbShB/8DK5HS0MTUcP6TwfURN3cscCk3fdyAUPNrWiWYZi17FcbcvlOYJhG 6fUsS46SrDPxGaINztSNkwuMd33z2uH3zygAKhfXmZZXEnYOZ6FsSUDP6SQZ0THjdZarKrWNRXtdX ZsizELJ2mJnDsotMBxvIQQMszKjc4ei2m27xApTL7cTmHX/IWXhYr32wrpi7sOXBjjrHn4+s8dHdp EOtQ3wpbnxzgLY1KuyHw3ot0BK8hjeIc+rNz8na/dfazFODuxucRYRN7PeW73Q8LISvOdbAJFVFQO jCezMOh7IE39Si3jlLPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgPWY-0004KU-0m; Thu, 27 Jun 2019 08:12:54 +0000 Received: from mail-eopbgr60083.outbound.protection.outlook.com ([40.107.6.83] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgPW5-0003xj-Pw for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2019 08:12:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PCRdjCcIWaqAzo4AG385nDP9nPkFHnwY2N7r/L9eS08=; b=Kilx/2E5QUsjuGuXrIgX90sAFwclt/WgOIuvvr9IqAp0NwxSLTbi+Ts7KDOmiAHwKmDUNBLJZhNzTAzAMG94pkIUZZjOq2w5s0CsKILr9YLNQOKBnE/MKIRV1CnDOWmMk89nOzjvoLoNFsY1bZtkNIKUnL0fMHl+tSoRX9TvJFQ= Received: from AM6PR04MB5207.eurprd04.prod.outlook.com (20.177.35.159) by AM6PR04MB4453.eurprd04.prod.outlook.com (20.176.242.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.17; Thu, 27 Jun 2019 08:12:19 +0000 Received: from AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::9c87:7753:43b9:6d4a]) by AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::9c87:7753:43b9:6d4a%4]) with mapi id 15.20.2008.014; Thu, 27 Jun 2019 08:12:19 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" , "robh+dt@kernel.org" , "o.rempel@pengutronix.de" Subject: [PATCH v2 1/2] firmware: imx: Add DSP IPC protocol interface Thread-Topic: [PATCH v2 1/2] firmware: imx: Add DSP IPC protocol interface Thread-Index: AQHVLMAKsAQXFVfM80aDHo0cs/xXGA== Date: Thu, 27 Jun 2019 08:12:19 +0000 Message-ID: <20190627081205.22065-2-daniel.baluta@nxp.com> References: <20190627081205.22065-1-daniel.baluta@nxp.com> In-Reply-To: <20190627081205.22065-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0802CA0020.eurprd08.prod.outlook.com (2603:10a6:800:aa::30) To AM6PR04MB5207.eurprd04.prod.outlook.com (2603:10a6:20b:e::31) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=daniel.baluta@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 51a89c88-0759-47b4-fb4f-08d6fad72ca1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR04MB4453; x-ms-traffictypediagnostic: AM6PR04MB4453: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:534; x-forefront-prvs: 008184426E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39860400002)(136003)(366004)(199004)(189003)(2501003)(81156014)(25786009)(68736007)(14444005)(256004)(186003)(14454004)(26005)(66066001)(476003)(99286004)(50226002)(6506007)(4326008)(8936002)(8676002)(81166006)(386003)(44832011)(102836004)(52116002)(305945005)(486006)(76176011)(446003)(3846002)(71190400001)(54906003)(71200400001)(7736002)(11346002)(6436002)(2616005)(478600001)(86362001)(316002)(53936002)(36756003)(5660300002)(1076003)(110136005)(66556008)(66476007)(64756008)(66946007)(73956011)(6486002)(2906002)(6116002)(66446008)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4453; H:AM6PR04MB5207.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 51cfBY+WhhcA/10ILDBEBFERCPxaFY7MbyF1OKFJp+yJKEQ5xpUVb/o+yKwNY+YdmxzjHyLV/h6Jsgr9QjnZU3KgCu8gbzDNS7Hq99QTpr7sz+utCeCkiuxRyxoKX1Yzy0Ksx558ukcHSUqrDKFDvDgLxDOwaBkU627J8vItZPcITSi1MG1Yy7UFPPup5Ac++ptdhvUtF/GuYLLkM01fahgRpq6TgZJZSUrxKzeOmaM/L/rAljoRoVp+tQ01gxVCRuKiUxD4gfVLaFvt5ZxzRVpqQzN4z84iWthNgnp5rR8mr81HMOyf7Hkn+UwtifXnuz0K94iPXYWZAjo1CurY8w2ykz1eUkfzHp/2IKoL+Y7auDHAzCN+MYsDpvLV5jh7chCqmcyRVL+JpnSCAl8kypphy9OXFGQ8+I8/p+qgA9w= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51a89c88-0759-47b4-fb4f-08d6fad72ca1 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2019 08:12:19.6727 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: daniel.baluta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4453 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190627_011225_871437_9CDC5A1A X-CRM114-Status: GOOD ( 22.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng Dong , "mark.rutland@arm.com" , Anson Huang , "devicetree@vger.kernel.org" , Daniel Baluta , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "festevam@gmail.com" , "S.j. Wang" , "linux-arm-kernel@lists.infradead.org" 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 Some of i.MX8 processors (e.g i.MX8QM, i.MX8QXP) contain the Tensilica HiFi4 DSP for advanced pre- and post-audio processing. The communication between Host CPU and DSP firmware is taking place using a shared memory area for message passing and a dedicated Messaging Unit for notifications. DSP IPC protocol driver offers a doorbell interface using imx-mailbox API. We use 4 MU channels (2 x TXDB, 2 x RXDB) to implement a request-reply protocol. Connection 0 (txdb0, rxdb0): - Host writes messasge to shared memory [SHMEM] - Host sends a request [MU] - DSP handles request [SHMEM] - DSP sends reply [MU] Connection 1 (txdb1, rxdb1): - DSP writes a message to shared memory [SHMEM] - DSP sends a request [MU] - Host handles request [SHMEM] - Host sends reply [MU] The protocol driver will be used by a Host client to communicate with the DSP. First client will be the i.MX8 part from Sound Open Firmware infrastructure. The protocol drivers offers the following interface: On Tx: - imx_dsp_ring_doorbell, will be called to notify the DSP that it needs to handle a request. On Rx: - clients need to provide two callbacks: .handle_reply .handle_request - the callbacks will be used by the protocol driver on notification arrival from DSP. Signed-off-by: Daniel Baluta Reviewed-by: --- drivers/firmware/imx/Kconfig | 11 +++ drivers/firmware/imx/Makefile | 1 + drivers/firmware/imx/imx-dsp.c | 142 +++++++++++++++++++++++++++++++ include/linux/firmware/imx/dsp.h | 67 +++++++++++++++ 4 files changed, 221 insertions(+) create mode 100644 drivers/firmware/imx/imx-dsp.c create mode 100644 include/linux/firmware/imx/dsp.h diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig index 42b566f8903f..ddb241708c31 100644 --- a/drivers/firmware/imx/Kconfig +++ b/drivers/firmware/imx/Kconfig @@ -1,4 +1,15 @@ # SPDX-License-Identifier: GPL-2.0-only +config IMX_DSP + bool "IMX DSP Protocol driver" + depends on IMX_MBOX + help + This enables DSP IPC protocol between host CPU (Linux) + and the firmware running on DSP. + DSP exists on some i.MX8 processors (e.g i.MX8QM, i.MX8QXP). + + It acts like a doorbell. Client might use shared memory to + exchange information with DSP side. + config IMX_SCU bool "IMX SCU Protocol driver" depends on IMX_MBOX diff --git a/drivers/firmware/imx/Makefile b/drivers/firmware/imx/Makefile index 802c4ad8e8f9..08bc9ddfbdfb 100644 --- a/drivers/firmware/imx/Makefile +++ b/drivers/firmware/imx/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_IMX_DSP) += imx-dsp.o obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o diff --git a/drivers/firmware/imx/imx-dsp.c b/drivers/firmware/imx/imx-dsp.c new file mode 100644 index 000000000000..c4d34a2fbff3 --- /dev/null +++ b/drivers/firmware/imx/imx-dsp.c @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2019 NXP + * Author: Daniel Baluta + * + * Implementation of the DSP IPC interface (host side) + */ + +#include +#include +#include +#include +#include +#include +#include + +/* + * imx_dsp_ring_doorbell - triggers an interrupt on the other side (DSP) + * + * @dsp: DSP IPC handle + * @chan_idx: index of the channel where to trigger the interrupt + * + * Returns non-negative value for success, negative value for error + */ +int imx_dsp_ring_doorbell(struct imx_dsp_ipc *ipc, unsigned int idx) +{ + int ret; + struct imx_dsp_chan *dsp_chan; + + if (idx >= DSP_MU_CHAN_NUM) + return -EINVAL; + + dsp_chan = &ipc->chans[idx]; + ret = mbox_send_message(dsp_chan->ch, NULL); + if (ret < 0) + return ret; + + return 0; +} +EXPORT_SYMBOL(imx_dsp_ring_doorbell); + +/* + * imx_dsp_handle_rx - rx callback used by imx mailbox + * + * @c: mbox client + * @msg: message received + * + * Users of DSP IPC will need to privde handle_reply and handle_request + * callbacks. + */ +static void imx_dsp_handle_rx(struct mbox_client *c, void *msg) +{ + struct imx_dsp_chan *chan = container_of(c, struct imx_dsp_chan, cl); + + if (chan->idx == 0) { + chan->ipc->ops->handle_reply(chan->ipc); + } else { + chan->ipc->ops->handle_request(chan->ipc); + imx_dsp_ring_doorbell(chan->ipc, 1); + } +} + +static int imx_dsp_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct imx_dsp_ipc *dsp_ipc; + struct imx_dsp_chan *dsp_chan; + struct mbox_client *cl; + char *chan_name; + int ret; + int i, j; + + dsp_ipc = devm_kzalloc(dev, sizeof(*dsp_ipc), GFP_KERNEL); + if (!dsp_ipc) + return -ENOMEM; + + for (i = 0; i < DSP_MU_CHAN_NUM; i++) { + if (i < 2) + chan_name = kasprintf(GFP_KERNEL, "txdb%d", i); + else + chan_name = kasprintf(GFP_KERNEL, "rxdb%d", i - 2); + + if (!chan_name) + return -ENOMEM; + + dsp_chan = &dsp_ipc->chans[i]; + cl = &dsp_chan->cl; + cl->dev = dev; + cl->tx_block = false; + cl->knows_txdone = true; + cl->rx_callback = imx_dsp_handle_rx; + + dsp_chan->ipc = dsp_ipc; + dsp_chan->idx = i % 2; + dsp_chan->ch = mbox_request_channel_byname(cl, chan_name); + if (IS_ERR(dsp_chan->ch)) { + ret = PTR_ERR(dsp_chan->ch); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to request mbox chan %s ret %d\n", + chan_name, ret); + goto out; + } + + dev_dbg(dev, "request mbox chan %s\n", chan_name); + /* chan_name is not used anymore by framework */ + kfree(chan_name); + } + + dsp_ipc->dev = dev; + + dev_set_drvdata(dev, dsp_ipc); + + dev_info(dev, "NXP i.MX DSP IPC initialized\n"); + + return devm_of_platform_populate(dev); +out: + kfree(chan_name); + for (j = 0; j < i; j++) { + dsp_chan = &dsp_ipc->chans[j]; + mbox_free_channel(dsp_chan->ch); + } + + return ret; +} + +static const struct of_device_id imx_dsp_match[] = { + { .compatible = "fsl,imx8qxp-dsp", }, + { /* Sentinel */ } +}; + +static struct platform_driver imx_dsp_driver = { + .driver = { + .name = "imx-dsp", + .of_match_table = imx_dsp_match, + }, + .probe = imx_dsp_probe, +}; +builtin_platform_driver(imx_dsp_driver); + +MODULE_AUTHOR("Daniel Baluta "); +MODULE_DESCRIPTION("IMX DSP IPC protocol driver"); +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/firmware/imx/dsp.h b/include/linux/firmware/imx/dsp.h new file mode 100644 index 000000000000..7562099c9e46 --- /dev/null +++ b/include/linux/firmware/imx/dsp.h @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 NXP + * + * Header file for the DSP IPC implementation + */ + +#ifndef _IMX_DSP_IPC_H +#define _IMX_DSP_IPC_H + +#include +#include +#include + +#define DSP_MU_CHAN_NUM 4 + +struct imx_dsp_chan { + struct imx_dsp_ipc *ipc; + struct mbox_client cl; + struct mbox_chan *ch; + char *name; + int idx; +}; + +struct imx_dsp_ops { + void (*handle_reply)(struct imx_dsp_ipc *ipc); + void (*handle_request)(struct imx_dsp_ipc *ipc); +}; + +struct imx_dsp_ipc { + /* Host <-> DSP communication uses 2 txdb and 2 rxdb channels */ + struct imx_dsp_chan chans[DSP_MU_CHAN_NUM]; + struct device *dev; + struct imx_dsp_ops *ops; + void *private_data; +}; + +static inline void imx_dsp_set_data(struct imx_dsp_ipc *ipc, void *data) +{ + if (!ipc) + return; + + ipc->private_data = data; +} + +static inline void *imx_dsp_get_data(struct imx_dsp_ipc *ipc) +{ + if (!ipc) + return NULL; + + return ipc->private_data; +} + +#if IS_ENABLED(CONFIG_IMX_DSP) + +int imx_dsp_ring_doorbell(struct imx_dsp_ipc *dsp, unsigned int chan_idx); + +#else + +static inline int imx_dsp_ring_doorbell(struct imx_dsp_ipc *ipc, + unsigned int chan_idx) +{ + return -ENOTSUPP; +} + +#endif +#endif /* _IMX_DSP_IPC_H */ From patchwork Thu Jun 27 08:12:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 11019117 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 83039112C for ; Thu, 27 Jun 2019 08:13:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74782289CE for ; Thu, 27 Jun 2019 08:13:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6786C289F0; Thu, 27 Jun 2019 08:13:32 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 0C377289CE for ; Thu, 27 Jun 2019 08:13:32 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: 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: List-Owner; bh=Z8J64oYz2aXXryTkkND/Ed8m2DqNVnXWTUD8kaFY8CU=; b=bkNzUoRfZPXTEd o4/Zj9NTszZGL1caAgXBkwJLJoUx6PO83pEuYgdnGxMHRi4RJttIg5geliCMMP443vYka1kJQBSpt r2xMgdKKVxCs3/3BA7AHznJJwJVAAG1rZ0nxiVyoO9CF/ruEoTBbcjZEuiR3HPABiRQXJCTwBqfTB wut2xtYoF7sAkgw6NHlVvdVlIAUfNw+1AT6Sa0DuiBahFwz6vD4xhewEFtRfZIvizHvBW7bPzbq+S hPlCDqhIbNlvg7hI8Cj45p7V5X8i6b1qfqU8zuuAcEgU0yySxa6mrJrNcymD+w3sr2J0onTnjUVe2 9XzGZtyzPBYeR5Munhww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgPX8-0004kM-B2; Thu, 27 Jun 2019 08:13:30 +0000 Received: from mail-eopbgr60083.outbound.protection.outlook.com ([40.107.6.83] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgPW7-0003xj-Sn for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2019 08:12:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dsdPYxCU7srWVhLq1BGY9FbUyssnUN5o9xuGkke+PCw=; b=pZt1dlzCRiWkRS30GslqPfucc/vO1TQMsZjPHxyE6Kswkx0Ob8U7TDi8HSedaa20ElFjTq9vZvBir/CIfn9gZMQSErsiyNBMjrhcippdn7kWU+oEiBXiwXdHaEqK/o+vLbTEFaxHMfldr5iLM0eMBRJtU4p9Ay3HbBNCcvuYkVs= Received: from AM6PR04MB5207.eurprd04.prod.outlook.com (20.177.35.159) by AM6PR04MB4453.eurprd04.prod.outlook.com (20.176.242.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.17; Thu, 27 Jun 2019 08:12:21 +0000 Received: from AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::9c87:7753:43b9:6d4a]) by AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::9c87:7753:43b9:6d4a%4]) with mapi id 15.20.2008.014; Thu, 27 Jun 2019 08:12:21 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" , "robh+dt@kernel.org" , "o.rempel@pengutronix.de" Subject: [PATCH v2 2/2] dt-bindings: dsp: fsl: Add DSP IPC binding support Thread-Topic: [PATCH v2 2/2] dt-bindings: dsp: fsl: Add DSP IPC binding support Thread-Index: AQHVLMALhzY9Df127E6IyTklCWRQSg== Date: Thu, 27 Jun 2019 08:12:20 +0000 Message-ID: <20190627081205.22065-3-daniel.baluta@nxp.com> References: <20190627081205.22065-1-daniel.baluta@nxp.com> In-Reply-To: <20190627081205.22065-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0802CA0020.eurprd08.prod.outlook.com (2603:10a6:800:aa::30) To AM6PR04MB5207.eurprd04.prod.outlook.com (2603:10a6:20b:e::31) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=daniel.baluta@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef5f7e60-15ff-412d-ed94-08d6fad72d5e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR04MB4453; x-ms-traffictypediagnostic: AM6PR04MB4453: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-forefront-prvs: 008184426E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39860400002)(136003)(366004)(199004)(189003)(966005)(2501003)(81156014)(25786009)(68736007)(256004)(186003)(14454004)(26005)(66066001)(476003)(99286004)(50226002)(6506007)(4326008)(8936002)(8676002)(81166006)(386003)(44832011)(102836004)(52116002)(305945005)(486006)(76176011)(446003)(3846002)(71190400001)(54906003)(53376002)(6306002)(71200400001)(7736002)(11346002)(6436002)(2616005)(478600001)(86362001)(316002)(53936002)(36756003)(5660300002)(1076003)(110136005)(66556008)(66476007)(64756008)(66946007)(73956011)(6486002)(2906002)(6116002)(66446008)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4453; H:AM6PR04MB5207.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 3tbO6/wDWf0lvpKRVEuDkUAi13vGSihk6hvcbmDCRVpgO+RUMuRfZvUK6JNAAqVgAa7x6j6NA+xjZRL7127JPnlNSpiE2mhUA/swZuSnQWZWf8FaEVNSygITVlS/CLALcuHeoj40eDln4LprBRUWI1vpXgQA+iUeh2ik4oH0K/oPQTUidpSvbldCV3wgnVNkDd2deQ+w9+EalEI8apw99MDdlhll4MQZo9+6SPma/7FFLJIPst+yQiMLyNBckHzSzD4PFBU54/xE2OxSBgt2C5RaKLQhr/zlQDhIkXUqdZovn2DFwBd/YLhcEKZymarfqL7u9UOG8xYwBs/oNRIZ2I116hrZGviO6/s62NlmbXXfM/Z/2g5D8vPsWF+MvdR5RyvuDiDi5riu/Gq+wM9isTAWjLx7TwaVnvK6i1/O2/o= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef5f7e60-15ff-412d-ed94-08d6fad72d5e X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2019 08:12:21.0739 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: daniel.baluta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4453 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190627_011227_987878_ACD31B73 X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng Dong , "mark.rutland@arm.com" , Anson Huang , "devicetree@vger.kernel.org" , Daniel Baluta , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "festevam@gmail.com" , "S.j. Wang" , "linux-arm-kernel@lists.infradead.org" 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 DSP IPC is the layer that allows the Host CPU to communicate with DSP firmware. DSP is part of some i.MX8 boards (e.g i.MX8QM, i.MX8QXP) Signed-off-by: Daniel Baluta --- .../devicetree/bindings/dsp/fsl,dsp_ipc.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/dsp/fsl,dsp_ipc.yaml diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp_ipc.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp_ipc.yaml new file mode 100644 index 000000000000..1cbf5d25b258 --- /dev/null +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp_ipc.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/freescale/fsl,dsp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8 IPC DSP interface + +maintainers: + - Daniel Baluta + +description: | + IPC communication layer between Host CPU and DSP on NXP i.MX8 platforms + +properties: + compatible: + enum: + - fsl,imx8qxp-dsp + + mboxes: + description: + List of <&phandle type channel> - 2 channels for TXDB, 2 channels for RXDB + (see mailbox/fsl,mu.txt) + maxItems: 4 + + mbox-names: + items: + - const: txdb0 + - const: txdb1 + - const: rxdb0 + - const: rxdb1 + +required: + - compatible + - mboxes + - mbox-names + +examples: + - | + dsp_ipc { + compatbile = "fsl,imx8qxp-dsp"; + mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1"; + mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>; + };