From patchwork Mon Nov 1 08:00:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12596015 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 4B5E5C433EF for ; Mon, 1 Nov 2021 08:01:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 0A07760F70 for ; Mon, 1 Nov 2021 08:01:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0A07760F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8509E16A1; Mon, 1 Nov 2021 09:01:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8509E16A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635753714; bh=8bHQ+r+hn58gW4q7mGQk5nYeHTwPmr/BEwAiYltJ14A=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=RP/Ibit4u1DsUseSAPiDuxh5uSv5DU+IRVHwOIzjdo6o3hRxG/HftlilVTkpZQWEb l9YWkkaR9MiSe9th6yTLLCRMgyiWLxzxfSX2HkXhJArfOa/UrCHWRY41xHAMNIrHj4 DH6ThDfIBx950qIQGrpxBs8CHNeJ7mskU6UurU8w= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E2DC4F80279; Mon, 1 Nov 2021 09:01:03 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9AFB5F8026A; Mon, 1 Nov 2021 09:00:58 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2076.outbound.protection.outlook.com [40.107.21.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 19F5AF8010A for ; Mon, 1 Nov 2021 09:00:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 19F5AF8010A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="kIjhpMon" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DZFMzsweobaow26yULsKzdYcpZCZkVaC3CPooCv4Z4GBMb4zmd8UuwtuLqC/nr6NFMqCqQ/C7F/1JK0LyhyEeumqrfte/bAng7Zv7raKEsuu+tLek/tWH9mkvEic62LrMj5OrcNDKgnLTcd/GfViEPkIqtUUOD1oFInRge1Xxn07nOP7Om6PUFe3SWrU18FQxYHT9T7RhuFwUYj1VOEdUudmgu/sAo6n6Vb/SjWxZj23EYCme3PEdhFMYIHVFzLyPRkDvqhATQUmkEfslGE9T9danb1IxwQZB8JoIHrLw2vZmCjOo9pxYxEXWDpvGrZctQWsqnnGFAupAv6wp02tAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yvSWYqdYEFYFk0YC1o266mfvxOUVtnxxmVLSoIru8is=; b=JfTiXSDgfYo5Kj6HVsW81XpVYCGj7TE+7jRFw56uotM3nAP7VmfsclXQ4TaSteqaebEV7rFlsVTjyaft5A/r2mLNwPBHSxtU6cStuAHcCHLj67bhkxblCGjJn4Dw5PiitzULGxAJxNFUP3ph2DdrwTawX1BUuGMoq87T/QpNtwHl0EHlbPCqPrePAAB/B5EZYKkEI9tDpyODntwB7dCXY7IWEh46HFeHOJpOtem37CumqEau2lM9ITDi3xGdfHeYfGQggTZ6C+GEknQWpOenjaWDkHegrYo8QoFJzbugCGYlv6RpjCHd421UItAN45KhxyX2wC5fS/IzHcb5fH6DSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yvSWYqdYEFYFk0YC1o266mfvxOUVtnxxmVLSoIru8is=; b=kIjhpMonERY6ezXxRsIyN3i6UPVMIslk2QzHjCa8Qo3Z37kv56dWimVBTyfLYqbjBdCBCCRWG2bin6HH7NIGeeZI5B1C5FcoUs78xSXhWQqNyxYK+VS4H3aeCC3DPEusfjrGYWRnNWBVRzpSCxgBmM9C4YNhLOq+MpkVPArse/0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) by VI1PR0402MB3664.eurprd04.prod.outlook.com (2603:10a6:803:1e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Mon, 1 Nov 2021 08:00:44 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::85af:f8be:aa99:ba5f]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::85af:f8be:aa99:ba5f%3]) with mapi id 15.20.4649.019; Mon, 1 Nov 2021 08:00:44 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 0/6] ASoC: SOF: Add support for Mediatek MT8195 Date: Mon, 1 Nov 2021 10:00:20 +0200 Message-Id: <20211101080026.297360-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 X-ClientProxiedBy: AM3PR07CA0070.eurprd07.prod.outlook.com (2603:10a6:207:4::28) To VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a02:2f08:5719:1500:cdb2:376b:257c:429a) by AM3PR07CA0070.eurprd07.prod.outlook.com (2603:10a6:207:4::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.9 via Frontend Transport; Mon, 1 Nov 2021 08:00:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ee20845-be57-4853-047f-08d99d0db4a0 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3664: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9cEJMtOhZrkojPomyNsj2GsZS6AeEG/dnF9Ne/bA+Ot5e6ovu1uclW4qa9FroN3R2mHtIn006oeNCnCRBYA7WyvKh6ohAa1q+qcOAi0hitRAOd745ieRxh63xtt7GvwA1uSpiBj48eTk9aD0O1PdhZyPQL6dOxdWdnuZv6jZUZwrMTcbKY5hP1Z99eZq/5rfsm8RUVyJ+yYffBlP8uiSDmQgS/ByezrYJHqqzFsL18vBmJyV7zSv0Ex7P4cKUXX7Wx3AhDlAImcT/j1+0tcsWNsAZDVF1mNESA6k186M601Ep/M7cATDJOdl1KgK7rgvmnuI425Z/vtb55nmxE6FLqt9+YNFZjODjQl3eRMa1rIWPrfEuoETH/l4ojpr5g01leWrUJqPKAL5/7p02+O1L0i2znx2X8SNceif5puaMXqV56WRW3i8PMMqDdGDPVHYgBaEVVQwmcWscyb9SIifJiWGPBSqEohxkCo1avYE1E/ldFi7Taa6ybb8RCTo45yT7qjSxIFf77wNCOKbIaU6CaAqFCLbzgm84wevz882g48704Zytaj7utecFE4X0xvsoMDoTRML5YOGq49V1Q8X2pptiinqp5DF61It/MNmZQKB0X4GM9rZpWODlRtqa2F123BeNnEXT5C4GrgVC0xj5w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5151.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(6666004)(7416002)(6512007)(316002)(186003)(52116002)(508600001)(5660300002)(4326008)(2616005)(1076003)(66946007)(66476007)(66556008)(6486002)(6506007)(8676002)(8936002)(38100700002)(2906002)(83380400001)(44832011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?NUe4U5Qg3jc12tlNirCwBYgmC0OW?= =?utf-8?q?dHsnUWqjhZnBSO4pAuCRVdYUToIt3tYE8i5LAb/oE0+fYs9td6+RAgtRdceYtbiTy?= =?utf-8?q?4K2qj2DplQItjxGLVTMTBihDHUbgiHj942RRDUIDHHGH7LM6OPy+pK77Jsb/CQVsb?= =?utf-8?q?xJtnlZN/MObn69G3yBFQonozjVFA06hF8qQ1544quzUbnU1Tl4Mm16cIskoJ3u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?utf-8?q?Vo3Dyj45AWnZnFdZhVDmVrcDmSD6cYsTmmr2nkxVQIhlvkGdiug48/iKgw29qloLS?= =?utf-8?q?q3R4M6fH/05K37D88n5hjmlmMlfCleYhiEH9TnFXf9Gs9S/kPXMrtrQx2O3f/Oq7j?= =?utf-8?q?SoX+pl2WovJYsX6iz8c8aXagDDq8Ohj6WpVXncC+Dmm91xXlj0WoRws9W8Ux3EjRv?= =?utf-8?q?9v7c3Yed64b/CUwHPT3GWZnIyh96kmxheGOgC2Yn+uaCN8B6azpB0ur06tn6on+Xv?= =?utf-8?q?rqjM2moABPKxF2X7uf2r6rZS0qtBN1QQiUsI3hltTz3xxrljZ+XqG6OjNoMog35B4?= =?utf-8?q?rkqK6NpMmrn0MnYEK5NvwQD93PPA+FmqKKXtFW3NxjjGZJ+kxdd0wZHy4sVSAifwm?= =?utf-8?q?h0YV1Tl3I3fhyicsTo0CLH0HVPExOu6ECM5wqYGmbTo/cPKsBuqpdKM+KnIdaojl1?= =?utf-8?q?PC6f7mtCYWJzlac+DYDETmANof9Cv1IeHnLyb1EuAa+CL+fSUUvsX3Rq5fGbbTnQu?= =?utf-8?q?0D3IrKxJj1He3B2/PV86MLAH1u+uZV7LBmfHSFwcBAuHSbedFP+bTU=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ee20845-be57-4853-047f-08d99d0db4a0 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2021 08:00:44.2685 (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: rsahZl1HFc6/asO6B5CVAJMjI88qbzYz7TRA6EDnaC3XPOaj3q/absmx7zhglcVFtbO2/BSP4jiLgHg4igbi+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3664 Cc: guennadi.liakhovetski@linux.intel.com, daniel.baluta@gmail.com, kai.vehmanen@linux.intel.com, Daniel Baluta , ranjani.sridharan@linux.intel.com, lgirdwood@gmail.com, linux-mediatek@lists.infradead.org, pierre-louis.bossart@linux.intel.com, peter.ujfalusi@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Daniel Baluta This patch series adds initial SOF support on Mediatek mt8195 platform. MT8195 has four Cortex A78 cores paired with four Cortex A55 cores. It also has Cadence HiFi-4 DSP single core. There are shared DRAM and mailbox interrupt between AP and DSP to use for IPC communication. YC Hung (6): ASoC: SOF: mediatek: Add mt8195 hardware support ASoC: SOF: tokens: add token for Mediatek AFE ASoC: SOF: topology: Add support for Mediatek AFE DAI ASoC: SOF: mediatek: Add fw loader and mt8195 dsp ops to load firmware ASoC: SOF: Add mt8195 device descriptor ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195 include/sound/sof/dai-mediatek.h | 23 ++ include/sound/sof/dai.h | 3 + include/uapi/sound/sof/tokens.h | 5 + sound/soc/sof/Kconfig | 3 +- sound/soc/sof/Makefile | 1 + sound/soc/sof/mediatek/Kconfig | 33 ++ sound/soc/sof/mediatek/Makefile | 2 + sound/soc/sof/mediatek/adsp_helper.h | 49 +++ sound/soc/sof/mediatek/mediatek-ops.h | 8 + sound/soc/sof/mediatek/mt8195/Makefile | 4 + sound/soc/sof/mediatek/mt8195/mt8195-loader.c | 56 +++ sound/soc/sof/mediatek/mt8195/mt8195.c | 377 ++++++++++++++++++ sound/soc/sof/mediatek/mt8195/mt8195.h | 158 ++++++++ sound/soc/sof/pcm.c | 12 + sound/soc/sof/sof-of-dev.c | 13 + sound/soc/sof/topology.c | 59 +++ 16 files changed, 805 insertions(+), 1 deletion(-) create mode 100644 include/sound/sof/dai-mediatek.h create mode 100644 sound/soc/sof/mediatek/Kconfig create mode 100644 sound/soc/sof/mediatek/Makefile create mode 100644 sound/soc/sof/mediatek/adsp_helper.h create mode 100644 sound/soc/sof/mediatek/mediatek-ops.h create mode 100644 sound/soc/sof/mediatek/mt8195/Makefile create mode 100644 sound/soc/sof/mediatek/mt8195/mt8195-loader.c create mode 100644 sound/soc/sof/mediatek/mt8195/mt8195.c create mode 100644 sound/soc/sof/mediatek/mt8195/mt8195.h