diff mbox series

[1/3,v4] ASoC: add hi6210-i2s DT bindings

Message ID 1490997961-31937-2-git-send-email-john.stultz@linaro.org
State Accepted
Commit 9e615f63cbafa2147fd302ab495d7b785306bc26
Headers show
Series HiKey i2s bindings, driver and dts changes | expand

Commit Message

John Stultz March 31, 2017, 10:05 p.m. UTC
Adds DT bindings documentation for the hi6210-i2s driver.

Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Andy Green <andy@warmcat.com>
Cc: Dave Long <dave.long@linaro.org>
Cc: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>

---
v3:
* Simplified and reworked dt binding
v4:
* Add #sound-dai-cells entry to make it clear multiple
  dais are possible
---
 .../bindings/sound/hisilicon,hi6210-i2s.txt        | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt

-- 
2.7.4

Comments

Mark Brown April 10, 2017, 6:13 p.m. UTC | #1
On Fri, Mar 31, 2017 at 03:05:59PM -0700, John Stultz wrote:

> +- #sound-dai-cells: Should be set to 1 (for multi-dai)


Please submit a followup patch documenting what these mean, at least for
what's in the code.
John Stultz April 10, 2017, 6:37 p.m. UTC | #2
On Mon, Apr 10, 2017 at 11:13 AM, Mark Brown <broonie@kernel.org> wrote:
> On Fri, Mar 31, 2017 at 03:05:59PM -0700, John Stultz wrote:

>

>> +- #sound-dai-cells: Should be set to 1 (for multi-dai)

>

> Please submit a followup patch documenting what these mean, at least for

> what's in the code.


So just to make sure I understand, you want documentation on what the
sound-dia-cells index maps to? (ie 0 to S2, as that's the only one
supported right now?) Or something else?

thanks
-john
Mark Brown April 10, 2017, 6:41 p.m. UTC | #3
On Mon, Apr 10, 2017 at 11:37:00AM -0700, John Stultz wrote:
> On Mon, Apr 10, 2017 at 11:13 AM, Mark Brown <broonie@kernel.org> wrote:

> > On Fri, Mar 31, 2017 at 03:05:59PM -0700, John Stultz wrote:


> >> +- #sound-dai-cells: Should be set to 1 (for multi-dai)


> > Please submit a followup patch documenting what these mean, at least for

> > what's in the code.


> So just to make sure I understand, you want documentation on what the

> sound-dia-cells index maps to? (ie 0 to S2, as that's the only one


*dai*

> supported right now?) Or something else?


Yes, that.   People need to be able to tell what the binding means.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt b/Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt
new file mode 100644
index 0000000..680bb035
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt
@@ -0,0 +1,34 @@ 
+* Hisilicon 6210 i2s controller
+
+Required properties:
+
+- compatible: should be one of the following:
+   - "hisilicon,hi6210-i2s"
+- reg: physical base address of the i2s controller unit and length of
+   memory mapped region.
+- interrupts: should contain the i2s interrupt.
+- clocks: a list of phandle + clock-specifier pairs, one for each entry
+  in clock-names.
+- clock-names: should contain following:
+   - "dacodec"
+   - "i2s-base"
+- dmas: DMA specifiers for tx dma. See the DMA client binding,
+  Documentation/devicetree/bindings/dma/dma.txt
+- dma-names: should be "tx" and "rx"
+- hisilicon,sysctrl-syscon: phandle to sysctrl syscon
+- #sound-dai-cells: Should be set to 1 (for multi-dai)
+
+Example for the hi6210 i2s controller:
+
+i2s0: i2s@f7118000{
+	compatible = "hisilicon,hi6210-i2s";
+	reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
+	interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
+	clocks = <&sys_ctrl HI6220_DACODEC_PCLK>,
+		 <&sys_ctrl HI6220_BBPPLL0_DIV>;
+	clock-names = "dacodec", "i2s-base";
+	dmas = <&dma0 15 &dma0 14>;
+	dma-names = "rx", "tx";
+	hisilicon,sysctrl-syscon = <&sys_ctrl>;
+	#sound-dai-cells = <1>;
+};