-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC: dt-bindings: move LPASS dai related bindings out of q6afe
q6afe (Audio Front End) is one of the DSP service that handles both LPASS (Low Power Audio SubSystem) Audio ports and LPASS clocks. As LPASS is a hardwware IP and commonly used by Qualcomm Audio DSP. In order to allow multiple DSP frameworks to use these bindings its best to move it out from the dsp specific bindings. For compatibility reasons and not breaking which is already working we still maintain same compatible string "qcom,q6afe-dais" Also as part of this change convert these LPASS dai related bindings into yaml format. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211026111655.1702-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
- Loading branch information
Srinivas Kandagatla
authored and
Mark Brown
committed
Oct 26, 2021
1 parent
21b178b
commit e1b26ac
Showing
2 changed files
with
178 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
178 changes: 178 additions & 0 deletions
178
Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: "http://devicetree.org/schemas/sound/qcom,q6dsp-lpass-ports.yaml#" | ||
$schema: "http://devicetree.org/meta-schemas/core.yaml#" | ||
|
||
title: Qualcomm DSP LPASS(Low Power Audio SubSystem) Audio Ports binding | ||
|
||
maintainers: | ||
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | ||
|
||
description: | | ||
This binding describes the Qualcomm DSP LPASS Audio ports | ||
properties: | ||
compatible: | ||
enum: | ||
- qcom,q6afe-dais | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
'#sound-dai-cells': | ||
const: 1 | ||
|
||
'#address-cells': | ||
const: 1 | ||
|
||
'#size-cells': | ||
const: 0 | ||
|
||
#Digital Audio Interfaces | ||
patternProperties: | ||
'^dai@[0-9]+$': | ||
type: object | ||
description: | ||
Q6DSP Digital Audio Interfaces. | ||
|
||
properties: | ||
reg: | ||
description: | ||
Digital Audio Interface ID | ||
|
||
qcom,sd-lines: | ||
$ref: /schemas/types.yaml#/definitions/uint32-array | ||
description: | ||
List of serial data lines used by this dai.should be one or more of the 0-3 sd lines. | ||
minItems: 1 | ||
maxItems: 4 | ||
uniqueItems: true | ||
items: | ||
minimum: 0 | ||
maximum: 3 | ||
|
||
qcom,tdm-sync-mode: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1, 2] | ||
description: | ||
TDM Synchronization mode | ||
0 = Short sync bit mode | ||
1 = Long sync mode | ||
2 = Short sync slot mode | ||
|
||
qcom,tdm-sync-src: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1] | ||
description: | ||
TDM Synchronization source | ||
0 = External source | ||
1 = Internal source | ||
|
||
qcom,tdm-data-out: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1] | ||
description: | ||
TDM Data out signal to drive with other masters | ||
0 = Disable | ||
1 = Enable | ||
|
||
qcom,tdm-invert-sync: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1] | ||
description: | ||
TDM Invert the sync | ||
0 = Normal | ||
1 = Invert | ||
|
||
qcom,tdm-data-delay: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1, 2] | ||
description: | ||
TDM Number of bit clock to delay data | ||
0 = 0 bit clock cycle | ||
1 = 1 bit clock cycle | ||
2 = 2 bit clock cycle | ||
|
||
qcom,tdm-data-align: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
enum: [0, 1] | ||
description: | ||
Indicate how data is packed within the slot. For example, 32 slot | ||
width in case of sample bit width is 24TDM Invert the sync. | ||
0 = MSB | ||
1 = LSB | ||
|
||
required: | ||
- reg | ||
|
||
allOf: | ||
- if: | ||
properties: | ||
reg: | ||
contains: | ||
# TDM DAI ID range from PRIMARY_TDM_RX_0 - QUINARY_TDM_TX_7 | ||
items: | ||
minimum: 24 | ||
maximum: 103 | ||
then: | ||
required: | ||
- qcom,tdm-sync-mode | ||
- qcom,tdm-sync-src | ||
- qcom,tdm-data-out | ||
- qcom,tdm-invert-sync | ||
- qcom,tdm-data-delay | ||
- qcom,tdm-data-align | ||
|
||
- if: | ||
properties: | ||
reg: | ||
contains: | ||
# MI2S DAI ID range PRIMARY_MI2S_RX - QUATERNARY_MI2S_TX and | ||
# QUINARY_MI2S_RX - QUINARY_MI2S_TX | ||
items: | ||
oneOf: | ||
- minimum: 16 | ||
maximum: 23 | ||
- minimum: 127 | ||
maximum: 128 | ||
then: | ||
required: | ||
- qcom,sd-lines | ||
|
||
additionalProperties: false | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- "#sound-dai-cells" | ||
- "#address-cells" | ||
- "#size-cells" | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/soc/qcom,apr.h> | ||
#include <dt-bindings/sound/qcom,q6afe.h> | ||
apr { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
apr-service@4 { | ||
reg = <APR_SVC_AFE>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
q6afedai@1 { | ||
compatible = "qcom,q6afe-dais"; | ||
reg = <1>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
#sound-dai-cells = <1>; | ||
dai@22 { | ||
reg = <QUATERNARY_MI2S_RX>; | ||
qcom,sd-lines = <0 1 2 3>; | ||
}; | ||
}; | ||
}; | ||
}; |