Message ID | 20230728090819.18038-7-maso.huang@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp317285vqg; Fri, 28 Jul 2023 02:52:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbW9RR4EBAfnuqTDvHV6bAyJi1UPXL5RN/LVrTbCOYmZajXEMK/M9lLBc101laOctk8K1t X-Received: by 2002:a05:6358:91a9:b0:135:57d0:d173 with SMTP id j41-20020a05635891a900b0013557d0d173mr2332027rwa.20.1690537966091; Fri, 28 Jul 2023 02:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690537966; cv=none; d=google.com; s=arc-20160816; b=ZOWMKZcvgJYakUJDq42NzGFzH+WTBz1cFqaGSltSQBdAKhjAV46mQ4YCwnqxSczQ5j kxntSISyB4DhSxjNu3sNQYoK66IMj5kfG1ujm/JgJSA2GnzV9KUc242J+sfyDuWIaWPl ruIqmoLQhRmt1Wac2bR1PySTbctsbwbWrR9ITr4HYagu+sREFTXZ0jToD5XK6BZmpGP3 OyY2AjRkELxB1q4ZwFY3FO3ym3gwV2cYwJIho1F6C0hHSriUEI1ce+Po8ICfpVzVBR5x 833FL+DRvLNxn9dYrJqMzjEw2phFFaDzz6C6NRUoPFi3mfnn+UET4pNlFUjpJsTII9zT c8IQ== 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=bbjmhOdykU83KPH/M1QU2kpF8BWkVdXUxY/Ht/Ui5AU=; fh=iSNOOyfUI0t9WidQNwMqPhgLGujMtfcFQPsMQPr9keg=; b=ZRon6FmCQpCytRr19jLgEFcSERiT8OBiF2+3o8rbd+7SsF5W2sDKYfsQdj/PitjaCP l6RTVsXWeLSWdkHF4PPDrP0ZCG0r7jRSUsnUlA/2SfX2Oii+Z2k0WNIdVfaWoCKz6z3Z NMKdk25i7W8WHlOXxj+16LjTqkLo3qmiUH+unYkLDb5gSb3VDW3QknPBzh4SUcZTlMTk 3mRa6WLcbISCDhB2/JGsSdSoeDS4OoKVYagfcHOLTTQOD+uu57vVnWynRUXzngwhJkF/ EfeR7NpsQWXD1baK9e1ObuFu+PXycctwEb7Lie647ttSxAN1uAnQgOu7t/iyQzX6i7CS ILZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=tSnG0mEn; 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 127-20020a630285000000b0055798b90375si2863459pgc.709.2023.07.28.02.52.32; Fri, 28 Jul 2023 02:52:46 -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=tSnG0mEn; 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 S234309AbjG1JMZ (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Fri, 28 Jul 2023 05:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235267AbjG1JLe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Jul 2023 05:11:34 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 862434EEC; Fri, 28 Jul 2023 02:09:29 -0700 (PDT) X-UUID: 624ea3fe2d2611ee9cb5633481061a41-20230728 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=bbjmhOdykU83KPH/M1QU2kpF8BWkVdXUxY/Ht/Ui5AU=; b=tSnG0mEnekHzsFk17sSgTIP4t+PRhtlfhANIyvqkVvfZ4B0WqbmByf85A6TpHU6HYjQJAyCNBB9tSuyOjio5FBTmC5OanaHQN+wKQPBZ5vFwYDT1qMI+sJpu1Vuv4zlpOZcPQ+MlvoI94NF04sJTItP7All/B5+LrLpMCFb7k+M=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.30,REQID:ff804065-7364-424e-afc2-8894d3728ea9,IP:0,U RL:25,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:95 X-CID-INFO: VERSION:1.1.30,REQID:ff804065-7364-424e-afc2-8894d3728ea9,IP:0,URL :25,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACT ION:quarantine,TS:95 X-CID-META: VersionHash:1fcc6f8,CLOUDID:fc39a2a0-0933-4333-8d4f-6c3c53ebd55b,B ulkID:230728170858FLODCKLR,BulkQuantity:0,Recheck:0,SF:38|29|28|17|19|48,T C:nil,Content:0,EDM:-3,IP:nil,URL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SDM,TF_CID_SPAM_ASC,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD, TF_CID_SPAM_ULN,TF_CID_SPAM_SNR X-UUID: 624ea3fe2d2611ee9cb5633481061a41-20230728 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from <maso.huang@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2124003612; Fri, 28 Jul 2023 17:08:57 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 28 Jul 2023 17:08:56 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 28 Jul 2023 17:08:56 +0800 From: Maso Huang <maso.huang@mediatek.com> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Trevor Wu <trevor.wu@mediatek.com>, Arnd Bergmann <arnd@arndb.de>, Mars Chen <chenxiangrui@huaqin.corp-partner.google.com>, Allen-KH Cheng <allen-kh.cheng@mediatek.com>, <alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org> CC: Maso Huang <maso.huang@mediatek.com> Subject: [PATCH v3 6/6] ASoC: dt-bindings: mediatek,mt7986-afe: add audio afe document Date: Fri, 28 Jul 2023 17:08:19 +0800 Message-ID: <20230728090819.18038-7-maso.huang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230728090819.18038-1-maso.huang@mediatek.com> References: <20230728090819.18038-1-maso.huang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772657537888152348 X-GMAIL-MSGID: 1772657537888152348 |
Series |
ASoC: mediatek: Add support for MT7986 SoC
|
|
Commit Message
Maso Huang (黃加竹)
July 28, 2023, 9:08 a.m. UTC
Add mt7986 audio afe document.
Signed-off-by: Maso Huang <maso.huang@mediatek.com>
---
.../bindings/sound/mediatek,mt7986-afe.yaml | 89 +++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml
Comments
Il 28/07/23 11:08, Maso Huang ha scritto: > Add mt7986 audio afe document. > > Signed-off-by: Maso Huang <maso.huang@mediatek.com> > --- > .../bindings/sound/mediatek,mt7986-afe.yaml | 89 +++++++++++++++++++ > 1 file changed, 89 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml > > diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml > new file mode 100644 > index 000000000000..ebb151c6400f > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml > @@ -0,0 +1,89 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/mediatek,mt7986-afe.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek AFE PCM controller for MT7986 > + > +maintainers: > + - Maso Huang <maso.huang@mediatek.com> > + > +properties: > + compatible: > + oneOf: > + - const: mediatek,mt7986-afe > + - items: > + - enum: > + - mediatek,mt7981-afe > + - mediatek,mt7988-afe > + - const: mediatek,mt7986-afe > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + minItems: 5 > + items: > + - description: audio bus clock > + - description: audio 26M clock > + - description: audio intbus clock > + - description: audio hopping clock > + - description: audio pll clock > + - description: mux for pcm_mck > + - description: audio i2s/pcm mck > + > + clock-names: > + minItems: 5 > + items: > + - const: bus_ck > + - const: 26m_ck > + - const: l_ck > + - const: aud_ck > + - const: eg2_ck > + - const: sel > + - const: i2s_m > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - assigned-clocks > + - assigned-clock-parents assigned-clocks and assigned-clock-parents are not a *required* property, as that depends on a number of things and someone *may* want to omit it. Besides, that's related to how the drivers interact with / setup the hardware and not with the hardware itself... you can keep the assigned-clocks and assigned-clock-parents in your examples, but again they're definitely not required properties. After fixing, Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Regards, Angelo > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + #include <dt-bindings/clock/mt7986-clk.h> > + > + afe@11210000 { > + compatible = "mediatek,mt7986-afe"; > + reg = <0x11210000 0x9000>; > + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&infracfg_ao CLK_INFRA_AUD_BUS_CK>, > + <&infracfg_ao CLK_INFRA_AUD_26M_CK>, > + <&infracfg_ao CLK_INFRA_AUD_L_CK>, > + <&infracfg_ao CLK_INFRA_AUD_AUD_CK>, > + <&infracfg_ao CLK_INFRA_AUD_EG2_CK>; > + clock-names = "bus_ck", > + "26m_ck", > + "l_ck", > + "aud_ck", > + "eg2_ck"; > + assigned-clocks = <&topckgen CLK_TOP_A1SYS_SEL>, > + <&topckgen CLK_TOP_AUD_L_SEL>, > + <&topckgen CLK_TOP_A_TUNER_SEL>; > + assigned-clock-parents = <&topckgen CLK_TOP_APLL2_D4>, > + <&apmixedsys CLK_APMIXED_APLL2>, > + <&topckgen CLK_TOP_APLL2_D4>; > + }; > + > +...
On Fri, 2023-07-28 at 12:00 +0200, AngeloGioacchino Del Regno wrote: > Il 28/07/23 11:08, Maso Huang ha scritto: > > Add mt7986 audio afe document. > > > > Signed-off-by: Maso Huang <maso.huang@mediatek.com> > > --- > > .../bindings/sound/mediatek,mt7986-afe.yaml | 89 > > +++++++++++++++++++ > > 1 file changed, 89 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml > > > > diff --git > > a/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml > > b/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml > > new file mode 100644 > > index 000000000000..ebb151c6400f > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/sound/mediatek,mt7986- > > afe.yaml > > @@ -0,0 +1,89 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: > > https://urldefense.com/v3/__http://devicetree.org/schemas/sound/mediatek,mt7986-afe.yaml*__;Iw!!CTRNKA9wMg0ARbw!nwtJIMuoaT5RiUlFU-0ExLhvWHgz9nyXm0Jxk9RfoaKqIKzS8_JTvdIW9AhOkTIpVjN9Jv3L7Aj4nXzTEeuHK2-Wdq69mo0$ > > > > +$schema: > > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!nwtJIMuoaT5RiUlFU-0ExLhvWHgz9nyXm0Jxk9RfoaKqIKzS8_JTvdIW9AhOkTIpVjN9Jv3L7Aj4nXzTEeuHK2-Wo1ebvx8$ > > > > + > > +title: MediaTek AFE PCM controller for MT7986 > > + > > +maintainers: > > + - Maso Huang <maso.huang@mediatek.com> > > + > > +properties: > > + compatible: > > + oneOf: > > + - const: mediatek,mt7986-afe > > + - items: > > + - enum: > > + - mediatek,mt7981-afe > > + - mediatek,mt7988-afe > > + - const: mediatek,mt7986-afe > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + minItems: 5 > > + items: > > + - description: audio bus clock > > + - description: audio 26M clock > > + - description: audio intbus clock > > + - description: audio hopping clock > > + - description: audio pll clock > > + - description: mux for pcm_mck > > + - description: audio i2s/pcm mck > > + > > + clock-names: > > + minItems: 5 > > + items: > > + - const: bus_ck > > + - const: 26m_ck > > + - const: l_ck > > + - const: aud_ck > > + - const: eg2_ck > > + - const: sel > > + - const: i2s_m > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + - clock-names > > + - assigned-clocks > > + - assigned-clock-parents > > assigned-clocks and assigned-clock-parents are not a *required* > property, > as that depends on a number of things and someone *may* want to omit > it. > > Besides, that's related to how the drivers interact with / setup the > hardware > and not with the hardware itself... you can keep the assigned-clocks > and > assigned-clock-parents in your examples, but again they're definitely > not > required properties. > > After fixing, > > Reviewed-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > > Regards, > Angelo > Hi Angelo, Thanks for your review. I'll remove these in v4 patch! Best regards, Maso > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > + #include <dt-bindings/interrupt-controller/irq.h> > > + #include <dt-bindings/clock/mt7986-clk.h> > > + > > + afe@11210000 { > > + compatible = "mediatek,mt7986-afe"; > > + reg = <0x11210000 0x9000>; > > + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&infracfg_ao CLK_INFRA_AUD_BUS_CK>, > > + <&infracfg_ao CLK_INFRA_AUD_26M_CK>, > > + <&infracfg_ao CLK_INFRA_AUD_L_CK>, > > + <&infracfg_ao CLK_INFRA_AUD_AUD_CK>, > > + <&infracfg_ao CLK_INFRA_AUD_EG2_CK>; > > + clock-names = "bus_ck", > > + "26m_ck", > > + "l_ck", > > + "aud_ck", > > + "eg2_ck"; > > + assigned-clocks = <&topckgen CLK_TOP_A1SYS_SEL>, > > + <&topckgen CLK_TOP_AUD_L_SEL>, > > + <&topckgen CLK_TOP_A_TUNER_SEL>; > > + assigned-clock-parents = <&topckgen CLK_TOP_APLL2_D4>, > > + <&apmixedsys CLK_APMIXED_APLL2>, > > + <&topckgen CLK_TOP_APLL2_D4>; > > + }; > > + > > +... > >
On 28/07/2023 11:08, Maso Huang wrote: > Add mt7986 audio afe document. > > Signed-off-by: Maso Huang <maso.huang@mediatek.com> Thank you for your patch. There is something to discuss/improve. > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - assigned-clocks > + - assigned-clock-parents You should constrain your clocks per variants. I doubt that they are really so flexible/optional on each SoC... or maybe missing clocks are result of unimplemented parts in the driver? But then this should not really affect bindings. Bindings still should require such clocks. Your DTS can always provide a <0>, if needed. > + > +additionalProperties: false Best regards, Krzysztof
On Fri, Jul 28, 2023 at 02:51:26PM +0200, Krzysztof Kozlowski wrote: > On 28/07/2023 11:08, Maso Huang wrote: > > + - assigned-clocks > > + - assigned-clock-parents > You should constrain your clocks per variants. I doubt that they are > really so flexible/optional on each SoC... or maybe missing clocks are > result of unimplemented parts in the driver? But then this should not > really affect bindings. Bindings still should require such clocks. Your > DTS can always provide a <0>, if needed. Depending on what the clocks are some of them might genuinely be optional, it's fairly common for audio devices to have multiple clock inputs and be able to select between them depending on system requirements or to have bidirectional clock pins which may be either a provider or consumer depending on system configuration. No idea how that applies with this specific device.
On Fri, 2023-07-28 at 14:51 +0200, Krzysztof Kozlowski wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 28/07/2023 11:08, Maso Huang wrote: > > Add mt7986 audio afe document. > > > > Signed-off-by: Maso Huang <maso.huang@mediatek.com> > > Thank you for your patch. There is something to discuss/improve. > > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + - clock-names > > + - assigned-clocks > > + - assigned-clock-parents > > You should constrain your clocks per variants. I doubt that they are > really so flexible/optional on each SoC... or maybe missing clocks > are > result of unimplemented parts in the driver? But then this should not > really affect bindings. Bindings still should require such clocks. > Your > DTS can always provide a <0>, if needed. > > Hi Krzysztof, After internal check, assigned-clocks and assigned-clock-parents are not required on this SoC. Maybe we can just drop these two options? Best regards, Maso > > + > > +additionalProperties: false > > > Best regards, > Krzysztof >
On 01/08/2023 10:25, Maso Huang (黃加竹) wrote: > On Fri, 2023-07-28 at 14:51 +0200, Krzysztof Kozlowski wrote: >> >> External email : Please do not click links or open attachments until >> you have verified the sender or the content. >> On 28/07/2023 11:08, Maso Huang wrote: >>> Add mt7986 audio afe document. >>> >>> Signed-off-by: Maso Huang <maso.huang@mediatek.com> >> >> Thank you for your patch. There is something to discuss/improve. >> >>> + >>> +required: >>> + - compatible >>> + - reg >>> + - interrupts >>> + - clocks >>> + - clock-names >>> + - assigned-clocks >>> + - assigned-clock-parents >> >> You should constrain your clocks per variants. I doubt that they are >> really so flexible/optional on each SoC... or maybe missing clocks >> are >> result of unimplemented parts in the driver? But then this should not >> really affect bindings. Bindings still should require such clocks. >> Your >> DTS can always provide a <0>, if needed. >> >> > > Hi Krzysztof, > > After internal check, assigned-clocks and assigned-clock-parents are > not required on this SoC. > Maybe we can just drop these two options? It's separate issue, but yes - why requiring them? I wrote about missing constraints for your clocks in the bindings. Best regards, Krzysztof
On Fri, 2023-08-04 at 11:45 +0200, Krzysztof Kozlowski wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 01/08/2023 10:25, Maso Huang (黃加竹) wrote: > > On Fri, 2023-07-28 at 14:51 +0200, Krzysztof Kozlowski wrote: > >> > >> External email : Please do not click links or open attachments > until > >> you have verified the sender or the content. > >> On 28/07/2023 11:08, Maso Huang wrote: > >>> Add mt7986 audio afe document. > >>> > >>> Signed-off-by: Maso Huang <maso.huang@mediatek.com> > >> > >> Thank you for your patch. There is something to discuss/improve. > >> > >>> + > >>> +required: > >>> + - compatible > >>> + - reg > >>> + - interrupts > >>> + - clocks > >>> + - clock-names > >>> + - assigned-clocks > >>> + - assigned-clock-parents > >> > >> You should constrain your clocks per variants. I doubt that they > are > >> really so flexible/optional on each SoC... or maybe missing clocks > >> are > >> result of unimplemented parts in the driver? But then this should > not > >> really affect bindings. Bindings still should require such clocks. > >> Your > >> DTS can always provide a <0>, if needed. > >> > >> > > > > Hi Krzysztof, > > > > After internal check, assigned-clocks and assigned-clock-parents > are > > not required on this SoC. > > Maybe we can just drop these two options? > > It's separate issue, but yes - why requiring them? > > I wrote about missing constraints for your clocks in the bindings. > > Best regards, > Krzysztof > Hi Krzysztof, OK, I'll remove assigned-clock and assigned-clock-parents. And constrain the clocks for different SoC in the binding in v4 patch. Best regards, Maso
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml new file mode 100644 index 000000000000..ebb151c6400f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mediatek,mt7986-afe.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek AFE PCM controller for MT7986 + +maintainers: + - Maso Huang <maso.huang@mediatek.com> + +properties: + compatible: + oneOf: + - const: mediatek,mt7986-afe + - items: + - enum: + - mediatek,mt7981-afe + - mediatek,mt7988-afe + - const: mediatek,mt7986-afe + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 5 + items: + - description: audio bus clock + - description: audio 26M clock + - description: audio intbus clock + - description: audio hopping clock + - description: audio pll clock + - description: mux for pcm_mck + - description: audio i2s/pcm mck + + clock-names: + minItems: 5 + items: + - const: bus_ck + - const: 26m_ck + - const: l_ck + - const: aud_ck + - const: eg2_ck + - const: sel + - const: i2s_m + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - assigned-clocks + - assigned-clock-parents + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/clock/mt7986-clk.h> + + afe@11210000 { + compatible = "mediatek,mt7986-afe"; + reg = <0x11210000 0x9000>; + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&infracfg_ao CLK_INFRA_AUD_BUS_CK>, + <&infracfg_ao CLK_INFRA_AUD_26M_CK>, + <&infracfg_ao CLK_INFRA_AUD_L_CK>, + <&infracfg_ao CLK_INFRA_AUD_AUD_CK>, + <&infracfg_ao CLK_INFRA_AUD_EG2_CK>; + clock-names = "bus_ck", + "26m_ck", + "l_ck", + "aud_ck", + "eg2_ck"; + assigned-clocks = <&topckgen CLK_TOP_A1SYS_SEL>, + <&topckgen CLK_TOP_AUD_L_SEL>, + <&topckgen CLK_TOP_A_TUNER_SEL>; + assigned-clock-parents = <&topckgen CLK_TOP_APLL2_D4>, + <&apmixedsys CLK_APMIXED_APLL2>, + <&topckgen CLK_TOP_APLL2_D4>; + }; + +...