xref: /freebsd/sys/contrib/device-tree/Bindings/sound/st,stm32-adfsdm.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotSTMicroelectronics Audio Digital Filter Sigma Delta modulators(DFSDM)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe DFSDM allows PDM microphones capture through SPI interface. The Audio
4*c66ec88fSEmmanuel Vadotinterface is seems as a sub block of the DFSDM device.
5*c66ec88fSEmmanuel VadotFor details on DFSDM bindings refer to ../iio/adc/st,stm32-dfsdm-adc.txt
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotRequired properties:
8*c66ec88fSEmmanuel Vadot  - compatible: "st,stm32h7-dfsdm-dai".
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel Vadot  - #sound-dai-cells : Must be equal to 0
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadot  - io-channels : phandle to iio dfsdm instance node.
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotExample of a sound card using audio DFSDM node.
15*c66ec88fSEmmanuel Vadot
16*c66ec88fSEmmanuel Vadot	sound_card {
17*c66ec88fSEmmanuel Vadot		compatible = "audio-graph-card";
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot		dais = <&cpu_port>;
20*c66ec88fSEmmanuel Vadot	};
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot	dfsdm: dfsdm@40017000 {
23*c66ec88fSEmmanuel Vadot		compatible = "st,stm32h7-dfsdm";
24*c66ec88fSEmmanuel Vadot		reg = <0x40017000 0x400>;
25*c66ec88fSEmmanuel Vadot		clocks = <&rcc DFSDM1_CK>;
26*c66ec88fSEmmanuel Vadot		clock-names = "dfsdm";
27*c66ec88fSEmmanuel Vadot		#interrupt-cells = <1>;
28*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
29*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel Vadot		dfsdm_adc0: filter@0 {
32*c66ec88fSEmmanuel Vadot			compatible = "st,stm32-dfsdm-dmic";
33*c66ec88fSEmmanuel Vadot			reg = <0>;
34*c66ec88fSEmmanuel Vadot			interrupts = <110>;
35*c66ec88fSEmmanuel Vadot			dmas = <&dmamux1 101 0x400 0x00>;
36*c66ec88fSEmmanuel Vadot			dma-names = "rx";
37*c66ec88fSEmmanuel Vadot			st,adc-channels = <1>;
38*c66ec88fSEmmanuel Vadot			st,adc-channel-names = "dmic0";
39*c66ec88fSEmmanuel Vadot			st,adc-channel-types = "SPI_R";
40*c66ec88fSEmmanuel Vadot			st,adc-channel-clk-src = "CLKOUT";
41*c66ec88fSEmmanuel Vadot			st,filter-order = <5>;
42*c66ec88fSEmmanuel Vadot
43*c66ec88fSEmmanuel Vadot			dfsdm_dai0: dfsdm-dai {
44*c66ec88fSEmmanuel Vadot				compatible = "st,stm32h7-dfsdm-dai";
45*c66ec88fSEmmanuel Vadot				#sound-dai-cells = <0>;
46*c66ec88fSEmmanuel Vadot				io-channels = <&dfsdm_adc0 0>;
47*c66ec88fSEmmanuel Vadot				cpu_port: port {
48*c66ec88fSEmmanuel Vadot				dfsdm_endpoint: endpoint {
49*c66ec88fSEmmanuel Vadot					remote-endpoint = <&dmic0_endpoint>;
50*c66ec88fSEmmanuel Vadot				};
51*c66ec88fSEmmanuel Vadot			};
52*c66ec88fSEmmanuel Vadot		};
53*c66ec88fSEmmanuel Vadot	};
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel Vadot	dmic0: dmic@0 {
56*c66ec88fSEmmanuel Vadot		compatible = "dmic-codec";
57*c66ec88fSEmmanuel Vadot		#sound-dai-cells = <0>;
58*c66ec88fSEmmanuel Vadot		port {
59*c66ec88fSEmmanuel Vadot			dmic0_endpoint: endpoint {
60*c66ec88fSEmmanuel Vadot				remote-endpoint = <&dfsdm_endpoint>;
61*c66ec88fSEmmanuel Vadot			};
62*c66ec88fSEmmanuel Vadot		};
63*c66ec88fSEmmanuel Vadot	};
64