From patchwork Tue Nov 3 07:59:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxin Yu X-Patchwork-Id: 11876181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MIME_BASE64_TEXT, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E66BDC2D0A3 for ; Tue, 3 Nov 2020 08:00:54 +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 2382B2222B for ; Tue, 3 Nov 2020 08:00:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="bVzp4d15"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="J2pwWnbe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2382B2222B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@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 9BA76172A; Tue, 3 Nov 2020 09:00:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9BA76172A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1604390452; bh=0QBSEOMZBWHt6e5tK2HT31+z/BJjLgKUQg5qu0chQ6Q=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=bVzp4d15W4po7uIyyGO817gwQhg6hubMqi9r5mrpfZOrpQ/Eg8VUy9WehTFqWGlHO wSnYUKDesZOdc1UnXHrW+WJKf+Ow0jleCMcG6a1ZgEcUJ6pxZZJSPq1I4PJQs/+anK 4D6WtL81RYFD/+ZTIRuR9MfSVXU7U+AcNsT9cdD4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9938EF804B3; Tue, 3 Nov 2020 09:00:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 50D42F804B4; Tue, 3 Nov 2020 08:59:58 +0100 (CET) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by alsa1.perex.cz (Postfix) with ESMTP id 2B86EF80108 for ; Tue, 3 Nov 2020 08:59:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B86EF80108 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="J2pwWnbe" X-UUID: b06df6bec48b485686bd0572ade9a640-20201103 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:Message-ID:Date:Subject:CC:To:From; bh=0QBSEOMZBWHt6e5tK2HT31+z/BJjLgKUQg5qu0chQ6Q=; b=J2pwWnbenV6tkSKAcpwga2IFdve5wPBz/3AMbBvaOBl2mAb+ACZyTo+CyCXWSXCct2E/VmGNKwkyrhYFSXmkRlewMSYaIIo3pxoo2FRMbsW1VzBlskiv/bpO1MXVRibUImyBPG1jEKGEDs1W+jHo4mzpHZ2MHPdQ2jq72gAPfIo=; X-UUID: b06df6bec48b485686bd0572ade9a640-20201103 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 787465698; Tue, 03 Nov 2020 15:59:43 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 3 Nov 2020 15:59:41 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 3 Nov 2020 15:59:40 +0800 From: Jiaxin Yu To: , , , , , , , , , Subject: [PATCH v4 0/9] ASoC: Mediatek: Add support for MT8192 SoC Date: Tue, 3 Nov 2020 15:59:29 +0800 Message-ID: <1604390378-23993-1-git-send-email-jiaxin.yu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-MTK: N Cc: shane.chien@mediatek.com, Bicycle.Tsai@mediatek.com, Jiaxin Yu , Trevor.Wu@mediatek.com, kuninori.morimoto.gx@renesas.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" This series of patches adds support for Mediatek AFE for MT8192 SoC. At the same time, the calibration function of MT6359 is completed with real machine driver. The patch is based on broonie tree "for-next" branch. Change since v3: - use normal conditional statements to improve legiblity in [v3,3/9] - remove mtk_i2s_hd_en_event as there's trace in the core - impove mt8192_i2s_enum and mt8192_adda_enum Change since v2: - split the dai driver files as a separate patch - fix dt-bindings to GPL-2.0-only License - remove unnecessary preperty descriptions such as 'maxItems' Change since v1: - fixed some typos related to dt-bindings in [v1,3/5] and [v1,5/5] - add vendor prefix to the properties, such as "mediatek,apmixedsys" - add a dependency description to indicate the required header files Jiaxin Yu (9): ASoC: mediatek: mt6359: add the calibration functions ASoC: mediatek: mt8192: add platform driver ASoC: mediatek: mt8192: support i2s in platform driver ASoC: mediatek: mt8192: support adda in platform driver ASoC: mediatek: mt8192: support pcm in platform driver ASoC: mediatek: mt8192: support tdm in platform driver dt-bindings: mediatek: mt8192: add audio afe document ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682 dt-bindings: mediatek: mt8192: add mt8192-mt6358-rt1015-rt5682 document .../bindings/sound/mt8192-afe-pcm.yaml | 100 + .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 42 + sound/soc/codecs/mt6359.c | 110 + sound/soc/codecs/mt6359.h | 7 + sound/soc/mediatek/Kconfig | 23 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/common/mtk-afe-fe-dai.c | 13 +- sound/soc/mediatek/common/mtk-base-afe.h | 1 + sound/soc/mediatek/mt8192/Makefile | 16 + sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 669 ++++ sound/soc/mediatek/mt8192/mt8192-afe-clk.h | 244 ++ sound/soc/mediatek/mt8192/mt8192-afe-common.h | 170 + .../soc/mediatek/mt8192/mt8192-afe-control.c | 163 + sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 306 ++ sound/soc/mediatek/mt8192/mt8192-afe-gpio.h | 19 + sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 2389 +++++++++++++ sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 1471 ++++++++ sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 2110 +++++++++++ sound/soc/mediatek/mt8192/mt8192-dai-pcm.c | 409 +++ sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 778 ++++ .../mediatek/mt8192/mt8192-interconnection.h | 65 + .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 1058 ++++++ sound/soc/mediatek/mt8192/mt8192-reg.h | 3131 +++++++++++++++++ 23 files changed, 13291 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml create mode 100644 Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml create mode 100644 sound/soc/mediatek/mt8192/Makefile create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-clk.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-clk.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-common.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-control.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-gpio.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-gpio.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-adda.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-i2s.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-pcm.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-interconnection.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-reg.h