Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Sameer Pujar <spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: perex-/Fr2/VpizcU@public.gmane.org,
	tiwai-IBi9RG/b67k@public.gmane.org,
	broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sharadg-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	mkumard-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	viswanathl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	rlokhande-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	dramesh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	atalambedu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH v2 1/9] dt-bindings: sound: tegra: add DT binding for AHUB
Date: Thu, 6 Feb 2020 18:10:45 +0000	[thread overview]
Message-ID: <20200206181045.GA31521@bogus> (raw)
In-Reply-To: <1580380422-3431-2-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Thu, Jan 30, 2020 at 04:03:34PM +0530, Sameer Pujar wrote:
> Audio Hub (AHUB) comprises a collection of hardware accelerators for audio
> pre-processing and post-processing and a programmable full crossbar for
> audio routing across these accelerators. This patch adds YAML schema for DT
> binding of AHUB and few of its following components. These devices will be
> registered as ASoC components.
>  * ADMAIF
>  * I2S
>  * DMIC
>  * DSPK
> 
> Signed-off-by: Sameer Pujar <spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  .../bindings/sound/nvidia,tegra186-dspk.yaml       | 105 +++++++++++++
>  .../bindings/sound/nvidia,tegra210-admaif.yaml     | 165 +++++++++++++++++++++
>  .../bindings/sound/nvidia,tegra210-ahub.yaml       | 130 ++++++++++++++++
>  .../bindings/sound/nvidia,tegra210-dmic.yaml       | 105 +++++++++++++
>  .../bindings/sound/nvidia,tegra210-i2s.yaml        | 112 ++++++++++++++
>  5 files changed, 617 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml
>  create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
> new file mode 100644
> index 0000000..dc9fef3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: (GPL-2.0)

Dual license new bindings:

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

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra186-dspk.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra186 DSPK Controller Device Tree Bindings
> +
> +description: |
> +  The Digital Speaker Controller (DSPK) can be viewed as a Pulse
> +  Density Modulation (PDM) transmitter that up-samples the input to
> +  the desired sampling rate by interpolation and then converts the
> +  over sampled Pulse Code Modulation (PCM) input to the desired 1-bit
> +  output via Delta Sigma Modulation (DSM).
> +
> +maintainers:
> +  - Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> +  - Sameer Pujar <spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:

Drop 'items' for a single entry.

> +          const: nvidia,tegra186-dspk
> +      - items:
> +          - enum:
> +              - nvidia,tegra194-dspk
> +          - enum:
> +              - nvidia,tegra186-dspk

This can be a 'const'

> +
> +  reg:
> +    description: offset and length of the register set for the device.

That's every 'reg'. Drop.

> +    maxItems: 1
> +
> +  clocks:
> +    description: must contain an entry for each entry in clock-names.
> +      See ../clocks/clocks-bindings.txt for details.
> +    minItems: 1

Drop description and minItems. minItems is implied by the length of 
'items'.

> +    items:
> +      - description: Module clock
> +
> +  clock-names:
> +    description: must contain clock names for each corresponding entry in clocks.
> +      See ../clocks/clocks-bindings.txt for details.
> +    minItems: 1

ditto

> +    items:
> +      - const: dspk
> +
> +  assigned-clocks:
> +    description: list of input clocks and dividers for the audio system.
> +      See ../clocks/clock-bindings.txt for details.
> +    minItems: 1

ditto

> +    items:
> +      - description: Module clock
> +
> +  assigned-clock-parents:
> +    description: parent clock for each entry in assigned-clocks
> +      See ../clocks/clock-bindings.txt for details.
> +    minItems: 1

ditto

> +    items:
> +      - description: Parent for module clock
> +
> +  assigned-clock-rates:
> +    description: clock rate for each entry in assigned-clocks
> +      See ../clocks/clock-bindings.txt for details.

ditto

> +    items:
> +      - description: initial module clock rate
> +
> +  "#sound-dai-cells":
> +    const: 1
> +
> +  sound-name-prefix:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description:
> +      Used as prefix for sink/source names of the component. Must be a
> +      unique string among multiple instances of the same component.
> +      The name can be "DSPK1" or "DSPKx", where x depends on the maximum

Sounds like a constraint.

