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
* Rockchip VAD controller
 
Required properties:
 
- compatible: should be one of the following
  - "rockchip,rk1808es-vad": for rk1808es
  - "rockchip,rk1808-vad": for rk1808
  - "rockchip,rk3308-vad": for rk3308
  - "rockchip,rk3568-vad": for rk3568
  - "rockchip,rk3588-vad": for rk3588
- reg: physical base address of the controller and length of memory mapped
  region.
- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
- clock-names: should contain following:
- interrupts: should contain the vad interrupt.
- rockchip,audio-sram: the phandle of audio sram for vad.
- rockchip,audio-src: the phandle of audio src for vad.
- rockchip,buffer-time-ms: vad sram buffer time msec.
- rockchip,det-channel: the channel(0~7) is used for detection.
- rockchip,mode: vad work mode.
  - 0: begin to store the data after voice detected.
  - 1: begin to store the data after vad is enabled.
  - 2: don't store the data.
 
Optional properties:
- rockchip,acodec-cfg: boolean, config acodec after voice activity detection.
 
Example for rk3308 VAD controller:
 
vad: vad@ff3c0000 {
   compatible = "rockchip,rk3308-vad";
   reg = <0x0 0xff3c0000 0x0 0x10000>;
   reg-names = "vad";
   clocks = <&cru HCLK_VAD>;
   clock-names = "hclk";
   interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
   rockchip,audio-sram = <&vad_sram>;
   rockchip,audio-src = <&i2s_8ch_0>;
   rockchip,det-channel = <0>;
   rockchip,mode = <0>;
   status = "disabled";
};