hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/Documentation/devicetree/bindings/sound/rockchip,multicodecs.txt
....@@ -12,6 +12,16 @@
1212 - rockchip,wait-card-locked : This is a variable length array, user specified
1313 these sound cards need to be prepared and locked,
1414 otherwise the local slave card can be probed.
15
+- rockchip,audio-routing : sound card dapm routing.
16
+- hp-det-gpio : headphone detect gpio.
17
+- io-channels : headset mic/key detect adc channel.
18
+- io-channel-names : headset mic/key adc channel name.
19
+- spk-con-gpio : speaker enable/disabled gpio.
20
+- hp-con-gpio : headphone enable/disabled gpio.
21
+- keyup-threshold-microvolt: keyup-threshold-microvolt uV.
22
+- poll-interval : headset adc key poller internal ms.
23
+- play-pause-key : PLAYPAUSE key, can define the other key like vol+/vol- and so on.
24
+
1525
1626 Optional dai-link subnode properties:
1727 - rockchip,format : CPU/CODEC common audio format.
....@@ -37,3 +47,42 @@
3747 rockchip,cpu = <&i2s0_8ch>;
3848 rockchip,codec = <&codec>, <&vad>;
3949 };
50
+
51
+Example 2 :
52
+
53
+es8388_sound: es8388-sound {
54
+ status = "okay";
55
+ compatible = "rockchip,multicodecs-card";
56
+ rockchip,card-name = "rockchip-es8388";
57
+ hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
58
+ io-channels = <&saradc 3>;
59
+ io-channel-names = "adc-detect";
60
+ spk-con-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
61
+ hp-con-gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
62
+ rockchip,format = "i2s";
63
+ rockchip,mclk-fs = <256>;
64
+ rockchip,cpu = <&i2s0_8ch>;
65
+ rockchip,codec = <&es8388>;
66
+ rockchip,audio-routing =
67
+ "Headphone", "LOUT1",
68
+ "Headphone", "ROUT1",
69
+ "Speaker", "LOUT2",
70
+ "Speaker", "ROUT2",
71
+ "Headphone", "Headphone Power",
72
+ "Headphone", "Headphone Power",
73
+ "Speaker", "Speaker Power",
74
+ "Speaker", "Speaker Power",
75
+ "LINPUT1", "Main Mic",
76
+ "LINPUT2", "Main Mic",
77
+ "RINPUT1", "Headset Mic",
78
+ "RINPUT2", "Headset Mic";
79
+ pinctrl-names = "default";
80
+ pinctrl-0 = <&hp_det>;
81
+ keyup-threshold-microvolt = <1800000>;
82
+ poll-interval = <100>;
83
+ play-pause-key{
84
+ label = "playpause";
85
+ linux,code = <KEY_PLAYPAUSE>;
86
+ press-threshold-microvolt = <2000>;
87
+ };
88
+};