146 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Samsung Midas audio complex with WM1811 codec8 9maintainers:10 - Sylwester Nawrocki <s.nawrocki@samsung.com>11 12allOf:13 - $ref: sound-card-common.yaml#14 15properties:16 compatible:17 const: samsung,midas-audio18 19 cpu:20 type: object21 additionalProperties: false22 properties:23 sound-dai:24 maxItems: 125 description: phandle to the I2S controller26 required:27 - sound-dai28 29 codec:30 type: object31 additionalProperties: false32 properties:33 sound-dai:34 maxItems: 135 description: phandle to the WM1811 CODEC36 required:37 - sound-dai38 39 samsung,audio-routing:40 deprecated: true41 $ref: /schemas/types.yaml#/definitions/non-unique-string-array42 description: |43 List of the connections between audio components; each entry is44 a pair of strings, the first being the connection's sink, the second45 being the connection's source; valid names for sources and sinks are46 the WM1811's pins (as documented in its binding), and the jacks47 on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.48 Deprecated, use audio-routing.49 50 mic-bias-supply:51 description: Supply for the micbias on the Main microphone52 53 submic-bias-supply:54 description: Supply for the micbias on the Sub microphone55 56 headset-mic-bias-supply:57 description: Supply for the micbias on the Headset microphone58 59 fm-sel-gpios:60 maxItems: 161 description: GPIO pin for FM selection62 63 lineout-sel-gpios:64 maxItems: 165 description: GPIO pin for line out selection66 67 headset-detect-gpios:68 maxItems: 169 description: GPIO for detection of headset insertion70 71 headset-key-gpios:72 maxItems: 173 description: GPIO for detection of headset key press74 75 io-channels:76 maxItems: 177 description: IO channel to read micbias voltage for headset detection78 79 io-channel-names:80 const: headset-detect81 82 samsung,headset-4pole-threshold-microvolt:83 minItems: 284 maxItems: 285 description:86 Array containing minimum and maximum IO channel value for 4-pole87 (with microphone/button) headsets. If the IO channel value is88 outside of this range, a 3-pole headset is assumed.89 90 samsung,headset-button-threshold-microvolt:91 minItems: 392 maxItems: 393 description: |94 Array of minimum (inclusive) IO channel values for headset button95 detection, in order: "Media", "Volume Up" and "Volume Down".96 97required:98 - compatible99 - cpu100 - codec101 - audio-routing102 - mic-bias-supply103 - submic-bias-supply104 105unevaluatedProperties: false106 107examples:108 - |109 #include <dt-bindings/gpio/gpio.h>110 111 sound {112 compatible = "samsung,midas-audio";113 model = "Midas";114 115 fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>;116 117 mic-bias-supply = <&mic_bias_reg>;118 submic-bias-supply = <&submic_bias_reg>;119 120 audio-routing =121 "HP", "HPOUT1L",122 "HP", "HPOUT1R",123 124 "SPK", "SPKOUTLN",125 "SPK", "SPKOUTLP",126 "SPK", "SPKOUTRN",127 "SPK", "SPKOUTRP",128 129 "RCV", "HPOUT2N",130 "RCV", "HPOUT2P",131 132 "IN1LP", "Main Mic",133 "IN1LN", "Main Mic",134 "IN1RP", "Sub Mic",135 "IN1LP", "Sub Mic";136 137 cpu {138 sound-dai = <&i2s0>;139 };140 141 codec {142 sound-dai = <&wm1811>;143 };144 145 };146