summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/sound/simple-card.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'dts/Bindings/sound/simple-card.yaml')
-rw-r--r--dts/Bindings/sound/simple-card.yaml152
1 files changed, 111 insertions, 41 deletions
diff --git a/dts/Bindings/sound/simple-card.yaml b/dts/Bindings/sound/simple-card.yaml
index 45fd9fd9eb..59ac2d1d1c 100644
--- a/dts/Bindings/sound/simple-card.yaml
+++ b/dts/Bindings/sound/simple-card.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/sound/simple-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Simple Audio Card Driver Device Tree Bindings
+title: Simple Audio Card Driver
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
@@ -48,6 +48,15 @@ definitions:
It is useful for some aCPUs with fixed clocks.
$ref: /schemas/types.yaml#/definitions/flag
+ system-clock-fixed:
+ description: |
+ Specifies that the clock frequency should not be modified.
+ Implied when system-clock-frequency is specified, but can be used when
+ a clock is mapped to the device whose frequency cannot or should not be
+ changed. When mclk-fs is also specified, this restricts the device to a
+ single fixed sampling rate.
+ $ref: /schemas/types.yaml#/definitions/flag
+
mclk-fs:
description: |
Multiplication factor between stream rate and codec mclk.
@@ -69,7 +78,7 @@ definitions:
$ref: /schemas/types.yaml#/definitions/uint32
prefix:
- description: "device name prefix"
+ description: device name prefix
$ref: /schemas/types.yaml#/definitions/string
label:
@@ -134,9 +143,20 @@ definitions:
$ref: "#/definitions/system-clock-frequency"
system-clock-direction-out:
$ref: "#/definitions/system-clock-direction-out"
+ system-clock-fixed:
+ $ref: "#/definitions/system-clock-fixed"
required:
- sound-dai
+ additional-devs:
+ type: object
+ description:
+ Additional devices used by the simple audio card.
+ patternProperties:
+ '^iio-aux(-.+)?$':
+ type: object
+ $ref: audio-iio-aux.yaml#
+
properties:
compatible:
contains:
@@ -156,45 +176,49 @@ properties:
description: User specified audio sound card name.
$ref: /schemas/types.yaml#/definitions/string
-# use patternProperties to avoid naming "xxx,yyy" issue
-patternProperties:
- "^simple-audio-card,widgets$":
+ simple-audio-card,widgets:
$ref: "#/definitions/widgets"
- "^simple-audio-card,routing$":
+ simple-audio-card,routing:
$ref: "#/definitions/routing"
- "^simple-audio-card,cpu(@[0-9a-f]+)?":
- $ref: "#/definitions/dai"
- "^simple-audio-card,codec(@[0-9a-f]+)?":
- $ref: "#/definitions/dai"
# common properties
- "^simple-audio-card,frame-master$":
+ simple-audio-card,frame-master:
$ref: "#/definitions/frame-master"
- "^simple-audio-card,bitclock-master$":
+ simple-audio-card,bitclock-master:
$ref: "#/definitions/bitclock-master"
- "^simple-audio-card,frame-inversion$":
+ simple-audio-card,frame-inversion:
$ref: "#/definitions/frame-inversion"
- "^simple-audio-card,bitclock-inversion$":
+ simple-audio-card,bitclock-inversion:
$ref: "#/definitions/bitclock-inversion"
- "^simple-audio-card,format$":
+ simple-audio-card,format:
$ref: "#/definitions/format"
- "^simple-audio-card,mclk-fs$":
+ simple-audio-card,mclk-fs:
$ref: "#/definitions/mclk-fs"
- "^simple-audio-card,aux-devs$":
+ simple-audio-card,aux-devs:
$ref: "#/definitions/aux-devs"
- "^simple-audio-card,convert-rate$":
+ simple-audio-card,additional-devs:
+ $ref: "#/definitions/additional-devs"
+ simple-audio-card,convert-rate:
$ref: "#/definitions/convert-rate"
- "^simple-audio-card,convert-channels$":
+ simple-audio-card,convert-channels:
$ref: "#/definitions/convert-channels"
- "^simple-audio-card,prefix$":
+ simple-audio-card,prefix:
$ref: "#/definitions/prefix"
- "^simple-audio-card,pin-switches$":
+ simple-audio-card,pin-switches:
$ref: "#/definitions/pin-switches"
- "^simple-audio-card,hp-det-gpio$":
+ simple-audio-card,hp-det-gpio:
maxItems: 1
- "^simple-audio-card,mic-det-gpio$":
+ simple-audio-card,mic-det-gpio:
maxItems: 1
+patternProperties:
+ "^simple-audio-card,cpu(@[0-9a-f]+)?$":
+ $ref: "#/definitions/dai"
+ "^simple-audio-card,codec(@[0-9a-f]+)?$":
+ $ref: "#/definitions/dai"
+ "^simple-audio-card,plat(@[0-9a-f]+)?$":
+ $ref: "#/definitions/dai"
+
"^simple-audio-card,dai-link(@[0-9a-f]+)?$":
description: |
Container for dai-link level properties and the CPU and CODEC sub-nodes.
@@ -204,6 +228,10 @@ patternProperties:
reg:
maxItems: 1
+ "#address-cells":
+ const: 1
+ "#size-cells":
+ const: 0
# common properties
frame-master:
$ref: "#/definitions/frame-master"
@@ -233,9 +261,9 @@ patternProperties:
maxItems: 1
patternProperties:
- "^cpu(@[0-9a-f]+)?":
+ "^cpu(-[0-9]+)?$":
$ref: "#/definitions/dai"
- "^codec(@[0-9a-f]+)?":
+ "^codec(-[0-9]+)?$":
$ref: "#/definitions/dai"
additionalProperties: false
@@ -245,9 +273,9 @@ required:
additionalProperties: false
examples:
-#--------------------
+# --------------------
# single DAI link
-#--------------------
+# --------------------
- |
sound {
compatible = "simple-audio-card";
@@ -274,9 +302,9 @@ examples:
};
};
-#--------------------
+# --------------------
# Multi DAI links
-#--------------------
+# --------------------
- |
sound {
compatible = "simple-audio-card";
@@ -317,10 +345,10 @@ examples:
};
};
-#--------------------
+# --------------------
# route audio from IMX6 SSI2 through TLV320DAC3100 codec
# through TPA6130A2 amplifier to headphones:
-#--------------------
+# --------------------
- |
sound {
compatible = "simple-audio-card";
@@ -342,9 +370,51 @@ examples:
};
};
-#--------------------
+# --------------------
+# route audio to/from a codec through an amplifier
+# designed with a potentiometer driven by IIO:
+# --------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,aux-devs = <&amp_in>, <&amp_out>;
+ simple-audio-card,routing =
+ "CODEC LEFTIN", "AMP_IN LEFT OUT",
+ "CODEC RIGHTIN", "AMP_IN RIGHT OUT",
+ "AMP_OUT LEFT IN", "CODEC LEFTOUT",
+ "AMP_OUT RIGHT IN", "CODEC RIGHTOUT";
+
+ simple-audio-card,additional-devs {
+ amp_out: iio-aux-out {
+ compatible = "audio-iio-aux";
+ io-channels = <&pot_out 0>, <&pot_out 1>;
+ io-channel-names = "LEFT", "RIGHT";
+ snd-control-invert-range = <1 1>;
+ sound-name-prefix = "AMP_OUT";
+ };
+
+ amp_in: iio_aux-in {
+ compatible = "audio-iio-aux";
+ io-channels = <&pot_in 0>, <&pot_in 1>;
+ io-channel-names = "LEFT", "RIGHT";
+ sound-name-prefix = "AMP_IN";
+ };
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&cpu>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&codec>;
+ clocks = <&clocks>;
+ };
+ };
+
+# --------------------
# Sampling Rate Conversion
-#--------------------
+# --------------------
- |
sound {
compatible = "simple-audio-card";
@@ -370,9 +440,9 @@ examples:
};
};
-#--------------------
+# --------------------
# 2 CPU 1 Codec (Mixing)
-#--------------------
+# --------------------
- |
sound {
compatible = "simple-audio-card";
@@ -407,7 +477,7 @@ examples:
};
};
-#--------------------
+# --------------------
# Multi DAI links with DPCM:
#
# CPU0 ------ ak4613
@@ -416,7 +486,7 @@ examples:
# CPU3 --/ /* DPCM 5ch/6ch */
# CPU4 --/ /* DPCM 7ch/8ch */
# CPU5 ------ PCM3168A-c
-#--------------------
+# --------------------
- |
sound {
compatible = "simple-audio-card";
@@ -451,16 +521,16 @@ examples:
convert-channels = <8>; /* TDM Split */
- sndcpu1: cpu0 {
+ sndcpu1: cpu-0 {
sound-dai = <&rcar_sound 1>;
};
- cpu1 {
+ cpu-1 {
sound-dai = <&rcar_sound 2>;
};
- cpu2 {
+ cpu-2 {
sound-dai = <&rcar_sound 3>;
};
- cpu3 {
+ cpu-3 {
sound-dai = <&rcar_sound 4>;
};
codec {