Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Srinivas Kandagatla and committed by
Mark Brown
e1b26ac9 21b178b8

+178 -158
-158
Documentation/devicetree/bindings/sound/qcom,q6afe.txt
··· 12 12 from DSP. 13 13 example "qcom,q6afe" 14 14 15 - = AFE DAIs (Digital Audio Interface) 16 - "dais" subnode of the AFE node. It represents afe dais, each afe dai is a 17 - subnode of "dais" representing board specific dai setup. 18 - "dais" node should have following properties followed by dai children. 19 - 20 - - compatible: 21 - Usage: required 22 - Value type: <stringlist> 23 - Definition: must be "qcom,q6afe-dais" 24 - 25 - - #sound-dai-cells 26 - Usage: required 27 - Value type: <u32> 28 - Definition: Must be 1 29 - 30 - - #address-cells 31 - Usage: required 32 - Value type: <u32> 33 - Definition: Must be 1 34 - 35 - - #size-cells 36 - Usage: required 37 - Value type: <u32> 38 - Definition: Must be 0 39 - 40 - == AFE DAI is subnode of "dais" and represent a dai, it includes board specific 41 - configuration of each dai. Must contain the following properties. 42 - 43 - - reg 44 - Usage: required 45 - Value type: <u32> 46 - Definition: Must be dai id 47 - 48 - - qcom,sd-lines 49 - Usage: required for mi2s interface 50 - Value type: <prop-encoded-array> 51 - Definition: Must be list of serial data lines used by this dai. 52 - should be one or more of the 0-3 sd lines. 53 - 54 - - qcom,tdm-sync-mode: 55 - Usage: required for tdm interface 56 - Value type: <prop-encoded-array> 57 - Definition: Synchronization mode. 58 - 0 - Short sync bit mode 59 - 1 - Long sync mode 60 - 2 - Short sync slot mode 61 - 62 - - qcom,tdm-sync-src: 63 - Usage: required for tdm interface 64 - Value type: <prop-encoded-array> 65 - Definition: Synchronization source. 66 - 0 - External source 67 - 1 - Internal source 68 - 69 - - qcom,tdm-data-out: 70 - Usage: required for tdm interface 71 - Value type: <prop-encoded-array> 72 - Definition: Data out signal to drive with other masters. 73 - 0 - Disable 74 - 1 - Enable 75 - 76 - - qcom,tdm-invert-sync: 77 - Usage: required for tdm interface 78 - Value type: <prop-encoded-array> 79 - Definition: Invert the sync. 80 - 0 - Normal 81 - 1 - Invert 82 - 83 - - qcom,tdm-data-delay: 84 - Usage: required for tdm interface 85 - Value type: <prop-encoded-array> 86 - Definition: Number of bit clock to delay data 87 - with respect to sync edge. 88 - 0 - 0 bit clock cycle 89 - 1 - 1 bit clock cycle 90 - 2 - 2 bit clock cycle 91 - 92 - - qcom,tdm-data-align: 93 - Usage: required for tdm interface 94 - Value type: <prop-encoded-array> 95 - Definition: Indicate how data is packed 96 - within the slot. For example, 32 slot width in case of 97 - sample bit width is 24. 98 - 0 - MSB 99 - 1 - LSB 100 - 101 15 = AFE CLOCKSS 102 16 "clocks" subnode of the AFE node. It represents q6afe clocks 103 17 "clocks" node should have following properties. ··· 35 121 apr-service@4 { 36 122 compatible = "qcom,q6afe"; 37 123 reg = <APR_SVC_AFE>; 38 - 39 - dais { 40 - compatible = "qcom,q6afe-dais"; 41 - #sound-dai-cells = <1>; 42 - #address-cells = <1>; 43 - #size-cells = <0>; 44 - 45 - dai@1 { 46 - reg = <HDMI_RX>; 47 - }; 48 - 49 - dai@24 { 50 - reg = <PRIMARY_TDM_RX_0>; 51 - qcom,tdm-sync-mode = <1>: 52 - qcom,tdm-sync-src = <1>; 53 - qcom,tdm-data-out = <0>; 54 - qcom,tdm-invert-sync = <1>; 55 - qcom,tdm-data-delay = <1>; 56 - qcom,tdm-data-align = <0>; 57 - 58 - }; 59 - 60 - dai@25 { 61 - reg = <PRIMARY_TDM_TX_0>; 62 - qcom,tdm-sync-mode = <1>: 63 - qcom,tdm-sync-src = <1>; 64 - qcom,tdm-data-out = <0>; 65 - qcom,tdm-invert-sync = <1>; 66 - qcom,tdm-data-delay <1>: 67 - qcom,tdm-data-align = <0>; 68 - }; 69 - 70 - dai@16 { 71 - reg = <PRIMARY_MI2S_RX>; 72 - qcom,sd-lines = <0 2>; 73 - }; 74 - 75 - dai@17 { 76 - reg = <PRIMARY_MI2S_TX>; 77 - qcom,sd-lines = <1>; 78 - }; 79 - 80 - dai@18 { 81 - reg = <SECONDARY_MI2S_RX>; 82 - qcom,sd-lines = <0 3>; 83 - }; 84 - 85 - dai@19 { 86 - reg = <SECONDARY_MI2S_TX>; 87 - qcom,sd-lines = <1>; 88 - }; 89 - 90 - dai@20 { 91 - reg = <TERTIARY_MI2S_RX>; 92 - qcom,sd-lines = <1 3>; 93 - }; 94 - 95 - dai@21 { 96 - reg = <TERTIARY_MI2S_TX>; 97 - qcom,sd-lines = <0>; 98 - }; 99 - 100 - dai@22 { 101 - reg = <QUATERNARY_MI2S_RX>; 102 - qcom,sd-lines = <0>; 103 - }; 104 - 105 - dai@23 { 106 - reg = <QUATERNARY_MI2S_TX>; 107 - qcom,sd-lines = <1>; 108 - }; 109 - }; 110 124 111 125 clocks { 112 126 compatible = "qcom,q6afe-clocks";
+178
Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/sound/qcom,q6dsp-lpass-ports.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: Qualcomm DSP LPASS(Low Power Audio SubSystem) Audio Ports binding 8 + 9 + maintainers: 10 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 + 12 + description: | 13 + This binding describes the Qualcomm DSP LPASS Audio ports 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - qcom,q6afe-dais 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + '#sound-dai-cells': 24 + const: 1 25 + 26 + '#address-cells': 27 + const: 1 28 + 29 + '#size-cells': 30 + const: 0 31 + 32 + #Digital Audio Interfaces 33 + patternProperties: 34 + '^dai@[0-9]+$': 35 + type: object 36 + description: 37 + Q6DSP Digital Audio Interfaces. 38 + 39 + properties: 40 + reg: 41 + description: 42 + Digital Audio Interface ID 43 + 44 + qcom,sd-lines: 45 + $ref: /schemas/types.yaml#/definitions/uint32-array 46 + description: 47 + List of serial data lines used by this dai.should be one or more of the 0-3 sd lines. 48 + minItems: 1 49 + maxItems: 4 50 + uniqueItems: true 51 + items: 52 + minimum: 0 53 + maximum: 3 54 + 55 + qcom,tdm-sync-mode: 56 + $ref: /schemas/types.yaml#/definitions/uint32 57 + enum: [0, 1, 2] 58 + description: 59 + TDM Synchronization mode 60 + 0 = Short sync bit mode 61 + 1 = Long sync mode 62 + 2 = Short sync slot mode 63 + 64 + qcom,tdm-sync-src: 65 + $ref: /schemas/types.yaml#/definitions/uint32 66 + enum: [0, 1] 67 + description: 68 + TDM Synchronization source 69 + 0 = External source 70 + 1 = Internal source 71 + 72 + qcom,tdm-data-out: 73 + $ref: /schemas/types.yaml#/definitions/uint32 74 + enum: [0, 1] 75 + description: 76 + TDM Data out signal to drive with other masters 77 + 0 = Disable 78 + 1 = Enable 79 + 80 + qcom,tdm-invert-sync: 81 + $ref: /schemas/types.yaml#/definitions/uint32 82 + enum: [0, 1] 83 + description: 84 + TDM Invert the sync 85 + 0 = Normal 86 + 1 = Invert 87 + 88 + qcom,tdm-data-delay: 89 + $ref: /schemas/types.yaml#/definitions/uint32 90 + enum: [0, 1, 2] 91 + description: 92 + TDM Number of bit clock to delay data 93 + 0 = 0 bit clock cycle 94 + 1 = 1 bit clock cycle 95 + 2 = 2 bit clock cycle 96 + 97 + qcom,tdm-data-align: 98 + $ref: /schemas/types.yaml#/definitions/uint32 99 + enum: [0, 1] 100 + description: 101 + Indicate how data is packed within the slot. For example, 32 slot 102 + width in case of sample bit width is 24TDM Invert the sync. 103 + 0 = MSB 104 + 1 = LSB 105 + 106 + required: 107 + - reg 108 + 109 + allOf: 110 + - if: 111 + properties: 112 + reg: 113 + contains: 114 + # TDM DAI ID range from PRIMARY_TDM_RX_0 - QUINARY_TDM_TX_7 115 + items: 116 + minimum: 24 117 + maximum: 103 118 + then: 119 + required: 120 + - qcom,tdm-sync-mode 121 + - qcom,tdm-sync-src 122 + - qcom,tdm-data-out 123 + - qcom,tdm-invert-sync 124 + - qcom,tdm-data-delay 125 + - qcom,tdm-data-align 126 + 127 + - if: 128 + properties: 129 + reg: 130 + contains: 131 + # MI2S DAI ID range PRIMARY_MI2S_RX - QUATERNARY_MI2S_TX and 132 + # QUINARY_MI2S_RX - QUINARY_MI2S_TX 133 + items: 134 + oneOf: 135 + - minimum: 16 136 + maximum: 23 137 + - minimum: 127 138 + maximum: 128 139 + then: 140 + required: 141 + - qcom,sd-lines 142 + 143 + additionalProperties: false 144 + 145 + required: 146 + - compatible 147 + - reg 148 + - "#sound-dai-cells" 149 + - "#address-cells" 150 + - "#size-cells" 151 + 152 + additionalProperties: false 153 + 154 + examples: 155 + - | 156 + #include <dt-bindings/soc/qcom,apr.h> 157 + #include <dt-bindings/sound/qcom,q6afe.h> 158 + apr { 159 + #address-cells = <1>; 160 + #size-cells = <0>; 161 + apr-service@4 { 162 + reg = <APR_SVC_AFE>; 163 + #address-cells = <1>; 164 + #size-cells = <0>; 165 + q6afedai@1 { 166 + compatible = "qcom,q6afe-dais"; 167 + reg = <1>; 168 + #address-cells = <1>; 169 + #size-cells = <0>; 170 + #sound-dai-cells = <1>; 171 + 172 + dai@22 { 173 + reg = <QUATERNARY_MI2S_RX>; 174 + qcom,sd-lines = <0 1 2 3>; 175 + }; 176 + }; 177 + }; 178 + };