1edf647d1SNeil Armstrong# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2edf647d1SNeil Armstrong%YAML 1.2 3edf647d1SNeil Armstrong--- 4edf647d1SNeil Armstrong$id: http://devicetree.org/schemas/sound/qcom,wcd939x.yaml# 5edf647d1SNeil Armstrong$schema: http://devicetree.org/meta-schemas/core.yaml# 6edf647d1SNeil Armstrong 7edf647d1SNeil Armstrongtitle: Qualcomm WCD9380/WCD9385 Audio Codec 8edf647d1SNeil Armstrong 9edf647d1SNeil Armstrongmaintainers: 10edf647d1SNeil Armstrong - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11edf647d1SNeil Armstrong 12edf647d1SNeil Armstrongdescription: | 13edf647d1SNeil Armstrong Qualcomm WCD9390/WCD9395 Codec is a standalone Hi-Fi audio codec IC. 14edf647d1SNeil Armstrong It has RX and TX Soundwire devices. 15edf647d1SNeil Armstrong The WCD9390/WCD9395 IC has a functionally separate USB-C Mux subsystem 16edf647d1SNeil Armstrong accessible over an I2C interface. 17edf647d1SNeil Armstrong The Audio Headphone and Microphone data path between the Codec and the USB-C Mux 18edf647d1SNeil Armstrong subsystems are external to the IC, thus requiring DT port-endpoint graph description 19edf647d1SNeil Armstrong to handle USB-C altmode & orientation switching for Audio Accessory Mode. 20edf647d1SNeil Armstrong 21edf647d1SNeil ArmstrongallOf: 22edf647d1SNeil Armstrong - $ref: dai-common.yaml# 23edf647d1SNeil Armstrong - $ref: qcom,wcd93xx-common.yaml# 24edf647d1SNeil Armstrong 25edf647d1SNeil Armstrongproperties: 26edf647d1SNeil Armstrong compatible: 27edf647d1SNeil Armstrong oneOf: 28edf647d1SNeil Armstrong - const: qcom,wcd9390-codec 29edf647d1SNeil Armstrong - items: 30edf647d1SNeil Armstrong - const: qcom,wcd9395-codec 31edf647d1SNeil Armstrong - const: qcom,wcd9390-codec 32edf647d1SNeil Armstrong 33edf647d1SNeil Armstrong mode-switch: 34edf647d1SNeil Armstrong description: Flag the port as possible handler of altmode switching 35edf647d1SNeil Armstrong type: boolean 36edf647d1SNeil Armstrong 37edf647d1SNeil Armstrong orientation-switch: 38edf647d1SNeil Armstrong description: Flag the port as possible handler of orientation switching 39edf647d1SNeil Armstrong type: boolean 40edf647d1SNeil Armstrong 41edf647d1SNeil Armstrong port: 42edf647d1SNeil Armstrong $ref: /schemas/graph.yaml#/properties/port 43edf647d1SNeil Armstrong description: 44edf647d1SNeil Armstrong A port node to link the WCD939x Codec node to USB MUX subsystems for the 45edf647d1SNeil Armstrong purpose of handling altmode muxing and orientation switching to detect and 46edf647d1SNeil Armstrong enable Audio Accessory Mode. 47edf647d1SNeil Armstrong 48edf647d1SNeil Armstrongrequired: 49edf647d1SNeil Armstrong - compatible 50edf647d1SNeil Armstrong 51edf647d1SNeil ArmstrongunevaluatedProperties: false 52edf647d1SNeil Armstrong 53edf647d1SNeil Armstrongexamples: 54edf647d1SNeil Armstrong - | 55*81f88fddSKrzysztof Kozlowski #include <dt-bindings/gpio/gpio.h> 56edf647d1SNeil Armstrong codec { 57edf647d1SNeil Armstrong compatible = "qcom,wcd9390-codec"; 58*81f88fddSKrzysztof Kozlowski reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; 59edf647d1SNeil Armstrong #sound-dai-cells = <1>; 60edf647d1SNeil Armstrong qcom,tx-device = <&wcd939x_tx>; 61edf647d1SNeil Armstrong qcom,rx-device = <&wcd939x_rx>; 62edf647d1SNeil Armstrong qcom,micbias1-microvolt = <1800000>; 63edf647d1SNeil Armstrong qcom,micbias2-microvolt = <1800000>; 64edf647d1SNeil Armstrong qcom,micbias3-microvolt = <1800000>; 65edf647d1SNeil Armstrong qcom,micbias4-microvolt = <1800000>; 66edf647d1SNeil Armstrong qcom,hphl-jack-type-normally-closed; 67edf647d1SNeil Armstrong qcom,ground-jack-type-normally-closed; 68edf647d1SNeil Armstrong qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; 69edf647d1SNeil Armstrong qcom,mbhc-headphone-vthreshold-microvolt = <50000>; 70edf647d1SNeil Armstrong }; 71edf647d1SNeil Armstrong 72edf647d1SNeil Armstrong /* ... */ 73edf647d1SNeil Armstrong 74edf647d1SNeil Armstrong soundwire@3210000 { 75edf647d1SNeil Armstrong #address-cells = <2>; 76edf647d1SNeil Armstrong #size-cells = <0>; 77edf647d1SNeil Armstrong reg = <0x03210000 0x2000>; 78edf647d1SNeil Armstrong wcd939x_rx: codec@0,4 { 79edf647d1SNeil Armstrong compatible = "sdw20217010e00"; 80edf647d1SNeil Armstrong reg = <0 4>; 81edf647d1SNeil Armstrong qcom,rx-port-mapping = <1 2 3 4 5 6>; 82edf647d1SNeil Armstrong }; 83edf647d1SNeil Armstrong }; 84edf647d1SNeil Armstrong 85edf647d1SNeil Armstrong soundwire@3230000 { 86edf647d1SNeil Armstrong #address-cells = <2>; 87edf647d1SNeil Armstrong #size-cells = <0>; 88edf647d1SNeil Armstrong reg = <0x03230000 0x2000>; 89edf647d1SNeil Armstrong wcd938x_tx: codec@0,3 { 90edf647d1SNeil Armstrong compatible = "sdw20217010e00"; 91edf647d1SNeil Armstrong reg = <0 3>; 92edf647d1SNeil Armstrong qcom,tx-port-mapping = <2 3 4 5>; 93edf647d1SNeil Armstrong }; 94edf647d1SNeil Armstrong }; 95edf647d1SNeil Armstrong 96edf647d1SNeil Armstrong... 97