> +      available instances on a Tegra SoC.
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - assigned-clocks
> +  - assigned-clock-parents
> +  - "#sound-dai-cells"
> +
> +examples:
> +  - |
> +    #include<dt-bindings/clock/tegra186-clock.h>
> +
> +    tegra_dspk1: dspk@2905000 {
> +        compatible = "nvidia,tegra186-dspk";
> +        reg = <0x2905000 0x100>;
> +        clocks = <&bpmp TEGRA186_CLK_DSPK1>;
> +        clock-names = "dspk";
> +        assigned-clocks = <&bpmp TEGRA186_CLK_DSPK1>;
> +        assigned-clock-parents = <&bpmp TEGRA186_CLK_PLL_A_OUT0>;
> +        assigned-clock-rates = <12288000>;
> +        #sound-dai-cells = <1>;
> +        sound-name-prefix = "DSPK1";
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> new file mode 100644
> index 0000000..a8a41ba
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml
> @@ -0,0 +1,165 @@
> +# SPAT-License-Identifier: (GPL-2.0)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/nvidia,tegra210-admaif.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Tegra210 ADMAIF Device Tree Bindings
> +
> +description: |
> +  ADMAIF is the interface between ADMA and AHUB. Each ADMA channel
> +  that sends/receives data to/from AHUB must interface through an
> +  ADMAIF channel. ADMA channel sending data to AHUB pairs with ADMAIF
> +  Tx channel and ADMA channel receiving data from AHUB pairs with
> +  ADMAIF Rx channel.
> +
> +maintainers:
> +  - Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> +  - Sameer Pujar <spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          const: nvidia,tegra210-admaif
> +      - items:
> +          const: nvidia,tegra186-admaif

These 2 can be a single enum.

> +      - items:
> +          - enum:
> +             - nvidia,tegra194-admaif
> +          - enum:
> +             - nvidia,tegra186-admaif
> +
> +  reg:
> +    maxItems: 1
> +
> +  dmas: true
> +
> +  dma-names: true
> +
> +  "#sound-dai-cells":
> +    const: 1
> +
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        const: nvidia,tegra210-admaif
> +
> +then:
> +  properties:
> +    dmas:
> +      $ref: /schemas/types.yaml#/definitions/phandle-array

Drop. Common properties already have a type.

Plus this is wrong. A '$ref' means all other keywords are ignored (until 
we move to draft8).

> +      description:
> +        Two or more DMA channel specifiers, equally divided for Tx and Rx.
> +      minItems: 2
> +      maxItems: 20
> +    dma-names:
> +      $ref: /schemas/types.yaml#/definitions/string-array

drop

> +      description:
> +        There must be at least one channel named "tx1" for transmit and "rx1"
> +        for receive. If more channels need to be specified then "tx1",
> +        "tx2" ... "tx10" can be used. Similarly for Rx channels as well.

Sounds like constraints.


Stopping there. Similar issues on the rest...

  parent reply	other threads:[~2020-02-06 18:10 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 10:33 [PATCH v2 0/9] add ASoC components for AHUB Sameer Pujar
     [not found] ` <1580380422-3431-1-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-01-30 10:33   ` [PATCH v2 1/9] dt-bindings: sound: tegra: add DT binding " Sameer Pujar
     [not found]     ` <1580380422-3431-2-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-03 20:19       ` Dmitry Osipenko
     [not found]         ` <32d6c62d-0ac4-54e0-2efb-9f9a8cf2d271-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-04  4:24           ` Sameer Pujar
2020-02-06 18:10       ` Rob Herring [this message]
2020-02-10 11:30         ` Sameer Pujar
     [not found]           ` <af58b6b2-25b2-e968-73c9-d87e1a9e2746-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-11 18:15             ` Rob Herring
2020-01-30 10:33   ` [PATCH v2 2/9] ASoC: tegra: add support for CIF programming Sameer Pujar
2020-02-05 17:02     ` Dmitry Osipenko
     [not found]       ` <7239e858-16b7-609f-c4e3-8135bee8450b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-06 11:56         ` Sameer Pujar
     [not found]           ` <1305a6db-a492-eec2-111e-ddc801d58d86-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-06 16:49             ` Dmitry Osipenko
     [not found]               ` <fb0a96bd-ac3c-0916-0337-0c86de196527-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-07 11:03                 ` Sameer Pujar
2020-01-30 10:33   ` [PATCH v2 3/9] ASoC: tegra: add Tegra210 based DMIC driver Sameer Pujar
     [not found]     ` <1580380422-3431-4-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-06 16:53       ` Dmitry Osipenko
     [not found]         ` <9ada4090-169e-0767-db5d-739f6e621812-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-07 11:06           ` Sameer Pujar
     [not found]             ` <3e89e75d-2f5a-dc42-98f7-8e1262afe380-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-08 16:19               ` Dmitry Osipenko
2020-01-30 10:33   ` [PATCH v2 4/9] ASoC: tegra: add Tegra210 based I2S driver Sameer Pujar
     [not found]     ` <1580380422-3431-5-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-06 16:59       ` Dmitry Osipenko
     [not found]         ` <3a586a6b-5f53-dc44-b9fc-67c633c626ef-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-06 17:06           ` David Laight
2020-02-07 11:23             ` Sameer Pujar
2020-02-07 11:24           ` Sameer Pujar
2020-01-30 10:33   ` [PATCH v2 5/9] ASoC: tegra: add Tegra210 based AHUB driver Sameer Pujar
2020-01-30 16:22     ` Dmitry Osipenko
     [not found]       ` <ef701838-be43-e42c-9245-b28cda5ed9bb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-04  4:29         ` Sameer Pujar
     [not found]     ` <1580380422-3431-6-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-01-30 17:09       ` Dmitry Osipenko
     [not found]         ` <bd802f93-dd03-f39d-86e1-39f8571bbbb0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-01-30 17:18           ` Dmitry Osipenko
     [not found]             ` <f8c04460-f2ea-3102-4723-a5a75ba535ba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-04  4:35               ` Sameer Pujar
2020-02-04  4:34           ` Sameer Pujar
2020-01-30 17:25       ` Dmitry Osipenko
2020-01-31  3:12         ` Sameer Pujar
2020-01-31 14:34           ` Dmitry Osipenko
     [not found]         ` <160bb2ca-89bb-0ecf-a334-0fac591b439a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-04  4:36           ` Sameer Pujar
2020-01-30 10:33   ` [PATCH v2 6/9] ASoC: tegra: add Tegra186 based DSPK driver Sameer Pujar
     [not found]     ` <1580380422-3431-7-git-send-email-spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-06 17:15       ` Dmitry Osipenko
     [not found]         ` <f8ed8c4a-af40-44b2-b720-4d3a9b660fda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-07 11:26           ` Sameer Pujar
     [not found]             ` <75a63cb3-7d79-7216-6791-3cec57464cd9-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-07 18:22               ` Dmitry Osipenko
     [not found]                 ` <847f4512-7118-e087-1004-685e476e11d8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-10 11:15                   ` Sameer Pujar
     [not found]                     ` <3c19ef99-8051-76f7-a4d6-0d61182fe6e4-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-10 12:22                       ` Jon Hunter
     [not found]                         ` <4c75fc51-fbfd-158f-a096-d4f178921ee3-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-02-10 14:49                           ` Sameer Pujar
2020-01-30 10:33   ` [PATCH v2 7/9] ASoC: tegra: add Tegra210 based ADMAIF driver Sameer Pujar
2020-01-30 10:33   ` [PATCH v2 8/9] arm64: tegra: add AHUB components for few Tegra chips Sameer Pujar
2020-01-30 10:33   ` [PATCH v2 9/9] arm64: tegra: enable AHUB modules " Sameer Pujar
2020-02-06 17:36   ` [PATCH v2 0/9] add ASoC components for AHUB Dmitry Osipenko
     [not found]     ` <fcab0af1-fe84-6028-701b-ab101feaa8de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-07 11:30       ` Sameer Pujar
2020-02-07 18:25         ` Dmitry Osipenko
     [not found]           ` <40a4d544-7c33-3f28-0b9c-384bc9fe3b53-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-10 11:22             ` Sameer Pujar

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=20200206181045.GA31521@bogus \
    --to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=atalambedu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dramesh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mkumard-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=perex-/Fr2/VpizcU@public.gmane.org \
    --cc=rlokhande-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=sharadg-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=spujar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tiwai-IBi9RG/b67k@public.gmane.org \
    --cc=viswanathl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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