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 1695e9e205SOlivier Moysanproperties: 1795e9e205SOlivier Moysan compatible: 1895e9e205SOlivier Moysan enum: 1995e9e205SOlivier Moysan - st,stm32h7-i2s 20*c69b7edcSOlivier Moysan - st,stm32mp25-i2s 2195e9e205SOlivier Moysan 2295e9e205SOlivier Moysan "#sound-dai-cells": 2395e9e205SOlivier Moysan const: 0 2495e9e205SOlivier Moysan 2595e9e205SOlivier Moysan reg: 2695e9e205SOlivier Moysan maxItems: 1 2795e9e205SOlivier Moysan 2895e9e205SOlivier Moysan clocks: 2995e9e205SOlivier Moysan items: 3095e9e205SOlivier Moysan - description: clock feeding the peripheral bus interface. 3195e9e205SOlivier Moysan - description: clock feeding the internal clock generator. 3295e9e205SOlivier Moysan - description: I2S parent clock for sampling rates multiple of 8kHz. 3395e9e205SOlivier Moysan - description: I2S parent clock for sampling rates multiple of 11.025kHz. 34*c69b7edcSOlivier Moysan minItems: 2 3595e9e205SOlivier Moysan 3695e9e205SOlivier Moysan clock-names: 3795e9e205SOlivier Moysan items: 3895e9e205SOlivier Moysan - const: pclk 3995e9e205SOlivier Moysan - const: i2sclk 4095e9e205SOlivier Moysan - const: x8k 4195e9e205SOlivier Moysan - const: x11k 42*c69b7edcSOlivier Moysan minItems: 2 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 64401ec2b8SOlivier Moysan port: 65401ec2b8SOlivier Moysan $ref: audio-graph-port.yaml# 66401ec2b8SOlivier Moysan unevaluatedProperties: false 67401ec2b8SOlivier Moysan 6802ec75edSGatien Chevallier access-controllers: 6902ec75edSGatien Chevallier minItems: 1 7002ec75edSGatien Chevallier maxItems: 2 7102ec75edSGatien Chevallier 7295e9e205SOlivier Moysanrequired: 7395e9e205SOlivier Moysan - compatible 7495e9e205SOlivier Moysan - "#sound-dai-cells" 7595e9e205SOlivier Moysan - reg 7695e9e205SOlivier Moysan - clocks 7795e9e205SOlivier Moysan - clock-names 7895e9e205SOlivier Moysan - interrupts 7995e9e205SOlivier Moysan - dmas 8095e9e205SOlivier Moysan - dma-names 8195e9e205SOlivier Moysan 82*c69b7edcSOlivier MoysanallOf: 83*c69b7edcSOlivier Moysan - $ref: dai-common.yaml# 84*c69b7edcSOlivier Moysan - if: 85*c69b7edcSOlivier Moysan properties: 86*c69b7edcSOlivier Moysan compatible: 87*c69b7edcSOlivier Moysan contains: 88*c69b7edcSOlivier Moysan const: st,stm32h7-i2s 89*c69b7edcSOlivier Moysan 90*c69b7edcSOlivier Moysan then: 91*c69b7edcSOlivier Moysan properties: 92*c69b7edcSOlivier Moysan clocks: 93*c69b7edcSOlivier Moysan minItems: 4 94*c69b7edcSOlivier Moysan 95*c69b7edcSOlivier Moysan clock-names: 96*c69b7edcSOlivier Moysan minItems: 4 97*c69b7edcSOlivier Moysan 98*c69b7edcSOlivier Moysan - if: 99*c69b7edcSOlivier Moysan properties: 100*c69b7edcSOlivier Moysan compatible: 101*c69b7edcSOlivier Moysan contains: 102*c69b7edcSOlivier Moysan const: st,stm32mp25-i2s 103*c69b7edcSOlivier Moysan 104*c69b7edcSOlivier Moysan then: 105*c69b7edcSOlivier Moysan properties: 106*c69b7edcSOlivier Moysan clocks: 107*c69b7edcSOlivier Moysan maxItems: 2 108*c69b7edcSOlivier Moysan 109*c69b7edcSOlivier Moysan clock-names: 110*c69b7edcSOlivier Moysan maxItems: 2 111*c69b7edcSOlivier Moysan 11258ae9a2aSKrzysztof KozlowskiunevaluatedProperties: false 11395e9e205SOlivier Moysan 11495e9e205SOlivier Moysanexamples: 11595e9e205SOlivier Moysan - | 11695e9e205SOlivier Moysan #include <dt-bindings/interrupt-controller/arm-gic.h> 11795e9e205SOlivier Moysan #include <dt-bindings/clock/stm32mp1-clks.h> 11895e9e205SOlivier Moysan i2s2: audio-controller@4000b000 { 11995e9e205SOlivier Moysan compatible = "st,stm32h7-i2s"; 12095e9e205SOlivier Moysan #sound-dai-cells = <0>; 12195e9e205SOlivier Moysan reg = <0x4000b000 0x400>; 12295e9e205SOlivier Moysan clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 12395e9e205SOlivier Moysan clock-names = "pclk", "i2sclk", "x8k", "x11k"; 12495e9e205SOlivier Moysan interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; 12595e9e205SOlivier Moysan dmas = <&dmamux1 39 0x400 0x01>, 12695e9e205SOlivier Moysan <&dmamux1 40 0x400 0x01>; 12795e9e205SOlivier Moysan dma-names = "rx", "tx"; 12895e9e205SOlivier Moysan pinctrl-names = "default"; 12995e9e205SOlivier Moysan pinctrl-0 = <&i2s2_pins_a>; 130401ec2b8SOlivier Moysan 131401ec2b8SOlivier Moysan /* assume audio-graph */ 132401ec2b8SOlivier Moysan port { 133401ec2b8SOlivier Moysan codec_endpoint: endpoint { 134401ec2b8SOlivier Moysan remote-endpoint = <&codec_endpoint>; 135401ec2b8SOlivier Moysan }; 136401ec2b8SOlivier Moysan }; 13795e9e205SOlivier Moysan }; 13895e9e205SOlivier Moysan 13995e9e205SOlivier Moysan... 140