xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/rockchip,audio-pwm.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1* Rockchip Audio PWM controller
2
3Required properties:
4
5- compatible: "rockchip,audio-pwm-v1"
6- reg: physical base address of the controller and length of memory mapped
7  region.
8- dmas: DMA specifiers for tx dma. See the DMA client binding,
9	Documentation/devicetree/bindings/dma/dma.txt
10- dma-names: should include "tx".
11- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
12- clock-names: should contain following:
13   - "clk" : clock for Audio PWM controller
14   - "hclk": clock for AHB BUS
15- pinctrl-names: Must contain a "default" entry.
16- pinctrl-N: One property must exist for each entry in
17	     pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
18	     for details of the property values.
19
20Optional properties:
21
22- rockchip,sample-width-bits: Output sampling data width,the value ranges from 8 to 11 bits.
23- rockchip,interpolat-points-cfg: Interpolation rate,the value must be 1/3/7/15 points,
24  if this is set,the linear interpolation mode will be turned on.
25- spk-ctl-gpios: The gpio of speak controller.
26
27Example for Audio PWM controller:
28
29audpwm: audpwm@ff840000 {
30	compatible = "rockchip,audio-pwm-v1";
31	reg = <0xff840000 0x1000>;
32	clocks = <&cru SCLK_AUDPWM>, <&cru HCLK_AUDPWM>;
33	clock-names = "clk", "hclk";
34	dmas = <&dmac 26>;
35	dma-names = "tx";
36	pinctrl-names = "default";
37	pinctrl-0 = <&audpwmm0_pins>;
38	rockchip,sample-width-bits = <11>;
39	rockchip,interpolat-points = <1>;
40	spk-ctl-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
41	status = "disabled";
42};
43