ASoC: dt-bindings: audio-graph-port related update

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Audio-Graph-Card and Simple-Audio-Card are similar Card
and are sharing same utils. Thus we can also sharing same schema.

This patch-set fixup some Renesas's "make dtbs_check".
This commit is contained in:
Mark Brown 2023-01-30 20:46:25 +00:00
commit 7f27be23ab
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
6 changed files with 184 additions and 86 deletions

View File

@ -25,6 +25,13 @@ properties:
"#sound-dai-cells":
const: 0
ports:
$ref: audio-graph-port.yaml#/definitions/ports
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
patternProperties:
"^asahi-kasei,in[1-2]-single-end$":
description: Input Pin 1 - 2.

View File

@ -11,32 +11,24 @@ maintainers:
select: false
allOf:
- $ref: /schemas/graph.yaml#/$defs/port-base
definitions:
port-base:
$ref: /schemas/graph.yaml#/$defs/port-base
properties:
convert-rate:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
convert-channels:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
convert-sample-format:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
mclk-fs:
$ref: "simple-card.yaml#/definitions/mclk-fs"
properties:
prefix:
description: "device name prefix"
$ref: /schemas/types.yaml#/definitions/string
convert-rate:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
convert-channels:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
convert-sample-format:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
patternProperties:
"^endpoint(@[0-9a-f]+)?":
endpoint-base:
$ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties:
mclk-fs:
description: |
Multiplication factor between stream rate and codec mclk.
When defined, mclk-fs property defined in dai-link sub nodes are
ignored.
$ref: /schemas/types.yaml#/definitions/uint32
$ref: "simple-card.yaml#/definitions/mclk-fs"
frame-inversion:
description: dai-link uses frame clock inversion
$ref: /schemas/types.yaml#/definitions/flag
@ -53,6 +45,15 @@ patternProperties:
oneOf:
- $ref: /schemas/types.yaml#/definitions/flag
- $ref: /schemas/types.yaml#/definitions/phandle
clocks:
description: Indicates system clock
$ref: /schemas/types.yaml#/definitions/phandle
system-clock-frequency:
$ref: "simple-card.yaml#/definitions/system-clock-frequency"
system-clock-direction-out:
$ref: "simple-card.yaml#/definitions/system-clock-direction-out"
system-clock-fixed:
$ref: "simple-card.yaml#/definitions/system-clock-fixed"
dai-format:
description: audio format.
@ -100,4 +101,24 @@ patternProperties:
minimum: 1
maximum: 64
ports:
$ref: "#/definitions/port-base"
unevaluatedProperties: false
patternProperties:
"^port(@[0-9a-f]+)?$":
$ref: "#/definitions/port-base"
unevaluatedProperties: false
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: "#/definitions/endpoint-base"
unevaluatedProperties: false
allOf:
- $ref: "#/definitions/port-base"
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: "#/definitions/endpoint-base"
unevaluatedProperties: false
additionalProperties: true

View File

@ -64,6 +64,7 @@ properties:
description: |
it must be 0 if your system is using single DAI
it must be 1 if your system is using multi DAIs
This is used on simple-audio-card
enum: [0, 1]
"#clock-cells":
@ -109,15 +110,34 @@ properties:
- pattern: '^clk_(a|b|c|i)$'
ports:
$ref: /schemas/graph.yaml#/properties/ports
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
patternProperties:
'^port(@[0-9a-f]+)?$':
$ref: audio-graph-port.yaml#
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: audio-graph-port.yaml#/definitions/endpoint-base
properties:
playback:
$ref: /schemas/types.yaml#/definitions/phandle-array
capture:
$ref: /schemas/types.yaml#/definitions/phandle-array
unevaluatedProperties: false
port:
$ref: audio-graph-port.yaml#
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: audio-graph-port.yaml#/definitions/endpoint-base
properties:
playback:
$ref: /schemas/types.yaml#/definitions/phandle-array
capture:
$ref: /schemas/types.yaml#/definitions/phandle-array
unevaluatedProperties: false
rcar_sound,dvc:
description: DVC subnode.
@ -174,10 +194,6 @@ properties:
enum:
- tx
- rx
required:
- interrupts
- dmas
- dma-names
additionalProperties: false
rcar_sound,ssiu:
@ -267,7 +283,6 @@ required:
- reg-names
- clocks
- clock-names
- "#sound-dai-cells"
allOf:
- $ref: dai-common.yaml#

