101950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 201950c46SEmmanuel Vadot%YAML 1.2 301950c46SEmmanuel Vadot--- 401950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,wcd939x.yaml# 501950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 601950c46SEmmanuel Vadot 701950c46SEmmanuel Vadottitle: Qualcomm WCD9380/WCD9385 Audio Codec 801950c46SEmmanuel Vadot 901950c46SEmmanuel Vadotmaintainers: 1001950c46SEmmanuel Vadot - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 1101950c46SEmmanuel Vadot 1201950c46SEmmanuel Vadotdescription: | 1301950c46SEmmanuel Vadot Qualcomm WCD9390/WCD9395 Codec is a standalone Hi-Fi audio codec IC. 1401950c46SEmmanuel Vadot It has RX and TX Soundwire devices. 1501950c46SEmmanuel Vadot The WCD9390/WCD9395 IC has a functionally separate USB-C Mux subsystem 1601950c46SEmmanuel Vadot accessible over an I2C interface. 1701950c46SEmmanuel Vadot The Audio Headphone and Microphone data path between the Codec and the USB-C Mux 1801950c46SEmmanuel Vadot subsystems are external to the IC, thus requiring DT port-endpoint graph description 1901950c46SEmmanuel Vadot to handle USB-C altmode & orientation switching for Audio Accessory Mode. 2001950c46SEmmanuel Vadot 2101950c46SEmmanuel VadotallOf: 2201950c46SEmmanuel Vadot - $ref: dai-common.yaml# 2301950c46SEmmanuel Vadot - $ref: qcom,wcd93xx-common.yaml# 2401950c46SEmmanuel Vadot 2501950c46SEmmanuel Vadotproperties: 2601950c46SEmmanuel Vadot compatible: 2701950c46SEmmanuel Vadot oneOf: 2801950c46SEmmanuel Vadot - const: qcom,wcd9390-codec 2901950c46SEmmanuel Vadot - items: 3001950c46SEmmanuel Vadot - const: qcom,wcd9395-codec 3101950c46SEmmanuel Vadot - const: qcom,wcd9390-codec 3201950c46SEmmanuel Vadot 3301950c46SEmmanuel Vadot mode-switch: 3401950c46SEmmanuel Vadot description: Flag the port as possible handler of altmode switching 3501950c46SEmmanuel Vadot type: boolean 3601950c46SEmmanuel Vadot 3701950c46SEmmanuel Vadot orientation-switch: 3801950c46SEmmanuel Vadot description: Flag the port as possible handler of orientation switching 3901950c46SEmmanuel Vadot type: boolean 4001950c46SEmmanuel Vadot 4101950c46SEmmanuel Vadot port: 4201950c46SEmmanuel Vadot $ref: /schemas/graph.yaml#/properties/port 4301950c46SEmmanuel Vadot description: 4401950c46SEmmanuel Vadot A port node to link the WCD939x Codec node to USB MUX subsystems for the 4501950c46SEmmanuel Vadot purpose of handling altmode muxing and orientation switching to detect and 4601950c46SEmmanuel Vadot enable Audio Accessory Mode. 4701950c46SEmmanuel Vadot 4801950c46SEmmanuel Vadotrequired: 4901950c46SEmmanuel Vadot - compatible 5001950c46SEmmanuel Vadot 5101950c46SEmmanuel VadotunevaluatedProperties: false 5201950c46SEmmanuel Vadot 5301950c46SEmmanuel Vadotexamples: 5401950c46SEmmanuel Vadot - | 55*0e8011faSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 5601950c46SEmmanuel Vadot codec { 5701950c46SEmmanuel Vadot compatible = "qcom,wcd9390-codec"; 58*0e8011faSEmmanuel Vadot reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; 5901950c46SEmmanuel Vadot #sound-dai-cells = <1>; 6001950c46SEmmanuel Vadot qcom,tx-device = <&wcd939x_tx>; 6101950c46SEmmanuel Vadot qcom,rx-device = <&wcd939x_rx>; 6201950c46SEmmanuel Vadot qcom,micbias1-microvolt = <1800000>; 6301950c46SEmmanuel Vadot qcom,micbias2-microvolt = <1800000>; 6401950c46SEmmanuel Vadot qcom,micbias3-microvolt = <1800000>; 6501950c46SEmmanuel Vadot qcom,micbias4-microvolt = <1800000>; 6601950c46SEmmanuel Vadot qcom,hphl-jack-type-normally-closed; 6701950c46SEmmanuel Vadot qcom,ground-jack-type-normally-closed; 6801950c46SEmmanuel Vadot qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; 6901950c46SEmmanuel Vadot qcom,mbhc-headphone-vthreshold-microvolt = <50000>; 7001950c46SEmmanuel Vadot }; 7101950c46SEmmanuel Vadot 7201950c46SEmmanuel Vadot /* ... */ 7301950c46SEmmanuel Vadot 7401950c46SEmmanuel Vadot soundwire@3210000 { 7501950c46SEmmanuel Vadot #address-cells = <2>; 7601950c46SEmmanuel Vadot #size-cells = <0>; 7701950c46SEmmanuel Vadot reg = <0x03210000 0x2000>; 7801950c46SEmmanuel Vadot wcd939x_rx: codec@0,4 { 7901950c46SEmmanuel Vadot compatible = "sdw20217010e00"; 8001950c46SEmmanuel Vadot reg = <0 4>; 8101950c46SEmmanuel Vadot qcom,rx-port-mapping = <1 2 3 4 5 6>; 8201950c46SEmmanuel Vadot }; 8301950c46SEmmanuel Vadot }; 8401950c46SEmmanuel Vadot 8501950c46SEmmanuel Vadot soundwire@3230000 { 8601950c46SEmmanuel Vadot #address-cells = <2>; 8701950c46SEmmanuel Vadot #size-cells = <0>; 8801950c46SEmmanuel Vadot reg = <0x03230000 0x2000>; 8901950c46SEmmanuel Vadot wcd938x_tx: codec@0,3 { 9001950c46SEmmanuel Vadot compatible = "sdw20217010e00"; 9101950c46SEmmanuel Vadot reg = <0 3>; 9201950c46SEmmanuel Vadot qcom,tx-port-mapping = <2 3 4 5>; 9301950c46SEmmanuel Vadot }; 9401950c46SEmmanuel Vadot }; 9501950c46SEmmanuel Vadot 9601950c46SEmmanuel Vadot... 97