| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/sound/qcom,pm4125-codec.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Qualcomm PM4125 Audio Codec |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Alexey Klimov <[email protected]> |
| 11 |
|
| 12 |
description: |
| 13 |
The audio codec IC found on Qualcomm PM4125/PM2250 PMIC. |
| 14 |
It has RX and TX Soundwire slave devices. |
| 15 |
|
| 16 |
allOf: |
| 17 |
- $ref: dai-common.yaml# |
| 18 |
|
| 19 |
properties: |
| 20 |
compatible: |
| 21 |
const: qcom,pm4125-codec |
| 22 |
|
| 23 |
reg: |
| 24 |
description: |
| 25 |
Specifies the SPMI base address for the audio codec peripherals. The |
| 26 |
address space contains reset register needed to power-on the codec. |
| 27 |
maxItems: 1 |
| 28 |
|
| 29 |
reg-names: |
| 30 |
maxItems: 1 |
| 31 |
|
| 32 |
vdd-io-supply: |
| 33 |
description: A reference to the 1.8V I/O supply |
| 34 |
|
| 35 |
vdd-cp-supply: |
| 36 |
description: A reference to the charge pump I/O supply |
| 37 |
|
| 38 |
vdd-mic-bias-supply: |
| 39 |
description: A reference to the 3.3V mic bias supply |
| 40 |
|
| 41 |
vdd-pa-vpos-supply: |
| 42 |
description: A reference to the PA VPOS supply |
| 43 |
|
| 44 |
qcom,tx-device: |
| 45 |
$ref: /schemas/types.yaml#/definitions/phandle-array |
| 46 |
description: A reference to Soundwire tx device phandle |
| 47 |
|
| 48 |
qcom,rx-device: |
| 49 |
$ref: /schemas/types.yaml#/definitions/phandle-array |
| 50 |
description: A reference to Soundwire rx device phandle |
| 51 |
|
| 52 |
qcom,micbias1-microvolt: |
| 53 |
description: micbias1 voltage |
| 54 |
minimum: 1800000 |
| 55 |
maximum: 2850000 |
| 56 |
|
| 57 |
qcom,micbias2-microvolt: |
| 58 |
description: micbias2 voltage |
| 59 |
minimum: 1800000 |
| 60 |
maximum: 2850000 |
| 61 |
|
| 62 |
qcom,micbias3-microvolt: |
| 63 |
description: micbias3 voltage |
| 64 |
minimum: 1800000 |
| 65 |
maximum: 2850000 |
| 66 |
|
| 67 |
qcom,mbhc-buttons-vthreshold-microvolt: |
| 68 |
description: |
| 69 |
Array of 8 Voltage threshold values corresponding to headset |
| 70 |
button0 - button7 |
| 71 |
minItems: 8 |
| 72 |
maxItems: 8 |
| 73 |
|
| 74 |
'#sound-dai-cells': |
| 75 |
const: 1 |
| 76 |
|
| 77 |
required: |
| 78 |
- compatible |
| 79 |
- reg |
| 80 |
- vdd-io-supply |
| 81 |
- vdd-cp-supply |
| 82 |
- vdd-mic-bias-supply |
| 83 |
- vdd-pa-vpos-supply |
| 84 |
- qcom,tx-device |
| 85 |
- qcom,rx-device |
| 86 |
- qcom,micbias1-microvolt |
| 87 |
- qcom,micbias2-microvolt |
| 88 |
- qcom,micbias3-microvolt |
| 89 |
- '#sound-dai-cells' |
| 90 |
|
| 91 |
unevaluatedProperties: false |
| 92 |
|
| 93 |
examples: |
| 94 |
- | |
| 95 |
#include <dt-bindings/spmi/spmi.h> |
| 96 |
|
| 97 |
spmi { |
| 98 |
#address-cells = <2>; |
| 99 |
#size-cells = <0>; |
| 100 |
|
| 101 |
pmic { |
| 102 |
#address-cells = <1>; |
| 103 |
#size-cells = <0>; |
| 104 |
|
| 105 |
audio-codec@f000 { |
| 106 |
compatible = "qcom,pm4125-codec"; |
| 107 |
reg = <0xf000>; |
| 108 |
vdd-io-supply = <&pm4125_l15>; |
| 109 |
vdd-cp-supply = <&pm4125_s4>; |
| 110 |
vdd-pa-vpos-supply = <&pm4125_s4>; |
| 111 |
vdd-mic-bias-supply = <&pm4125_l22>; |
| 112 |
qcom,micbias1-microvolt = <1800000>; |
| 113 |
qcom,micbias2-microvolt = <1800000>; |
| 114 |
qcom,micbias3-microvolt = <1800000>; |
| 115 |
qcom,rx-device = <&pm4125_rx>; |
| 116 |
qcom,tx-device = <&pm4125_tx>; |
| 117 |
#sound-dai-cells = <1>; |
| 118 |
}; |
| 119 |
}; |
| 120 |
}; |
| 121 |
|
| 122 |
/* ... */ |
| 123 |
|
| 124 |
soundwire@a610000 { |
| 125 |
reg = <0x0a610000 0x2000>; |
| 126 |
#address-cells = <2>; |
| 127 |
#size-cells = <0>; |
| 128 |
pm4125_rx: audio-codec@0,4 { |
| 129 |
compatible = "sdw20217010c00"; |
| 130 |
reg = <0 4>; |
| 131 |
qcom,rx-port-mapping = <1 3>; |
| 132 |
}; |
| 133 |
}; |
| 134 |
... |