From patchwork Fri Oct 21 08:27:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?VHJldm9yIFd1ICjlkLPmlofoia8p?= X-Patchwork-Id: 465 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp565873wrr; Fri, 21 Oct 2022 01:33:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VlaoKdYHw7GZCNXeJx8Ns97KC1dpIsAnFbH/F3KibxGzZIt8hDvv73Mz1E40rotuBT8SZ X-Received: by 2002:a17:907:3186:b0:777:3fe7:4659 with SMTP id xe6-20020a170907318600b007773fe74659mr14358043ejb.336.1666341212642; Fri, 21 Oct 2022 01:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666341212; cv=none; d=google.com; s=arc-20160816; b=X34ZUYKqUkufP8bfdak90hgf38uHYcq7NQpkJczRDwYbiyE94QX0m9A8bLnE/LtWb+ iza51eXHkaR5KH2vyU5Ma3C1jx1UxXM9c7lw9kYN/4uHUYP4PBn5pTZHG5u2Jl4jWGlH /cMSbVxPESKD+muLMLWi6vPgTk28VjZWDcshhsJXA8jhUYgjlErTtlpXsPusWYROp4Ka ejqQqWc9HFZV8jllgV9pWx6nSXYWYDDAHuS9oZG80b1xKL57rsabkR1EeckfphMPjqV3 NokVWc9a8UBh91oHEKakYOvAbltszrtxVpyX6ZT5uJ0Cw2kXqt8Nbi6y13E6+b+Du2FE oU2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=6EmYthcJ2NF4pkw+zwFpbJG1Uc8byJjYA0ftZAO+KwY=; b=fPxCt2XilfbPqAwpXkzMYQiiahJqeNfA34TqkGO9qtbW6Y79qJ1FRO0xMxQMifpUZL n19OAlUjexcaiulUs6EEtTbNjhwICr7Zaw7865vnDO5lXRFyKXO03ffhkfo84SA9cTOr ZWaQn3tY91fvmDfGMDSWCBShk2f7jQ7vWkz5yFnRr0kxuvP1wDAjx/SwYbf9if6LfvoG pTML2JAjLp74ozzy1Wt0ju/nCvmQCgio/0Ke0EcAPgRiynNlG2cPCjAtDwg/N/DHTH+G WuVB32DJxfjntXrRPLnXHoom7+jIVTRnPW2uMzs5rprG3rAokxr8BpoZeFG8hqzE1W7D xzQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mG3jmCIx; 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 r8-20020a170906280800b00782e437a368si15701505ejc.160.2022.10.21.01.33.08; Fri, 21 Oct 2022 01:33:32 -0700 (PDT) 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=mG3jmCIx; 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 S230156AbiJUI1x (ORCPT + 99 others); Fri, 21 Oct 2022 04:27:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbiJUI1l (ORCPT ); Fri, 21 Oct 2022 04:27:41 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6E3224D8B0; Fri, 21 Oct 2022 01:27:32 -0700 (PDT) X-UUID: a3ff3a9331b64b5da75a6f386f9c79a0-20221021 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=6EmYthcJ2NF4pkw+zwFpbJG1Uc8byJjYA0ftZAO+KwY=; b=mG3jmCIxQ7bMW6bRVy1ySyfMNqXi7nfI7Ma1M2IhRt1qF9y0zdFL28rQqvtHS2fHqUOjeLGezdW479DbxfHfXSvjSohdRy+3DThtXYvNvAOoGGvYIoMOThKvJHI7SJhKX1IBWwC6UMO2PtjfKoO/1zSg5mGMTvgvVSh1rk16zAo=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.12,REQID:9fbdf926-1fc3-4eb8-9ac5-93cb204bae05,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:62cd327,CLOUDID:63fa3ee4-e572-4957-be22-d8f73f3158f9,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 X-UUID: a3ff3a9331b64b5da75a6f386f9c79a0-20221021 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1191235126; Fri, 21 Oct 2022 16:27:25 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 21 Oct 2022 16:27:24 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 21 Oct 2022 16:27:24 +0800 From: Trevor Wu To: , , , , CC: , , , , , , , Subject: [PATCH v2 00/12] ASoC: mediatek: Add support for MT8188 SoC Date: Fri, 21 Oct 2022 16:27:07 +0800 Message-ID: <20221021082719.18325-1-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 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,URIBL_BLOCKED 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?1747285403076429363?= X-GMAIL-MSGID: =?utf-8?q?1747285403076429363?= This series of patches adds support for Mediatek AFE of MT8188 SoC. Patches are based on broonie tree "for-next" branch. Changes since v1: - remove bus protection functions in case of unmerged dependency problem - replace some bit operation macro with FIELD_PREP - simplify register control by regmap_set_bits and regmap_clear_bits - fix dt-binding errors - rename compatible string for recognition Trevor Wu (12): ASoC: mediatek: common: add SMC ops and SMC CMD ASoC: mediatek: mt8188: add common header ASoC: mediatek: mt8188: support audsys clock ASoC: mediatek: mt8188: support adda in platform driver ASoC: mediatek: mt8188: support etdm in platform driver ASoC: mediatek: mt8188: support pcmif in platform driver ASoC: mediatek: mt8188: support audio clock control ASoC: mediatek: mt8188: add platform driver ASoC: mediatek: mt8188: add control for timing select dt-bindings: mediatek: mt8188: add audio afe document ASoC: mediatek: mt8188: add machine driver with mt6359 dt-bindings: mediatek: mt8188: add mt8188-mt6359 document .../bindings/sound/mt8188-afe-pcm.yaml | 187 + .../bindings/sound/mt8188-mt6359.yaml | 64 + sound/soc/mediatek/Kconfig | 23 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/common/mtk-base-afe.h | 19 + sound/soc/mediatek/mt8188/Makefile | 15 + sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 656 ++++ sound/soc/mediatek/mt8188/mt8188-afe-clk.h | 114 + sound/soc/mediatek/mt8188/mt8188-afe-common.h | 151 + sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 3359 +++++++++++++++++ sound/soc/mediatek/mt8188/mt8188-audsys-clk.c | 206 + sound/soc/mediatek/mt8188/mt8188-audsys-clk.h | 15 + .../soc/mediatek/mt8188/mt8188-audsys-clkid.h | 83 + sound/soc/mediatek/mt8188/mt8188-dai-adda.c | 631 ++++ sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 2596 +++++++++++++ sound/soc/mediatek/mt8188/mt8188-dai-pcm.c | 366 ++ sound/soc/mediatek/mt8188/mt8188-mt6359.c | 808 ++++ sound/soc/mediatek/mt8188/mt8188-reg.h | 3180 ++++++++++++++++ 18 files changed, 12474 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8188-afe-pcm.yaml create mode 100644 Documentation/devicetree/bindings/sound/mt8188-mt6359.yaml create mode 100644 sound/soc/mediatek/mt8188/Makefile create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-common.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clkid.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-adda.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-pcm.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-mt6359.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-reg.h