hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
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
* Rockchip rk817 codec
 
Required properties:
 
- compatible: "rockchip,rk817-codec"
- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
- clock-names: should be "mclk".
- spk-ctl-gpios: spk mute enable/disable
- hp-ctl-gpios: hp mute enable/disable
- spk-mute-delay-ms: spk mute delay time
- hp-mute-delay-ms: hp mute delay time
- spk-volume: DAC L/R volume digital setting for Speaker
- hp-volume: DAC L/R volume digital setting for Headphone
  *
  * DDAC L/R volume setting
  * 0db~-95db,0.375db/step,for example:
  * 0: 0dB
  * 10: -3.75dB
  * 125: -46dB
  * 255: -95dB
  *
- capture-volume: ADC L/R volume digital setting for Microphone
  *
  * DADC L/R volume setting
  * 0db~-95db,0.375db/step,for example:
  * 0: 0dB
  * 10: -3.75dB
  * 125: -46dB
  * 255: -95dB
  *
- mic-in-differential:
  Boolean. Indicate MIC input are differential, rather than single-ended.
- pdmdata-out-enable:
  Boolean. Indicate pdmdata output is enable or disable.
- use-ext-amplifier:
  Boolean. Indicate use external amplifier or not.
- adc-for-loopback:
  Boolean. Indicate adc use for loopback or not.
- out-l2spk-r2hp:
  Boolean. Use route config for L to ClassD speaker out and R to HPR out
 
Example for rk817 codec:
 
rk817: pmic@20 {
   compatible = "rockchip,rk817";
   reg = <0x20>;
   interrupt-parent = <&gpio0>;
   interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
   pinctrl-names = "default";
   pinctrl-0 = <&pmic_int>;
 
   ........
 
   rk817_codec: codec {
           #sound-dai-cells = <0>;
           compatible = "rockchip,rk817-codec";
           clocks = <&cru SCLK_I2S_8CH_OUT>;
           clock-names = "mclk";
           pinctrl-names = "default";
           pinctrl-0 = <&i2s_8ch_mclk>;
           hp-volume = <3>;
           spk-volume = <3>;
           capture-volume = <0>;
           mic-in-differential;
           status = "okay";
   };
 
   ........
 
};