1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Samsung Midas audio complex with WM1811 codec 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Sylwester Nawrocki <s.nawrocki@samsung.com> 11c66ec88fSEmmanuel Vadot 12aa1a8ff2SEmmanuel VadotallOf: 13aa1a8ff2SEmmanuel Vadot - $ref: sound-card-common.yaml# 14aa1a8ff2SEmmanuel Vadot 15c66ec88fSEmmanuel Vadotproperties: 16c66ec88fSEmmanuel Vadot compatible: 17c66ec88fSEmmanuel Vadot const: samsung,midas-audio 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadot cpu: 20c66ec88fSEmmanuel Vadot type: object 217ef62cebSEmmanuel Vadot additionalProperties: false 22c66ec88fSEmmanuel Vadot properties: 23c66ec88fSEmmanuel Vadot sound-dai: 246be33864SEmmanuel Vadot maxItems: 1 25c66ec88fSEmmanuel Vadot description: phandle to the I2S controller 26c66ec88fSEmmanuel Vadot required: 27c66ec88fSEmmanuel Vadot - sound-dai 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel Vadot codec: 30c66ec88fSEmmanuel Vadot type: object 317ef62cebSEmmanuel Vadot additionalProperties: false 32c66ec88fSEmmanuel Vadot properties: 33c66ec88fSEmmanuel Vadot sound-dai: 346be33864SEmmanuel Vadot maxItems: 1 35c66ec88fSEmmanuel Vadot description: phandle to the WM1811 CODEC 36c66ec88fSEmmanuel Vadot required: 37c66ec88fSEmmanuel Vadot - sound-dai 38c66ec88fSEmmanuel Vadot 39c66ec88fSEmmanuel Vadot samsung,audio-routing: 40aa1a8ff2SEmmanuel Vadot deprecated: true 41c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/non-unique-string-array 42c66ec88fSEmmanuel Vadot description: | 43c66ec88fSEmmanuel Vadot List of the connections between audio components; each entry is 44c66ec88fSEmmanuel Vadot a pair of strings, the first being the connection's sink, the second 45c66ec88fSEmmanuel Vadot being the connection's source; valid names for sources and sinks are 46c66ec88fSEmmanuel Vadot the WM1811's pins (as documented in its binding), and the jacks 47c66ec88fSEmmanuel Vadot on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic. 48aa1a8ff2SEmmanuel Vadot Deprecated, use audio-routing. 49c66ec88fSEmmanuel Vadot 50c66ec88fSEmmanuel Vadot mic-bias-supply: 51c66ec88fSEmmanuel Vadot description: Supply for the micbias on the Main microphone 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel Vadot submic-bias-supply: 54c66ec88fSEmmanuel Vadot description: Supply for the micbias on the Sub microphone 55c66ec88fSEmmanuel Vadot 56*0e8011faSEmmanuel Vadot headset-mic-bias-supply: 57*0e8011faSEmmanuel Vadot description: Supply for the micbias on the Headset microphone 58*0e8011faSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot fm-sel-gpios: 605def4c47SEmmanuel Vadot maxItems: 1 61c66ec88fSEmmanuel Vadot description: GPIO pin for FM selection 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel Vadot lineout-sel-gpios: 645def4c47SEmmanuel Vadot maxItems: 1 65c66ec88fSEmmanuel Vadot description: GPIO pin for line out selection 66c66ec88fSEmmanuel Vadot 67*0e8011faSEmmanuel Vadot headset-detect-gpios: 68*0e8011faSEmmanuel Vadot maxItems: 1 69*0e8011faSEmmanuel Vadot description: GPIO for detection of headset insertion 70*0e8011faSEmmanuel Vadot 71*0e8011faSEmmanuel Vadot headset-key-gpios: 72*0e8011faSEmmanuel Vadot maxItems: 1 73*0e8011faSEmmanuel Vadot description: GPIO for detection of headset key press 74*0e8011faSEmmanuel Vadot 75*0e8011faSEmmanuel Vadot io-channels: 76*0e8011faSEmmanuel Vadot maxItems: 1 77*0e8011faSEmmanuel Vadot description: IO channel to read micbias voltage for headset detection 78*0e8011faSEmmanuel Vadot 79*0e8011faSEmmanuel Vadot io-channel-names: 80*0e8011faSEmmanuel Vadot const: headset-detect 81*0e8011faSEmmanuel Vadot 82*0e8011faSEmmanuel Vadot samsung,headset-4pole-threshold-microvolt: 83*0e8011faSEmmanuel Vadot minItems: 2 84*0e8011faSEmmanuel Vadot maxItems: 2 85*0e8011faSEmmanuel Vadot description: 86*0e8011faSEmmanuel Vadot Array containing minimum and maximum IO channel value for 4-pole 87*0e8011faSEmmanuel Vadot (with microphone/button) headsets. If the IO channel value is 88*0e8011faSEmmanuel Vadot outside of this range, a 3-pole headset is assumed. 89*0e8011faSEmmanuel Vadot 90*0e8011faSEmmanuel Vadot samsung,headset-button-threshold-microvolt: 91*0e8011faSEmmanuel Vadot minItems: 3 92*0e8011faSEmmanuel Vadot maxItems: 3 93*0e8011faSEmmanuel Vadot description: | 94*0e8011faSEmmanuel Vadot Array of minimum (inclusive) IO channel values for headset button 95*0e8011faSEmmanuel Vadot detection, in order: "Media", "Volume Up" and "Volume Down". 96*0e8011faSEmmanuel Vadot 97c66ec88fSEmmanuel Vadotrequired: 98c66ec88fSEmmanuel Vadot - compatible 99c66ec88fSEmmanuel Vadot - cpu 100c66ec88fSEmmanuel Vadot - codec 101aa1a8ff2SEmmanuel Vadot - audio-routing 102c66ec88fSEmmanuel Vadot - mic-bias-supply 103c66ec88fSEmmanuel Vadot - submic-bias-supply 104c66ec88fSEmmanuel Vadot 105aa1a8ff2SEmmanuel VadotunevaluatedProperties: false 106c66ec88fSEmmanuel Vadot 107c66ec88fSEmmanuel Vadotexamples: 108c66ec88fSEmmanuel Vadot - | 109c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 110c66ec88fSEmmanuel Vadot 111c66ec88fSEmmanuel Vadot sound { 112c66ec88fSEmmanuel Vadot compatible = "samsung,midas-audio"; 113c66ec88fSEmmanuel Vadot model = "Midas"; 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>; 116c66ec88fSEmmanuel Vadot 117c66ec88fSEmmanuel Vadot mic-bias-supply = <&mic_bias_reg>; 118c66ec88fSEmmanuel Vadot submic-bias-supply = <&submic_bias_reg>; 119c66ec88fSEmmanuel Vadot 120aa1a8ff2SEmmanuel Vadot audio-routing = 121c66ec88fSEmmanuel Vadot "HP", "HPOUT1L", 122c66ec88fSEmmanuel Vadot "HP", "HPOUT1R", 123c66ec88fSEmmanuel Vadot 124c66ec88fSEmmanuel Vadot "SPK", "SPKOUTLN", 125c66ec88fSEmmanuel Vadot "SPK", "SPKOUTLP", 126c66ec88fSEmmanuel Vadot "SPK", "SPKOUTRN", 127c66ec88fSEmmanuel Vadot "SPK", "SPKOUTRP", 128c66ec88fSEmmanuel Vadot 129c66ec88fSEmmanuel Vadot "RCV", "HPOUT2N", 130c66ec88fSEmmanuel Vadot "RCV", "HPOUT2P", 131c66ec88fSEmmanuel Vadot 132c66ec88fSEmmanuel Vadot "IN1LP", "Main Mic", 133c66ec88fSEmmanuel Vadot "IN1LN", "Main Mic", 134c66ec88fSEmmanuel Vadot "IN1RP", "Sub Mic", 135c66ec88fSEmmanuel Vadot "IN1LP", "Sub Mic"; 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot cpu { 138c66ec88fSEmmanuel Vadot sound-dai = <&i2s0>; 139c66ec88fSEmmanuel Vadot }; 140c66ec88fSEmmanuel Vadot 141c66ec88fSEmmanuel Vadot codec { 142c66ec88fSEmmanuel Vadot sound-dai = <&wm1811>; 143c66ec88fSEmmanuel Vadot }; 144c66ec88fSEmmanuel Vadot 145c66ec88fSEmmanuel Vadot }; 146