195e9e205SOlivier Moysan# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 295e9e205SOlivier Moysan%YAML 1.2 395e9e205SOlivier Moysan--- 495e9e205SOlivier Moysan$id: http://devicetree.org/schemas/sound/st,stm32-i2s.yaml# 595e9e205SOlivier Moysan$schema: http://devicetree.org/meta-schemas/core.yaml# 695e9e205SOlivier Moysan 795e9e205SOlivier Moysantitle: STMicroelectronics STM32 SPI/I2S Controller 895e9e205SOlivier Moysan 995e9e205SOlivier Moysanmaintainers: 10f4eedebdSPatrice Chotard - Olivier Moysan <olivier.moysan@foss.st.com> 1195e9e205SOlivier Moysan 1295e9e205SOlivier Moysandescription: 1395e9e205SOlivier Moysan The SPI/I2S block supports I2S/PCM protocols when configured on I2S mode. 1495e9e205SOlivier Moysan Only some SPI instances support I2S. 1595e9e205SOlivier Moysan 1658ae9a2aSKrzysztof KozlowskiallOf: 1758ae9a2aSKrzysztof Kozlowski - $ref: dai-common.yaml# 1858ae9a2aSKrzysztof Kozlowski 1995e9e205SOlivier Moysanproperties: 2095e9e205SOlivier Moysan compatible: 2195e9e205SOlivier Moysan enum: 2295e9e205SOlivier Moysan - st,stm32h7-i2s 2395e9e205SOlivier Moysan 2495e9e205SOlivier Moysan "#sound-dai-cells": 2595e9e205SOlivier Moysan const: 0 2695e9e205SOlivier Moysan 2795e9e205SOlivier Moysan reg: 2895e9e205SOlivier Moysan maxItems: 1 2995e9e205SOlivier Moysan 3095e9e205SOlivier Moysan clocks: 3195e9e205SOlivier Moysan items: 3295e9e205SOlivier Moysan - description: clock feeding the peripheral bus interface. 3395e9e205SOlivier Moysan - description: clock feeding the internal clock generator. 3495e9e205SOlivier Moysan - description: I2S parent clock for sampling rates multiple of 8kHz. 3595e9e205SOlivier Moysan - description: I2S parent clock for sampling rates multiple of 11.025kHz. 3695e9e205SOlivier Moysan 3795e9e205SOlivier Moysan clock-names: 3895e9e205SOlivier Moysan items: 3995e9e205SOlivier Moysan - const: pclk 4095e9e205SOlivier Moysan - const: i2sclk 4195e9e205SOlivier Moysan - const: x8k 4295e9e205SOlivier Moysan - const: x11k 4395e9e205SOlivier Moysan 4495e9e205SOlivier Moysan interrupts: 4595e9e205SOlivier Moysan maxItems: 1 4695e9e205SOlivier Moysan 4795e9e205SOlivier Moysan dmas: 4895e9e205SOlivier Moysan items: 4995e9e205SOlivier Moysan - description: audio capture DMA. 5095e9e205SOlivier Moysan - description: audio playback DMA. 5195e9e205SOlivier Moysan 5295e9e205SOlivier Moysan dma-names: 5395e9e205SOlivier Moysan items: 5495e9e205SOlivier Moysan - const: rx 5595e9e205SOlivier Moysan - const: tx 5695e9e205SOlivier Moysan 5795e9e205SOlivier Moysan resets: 5895e9e205SOlivier Moysan maxItems: 1 5995e9e205SOlivier Moysan 60df91785aSOlivier Moysan "#clock-cells": 61df91785aSOlivier Moysan description: Configure the I2S device as MCLK clock provider. 62df91785aSOlivier Moysan const: 0 63df91785aSOlivier Moysan 64*401ec2b8SOlivier Moysan port: 65*401ec2b8SOlivier Moysan $ref: audio-graph-port.yaml# 66*401ec2b8SOlivier Moysan unevaluatedProperties: false 67*401ec2b8SOlivier Moysan 6895e9e205SOlivier Moysanrequired: 6995e9e205SOlivier Moysan - compatible 7095e9e205SOlivier Moysan - "#sound-dai-cells" 7195e9e205SOlivier Moysan - reg 7295e9e205SOlivier Moysan - clocks 7395e9e205SOlivier Moysan - clock-names 7495e9e205SOlivier Moysan - interrupts 7595e9e205SOlivier Moysan - dmas 7695e9e205SOlivier Moysan - dma-names 7795e9e205SOlivier Moysan 7858ae9a2aSKrzysztof KozlowskiunevaluatedProperties: false 7995e9e205SOlivier Moysan 8095e9e205SOlivier Moysanexamples: 8195e9e205SOlivier Moysan - | 8295e9e205SOlivier Moysan #include <dt-bindings/interrupt-controller/arm-gic.h> 8395e9e205SOlivier Moysan #include <dt-bindings/clock/stm32mp1-clks.h> 8495e9e205SOlivier Moysan i2s2: audio-controller@4000b000 { 8595e9e205SOlivier Moysan compatible = "st,stm32h7-i2s"; 8695e9e205SOlivier Moysan #sound-dai-cells = <0>; 8795e9e205SOlivier Moysan reg = <0x4000b000 0x400>; 8895e9e205SOlivier Moysan clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 8995e9e205SOlivier Moysan clock-names = "pclk", "i2sclk", "x8k", "x11k"; 9095e9e205SOlivier Moysan interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; 9195e9e205SOlivier Moysan dmas = <&dmamux1 39 0x400 0x01>, 9295e9e205SOlivier Moysan <&dmamux1 40 0x400 0x01>; 9395e9e205SOlivier Moysan dma-names = "rx", "tx"; 9495e9e205SOlivier Moysan pinctrl-names = "default"; 9595e9e205SOlivier Moysan pinctrl-0 = <&i2s2_pins_a>; 96*401ec2b8SOlivier Moysan 97*401ec2b8SOlivier Moysan /* assume audio-graph */ 98*401ec2b8SOlivier Moysan port { 99*401ec2b8SOlivier Moysan codec_endpoint: endpoint { 100*401ec2b8SOlivier Moysan remote-endpoint = <&codec_endpoint>; 101*401ec2b8SOlivier Moysan }; 102*401ec2b8SOlivier Moysan }; 10395e9e205SOlivier Moysan }; 10495e9e205SOlivier Moysan 10595e9e205SOlivier Moysan... 106