From patchwork Tue Jan 10 08:43:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tinghan Shen X-Patchwork-Id: 41353 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2631665wrt; Tue, 10 Jan 2023 00:53:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXvE9IoUgHtVRKlgdqohBL16nS7zQkcvyxf3/H8xvi1K4fpPeTRj3haN2IkWW5JfwRA0xAf8 X-Received: by 2002:a17:903:110d:b0:192:8b0e:98e1 with SMTP id n13-20020a170903110d00b001928b0e98e1mr63069783plh.54.1673340800711; Tue, 10 Jan 2023 00:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673340800; cv=none; d=google.com; s=arc-20160816; b=MO4Jy6JqfzUMQ/iQVX9OkAdRkn7zvm2eODu6+9AgibjNh2asg/Q35BHkWWJV6yRuCH IzyT+66s50nDO6tctOxPIuMk8spJGIFcWGpnwnIn1w/81cs/pv9vUN9KXUjAzVrNiVBw boGrCcbCox+gaRPmbXyx3zS7X954sPtOt6FTq5I2CIpDQl4SO3N3KF0NhsK2B6dLiKFB k8PZzfmDPZ/thP6ZKOwzO6bUqBWtSsTo0P4bCAAzJbWO3jNRQj+dL0U7UcCYk6OISlX2 63YgchNopOpjqqcJKcZC2aplMpoYcddg4uL1V08/8DqPl6MZnpcv3cBRqQsDyWXD/VuD EL8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HKJ904CLUokW1OlRLknq9RPV9mWOeGMzXGQ7/497xEE=; b=hxuV0RtbS3OSoz4hIFp0BnMtzkp69mntDRf1SXjW3z0KpDkiLcpQ+eqbYHujMEulIU b+kyWxYbrAxERctuFtUBDttw2rNGtHEfpfoTSSDBDv7tV26V4dQPfdoua3RH3uttdUQn 5lR/MYqljKIdX40HhS51HJiqiRt3nWHa737mwhvAob92FyMrJx50XY42otZXhmp0aCzU Z0KzZgtpQal13sx9Eq7f2f2J7s87CXs942rxjA5yld5H8f1ioLXRVQbWeYo+yWNF288Y UYULINHTinVGnPrzEjJwn4mDR0Zj01nccX79ozvjORVRw2WBtQ4RSw2TBtuT51DizDgr uIlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=lDPhIMlK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u15-20020a17090341cf00b00188881adcd7si11551720ple.550.2023.01.10.00.53.03; Tue, 10 Jan 2023 00:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=lDPhIMlK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238055AbjAJItO (ORCPT + 99 others); Tue, 10 Jan 2023 03:49:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237721AbjAJInW (ORCPT ); Tue, 10 Jan 2023 03:43:22 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6425B4C739; Tue, 10 Jan 2023 00:43:20 -0800 (PST) X-UUID: e95571713abb4cdb8eae7b591d23da19-20230110 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=HKJ904CLUokW1OlRLknq9RPV9mWOeGMzXGQ7/497xEE=; b=lDPhIMlKmiDKhu1LJnpjmmf56VSRula494mifAdQMoxPJk9Ir/fBQS1RA7XkVreo0aNf+wjQBaebXmU2n56sfkxA46rsJpA57+oRemvgwrV17hK6gFja3ZTs26FLsORjUK0nXk2zWh2l4mSauoqiPCJcRtJYYUclyqaD8pYajGY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:3e0ec90d-d71a-4581-959e-75cd510ccaa0,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:543e81c,CLOUDID:1b643754-dd49-462e-a4be-2143a3ddc739,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: e95571713abb4cdb8eae7b591d23da19-20230110 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2067634123; Tue, 10 Jan 2023 16:43:15 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 10 Jan 2023 16:43:13 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 10 Jan 2023 16:43:13 +0800 From: Tinghan Shen To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown , Jaroslav Kysela , Takashi Iwai , Tinghan Shen , AngeloGioacchino Del Regno , Chunxu Li , Dan Carpenter , YC Hung , Wan Jiabing , Allen-KH Cheng CC: , , , , , , Subject: [PATCH v2 1/3] dt-bindings: dsp: mediatek: Add mt8188 dsp compatible Date: Tue, 10 Jan 2023 16:43:10 +0800 Message-ID: <20230110084312.12953-2-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230110084312.12953-1-tinghan.shen@mediatek.com> References: <20230110084312.12953-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754625003541872816?= X-GMAIL-MSGID: =?utf-8?q?1754625003541872816?= Add support of the single-core HiFi5 audio DSP on MediaTek MT8188 SoC for pre- and post- audio processing. Signed-off-by: Tinghan Shen Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml b/Documentation/devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml index 3e63f79890b4..88575da1e6d5 100644 --- a/Documentation/devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml +++ b/Documentation/devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml @@ -15,7 +15,9 @@ description: | properties: compatible: - const: mediatek,mt8186-dsp + enum: + - mediatek,mt8186-dsp + - mediatek,mt8188-dsp reg: items: From patchwork Tue Jan 10 08:43:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tinghan Shen X-Patchwork-Id: 41352 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2631587wrt; Tue, 10 Jan 2023 00:53:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXv8kBgzunXbzQ3pnZlA7sKe3wrlnf4j3J3A74IS5ylwj5a34IdGRcJEt89ZiTTrIFGfSUyL X-Received: by 2002:a05:6a21:e384:b0:b0:25ba:1769 with SMTP id cc4-20020a056a21e38400b000b025ba1769mr92597296pzc.58.1673340787763; Tue, 10 Jan 2023 00:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673340787; cv=none; d=google.com; s=arc-20160816; b=du/ZA0LgCu23Z4ZZFJNi2bzxZCdUsvhyvi/cKjU8CNqMkdOBuFEM3nhJiw25Y44tH+ 6iKs4HilaF1L4fVKo1kSUAuAdADkm7EQDCmSJ2+6YW+nSJ5fdO1qJCBlegKGmpWfYEYN DIlJxQWcHtHlYkeh8Omgd/DmyV/qXNa4y8sn4xtLsVRenvwhgTz3scEMt3+Fk8zXXBjj 3l9o4S8an+XdOPv34V1+fHNfhHVkA45zEV2vB+CCbRmQ1pxQlqTC1zyf66VG98dkcOOA xwgd3X3n13bAGDDszSlHcxn8lqdLZviXcQ3VTu4h9EL5YKhPxIwPThiDJePAqbVyNlWx fkVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Yt/1rVdKqsCac3uXMYG6HnpQCTqHWocqbiuBN4kIjIY=; b=dK3ksWoTin9tkJz8oa0sPkdMLGFZbXkUn6vSK7zptkAN/jLQkTyC3jqCvU1FkWHYNP E2yhMjX6zDvJIB259GLvuiFMv1qkHx+Sp5WietZzElsaH92eN8ASlwLwrYSIl9D2hes8 AfyO/XnnvLRM52J5gI2LX6gkbJU3iZ/hOVtnWfe/Lc+N2vKagHLFfYpA5A4y+0wE8vBF iB2mcdjLeCOw5ZR4sLAYhmP4WbQR9r87gSvhOnK3aSFmtF9PQVHfg25u8sEOjhmiDbOO 9A0DClV9vY45TGeqxstg0/RBwDWrHRil1170L6AjTifYwXhh2hBcAbfZ9Goes5/2o2Fx nF5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=J9MbmLML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a056a00081300b005871ef7e13csi7819289pfk.46.2023.01.10.00.52.51; Tue, 10 Jan 2023 00:53:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=J9MbmLML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238031AbjAJItI (ORCPT + 99 others); Tue, 10 Jan 2023 03:49:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231553AbjAJInW (ORCPT ); Tue, 10 Jan 2023 03:43:22 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A4E315FCF; Tue, 10 Jan 2023 00:43:19 -0800 (PST) X-UUID: 52be8810eca7441faf70ecfa49b33d19-20230110 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Yt/1rVdKqsCac3uXMYG6HnpQCTqHWocqbiuBN4kIjIY=; b=J9MbmLMLe629K81IkJ6Nng6LSqAYxJ+ArdxxbtOsHcFGevXiKzk+XCX9FdhFrWjHnkwDxMcMe14e3WjoHoxlhevr7kL6gvEgz/8KwdH/U3WJrWhV0nyigYtxq0H/ZsVokzfFEUvBT2yVcXCd/tiViYd8q1KOjrqVqNUia+BsPmA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:1333e0b4-20bc-4748-90d2-4a1d84e108b8,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:543e81c,CLOUDID:bd2e61f5-ff42-4fb0-b929-626456a83c14,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: 52be8810eca7441faf70ecfa49b33d19-20230110 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 650736675; Tue, 10 Jan 2023 16:43:14 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 10 Jan 2023 16:43:13 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 10 Jan 2023 16:43:13 +0800 From: Tinghan Shen To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , "Mark Brown" , Jaroslav Kysela , Takashi Iwai , Tinghan Shen , "AngeloGioacchino Del Regno" , Chunxu Li , Dan Carpenter , YC Hung , Wan Jiabing , Allen-KH Cheng CC: , , , , , , Subject: [PATCH v2 2/3] ASoC: SOF: mediatek: Support mt8188 platform Date: Tue, 10 Jan 2023 16:43:11 +0800 Message-ID: <20230110084312.12953-3-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230110084312.12953-1-tinghan.shen@mediatek.com> References: <20230110084312.12953-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754624990074964404?= X-GMAIL-MSGID: =?utf-8?q?1754624990074964404?= Add support of SOF on MediaTek MT8188 SoC. MT8188 ADSP integrates with a single core Cadence HiFi-5 DSP. The IPC communication between AP and DSP is based on shared DRAM and mailbox interrupt. The change in the mt8186.h is compatible on both mt8186 and mt8188. The register controls booting the DSP core with the default address or the user specified address. Both mt8186 and mt8188 should boot with the user specified boot in the driver. The usage of the register is the same on both SoC, but the control bit is different on mt8186 and mt8188, which is bit 1 on mt8186 and bit 0 on mt8188. Configure the redundant bit has noside effect on both SoCs. Signed-off-by: Tinghan Shen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8186/mt8186.c | 17 +++++++++++++++++ sound/soc/sof/mediatek/mt8186/mt8186.h | 10 +++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index 79da25725987..af0dfc2fc4cc 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c @@ -625,8 +625,25 @@ static const struct sof_dev_desc sof_of_mt8186_desc = { .ops = &sof_mt8186_ops, }; +static const struct sof_dev_desc sof_of_mt8188_desc = { + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, + .default_fw_path = { + [SOF_IPC] = "mediatek/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "mediatek/sof-tplg", + }, + .default_fw_filename = { + [SOF_IPC] = "sof-mt8188.ri", + }, + .nocodec_tplg_filename = "sof-mt8188-nocodec.tplg", + .ops = &sof_mt8186_ops, +}; + static const struct of_device_id sof_of_mt8186_ids[] = { { .compatible = "mediatek,mt8186-dsp", .data = &sof_of_mt8186_desc}, + { .compatible = "mediatek,mt8188-dsp", .data = &sof_of_mt8188_desc}, { } }; MODULE_DEVICE_TABLE(of, sof_of_mt8186_ids); diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.h b/sound/soc/sof/mediatek/mt8186/mt8186.h index 98b2965e5ba6..5b521c60b4e3 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.h +++ b/sound/soc/sof/mediatek/mt8186/mt8186.h @@ -52,7 +52,15 @@ struct snd_sof_dev; #define ADSP_PRID 0x0 #define ADSP_ALTVEC_C0 0x04 #define ADSP_ALTVECSEL 0x0C -#define ADSP_ALTVECSEL_C0 BIT(1) +#define MT8188_ADSP_ALTVECSEL_C0 BIT(0) +#define MT8186_ADSP_ALTVECSEL_C0 BIT(1) + +/* + * On MT8188, BIT(1) is not evaluated and on MT8186 BIT(0) is not evaluated: + * We can simplify the driver by safely setting both bits regardless of the SoC. + */ +#define ADSP_ALTVECSEL_C0 (MT8188_ADSP_ALTVECSEL_C0 | \ + MT8186_ADSP_ALTVECSEL_C0) /* dsp bus */ #define ADSP_SRAM_POOL_CON 0x190 From patchwork Tue Jan 10 08:43:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tinghan Shen X-Patchwork-Id: 41351 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2628828wrt; Tue, 10 Jan 2023 00:45:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXuxfXqYQQl1zA4Claz37gIkeSuQVHgu58f7tFK6zmv79bVODVX+CibDwxkZjMy64zzkU6Uh X-Received: by 2002:a17:906:700f:b0:7c1:6bd9:571e with SMTP id n15-20020a170906700f00b007c16bd9571emr52000948ejj.13.1673340302660; Tue, 10 Jan 2023 00:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673340302; cv=none; d=google.com; s=arc-20160816; b=umg40+Zqta8LXzUY2hei2/lpbeKQbdo7Qrq4FVcVy1GkPcqj7X/MX96yA7BYi7/1IV YtsDUQeRukNw0Wrl9i4Iw/iKlsYIMpv1oTJpxRxzo8v4zwT/y3B1LmKzO85nL+PSN/zA e450XvxC97bv27yvW8v0OkEVD6vahAYxgunADasNaCJKCVMUYmxEIPy7+l4Omb8kzJ8J SDnxH7qT8WMc/+VzfzDcrbXIL9zZV4lZr5Kk76y43LER7BNYSlVH2yLeQaqdkuZRpDIV 70DnmlZIPws85sxfX0Yw2c5YTl0AAiG7VwLa49/r7ACbH98DByIaN9kY/1uWe9irf0E4 KNNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nv45cAPgQZFnMe/GJQzPYM+/k0dB/WqWToW8fm1qrmg=; b=ZfmDn/+RGXK4yBA8pIr+XrvAqFBujuvoOUP2JVvgfXZKU9HzDZqRWjM5L5uAW0FeGm aGwftS3iHYZNH8z68yg2hPWiGro/QVDxE6yFLAoLRX2KveHg/9ZXJcPa0YPm+VPe2f4u qlvd8Cdc/sotyrNytI4GvPt9vs9KrurkM1j7zNi/siZjoQk7ABJppI4j33y/bVwdly2X DIBTfB7+ddff8MRDj+hgMUtCrsbkNluyQmQQtl1a6253PxrQPScjAH+vgvehZDKOse8i b65KQjfgtTyURF7RLVz3cGcwhAyFcFnyspxptRNDpGkAnXLxkrgNYYm33e5pCGT8Xngf fARw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=L6ykO31R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a17090658cc00b00805ea749ee4si11769156ejs.474.2023.01.10.00.44.39; Tue, 10 Jan 2023 00:45:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=L6ykO31R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237997AbjAJInt (ORCPT + 99 others); Tue, 10 Jan 2023 03:43:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237919AbjAJInZ (ORCPT ); Tue, 10 Jan 2023 03:43:25 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34EA012AEF; Tue, 10 Jan 2023 00:43:22 -0800 (PST) X-UUID: d601ee033aac4349b13ed818aca1e9d6-20230110 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=nv45cAPgQZFnMe/GJQzPYM+/k0dB/WqWToW8fm1qrmg=; b=L6ykO31RoJPwHg8HT55Q4wR9cys68S1ti85fr7zfIpa+mbvDbxqJwQVpiX0dHPo+MZbBGMAw14TFk9EpEQ8TS/0tq3k+pLV7MmDfIVGOhZYOKowgvqpzdT7j0KC4rGxy7hFUF872h3aBxUKvA+kE3M15yFKmb3ZdINgx1fV01lU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:b859a62d-ef0e-4810-9bae-08b5b342d9d8,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.17,REQID:b859a62d-ef0e-4810-9bae-08b5b342d9d8,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:543e81c,CLOUDID:1c643754-dd49-462e-a4be-2143a3ddc739,B ulkID:2301101643174NRWN4S6,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0 X-CID-BVR: 0 X-UUID: d601ee033aac4349b13ed818aca1e9d6-20230110 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1867636755; Tue, 10 Jan 2023 16:43:15 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 10 Jan 2023 16:43:14 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 10 Jan 2023 16:43:14 +0800 From: Tinghan Shen To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown , Jaroslav Kysela , Takashi Iwai , Tinghan Shen , AngeloGioacchino Del Regno , Chunxu Li , Dan Carpenter , YC Hung , Wan Jiabing , Allen-KH Cheng CC: , , , , , , Subject: [PATCH v2 3/3] ASoC: SOF: mediatek: Provide debugfs_add_region_item ops for core Date: Tue, 10 Jan 2023 16:43:12 +0800 Message-ID: <20230110084312.12953-4-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230110084312.12953-1-tinghan.shen@mediatek.com> References: <20230110084312.12953-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754624481120966376?= X-GMAIL-MSGID: =?utf-8?q?1754624481120966376?= Set the generic iomem callback for debugfs_add_region_item to support sof-logger. Signed-off-by: Tinghan Shen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8186/mt8186.c | 3 +++ sound/soc/sof/mediatek/mt8195/mt8195.c | 1 + 2 files changed, 4 insertions(+) diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index af0dfc2fc4cc..dbea604ebc04 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c @@ -588,6 +588,9 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = { .drv = mt8186_dai, .num_drv = ARRAY_SIZE(mt8186_dai), + /* Debug information */ + .debugfs_add_region_item = snd_sof_debugfs_add_region_item_iomem, + /* PM */ .suspend = mt8186_dsp_suspend, .resume = mt8186_dsp_resume, diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index 7c831e18483c..5b04fec9c9c9 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -637,6 +637,7 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = { /* Debug information */ .dbg_dump = mt8195_adsp_dump, + .debugfs_add_region_item = snd_sof_debugfs_add_region_item_iomem, /* DAI drivers */ .drv = mt8195_dai,