View File

@ -217,6 +217,10 @@ patternProperties:
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
# common properties
frame-master:
$ref: "#/definitions/frame-master"

View File

@ -1,56 +0,0 @@
Texas Instruments pcm3168a DT bindings
This driver supports both SPI and I2C bus access for this codec
Required properties:
- compatible: "ti,pcm3168a"
- clocks : Contains an entry for each entry in clock-names
- clock-names : Includes the following entries:
"scki" The system clock
- VDD1-supply : Digital power supply regulator 1 (+3.3V)
- VDD2-supply : Digital power supply regulator 2 (+3.3V)
- VCCAD1-supply : ADC power supply regulator 1 (+5V)
- VCCAD2-supply : ADC power supply regulator 2 (+5V)
- VCCDA1-supply : DAC power supply regulator 1 (+5V)
- VCCDA2-supply : DAC power supply regulator 2 (+5V)
For required properties on SPI/I2C, consult SPI/I2C device tree documentation
Optional properties:
- reset-gpios : Optional reset gpio line connected to RST pin of the codec.
The RST line is low active:
RST = low: device power-down
RST = high: device is enabled
Examples:
i2c0: i2c0@0 {
...
pcm3168a: audio-codec@44 {
compatible = "ti,pcm3168a";
reg = <0x44>;
reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
clocks = <&clk_core CLK_AUDIO>;
clock-names = "scki";
VDD1-supply = <&supply3v3>;
VDD2-supply = <&supply3v3>;
VCCAD1-supply = <&supply5v0>;
VCCAD2-supply = <&supply5v0>;
VCCDA1-supply = <&supply5v0>;
VCCDA2-supply = <&supply5v0>;
pinctrl-names = "default";
pinctrl-0 = <&dac_clk_pin>;
};
};

View File

@ -0,0 +1,107 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,pcm3168a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments PCM3168A Audio Codec
maintainers:
- Damien Horsley <Damien.Horsley@imgtec.com>
- Geert Uytterhoeven <geert+renesas@glider.be>
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
description:
The Texas Instruments PCM3168A is a 24-bit Multi-channel Audio CODEC with
96/192kHz sampling rate, supporting both SPI and I2C bus access.
properties:
compatible:
const: ti,pcm3168a
reg:
maxItems: 1
clocks:
items:
- description: System clock input
clock-names:
items:
- const: scki
reset-gpios:
items:
- description: |
GPIO line connected to the active-low RST pin of the codec.
RST = low: device power-down
RST = high: device is enabled
"#sound-dai-cells":
enum: [0, 1]
VDD1-supply:
description: Digital power supply regulator 1 (+3.3V)
VDD2-supply:
description: Digital power supply regulator 2 (+3.3V)
VCCAD1-supply:
description: ADC power supply regulator 1 (+5V)
VCCAD2-supply:
description: ADC power supply regulator 2 (+5V)
VCCDA1-supply:
description: DAC power supply regulator 1 (+5V)
VCCDA2-supply:
description: DAC power supply regulator 2 (+5V)
ports:
$ref: audio-graph-port.yaml#/definitions/port-base
properties:
port@0:
$ref: audio-graph-port.yaml#
description: Audio input port.
port@1:
$ref: audio-graph-port.yaml#
description: Audio output port.
required:
- compatible
- reg
- clocks
- clock-names
- VDD1-supply
- VDD2-supply
- VCCAD1-supply
- VCCAD2-supply
- VCCDA1-supply
- VCCDA2-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
pcm3168a: audio-codec@44 {
compatible = "ti,pcm3168a";
reg = <0x44>;
reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
clocks = <&clk_core 42>;
clock-names = "scki";
VDD1-supply = <&supply3v3>;
VDD2-supply = <&supply3v3>;
VCCAD1-supply = <&supply5v0>;
VCCAD2-supply = <&supply5v0>;
VCCDA1-supply = <&supply5v0>;
VCCDA2-supply = <&supply5v0>;
};
};