summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/sound/rt5640.txt
blob: ff1228713f7e521e5bdb12a18a8110ff946676b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
RT5640/RT5639 audio CODEC

This device supports I2C only.

Required properties:

- compatible : One of "realtek,rt5640" or "realtek,rt5639".

- reg : The I2C address of the device.

- interrupts : The CODEC's interrupt output.

Optional properties:

- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"

- realtek,in1-differential
- realtek,in2-differential
- realtek,in3-differential
  Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended.

- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.

- realtek,dmic1-data-pin
  0: dmic1 is not used
  1: using IN1P pin as dmic1 data pin
  2: using GPIO3 pin as dmic1 data pin

- realtek,dmic2-data-pin
  0: dmic2 is not used
  1: using IN1N pin as dmic2 data pin
  2: using GPIO4 pin as dmic2 data pin

- realtek,jack-detect-source
  u32. Valid values:
  0: jack-detect is not used
  1: Use GPIO1 for jack-detect
  2: Use JD1_IN4P for jack-detect
  3: Use JD2_IN4N for jack-detect
  4: Use GPIO2 for jack-detect
  5: Use GPIO3 for jack-detect
  6: Use GPIO4 for jack-detect

- realtek,jack-detect-not-inverted
  bool. Normal jack-detect switches give an inverted signal, set this bool
  in the rare case you've a jack-detect switch which is not inverted.

- realtek,over-current-threshold-microamp
  u32, micbias over-current detection threshold in µA, valid values are
  600, 1500 and 2000µA.

- realtek,over-current-scale-factor
  u32, micbias over-current detection scale-factor, valid values are:
  0: Scale current by 0.5
  1: Scale current by 0.75
  2: Scale current by 1.0
  3: Scale current by 1.5

Pins on the device (for linking into audio routes) for RT5639/RT5640:

  * DMIC1
  * DMIC2
  * MICBIAS1
  * IN1P
  * IN1N
  * IN2P
  * IN2N
  * IN3P
  * IN3N
  * HPOL
  * HPOR
  * LOUTL
  * LOUTR
  * SPOLP
  * SPOLN
  * SPORP
  * SPORN

Additional pins on the device for RT5640:

  * MONOP
  * MONON

Example:

rt5640 {
	compatible = "realtek,rt5640";
	reg = <0x1c>;
	interrupt-parent = <&gpio>;
	interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
	realtek,ldo1-en-gpios =
		<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
};