linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trevor Wu <trevor.wu@mediatek.com>
To: Rob Herring <robh@kernel.org>
Cc: <broonie@kernel.org>, <tiwai@suse.com>, <matthias.bgg@gmail.com>,
	<alsa-devel@alsa-project.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<bicycle.tsai@mediatek.com>, <jiaxin.yu@mediatek.com>,
	<cychiang@google.com>, <aaronyu@google.com>
Subject: Re: [PATCH v2 6/8] dt-bindings: mediatek: mt8195: add audio afe document
Date: Mon, 5 Jul 2021 15:01:26 +0800	[thread overview]
Message-ID: <52d6aada4b48cc3b72bc5beb1bb5ca6acf5e91aa.camel@mediatek.com> (raw)
In-Reply-To: <20210701201846.GA2783836@robh.at.kernel.org>

On Thu, 2021-07-01 at 14:18 -0600, Rob Herring wrote:
> On Tue, Jun 29, 2021 at 09:47:34AM +0800, Trevor Wu wrote:
> > This patch adds mt8195 audio afe document.
> > 
> > Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
> > ---
> > This patch depends on the following series that have not been
> > accepted.
> > 
> > [1] Mediatek MT8195 clock support
> > 
https://patchwork.kernel.org/project/linux-mediatek/list/?series=501923
> > (dt-bindings/clock/mt8195-clk.h is included)
> > 
> > [2] Mediatek MT8195 power domain support
> > 
https://patchwork.kernel.org/project/linux-mediatek/list/?series=500709
> > (dt-bindings/power/mt8195-power.h is included)
> > ---
> >  .../bindings/sound/mt8195-afe-pcm.yaml        | 136
> > ++++++++++++++++++
> >  1 file changed, 136 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/sound/mt8195-
> > afe-pcm.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/mt8195-afe-
> > pcm.yaml b/Documentation/devicetree/bindings/sound/mt8195-afe-
> > pcm.yaml
> > new file mode 100644
> > index 000000000000..a4fb5c7dd022
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml
> > @@ -0,0 +1,136 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Mediatek AFE PCM controller for mt8195
> > +
> > +maintainers:
> > +  - Trevor Wu <trevor.wu@mediatek.com>
> > +
> > +properties:
> > +  compatible:
> > +    const: mediatek,mt8195-audio
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  mediatek,topckgen:
> > +    $ref: "/schemas/types.yaml#/definitions/phandle"
> > +    description: The phandle of the mediatek topckgen controller
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    items:
> > +      - description: audio 26M clock
> > +      - description: AFE clock
> > +      - description: audio infra sys clock
> > +      - description: audio infra 26M clock
> > +
> > +  clock-names:
> > +    items:
> > +      - const: clk26m
> > +      - const: aud_afe
> > +      - const: infra_ao_audio
> > +      - const: infra_ao_audio_26m_b
> > +
> > +  etdm-in1-chn-disabled:
> 
> Needs a vendor prefix.
> 
> > +    $ref: /schemas/types.yaml#/definitions/uint8-array
> > +    maxItems: 24
> > +    description: Specify which input channel should be disabled.
> > +
> > +  etdm-in2-chn-disabled:
> 
> Needs a vendor prefix.
> 
> > +    $ref: /schemas/types.yaml#/definitions/uint8-array
> > +    maxItems: 16
> > +    description: Specify which input channel should be disabled.
> > +
> > +patternProperties:
> > +  "^etdm-in[1-2]-mclk-source$":
> 
> And all these need a vendor prefix.
> 
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Specify etdm in mclk source clock.
> > +    enum:
> > +      - 0 # xtal_26m_ck
> > +      - 1 # apll1_ck
> > +      - 2 # apll2_ck
> > +      - 3 # apll3_ck
> > +      - 4 # apll4_ck
> > +      - 5 # apll5_ck
> > +      - 6 # hdmirx_apll_ck
> > +
> > +  "^etdm-out[1-3]-mclk-source$":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Specify etdm out mclk source clock.
> > +
> > +  "^etdm-in[1-2]-mclk-alwasys-on-rate$":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Specify etdm in mclk output rate for always on
> > case.
> 
> Hz? If so, '-hz' unit suffix and drop the type ref.
> 

Yes, it's Hz.
I will add unit suffix and drop the type.

