dt-bindings: sound: add DT bindings for Microchip S/PDIF TX Controller
Subsystems (5)
PATCH v2 1/2 dt-bindings: sound: add DT bindings for Microchip S/PDIF TX Controller
This patch adds DT bindings for the new Microchip S/PDIF TX Controller embedded inside sama7g5 SoCs.
---
Changes in v2:
- replaced https with http
- reworked example, included bindings;
.../bindings/sound/mchp,spdiftx.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +80 -0
@@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mchp,spdiftx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip S/PDIF Tx Controller Device Tree Bindings + +maintainers: + - Codrin Ciubotariu <[email protected]> + +description: + The Microchip Sony/Philips Digital Interface Transmitter is a + serial port compliant with the IEC-60958 standard. + +properties: + "#sound-dai-cells": + const: 0 + + compatible: + oneOf: + - const: microchip,sama7g5-spdiftx + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Peripheral Bus Clock + - description: Generic Clock + + clock-names: + items: + - const: pclk + - const: gclk + + dmas: + description: TX DMA Channel + + dma-names: + const: tx + + pinctrl-0: true + + pinctrl-names: + const: default + +required: + - "#sound-dai-cells" + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/at91.h> + #include <dt-bindings/dma/at91.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + spdiftx@e1618000 { + #sound-dai-cells = <0>; + compatible = "microchip,sama7g5-spdiftx"; + reg = <0xe1618000 0x4000>; + interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma0 AT91_XDMAC_DT_PERID(50)>; + dma-names = "tx"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 85>, <&pmc PMC_TYPE_GCK 85>; + clock-names = "pclk", "gclk"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spdiftx_default>; + };
Signature · 1 line
2.25.1
PATCH v2 2/2 ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller
The new SPDIF TX controller is a serial port compliant with the IEC- 60958 standard. It also supports programmable User Data and Channel Status fields.
This IP is embedded in Microchip's sama7g5 SoC.
---
Changes in v2:
- none
sound/soc/atmel/Kconfig | 12 + sound/soc/atmel/Makefile | 2 + sound/soc/atmel/mchp-spdiftx.c | 864 +++++++++++++++++++++++++++++++++ 3 files changed, 878 insertions(+) create mode 100644 sound/soc/atmel/mchp-spdiftx.c
sound/soc/atmel/Kconfig +12 -0
@@ -132,4 +132,16 @@ config SND_MCHP_SOC_I2S_MCC and supports a Time Division Multiplexed (TDM) interface with external multi-channel audio codecs. +config SND_MCHP_SOC_SPDIFTX + tristate "Microchip ASoC driver for boards using S/PDIF TX" + depends on OF && (ARCH_AT91 || COMPILE_TEST) + select SND_SOC_GENERIC_DMAENGINE_PCM + select REGMAP_MMIO + help + Say Y or M if you want to add support for Microchip S/PDIF TX ASoc + driver on the following Microchip platforms: + - sama7g5 + + This S/PDIF TX driver is compliant with IEC-60958 standard and + includes programable User Data and Channel Status fields. endif
sound/soc/atmel/Makefile +2 -0
@@ -5,6 +5,7 @@ snd-soc-atmel-pcm-dma-objs := atmel-pcm-dma.o snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o snd-soc-atmel-i2s-objs := atmel-i2s.o snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o +snd-soc-mchp-spdiftx-objs := mchp-spdiftx.o # pdc and dma need to both be built-in if any user of # ssc is built-in.
@@ -17,6 +18,7 @@ endif obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o obj-$(CONFIG_SND_ATMEL_SOC_I2S) += snd-soc-atmel-i2s.o obj-$(CONFIG_SND_MCHP_SOC_I2S_MCC) += snd-soc-mchp-i2s-mcc.o +obj-$(CONFIG_SND_MCHP_SOC_SPDIFTX) += snd-soc-mchp-spdiftx.o # AT91 Machine Support snd-soc-sam9g20-wm8731-objs := sam9g20_wm8731.o
sound/soc/atmel/mchp-spdiftx.c new file +864 -0
864 lines not on this page · raw message
Signature · 1 line
2.25.1
Rob Herring
maintainerQuoted 32 lines · Codrin Ciubotariu
This patch adds DT bindings for the new Microchip S/PDIF TX Controller embedded inside sama7g5 SoCs.
Signed-off-by Codrin Ciubotariu <[email protected]>---
Changes in v2:
- replaced https with http
- reworked example, included bindings;.../bindings/sound/mchp,spdiftx.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mchp,spdiftx.yamlDocumentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +12
-0@@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mchp,spdiftx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip S/PDIF Tx Controller Device Tree Bindings + +maintainers: + - Codrin Ciubotariu <[email protected]> + +description:
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml line 22
Quoted 10 lines
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +10
-0+ The Microchip Sony/Philips Digital Interface Transmitter is a + serial port compliant with the IEC-60958 standard. + +properties: + "#sound-dai-cells": + const: 0 + + compatible: + oneOf: + - const: microchip,sama7g5-spdiftx
No need for 'oneOf' when only 1 entry.
Quoted 9 lines
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +9
-0+ + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items:
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml line 41
Quoted 10 lines
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +10
-0+ - description: Peripheral Bus Clock + - description: Generic Clock + + clock-names: + items: + - const: pclk + - const: gclk + + dmas: + description: TX DMA Channel
How many? (maxItems: 1)
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml line 49
Quoted 8 lines
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +8
-0+ + dma-names: + const: tx + + pinctrl-0: true + + pinctrl-names: + const: default
You can drop pinctrl props. They are always allowed.
Quoted 34 lines
Documentation/devicetree/bindings/sound/mchp,spdiftx.yaml new file +31
-0+ +required: + - "#sound-dai-cells" + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/at91.h> + #include <dt-bindings/dma/at91.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + spdiftx@e1618000 { + #sound-dai-cells = <0>; + compatible = "microchip,sama7g5-spdiftx"; + reg = <0xe1618000 0x4000>; + interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma0 AT91_XDMAC_DT_PERID(50)>; + dma-names = "tx"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 85>, <&pmc PMC_TYPE_GCK 85>; + clock-names = "pclk", "gclk"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spdiftx_default>; + };Signature · 1 line
2.25.1