Commit 4359caad authored by Elinor Montmasson's avatar Elinor Montmasson Committed by Mark Brown

ASoC: dt-bindings: update fsl-asoc-card bindings after imx-spdif merge

The S/PDIF audio card support with compatible "fsl,imx-audio-spdif"
was merged from imx-spdif into the fsl-asoc-card driver.
It makes possible to use an S/PDIF with an ASRC.

This merge introduces new DT bindings to use with compatible
"fsl,imx-audio-spdif" to follow the way fsl-asoc-card works:
* the "spdif-controller" property from imx-spdif is named "audio-cpu"
  in fsl-asoc-card.
* fsl-asoc-card uses codecs explicitly declared in DT
  with "audio-codec".
  With an SPDIF, codec drivers spdif_transmitter and
  spdif_receiver should be used.
  Driver imx-spdif used instead the dummy codec and a pair of
  boolean properties, "spdif-in" and "spdif-out".

In an upcoming commit, in-tree DTs will be modified to follow these new
properties:
* Property "spdif-controller" will be renamed "audio-cpu".
* spdif_transmitter and spdif_receiver nodes will be declared
  and linked to the fsl-asoc-card node with the property "audio-codec".

To keep backward compatibility with other DTs, support for
"spdif-controller", "spdif-in" and "spdif-out" properties is kept.
However, it is recommended to use the new properties if possible.
It is better to declare transmitter and/or receiver
in DT than using the dummy codec.

DTs using compatible "fsl,imx-audio-spdif" are still supported, and
fsl-asoc-card will behave the same as imx-spdif for these DTs.
Signed-off-by: default avatarElinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Reviewed-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240627083104.123357-6-elinor.montmasson@savoirfairelinux.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6d174cc4
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,imx-audio-spdif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX audio complex with S/PDIF transceiver
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
properties:
compatible:
oneOf:
- items:
- enum:
- fsl,imx-sabreauto-spdif
- fsl,imx6sx-sdb-spdif
- const: fsl,imx-audio-spdif
- enum:
- fsl,imx-audio-spdif
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
spdif-controller:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the i.MX S/PDIF controller
spdif-out:
type: boolean
description:
If present, the transmitting function of S/PDIF will be enabled,
indicating there's a physical S/PDIF out connector or jack on the
board or it's connecting to some other IP block, such as an HDMI
encoder or display-controller.
spdif-in:
type: boolean
description:
If present, the receiving function of S/PDIF will be enabled,
indicating there is a physical S/PDIF in connector/jack on the board.
required:
- compatible
- model
- spdif-controller
anyOf:
- required:
- spdif-in
- required:
- spdif-out
additionalProperties: false
examples:
- |
sound-spdif {
compatible = "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif>;
spdif-out;
spdif-in;
};
......@@ -65,6 +65,11 @@ properties:
- fsl,imx-audio-sgtl5000
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- items:
- enum:
- fsl,imx-sabreauto-spdif
- fsl,imx6sx-sdb-spdif
- const: fsl,imx-audio-spdif
- items:
- enum:
- fsl,imx-audio-ac97
......@@ -81,6 +86,7 @@ properties:
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- fsl,imx-audio-wm8958
- fsl,imx-audio-spdif
model:
$ref: /schemas/types.yaml#/definitions/string
......@@ -93,8 +99,15 @@ properties:
need to add ASRC support via DPCM.
audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an audio codec
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
The phandle of an audio codec.
With "fsl,imx-audio-spdif", either SPDIF audio codec spdif_transmitter,
spdif_receiver or both.
minItems: 1
maxItems: 2
items:
maxItems: 1
audio-cpu:
$ref: /schemas/types.yaml#/definitions/phandle
......@@ -150,8 +163,10 @@ properties:
description: dai-link uses bit clock inversion.
mclk-id:
$ref: /schemas/types.yaml#/definitions/uint32
description: main clock id, specific for each card configuration.
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Main clock id for each codec, specific for each card configuration.
minItems: 1
maxItems: 2
mux-int-port:
$ref: /schemas/types.yaml#/definitions/uint32
......@@ -167,6 +182,27 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an CPU DAI controller
spdif-controller:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description: The phandle of an S/PDIF CPU DAI controller.
spdif-out:
type: boolean
deprecated: true
description: |
If present, the transmitting function of S/PDIF will be enabled,
indicating there's a physical S/PDIF out connector or jack on the
board or it's connecting to some other IP block, such as an HDMI
encoder or display-controller.
spdif-in:
type: boolean
deprecated: true
description: |
If present, the receiving function of S/PDIF will be enabled,
indicating there is a physical S/PDIF in connector/jack on the board.
required:
- compatible
- model
......@@ -195,3 +231,12 @@ examples:
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};
- |
sound-spdif-asrc {
compatible = "fsl,imx-audio-spdif";
model = "spdif-asrc-audio";
audio-cpu = <&spdif>;
audio-asrc = <&easrc>;
audio-codec = <&spdifdit>, <&spdifdir>;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment