From: Krzysztof Kozlowski <krzk@kernel.org>
To: Charan Pedumuru <charan.pedumuru@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: sound: nvidia,tegra30-ahub: Convert to DT schema
Date: Mon, 15 Jun 2026 08:50:00 +0200 [thread overview]
Message-ID: <20260615-elastic-spiked-kudu-6ef296@quoll> (raw)
In-Reply-To: <20260613-nvidia-ahub-v1-1-5b7e85301736@gmail.com>
On Sat, Jun 13, 2026 at 08:24:47AM +0000, Charan Pedumuru wrote:
> Convert NVIDIA Tegra Audio Hub (AHUB) binding to DT schema.
Please use subject prefixes matching the subsystem. You can get them for
example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
ASoC: dt-bindings:
...
> +description:
> + The NVIDIA Tegra AHUB (Audio Hub) is an audio interconnect block used to
> + route data between various audio clients such as I2S, DAM, SPDIF, and
> + APBIF. It exposes multiple register regions and supports different
> + configurations depending on the Tegra SoC generation. The AHUB also
> + provides a configlink bus for child audio components, which use CIF
> + (Client Interface) IDs to identify their data paths. The number of DMA
> + channels, reset lines, and additional modules varies across Tegra30,
> + Tegra114, and Tegra124 platforms.
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: nvidia,tegra30-ahub
> + - const: nvidia,tegra114-ahub
> + - const: nvidia,tegra124-ahub
These three are enum and please sort alphanumerically, not by natural
sorting (so 30 > 124)
> + - items:
> + - const: nvidia,tegra132-ahub
> + - const: nvidia,tegra124-ahub
> +
> + reg:
> + minItems: 2
> + maxItems: 3
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: Clock for the D_AUDIO domain
> + - description: Clock for the APBIF interface
> +
> + clock-names:
> + items:
> + - const: d_audio
> + - const: apbif
> +
> + resets:
> + minItems: 11
> + maxItems: 21
> +
> + reset-names:
> + oneOf:
> + # Tegra30: d_audio apbif i2s0-4 dam0-2 spdif
> + - items:
> + - const: d_audio
> + - const: apbif
> + - const: i2s0
> + - const: i2s1
> + - const: i2s2
> + - const: i2s3
> + - const: i2s4
> + - const: dam0
> + - const: dam1
> + - const: dam2
> + - const: spdif
> +
> + # Tegra114: adds amx adx
> + - items:
> + - const: d_audio
> + - const: apbif
> + - const: i2s0
> + - const: i2s1
> + - const: i2s2
> + - const: i2s3
> + - const: i2s4
> + - const: dam0
> + - const: dam1
> + - const: dam2
> + - const: spdif
> + - const: amx
> + - const: adx
> +
> + # Tegra124: adds amx1 adx1 afc0-5
> + - items:
> + - const: d_audio
> + - const: apbif
> + - const: i2s0
> + - const: i2s1
> + - const: i2s2
> + - const: i2s3
> + - const: i2s4
> + - const: dam0
> + - const: dam1
> + - const: dam2
> + - const: spdif
> + - const: amx
> + - const: amx1
> + - const: adx
> + - const: adx1
> + - const: afc0
> + - const: afc1
> + - const: afc2
> + - const: afc3
> + - const: afc4
> + - const: afc5
These should be placed in allOf: section. Here define only min/maxItems.
> +
> + dmas:
> + minItems: 8
> + maxItems: 20
> +
> + dma-names:
> + oneOf:
> + # Tegra30: rx0..rx3 tx0..tx3 (n=3)
> + - items:
> + - const: rx0
> + - const: tx0
> + - const: rx1
> + - const: tx1
> + - const: rx2
> + - const: tx2
> + - const: rx3
> + - const: tx3
> +
> + # Tegra114/124: rx0..rx9 tx0..tx9 (n=9)
> + - items:
> + - const: rx0
> + - const: tx0
> + - const: rx1
> + - const: tx1
> + - const: rx2
> + - const: tx2
> + - const: rx3
> + - const: tx3
> + - const: rx4
> + - const: tx4
> + - const: rx5
> + - const: tx5
> + - const: rx6
> + - const: tx6
> + - const: rx7
> + - const: tx7
> + - const: rx8
> + - const: tx8
> + - const: rx9
> + - const: tx9
Keep this list (so drop the "oneOf") and add minItems. Then in
allOf:if:then: block you customize min/maxItems.
> +
> + "#address-cells":
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + "#size-cells":
> + $ref: /schemas/types.yaml#/definitions/uint32
You do not need types. You need values (const). See also other bindings
for examples. Even if this is MMIO bus, I doubt children need 64-bit
addressing, so this should be really 32-bit (thus const:1 , not even
enum). If you need 64-bit addressing (e.g. for DMA), this would have to
be explained.
> +
> + ranges: true
> +
> +patternProperties:
> + "^i2s@[0-9a-f]+$":
I think this was not in the old binding. so you need to explain in
commit msg why you made this change to the binding.
> + type: object
> +
> + allOf:
> + - $ref: /schemas/sound/nvidia,tegra30-i2s.yaml#
$ref directly, no need for allOf
> +
> + properties:
> + nvidia,ahub-cif-ids:
> + description: Pair of AHUB CIF IDs for the RX and TX data paths.
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 2
> + maxItems: 2
> +
> + required:
> + - nvidia,ahub-cif-ids
Why do you need the properties and required here? The child (i2s) schema
should define that.
> +
> + unevaluatedProperties: false
> +
Best regards,
Krzysztof
prev parent reply other threads:[~2026-06-15 6:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-13 8:24 Charan Pedumuru
2026-06-14 0:04 ` Mark Brown
2026-06-15 6:50 ` Krzysztof Kozlowski [this message]
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=20260615-elastic-spiked-kudu-6ef296@quoll \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=charan.pedumuru@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@kernel.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
all inboxes | Powered by JetHome®