Add driver for Microchip S/PDIF RX
Subsystems (5)
cover Add driver for Microchip S/PDIF RX
The Sony/Philips Digital Interface Receiver (SPDIFRX) is a serial port compliant with the IEC-60958 standard. Among its caracteristics, we mention the following:
- SPDIF/AES-EBU Compatible Serial Port
- 32 Samples FIFO
- Data Width Configurable to 24 bits, 20 bits or 16 bits
- Packed and Unpacked Data Support for System Memory Optimization
- Line State Events Report and Source of Interrupt
- Line Error Rate Report
- Full Memory Map of 192 bits for Channel 1 and Channel 2 Status and User Data
- First 32-bit Status A, Status B Change Report and Source of Interrupt
- Line Digital Filter
- Register Write Protection
- Abnormal Software Access and Internal Sequencer Integrity Check Reports
This interface is available in Microchip's SAMA7G5 SoC.
Codrin Ciubotariu (2):
dt-bindings: sound: add DT bindings for Microchip S/PDIF RX Controller
ASoC: mchp-spdifrx: add driver for SPDIF RX
.../bindings/sound/mchp,spdifrx.yaml | 73 ++ sound/soc/atmel/Kconfig | 13 + sound/soc/atmel/Makefile | 2 + sound/soc/atmel/mchp-spdifrx.c | 954 ++++++++++++++++++ 4 files changed, 1042 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mchp,spdifrx.yaml create mode 100644 sound/soc/atmel/mchp-spdifrx.c
Signature · 1 line
2.25.1
PATCH 1/2 dt-bindings: sound: add DT bindings for Microchip S/PDIF RX Controller
This patch adds DT bindings for the new Microchip S/PDIF RX Controller embedded inside sama7g5 SoCs.
--- .../bindings/sound/mchp,spdifrx.yaml | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mchp,spdifrx.yaml
Documentation/devicetree/bindings/sound/mchp,spdifrx.yaml new file +73 -0
@@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mchp,spdifrx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip S/PDIF Rx Controller Device Tree Bindings + +maintainers: + - Codrin Ciubotariu <[email protected]> + +description: + The Microchip Sony/Philips Digital Interface Receiver is a + serial port compliant with the IEC-60958 standard. + +properties: + "#sound-dai-cells": + const: 0 + + compatible: + const: microchip,sama7g5-spdifrx + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Peripheral Bus Clock + - description: Generic Clock + + clock-names: + items: + - const: pclk + - const: gclk + + dmas: + description: RX DMA Channel + maxItems: 1 + + dma-names: + const: rx + +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> + + spdifrx: spdifrx@e1614000 { + #sound-dai-cells = <0>; + compatible = "microchip,sama7g5-spdifrx"; + reg = <0xe1614000 0x4000>; + interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma0 AT91_XDMAC_DT_PERID(49)>; + dma-names = "rx"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 84>, <&pmc PMC_TYPE_GCK 84>; + clock-names = "pclk", "gclk"; + };
Signature · 1 line
2.25.1
PATCH 2/2 ASoC: mchp-spdifrx: add driver for SPDIF RX
In reply to Codrin CiubotariuThe new SPDIF RX 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.
--- sound/soc/atmel/Kconfig | 13 + sound/soc/atmel/Makefile | 2 + sound/soc/atmel/mchp-spdifrx.c | 954 +++++++++++++++++++++++++++++++++ 3 files changed, 969 insertions(+) create mode 100644 sound/soc/atmel/mchp-spdifrx.c
sound/soc/atmel/Kconfig +13 -0
@@ -144,4 +144,17 @@ config SND_MCHP_SOC_SPDIFTX This S/PDIF TX driver is compliant with IEC-60958 standard and includes programable User Data and Channel Status fields. + +config SND_MCHP_SOC_SPDIFRX + tristate "Microchip ASoC driver for boards using S/PDIF RX" + 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 RX ASoc + driver on the following Microchip platforms: + - sama7g5 + + This S/PDIF RX driver is compliant with IEC-60958 standard and + includes programable User Data and Channel Status fields. endif
sound/soc/atmel/Makefile +2 -0
@@ -6,6 +6,7 @@ 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 +snd-soc-mchp-spdifrx-objs := mchp-spdifrx.o # pdc and dma need to both be built-in if any user of # ssc is built-in.
@@ -19,6 +20,7 @@ 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 +obj-$(CONFIG_SND_MCHP_SOC_SPDIFRX) += snd-soc-mchp-spdifrx.o # AT91 Machine Support snd-soc-sam9g20-wm8731-objs := sam9g20_wm8731.o
sound/soc/atmel/mchp-spdifrx.c new file +954 -0
954 lines not on this page · raw message
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Mark Brown
maintainerQuoted 16 lines · Codrin Ciubotariu
The Sony/Philips Digital Interface Receiver (SPDIFRX) is a serial port compliant with the IEC-60958 standard. Among its caracteristics, we mention the following:
- SPDIF/AES-EBU Compatible Serial Port
- 32 Samples FIFO
- Data Width Configurable to 24 bits, 20 bits or 16 bits
- Packed and Unpacked Data Support for System Memory Optimization
- Line State Events Report and Source of Interrupt
- Line Error Rate Report
- Full Memory Map of 192 bits for Channel 1 and Channel 2 Status and User Data
- First 32-bit Status A, Status B Change Report and Source of Interrupt
- Line Digital Filter
- Register Write Protection
- Abnormal Software Access and Internal Sequencer Integrity Check Reports
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: add DT bindings for Microchip S/PDIF RX Controller
commit: 80db8751d7c0bebe11e62df19cec9cb0a392c354
[2/2] ASoC: mchp-spdifrx: add driver for SPDIF RX
commit: ef265c55c1ac0f02c74a33d8e054547f7eafc81bAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark