Skip to contentSkip to conversation

ASoC: add hi6210-i2s DT bindings

RFC PATCH Superseded John Stultz 1 participant 2 messages Oct 12, 2016

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH v3 1/2 ASoC: add hi6210-i2s DT bindings

Adds DT bindings documentation for the hi6210-i2s driver.

Cc Zhangfei Gao <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Jaroslav Kysela <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Andy Green <[email protected]>
Cc Dave Long <[email protected]>
Cc Guodong Xu <[email protected]>

---
v3:
* Simplified and reworked dt binding

---
 .../bindings/sound/hisilicon,hi6210-i2s.txt        | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt
Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt new file +32 -0
new file mode 100644
index 0000000..4be451c
@@ -0,0 +1,32 @@
+* 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
+
+Example for the hi6210 i2s controller:
+
+i2s0: hi6210_i2s {
+	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>;
+};
Signature · 1 line
2.7.4
#1 lore raw

RFC PATCH v3 2/2 ASoC: hisilicon: Add hi6210 i2s audio driver

From: Andy Green <[email protected]>

Add driver for hi6210 i2s controller found on hi6220 boards.

This is just another spin trying to address earlier review feedback. Additional feedback or suggestions would be quite welcome.

thanks
-john

Cc Zhangfei Gao <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Jaroslav Kysela <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Andy Green <[email protected]>
Cc Dave Long <[email protected]>
Cc Guodong Xu <[email protected]>

[jstultz: Forward ported to mainline, fairly major rework
based on suggestions from Mark Brown]

---
v2:
* Folded in fixes from kbuildbot
* Split i2s and hdmi-card drivers up
* Major rework from MarkB's suggestions
v3:
* Folded in fixes from Guodong
* Simplified and reworked devicetree bindings
* Integrated review feedback from Mark Brown

---
 sound/soc/Kconfig                |   1 +
 sound/soc/Makefile               |   1 +
 sound/soc/hisilicon/Kconfig      |   5 +
 sound/soc/hisilicon/Makefile     |   1 +
 sound/soc/hisilicon/hi6210-i2s.c | 628 +++++++++++++++++++++++++++++++++++++++
 sound/soc/hisilicon/hi6210-i2s.h | 276 +++++++++++++++++
 6 files changed, 912 insertions(+)
 create mode 100644 sound/soc/hisilicon/Kconfig
 create mode 100644 sound/soc/hisilicon/Makefile
 create mode 100644 sound/soc/hisilicon/hi6210-i2s.c
 create mode 100644 sound/soc/hisilicon/hi6210-i2s.h
sound/soc/Kconfig +1 -0
index 182d92e..9df9658 100644
@@ -47,6 +47,7 @@ source "sound/soc/cirrus/Kconfig"
 source "sound/soc/davinci/Kconfig"
 source "sound/soc/dwc/Kconfig"
 source "sound/soc/fsl/Kconfig"
+source "sound/soc/hisilicon/Kconfig"
 source "sound/soc/jz4740/Kconfig"
 source "sound/soc/nuc900/Kconfig"
 source "sound/soc/omap/Kconfig"
sound/soc/Makefile +1 -0
index 9a30f21..2f6aabb 100644
@@ -27,6 +27,7 @@ obj-$(CONFIG_SND_SOC)	+= cirrus/
 obj-$(CONFIG_SND_SOC)	+= davinci/
 obj-$(CONFIG_SND_SOC)	+= dwc/
 obj-$(CONFIG_SND_SOC)	+= fsl/
+obj-$(CONFIG_SND_SOC)	+= hisilicon/
 obj-$(CONFIG_SND_SOC)	+= jz4740/
 obj-$(CONFIG_SND_SOC)	+= img/
 obj-$(CONFIG_SND_SOC)	+= intel/
sound/soc/hisilicon/Kconfig new file +5 -0
new file mode 100644
index 0000000..4356d5a
@@ -0,0 +1,5 @@
+config SND_I2S_HI6210_I2S
+	tristate "Hisilicon I2S controller"
+	select SND_SOC_GENERIC_DMAENGINE_PCM
+	help
+	  Hisilicon I2S
sound/soc/hisilicon/Makefile new file +1 -0
new file mode 100644
index 0000000..e8095e2
@@ -0,0 +1 @@
+obj-$(CONFIG_SND_I2S_HI6210_I2S) += hi6210-i2s.o
sound/soc/hisilicon/hi6210-i2s.c new file +628 -0

628 lines not on this page · raw message

sound/soc/hisilicon/hi6210-i2s.h new file +276 -0

276 lines not on this page · raw message

Signature · 1 line
2.7.4