From 86d27c996d737210f1d95e9456069de1210d2fea Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Mon, 24 Feb 2020 17:31:47 +0800 Subject: [PATCH] dt-bindings: sound: rockchip: Add binding for Audio PWM Change-Id: Ia7d8bf6e697fbb9ff7de9c0572f9c679136be47c Signed-off-by: Sugar Zhang --- .../bindings/sound/rockchip,audio-pwm.txt | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/rockchip,audio-pwm.txt diff --git a/Documentation/devicetree/bindings/sound/rockchip,audio-pwm.txt b/Documentation/devicetree/bindings/sound/rockchip,audio-pwm.txt new file mode 100644 index 000000000000..042c7ac5109d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip,audio-pwm.txt @@ -0,0 +1,40 @@ +* Rockchip Audio PWM controller + +Required properties: + +- compatible: "rockchip,audio-pwm-v1" +- reg: physical base address of the controller and length of memory mapped + region. +- dmas: DMA specifiers for tx dma. See the DMA client binding, + Documentation/devicetree/bindings/dma/dma.txt +- dma-names: should include "tx". +- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. +- clock-names: should contain following: + - "clk" : clock for Audio PWM controller + - "hclk": clock for AHB BUS +- pinctrl-names: Must contain a "default" entry. +- pinctrl-N: One property must exist for each entry in + pinctrl-names. See ../pinctrl/pinctrl-bindings.txt + for details of the property values. + +Optional properties: + +- rockchip,sample-width-bits: Output sampling data width,the value ranges from 8 to 11 bits. +- rockchip,interpolat-points-cfg: Interpolation rate,the value must be 1/3/7/15 points, + if this is set,the linear interpolation mode will be turned on. + +Example for Audio PWM controller: + +audpwm: audpwm@ff840000 { + compatible = "rockchip,audio-pwm-v1"; + reg = <0xff840000 0x1000>; + clocks = <&cru SCLK_AUDPWM>, <&cru HCLK_AUDPWM>; + clock-names = "clk", "hclk"; + dmas = <&dmac 26>; + dma-names = "tx"; + pinctrl-names = "default"; + pinctrl-0 = <&audpwmm0_pins>; + rockchip,sample-width-bits = <11>; + rockchip,interpolat-points = <1>; + status = "disabled"; +};