devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Daniel Baluta <daniel.baluta@oss.nxp.com>
Cc: pierre-louis.bossart@linux.intel.com,
	alsa-devel@alsa-project.org, kuninori.morimoto.gx@renesas.com,
	peter.ujfalusi@ti.com, broonie@kernel.org, linux-imx@nxp.com,
	devicetree@vger.kernel.org, Xiubo.Lee@gmail.com,
	shengjiu.wang@nxp.com, linux-kernel@vger.kernel.org,
	tiwai@suse.com, ranjani.sridharan@linux.intel.com,
	liam.r.girdwood@linux.intel.com,
	sound-open-firmware@alsa-project.org,
	Daniel Baluta <daniel.baluta@nxp.com>
Subject: Re: [PATCH v2 1/2] dt-bindings: sound: Add FSL CPU DAI bindings
Date: Thu, 12 Mar 2020 15:23:06 -0500	[thread overview]
Message-ID: <20200312202306.GA18767@bogus> (raw)
In-Reply-To: <20200306111353.12906-2-daniel.baluta@oss.nxp.com>

On Fri, Mar 06, 2020 at 01:13:52PM +0200, Daniel Baluta wrote:
> From: Daniel Baluta <daniel.baluta@nxp.com>
> 
> Add dt bindings for he Generic FSL CPU DAI.
> 
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>  .../devicetree/bindings/sound/fsl,dai.yaml    | 97 +++++++++++++++++++
>  1 file changed, 97 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/fsl,dai.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,dai.yaml b/Documentation/devicetree/bindings/sound/fsl,dai.yaml
> new file mode 100644
> index 000000000000..e6426af67d30
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/fsl,dai.yaml
> @@ -0,0 +1,97 @@
> +# SPDX-License-Identifier: GPL-2.0

Dual license new bindings please:

(GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/fsl,dai.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic CPU FSL DAI driver for resource management

Bindings are for h/w devices, not drivers.

> +
> +maintainers:
> +  - Daniel Baluta <daniel.baluta@nxp.com>
> +
> +description: |
> +  On platforms with a DSP we need to split the resource handling between
> +  Application Processor (AP) and DSP. On platforms where the DSP doesn't
> +  have an easy access to resources, the AP will take care of
> +  configuring them. Resources handled by this generic driver are: clocks,
> +  power domains, pinctrl.

The DT should define a DSP node with resources that are part of the 
DSP. What setup the AP has to do should be implied by the compatible 
string and possibly what resources are described.

Or maybe the audio portion of the DSP is a child node...

> +
> +properties:
> +  '#sound-dai-cells':
> +    const: 0
> +
> +  compatible:
> +    enum:
> +      - fsl,esai-dai
> +      - fsl,sai-dai

Not very specific. There's only 2 versions of the DSP and ways it is 
integrated?

> +
> +  clocks:
> +    oneOf:
> +      - items: # for ESAI
> +          - description: Core clock used to access registers.
> +          - description: ESAI baud clock for ESAI controller used to derive
> +                         HCK, SCK and FS.
> +          - description: The system clock derived from ahb clock used to derive
> +                         HCK, SCK and FS.
> +          - description: SPBA clock is required when ESAI is placed as a bus
> +                         slave of the SP Bus and when two or more bus masters
> +                         (CPU, DMA or DSP) try to access it. This property is
> +                         optional depending on SoC design.
> +      - items: # for SAI
> +          - description: Bus clock for accessing registers
> +          - description: Master clock 0 for providing bit clock and frame clock
> +          - description: Master clock 1 for providing bit clock and frame clock
> +          - description: Master clock 2 for providing bit clock and frame clock
> +          - description: Master clock 3 for providing bit clock and frame clock
> +
> +  clock-names:
> +    oneOf:
> +      - items: # for ESAI
> +          - const: core
> +          - const: extal
> +          - const: fsys
> +          - const: spba
> +      - items: # for SAI
> +          - const: bus
> +          - const: mclk0
> +          - const: mclk1
> +          - const: mclk2
> +          - const: mclk3
> +
> +  pinctrl-0:
> +    description: Should specify pin control groups used for this controller.
> +
> +  pinctrl-names:
> +    const: default

pinctrl properties are implicitly allowed an don't have to be listed 
here.

> +
> +  power-domains:
> +    $ref: '/schemas/types.yaml#/definitions/phandle-array'

Don't need a type.

> +    description:
> +      List of phandles and PM domain specifiers, as defined by bindings of the
> +      PM domain provider.

Don't need to re-define common properties.

You do need to say how many power domains (maxItems: 1?).

> +
> +  fsl,dai-index:
> +    $ref: '/schemas/types.yaml#/definitions/uint32'
> +    description: Physical DAI index, must match the index from topology file

Sorry, we don't do indexes in DT.

What's a topology file?

> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - fsl,dai-index
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx8-clock.h>
> +    esai0_port: esai-port {
> +         #sound-dai-cells = <0>;
> +        compatible = "fsl,esai-dai";
> +
> +        fsl,dai-index = <0>;
> +        pinctrl-names = "default";
> +        pinctrl-0 = <&pinctrl_esai0>;
> +
> +        clocks = <&esai0_lpcg 1>, <&esai0_lpcg 0>,  <&esai0_lpcg 1>,
> +            <&clk_dummy>;
> +        clock-names = "core", "extal", "fsys", "spba";
> +    };
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-03-12 20:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 11:13 [PATCH v2 0/2] Add generic FSL CPU DAI driver Daniel Baluta
2020-03-06 11:13 ` [PATCH v2 1/2] dt-bindings: sound: Add FSL CPU DAI bindings Daniel Baluta
2020-03-12 20:23   ` Rob Herring [this message]
2020-03-16 13:01     ` Daniel Baluta
2020-03-18 23:50       ` Rob Herring
2020-03-06 11:13 ` [PATCH v2 2/2] ASoC: fsl: Add generic CPU DAI driver Daniel Baluta
2020-03-16 15:10   ` Lars-Peter Clausen

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=20200312202306.GA18767@bogus \
    --to=robh@kernel.org \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=daniel.baluta@oss.nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=shengjiu.wang@nxp.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).