diff options
| author | Oder Chiou <oder_chiou@realtek.com> | 2015-06-10 02:27:58 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-06-10 13:31:06 -0400 |
| commit | fb5ab0e7473d41e2a9db0fcb569faf337d595838 (patch) | |
| tree | 7f8fc45cb549ace4d8a41a5e8225a89a5f4a994d | |
| parent | 1fcb76dbd16f3cf4c121e6141ae27446fd732267 (diff) | |
ASoC: rt5645: add device tree support
Modify the RT5645 driver to parse platform data from device tree.
Write a DT binding document to describe those properties.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | Documentation/devicetree/bindings/sound/rt5645.txt | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/rt5645.txt b/Documentation/devicetree/bindings/sound/rt5645.txt new file mode 100644 index 000000000000..7cee1f518f59 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rt5645.txt | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | RT5650/RT5645 audio CODEC | ||
| 2 | |||
| 3 | This device supports I2C only. | ||
| 4 | |||
| 5 | Required properties: | ||
| 6 | |||
| 7 | - compatible : One of "realtek,rt5645" or "realtek,rt5650". | ||
| 8 | |||
| 9 | - reg : The I2C address of the device. | ||
| 10 | |||
| 11 | - interrupts : The CODEC's interrupt output. | ||
| 12 | |||
| 13 | Optional properties: | ||
| 14 | |||
| 15 | - hp-detect-gpios: | ||
| 16 | a GPIO spec for the external headphone detect pin. If jd-mode = 0, | ||
| 17 | we will get the JD status by getting the value of hp-detect-gpios. | ||
| 18 | |||
| 19 | - realtek,in2-differential | ||
| 20 | Boolean. Indicate MIC2 input are differential, rather than single-ended. | ||
| 21 | |||
| 22 | - realtek,dmic1-data-pin | ||
| 23 | 0: dmic1 is not used | ||
| 24 | 1: using IN2P pin as dmic1 data pin | ||
| 25 | 2: using GPIO6 pin as dmic1 data pin | ||
| 26 | 3: using GPIO10 pin as dmic1 data pin | ||
| 27 | 4: using GPIO12 pin as dmic1 data pin | ||
| 28 | |||
| 29 | - realtek,dmic2-data-pin | ||
| 30 | 0: dmic2 is not used | ||
| 31 | 1: using IN2N pin as dmic2 data pin | ||
| 32 | 2: using GPIO5 pin as dmic2 data pin | ||
| 33 | 3: using GPIO11 pin as dmic2 data pin | ||
| 34 | |||
| 35 | -- realtek,jd-mode : The JD mode of rt5645/rt5650 | ||
| 36 | 0 : rt5645/rt5650 JD function is not used | ||
| 37 | 1 : Mode-0 (VDD=3.3V), two port jack detection | ||
| 38 | 2 : Mode-1 (VDD=3.3V), one port jack detection | ||
| 39 | 3 : Mode-2 (VDD=1.8V), one port jack detection | ||
| 40 | |||
| 41 | Pins on the device (for linking into audio routes) for RT5645/RT5650: | ||
| 42 | |||
| 43 | * DMIC L1 | ||
| 44 | * DMIC R1 | ||
| 45 | * DMIC L2 | ||
| 46 | * DMIC R2 | ||
| 47 | * IN1P | ||
| 48 | * IN1N | ||
| 49 | * IN2P | ||
| 50 | * IN2N | ||
| 51 | * Haptic Generator | ||
| 52 | * HPOL | ||
| 53 | * HPOR | ||
| 54 | * LOUTL | ||
| 55 | * LOUTR | ||
| 56 | * PDM1L | ||
| 57 | * PDM1R | ||
| 58 | * SPOL | ||
| 59 | * SPOR | ||
| 60 | |||
| 61 | Example: | ||
| 62 | |||
| 63 | codec: rt5650@1a { | ||
| 64 | compatible = "realtek,rt5650"; | ||
| 65 | reg = <0x1a>; | ||
| 66 | hp-detect-gpios = <&gpio 19 0>; | ||
| 67 | interrupt-parent = <&gpio>; | ||
| 68 | interrupts = <7 IRQ_TYPE_EDGE_FALLING>; | ||
| 69 | realtek,dmic-en = "true"; | ||
| 70 | realtek,en-jd-func = "true"; | ||
| 71 | realtek,jd-mode = <3>; | ||
| 72 | }; \ No newline at end of file | ||
