1cd989bfcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2cd989bfcSEmmanuel Vadot%YAML 1.2 3cd989bfcSEmmanuel Vadot--- 4cd989bfcSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml# 5cd989bfcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6cd989bfcSEmmanuel Vadot 7cd989bfcSEmmanuel Vadottitle: Qualcomm APQ8016 and similar sound cards 8cd989bfcSEmmanuel Vadot 9cd989bfcSEmmanuel Vadotmaintainers: 10cd989bfcSEmmanuel Vadot - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11cd989bfcSEmmanuel Vadot - Stephan Gerhold <stephan@gerhold.net> 12cd989bfcSEmmanuel Vadot 13cd989bfcSEmmanuel Vadotproperties: 14cd989bfcSEmmanuel Vadot compatible: 15cd989bfcSEmmanuel Vadot enum: 16cd989bfcSEmmanuel Vadot - qcom,apq8016-sbc-sndcard 17cd989bfcSEmmanuel Vadot - qcom,msm8916-qdsp6-sndcard 18cd989bfcSEmmanuel Vadot 19cd989bfcSEmmanuel Vadot reg: 20cd989bfcSEmmanuel Vadot items: 21cd989bfcSEmmanuel Vadot - description: Microphone I/O mux register address 22cd989bfcSEmmanuel Vadot - description: Speaker I/O mux register address 23cd989bfcSEmmanuel Vadot 24cd989bfcSEmmanuel Vadot reg-names: 25cd989bfcSEmmanuel Vadot items: 26cd989bfcSEmmanuel Vadot - const: mic-iomux 27cd989bfcSEmmanuel Vadot - const: spkr-iomux 28cd989bfcSEmmanuel Vadot 29cd989bfcSEmmanuel Vadot audio-routing: 30cd989bfcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/non-unique-string-array 31cd989bfcSEmmanuel Vadot description: 32cd989bfcSEmmanuel Vadot A list of the connections between audio components. Each entry is a 33cd989bfcSEmmanuel Vadot pair of strings, the first being the connection's sink, the second 34cd989bfcSEmmanuel Vadot being the connection's source. Valid names could be power supplies, 35cd989bfcSEmmanuel Vadot MicBias of codec and the jacks on the board. 36cd989bfcSEmmanuel Vadot 37cd989bfcSEmmanuel Vadot aux-devs: 38cd989bfcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 39cd989bfcSEmmanuel Vadot description: | 40cd989bfcSEmmanuel Vadot List of phandles pointing to auxiliary devices, such 41cd989bfcSEmmanuel Vadot as amplifiers, to be added to the sound card. 42cd989bfcSEmmanuel Vadot 43cd989bfcSEmmanuel Vadot model: 44cd989bfcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 45cd989bfcSEmmanuel Vadot description: User visible long sound card name 46cd989bfcSEmmanuel Vadot 47cd989bfcSEmmanuel Vadot pin-switches: 48cd989bfcSEmmanuel Vadot description: List of widget names for which pin switches should be created. 49cd989bfcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string-array 50cd989bfcSEmmanuel Vadot 51cd989bfcSEmmanuel Vadot widgets: 52cd989bfcSEmmanuel Vadot description: User specified audio sound widgets. 53cd989bfcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/non-unique-string-array 54cd989bfcSEmmanuel Vadot 55cd989bfcSEmmanuel VadotpatternProperties: 56cd989bfcSEmmanuel Vadot ".*-dai-link$": 57cd989bfcSEmmanuel Vadot description: 58cd989bfcSEmmanuel Vadot Each subnode represents a dai link. Subnodes of each dai links would be 59cd989bfcSEmmanuel Vadot cpu/codec dais. 60cd989bfcSEmmanuel Vadot 61cd989bfcSEmmanuel Vadot type: object 62cd989bfcSEmmanuel Vadot 63cd989bfcSEmmanuel Vadot properties: 64cd989bfcSEmmanuel Vadot link-name: 65cd989bfcSEmmanuel Vadot description: Indicates dai-link name and PCM stream name. 66cd989bfcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 67cd989bfcSEmmanuel Vadot maxItems: 1 68cd989bfcSEmmanuel Vadot 69cd989bfcSEmmanuel Vadot cpu: 70cd989bfcSEmmanuel Vadot description: Holds subnode which indicates cpu dai. 71cd989bfcSEmmanuel Vadot type: object 72cd989bfcSEmmanuel Vadot additionalProperties: false 73cd989bfcSEmmanuel Vadot 74cd989bfcSEmmanuel Vadot properties: 75cd989bfcSEmmanuel Vadot sound-dai: 76cd989bfcSEmmanuel Vadot maxItems: 1 77cd989bfcSEmmanuel Vadot 78cd989bfcSEmmanuel Vadot platform: 79cd989bfcSEmmanuel Vadot description: Holds subnode which indicates platform dai. 80cd989bfcSEmmanuel Vadot type: object 81cd989bfcSEmmanuel Vadot additionalProperties: false 82cd989bfcSEmmanuel Vadot 83cd989bfcSEmmanuel Vadot properties: 84cd989bfcSEmmanuel Vadot sound-dai: 85cd989bfcSEmmanuel Vadot maxItems: 1 86cd989bfcSEmmanuel Vadot 87cd989bfcSEmmanuel Vadot codec: 88cd989bfcSEmmanuel Vadot description: Holds subnode which indicates codec dai. 89cd989bfcSEmmanuel Vadot type: object 90cd989bfcSEmmanuel Vadot additionalProperties: false 91cd989bfcSEmmanuel Vadot 92cd989bfcSEmmanuel Vadot properties: 93cd989bfcSEmmanuel Vadot sound-dai: 94cd989bfcSEmmanuel Vadot minItems: 1 95cd989bfcSEmmanuel Vadot maxItems: 8 96cd989bfcSEmmanuel Vadot 97cd989bfcSEmmanuel Vadot required: 98cd989bfcSEmmanuel Vadot - link-name 99cd989bfcSEmmanuel Vadot - cpu 100cd989bfcSEmmanuel Vadot 101cd989bfcSEmmanuel Vadot additionalProperties: false 102cd989bfcSEmmanuel Vadot 103cd989bfcSEmmanuel Vadotrequired: 104cd989bfcSEmmanuel Vadot - compatible 105cd989bfcSEmmanuel Vadot - reg 106cd989bfcSEmmanuel Vadot - reg-names 107cd989bfcSEmmanuel Vadot - model 108cd989bfcSEmmanuel Vadot 109cd989bfcSEmmanuel VadotadditionalProperties: false 110cd989bfcSEmmanuel Vadot 111cd989bfcSEmmanuel Vadotexamples: 112cd989bfcSEmmanuel Vadot - | 113cd989bfcSEmmanuel Vadot #include <dt-bindings/sound/qcom,lpass.h> 114cd989bfcSEmmanuel Vadot sound@7702000 { 115cd989bfcSEmmanuel Vadot compatible = "qcom,apq8016-sbc-sndcard"; 116cd989bfcSEmmanuel Vadot reg = <0x07702000 0x4>, <0x07702004 0x4>; 117cd989bfcSEmmanuel Vadot reg-names = "mic-iomux", "spkr-iomux"; 118cd989bfcSEmmanuel Vadot 119cd989bfcSEmmanuel Vadot model = "DB410c"; 120cd989bfcSEmmanuel Vadot audio-routing = 121cd989bfcSEmmanuel Vadot "AMIC2", "MIC BIAS Internal2", 122cd989bfcSEmmanuel Vadot "AMIC3", "MIC BIAS External1"; 123cd989bfcSEmmanuel Vadot 124cd989bfcSEmmanuel Vadot pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>; 125cd989bfcSEmmanuel Vadot pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>; 126cd989bfcSEmmanuel Vadot pinctrl-names = "default", "sleep"; 127cd989bfcSEmmanuel Vadot 128cd989bfcSEmmanuel Vadot quaternary-dai-link { 129cd989bfcSEmmanuel Vadot link-name = "ADV7533"; 130cd989bfcSEmmanuel Vadot cpu { 131cd989bfcSEmmanuel Vadot sound-dai = <&lpass MI2S_QUATERNARY>; 132cd989bfcSEmmanuel Vadot }; 133cd989bfcSEmmanuel Vadot codec { 134cd989bfcSEmmanuel Vadot sound-dai = <&adv_bridge 0>; 135cd989bfcSEmmanuel Vadot }; 136cd989bfcSEmmanuel Vadot }; 137cd989bfcSEmmanuel Vadot 138cd989bfcSEmmanuel Vadot primary-dai-link { 139cd989bfcSEmmanuel Vadot link-name = "WCD"; 140cd989bfcSEmmanuel Vadot cpu { 141cd989bfcSEmmanuel Vadot sound-dai = <&lpass MI2S_PRIMARY>; 142cd989bfcSEmmanuel Vadot }; 143cd989bfcSEmmanuel Vadot codec { 144cd989bfcSEmmanuel Vadot sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 145cd989bfcSEmmanuel Vadot }; 146cd989bfcSEmmanuel Vadot }; 147cd989bfcSEmmanuel Vadot 148cd989bfcSEmmanuel Vadot tertiary-dai-link { 149cd989bfcSEmmanuel Vadot link-name = "WCD-Capture"; 150cd989bfcSEmmanuel Vadot cpu { 151cd989bfcSEmmanuel Vadot sound-dai = <&lpass MI2S_TERTIARY>; 152cd989bfcSEmmanuel Vadot }; 153cd989bfcSEmmanuel Vadot codec { 154cd989bfcSEmmanuel Vadot sound-dai = <&lpass_codec 1>, <&wcd_codec 1>; 155cd989bfcSEmmanuel Vadot }; 156cd989bfcSEmmanuel Vadot }; 157cd989bfcSEmmanuel Vadot }; 158cd989bfcSEmmanuel Vadot 159cd989bfcSEmmanuel Vadot - | 160cd989bfcSEmmanuel Vadot #include <dt-bindings/sound/qcom,q6afe.h> 161cd989bfcSEmmanuel Vadot #include <dt-bindings/sound/qcom,q6asm.h> 162cd989bfcSEmmanuel Vadot sound@7702000 { 163cd989bfcSEmmanuel Vadot compatible = "qcom,msm8916-qdsp6-sndcard"; 164cd989bfcSEmmanuel Vadot reg = <0x07702000 0x4>, <0x07702004 0x4>; 165cd989bfcSEmmanuel Vadot reg-names = "mic-iomux", "spkr-iomux"; 166cd989bfcSEmmanuel Vadot 167cd989bfcSEmmanuel Vadot model = "msm8916"; 168cd989bfcSEmmanuel Vadot widgets = 169cd989bfcSEmmanuel Vadot "Speaker", "Speaker", 170cd989bfcSEmmanuel Vadot "Headphone", "Headphones"; 171cd989bfcSEmmanuel Vadot pin-switches = "Speaker"; 172cd989bfcSEmmanuel Vadot audio-routing = 173cd989bfcSEmmanuel Vadot "Speaker", "Speaker Amp OUT", 174cd989bfcSEmmanuel Vadot "Speaker Amp IN", "HPH_R", 175cd989bfcSEmmanuel Vadot "Headphones", "HPH_L", 176cd989bfcSEmmanuel Vadot "Headphones", "HPH_R", 177cd989bfcSEmmanuel Vadot "AMIC1", "MIC BIAS Internal1", 178cd989bfcSEmmanuel Vadot "AMIC2", "MIC BIAS Internal2", 179cd989bfcSEmmanuel Vadot "AMIC3", "MIC BIAS Internal3"; 180cd989bfcSEmmanuel Vadot aux-devs = <&speaker_amp>; 181cd989bfcSEmmanuel Vadot 182cd989bfcSEmmanuel Vadot pinctrl-names = "default", "sleep"; 183cd989bfcSEmmanuel Vadot pinctrl-0 = <&cdc_pdm_lines_act>; 184cd989bfcSEmmanuel Vadot pinctrl-1 = <&cdc_pdm_lines_sus>; 185cd989bfcSEmmanuel Vadot 186cd989bfcSEmmanuel Vadot mm1-dai-link { 187cd989bfcSEmmanuel Vadot link-name = "MultiMedia1"; 188cd989bfcSEmmanuel Vadot cpu { 189cd989bfcSEmmanuel Vadot sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 190cd989bfcSEmmanuel Vadot }; 191cd989bfcSEmmanuel Vadot }; 192cd989bfcSEmmanuel Vadot 193cd989bfcSEmmanuel Vadot primary-dai-link { 194cd989bfcSEmmanuel Vadot link-name = "Primary MI2S"; 195cd989bfcSEmmanuel Vadot cpu { 196cd989bfcSEmmanuel Vadot sound-dai = <&q6afedai PRIMARY_MI2S_RX>; 197cd989bfcSEmmanuel Vadot }; 198cd989bfcSEmmanuel Vadot platform { 199cd989bfcSEmmanuel Vadot sound-dai = <&q6routing>; 200cd989bfcSEmmanuel Vadot }; 201cd989bfcSEmmanuel Vadot codec { 202cd989bfcSEmmanuel Vadot sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 203cd989bfcSEmmanuel Vadot }; 204cd989bfcSEmmanuel Vadot }; 205cd989bfcSEmmanuel Vadot }; 206