> > +
> > +  "^etdm-out[1-3]-mclk-alwasys-on-rate$":
> 
> typo: alwasys
> 
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Specify etdm out mclk output rate for always on
> > case.
> 
> Hz?
> 
> > +
> > +  "^etdm-in[1-2]-data-mode$":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Specify etdm in data mode.
> > +    enum:
> > +      - 0 # one pin (TDM)
> > +      - 1 # multi pin (I2S)
> 
> Can be boolean?
> 
Yes, becasue only two options can be configured for data mode.
I will replace it with a bool property like "mediatek,etdm-in[1-2]-
multi-pin-mode".

> > +
> > +  "^etdm-out[1-3]-data-mode$":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Specify etdm out data mode.
> 
> Constraints on values?
> 
> > +
> > +  "^etdm-in[1-2]-cowork-source$":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: |
> > +      etdm modules can share the same external clock pin. Specify
> > +      which etdm clock source is required by this etdm in moudule.
> > +    enum:
> > +      - 0 # etdm1_in
> > +      - 1 # etdm2_in
> > +      - 2 # etdm1_out
> > +      - 3 # etdm2_out
> > +      - 4 # etdm3_out
> > +
> > +  "^etdm-out[1-3]-cowork-source$":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: |
> > +      etdm modules can share the same external clock pin. Specify
> > +      which etdm clock source is required by this etdm out
> > moudule.
> 
> Constraints?
> 
> > +
> > +required:
> > +  - compatible
> > +  - interrupts
> > +  - mediatek,topckgen
> > +  - power-domains
> > +  - clocks
> > +  - clock-names
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/clock/mt8195-clk.h>
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    #include <dt-bindings/power/mt8195-power.h>
> > +
> > +    afe: mt8195-afe-pcm {
> > +        compatible = "mediatek,mt8195-audio";
> > +        interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
> > +        mediatek,topckgen = <&topckgen>;
> > +        power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>;
> > +        clocks = <&clk26m>,
> > +                 <&audsys CLK_AUD_AFE>,
> > +                 <&infracfg_ao CLK_INFRA_AO_AUDIO>,
> > +                 <&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>;
> > +        clock-names = "clk26m",
> > +                      "aud_afe",
> > +                      "infra_ao_audio",
> > +                      "infra_ao_audio_26m_b";
> > +    };
> > +
> > +...
> > -- 
> > 2.18.0
> > 

Thanks for your reviewing.
I will correct all problems on v3.

Thanks,
Trevor
> > 

  reply	other threads:[~2021-07-05  7:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29  1:47 [PATCH v2 0/8] ASoC: mediatek: Add support for MT8195 SoC Trevor Wu
2021-06-29  1:47 ` [PATCH v2 1/8] ASoC: mediatek: mt8195: update mediatek common driver Trevor Wu
2021-06-29  1:47 ` [PATCH v2 2/8] ASoC: mediatek: mt8195: support etdm in platform driver Trevor Wu
2021-06-29  1:47 ` [PATCH v2 3/8] ASoC: mediatek: mt8195: support adda " Trevor Wu
2021-06-29  1:47 ` [PATCH v2 4/8] ASoC: mediatek: mt8195: support pcm " Trevor Wu
2021-06-29  1:47 ` [PATCH v2 5/8] ASoC: mediatek: mt8195: add " Trevor Wu
2021-07-12  6:57   ` Chen-Yu Tsai
2021-07-12 15:09     ` Trevor Wu
2021-07-13  6:00       ` Chen-Yu Tsai
2021-07-15 11:05         ` Trevor Wu
2021-07-19 10:05           ` Chen-Yu Tsai
2021-07-22  8:56             ` Trevor Wu
2021-07-23  6:27               ` Chen-Yu Tsai
2021-07-26 14:31                 ` Trevor Wu
2021-08-02 10:21                   ` Chen-Yu Tsai
2021-08-03 10:12                     ` Trevor Wu
2021-06-29  1:47 ` [PATCH v2 6/8] dt-bindings: mediatek: mt8195: add audio afe document Trevor Wu
2021-07-01 20:18   ` Rob Herring
2021-07-05  7:01     ` Trevor Wu [this message]
2021-06-29  1:47 ` [PATCH v2 7/8] ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682 Trevor Wu
2021-06-29  1:47 ` [PATCH v2 8/8] dt-bindings: mediatek: mt8195: add mt8195-mt6359-rt1019-rt5682 document Trevor Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52d6aada4b48cc3b72bc5beb1bb5ca6acf5e91aa.camel@mediatek.com \
    --to=trevor.wu@mediatek.com \
    --cc=aaronyu@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bicycle.tsai@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=cychiang@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxin.yu@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.com \
    --subject='Re: [PATCH v2 6/8] dt-bindings: mediatek: mt8195: add audio afe document' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).