Support ZTE zx296702 SPDIF/I2S
Subsystems (3)
v4 cover Support ZTE zx296702 SPDIF/I2S
Changes vs v3:
- remove HDMI stuff and will add it in video side later
- Polish SPDIF driver with devm_*
Changes vs v2:
- remove pcm dma driver and merge the related call into DAI driver
- Add zx HDMI codec with direct HDMI function call
- Other typo and minor fix
Jun Nie (4):
dt: Add documentation for the ZTE SPDIF controller
dt: Add documentation for the ZTE I2S controller
ASoC: zx: Add zx296702 SPDIF support
ASoC: zx: Add ZTE zx296702 I2S DAI driver
.../devicetree/bindings/sound/zte,zx-i2s.txt | 44 +++ .../devicetree/bindings/sound/zte,zx-spdif.txt | 28 ++ sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/zte/Kconfig | 17 + sound/soc/zte/Makefile | 2 + sound/soc/zte/zx296702-i2s.c | 437 +++++++++++++++++++++ sound/soc/zte/zx296702-spdif.c | 370 +++++++++++++++++ 8 files changed, 900 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/zte,zx-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/zte,zx-spdif.txt create mode 100644 sound/soc/zte/Kconfig create mode 100644 sound/soc/zte/Makefile create mode 100644 sound/soc/zte/zx296702-i2s.c create mode 100644 sound/soc/zte/zx296702-spdif.c
Signature · 1 line
1.9.1
PATCH v4 1/4 dt: Add documentation for the ZTE SPDIF controller
This patch adds the devicetree documentation for the ZTE zx296702 SPDIF audio controller.
--- .../devicetree/bindings/sound/zte,zx-spdif.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
Documentation/devicetree/bindings/sound/zte,zx-spdif.txt new file +28 -0
@@ -0,0 +1,28 @@ +ZTE ZX296702 SPDIF controller + +Required properties: + - compatible : Must be "zte,zx296702-spdif" + - reg : Must contain SPDIF core's registers location and length + - clocks : Pairs of phandle and specifier referencing the controller's clocks. + - clock-names: "tx" for the clock to the SPDIF interface. + - dmas: Pairs of phandle and specifier for the DMA channel that is used by + the core. The core expects one dma channel for transmit. + - dma-names : Must be "tx" + +For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties +please check: + * resource-names.txt + * clock/clock-bindings.txt + * dma/dma.txt + +Example: + spdif0: spdif0@0b004000 { + compatible = "zte,zx296702-spdif"; + reg = <0x0b004000 0x1000>; + clocks = <&lsp0clk ZX296702_SPDIF0_DIV>; + clock-names = "tx"; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma 4>; + dma-names = "tx"; + status = "okay"; + };
Signature · 1 line
1.9.1
PATCH v4 2/4 dt: Add documentation for the ZTE I2S controller
In reply to Jun NieThis patch adds the devicetree documentation for the ZTE zx296702 I2S audio controller.
--- .../devicetree/bindings/sound/zte,zx-i2s.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
Documentation/devicetree/bindings/sound/zte,zx-i2s.txt new file +44 -0
@@ -0,0 +1,44 @@ +ZTE ZX296702 I2S controller + +Required properties: + - compatible : Must be "zte,zx296702-i2s" + - reg : Must contain I2S core's registers location and length + - clocks : Pairs of phandle and specifier referencing the controller's clocks. + - clock-names: "tx" for the clock to the I2S interface. + - dmas: Pairs of phandle and specifier for the DMA channel that is used by + the core. The core expects two dma channels for transmit. + - dma-names : Must be "tx" and "rx" + +For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties +please check: + * resource-names.txt + * clock/clock-bindings.txt + * dma/dma.txt + +Example: + i2s0: i2s0@0b005000 { + #sound-dai-cells = <0>; + compatible = "zte,zx296702-i2s"; + reg = <0x0b005000 0x1000>; + clocks = <&lsp0clk ZX296702_I2S0_DIV>; + clock-names = "tx"; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma 5>, <&dma 6>; + dma-names = "tx", "rx"; + status = "okay"; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "zx296702_snd"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + sndcpu: simple-audio-card,cpu { + sound-dai = <&i2s0>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&acodec>; + }; + };
Signature · 1 line
1.9.1
PATCH v4 3/4 ASoC: zx: Add zx296702 SPDIF support
In reply to Jun NieAdd driver for zx296702 SPDIF controller
--- sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/zte/Kconfig | 8 + sound/soc/zte/Makefile | 1 + sound/soc/zte/zx296702-spdif.c | 370 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 381 insertions(+) create mode 100644 sound/soc/zte/Kconfig create mode 100644 sound/soc/zte/Makefile create mode 100644 sound/soc/zte/zx296702-spdif.c
sound/soc/Kconfig +1 -0
@@ -57,6 +57,7 @@ source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" source "sound/soc/ux500/Kconfig" source "sound/soc/xtensa/Kconfig" +source "sound/soc/zte/Kconfig" # Supported codecs source "sound/soc/codecs/Kconfig"
sound/soc/Makefile +1 -0
@@ -38,3 +38,4 @@ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/ obj-$(CONFIG_SND_SOC) += ux500/ obj-$(CONFIG_SND_SOC) += xtensa/ +obj-$(CONFIG_SND_SOC) += zte/
sound/soc/zte/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config ZX296702_SPDIF + tristate "ZX296702 spdif" + depends on SOC_ZX296702 || COMPILE_TEST + depends on COMMON_CLK + select SND_SOC_GENERIC_DMAENGINE_PCM + help + Say Y or M if you want to add support for codecs attached to the + zx296702 spdif interface
sound/soc/zte/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_ZX296702_SPDIF) += zx296702-spdif.o
sound/soc/zte/zx296702-spdif.c new file +370 -0
370 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v4 4/4 ASoC: zx: Add ZTE zx296702 I2S DAI driver
In reply to Jun NieAdd ZTE zx296702 I2S interface DAI driver
--- sound/soc/zte/Kconfig | 9 + sound/soc/zte/Makefile | 1 + sound/soc/zte/zx296702-i2s.c | 437 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 447 insertions(+) create mode 100644 sound/soc/zte/zx296702-i2s.c
sound/soc/zte/Kconfig +9 -0
@@ -6,3 +6,12 @@ config ZX296702_SPDIF help Say Y or M if you want to add support for codecs attached to the zx296702 spdif interface + +config ZX296702_I2S + tristate "ZX296702 i2s" + depends on SOC_ZX296702 || COMPILE_TEST + depends on COMMON_CLK + select SND_SOC_GENERIC_DMAENGINE_PCM + help + Say Y or M if you want to add support for codecs attached to the + zx296702 i2s interface
sound/soc/zte/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_ZX296702_SPDIF) += zx296702-spdif.o +obj-$(CONFIG_ZX296702_I2S) += zx296702-i2s.o
sound/soc/zte/zx296702-i2s.c new file +437 -0
437 lines not on this page · raw message
Signature · 1 line
1.9.1
Quoted 3 lines · Jun Nie
Changes vs v3:
- remove HDMI stuff and will add it in video side later
- Polish SPDIF driver with devm_*
Applied all, thanks.
2015-06-04 20:05 GMT+08:00 Mark Brown <[email protected]>:
Quoted 6 lines · Jun Nie
Quoted 3 lines
Changes vs v3:
- remove HDMI stuff and will add it in video side later
- Polish SPDIF driver with devm_*Applied all, thanks.
Simple error is found and fixed in v5. Sorry for inconvenience :(
Mark Brown
maintainerQuoted 5 lines · Jun Nie
2015-06-04 20:05 GMT+08:00 Mark Brown <[email protected]>:
Quoted 1 line
Applied all, thanks.
Simple error is found and fixed in v5. Sorry for inconvenience :(
If things have been applied please send incremental patches rather than total replacements (as the mail you get when I push the patches says!).