Linux Audio

Check our new training course

Loading...
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
/*
 * Copyright (c) 2019,2022 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <xtensa/intel/intel_adsp_cavs.dtsi>
#include <mem.h>

/ {
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "cdns,tensilica-xtensa-lx6";
			reg = <0>;
			cpu-power-states = <&d3>;
			i-cache-line-size = <64>;
			d-cache-line-size = <64>;
		};

		cpu1: cpu@1 {
			device_type = "cpu";
			compatible = "cdns,tensilica-xtensa-lx6";
			reg = <1>;
			cpu-power-states = <&d3>;
		};

		power-states {
			/* PM_STATE_SOFT_OFF can be entered only by calling
			 * pm_state_force. The procedure is triggered by IPC
			 * from the HOST (SET_DX).
			 */
			d3: off {
				compatible = "zephyr,power-state";
				power-state-name = "soft-off";
				min-residency-us = <2147483647>;
				exit-latency-us = <0>;
			};
		};
	};

	sram0: memory@be000000 {
		device_type = "memory";
		compatible = "mmio-sram";
		reg = <0xbe000000 DT_SIZE_K(1920)>;
	};

	sram1: memory@be800000 {
		device_type = "memory";
		compatible = "mmio-sram";
		reg = <0xbe800000 DT_SIZE_K(64)>;
	};

	sysclk: system-clock {
		compatible = "fixed-clock";
		clock-frequency = <38400000>;
		#clock-cells = <0>;
	};

	audioclk: audio-clock {
		compatible = "fixed-clock";
		clock-frequency = <24576000>;
		#clock-cells = <0>;
	};

	pllclk: pll-clock {
		compatible = "fixed-clock";
		clock-frequency = <96000000>;
		#clock-cells = <0>;
	};

	clkctl: clkctl {
		compatible = "intel,adsp-shim-clkctl";
		adsp-clkctl-clk-wovcro = <0>;
		adsp-clkctl-clk-lpro = <1>;
		adsp-clkctl-clk-hpro = <2>;
		adsp-clkctl-freq-enc = <0x1a 0x20000002 0x80000002>;
		adsp-clkctl-freq-mask = <0x10 0x20000000 0x80000000>;
		adsp-clkctl-freq-default = <2>;
		adsp-clkctl-freq-lowest = <0>;
		wovcro-supported;
	};

	IMR1: memory@0xb0000000 {
		compatible = "intel,adsp-imr";
		reg = <0xB0000000 DT_SIZE_M(16)>;
		block-size = <0x1000>;
		zephyr,memory-region = "IMR1";
	};

	soc {
		shim: shim@71f00 {
			compatible = "intel,adsp-shim";
			reg = <0x71f00 0x100>;
		};

		mem_window0: mem_window@71a00 {
			compatible = "intel,adsp-mem-window";
			reg = <0x71a00 0x8>;
			offset = <0x4000>;
			memory = <&sram0>;
			initialize;
			read-only;
		};
		mem_window1: mem_window@71a08 {
			compatible = "intel,adsp-mem-window";
			reg = <0x71a08 0x8>;
			memory = <&sram0>;
		};

		mem_window2: mem_window@71a10 {
			compatible = "intel,adsp-mem-window";
			reg = <0x71a10 0x8>;
			memory = <&sram0>;
		};

		mem_window3: mem_window@71a18 {
			compatible = "intel,adsp-mem-window";
			reg = <0x71a18 0x8>;
			memory = <&sram0>;
			read-only;
		};

		timer: timer {
			compatible = "intel,adsp-timer";
			syscon = <&shim>;
		};

		sspbase: ssp_base@71c00 {
			compatible = "intel,cavs-sspbase";
			reg = <0x71c00 0x100>;
		};

		l2lm: l2lm@71d00 {
			compatible = "intel,cavs-l2lm";
			reg = <0x71d00 0x20>;
		};

		adsp_host_ipc: cavs_host_ipc@71e00 {
			compatible = "intel,adsp-host-ipc";
			reg = <0x71e00 0x30>;
			interrupts = <7 0 0>;
			interrupt-parent = <&cavs_intc0>;
		};

		core_intc: core_intc@0 {
			compatible = "cdns,xtensa-core-intc";
			reg = <0x00 0x400>;
			interrupt-controller;
			#interrupt-cells = <3>;
		};

		cavs_intc0: cavs@78800  {
			compatible = "intel,cavs-intc";
			reg = <0x78800 0x10>;
			interrupt-controller;
			#interrupt-cells = <3>;
			interrupts = <6 0 0>;
			interrupt-parent = <&core_intc>;
		};

		cavs_intc1: cavs@78810  {
			compatible = "intel,cavs-intc";
			reg = <0x78810 0x10>;
			interrupt-controller;
			#interrupt-cells = <3>;
			interrupts = <0xA 0 0>;
			interrupt-parent = <&core_intc>;
		};

		cavs_intc2: cavs@78820  {
			compatible = "intel,cavs-intc";
			reg = <0x78820 0x10>;
			interrupt-controller;
			#interrupt-cells = <3>;
			interrupts = <0XD 0 0>;
			interrupt-parent = <&core_intc>;
		};

		cavs_intc3: cavs@78830  {
			compatible = "intel,cavs-intc";
			reg = <0x78830 0x10>;
			interrupt-controller;
			#interrupt-cells = <3>;
			interrupts = <0x10 0 0>;
			interrupt-parent = <&core_intc>;
		};

		adsp_idc: idc@1200 {
			compatible = "intel,adsp-idc";
			reg = <0x1200 0x80>;
			interrupts = <8 0 0>;
			interrupt-parent = <&cavs_intc0>;
		};

		tlb: tlb@3000 {
			compatible = "intel,adsp-tlb";
			reg = <0x3000 0x1000>;
			paddr-size = <11>;
		};

		dmic0: dmic0@10000 {
			compatible = "intel,dai-dmic";
			reg = <0x10000 0x8000>;
			shim = <0x71E80>;
			fifo = <0x0008>;
			interrupts = <0x08 0 0>;
			interrupt-parent = <&cavs_intc3>;
		};

		dmic1: dmic1@10000 {
			compatible = "intel,dai-dmic";
			reg = <0x10000 0x8000>;
			shim = <0x71E80>;
			fifo = <0x0108>;
			interrupts = <0x09 0 0>;
			interrupt-parent = <&cavs_intc3>;
		};

		/*
		 * FIXME this is modeling individual alh channels/instances
		 * with node labels, which has problems. A better representation
		 * is discussed here:
		 *
		 * https://github.com/zephyrproject-rtos/zephyr/pull/50287#discussion_r974591009
		 */
		alh0: alh0@71000 {
			compatible = "intel,alh-dai";
			reg = <0x00071000 0x00071200>;

			status = "okay";
		};

		alh1: alh1@71000 {
			compatible = "intel,alh-dai";
			reg = <0x00071000 0x00071200>;

			status = "okay";
		};

		ssp0: ssp@77000 {
			compatible = "intel,ssp-dai";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x00077000 0x200
			       0x00078C00 0x008>;
			interrupts = <0x01 0 0>;
			interrupt-parent = <&cavs_intc3>;
			dmas = <&lpgpdma0 2
				&lpgpdma0 3>;
			dma-names = "tx", "rx";

			status = "okay";
		};

		ssp1: ssp@77200 {
			compatible = "intel,ssp-dai";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x00077200 0x200
			       0x00078C00 0x008>;
			interrupts = <0x01 0 0>;
			interrupt-parent = <&cavs_intc3>;
			dmas = <&lpgpdma0 4
				&lpgpdma0 5>;
			dma-names = "tx", "rx";

			status = "okay";
		};

		ssp2: ssp@77400 {
			compatible = "intel,ssp-dai";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x00077400 0x200
			       0x00078C00 0x008>;
			interrupts = <0x02 0 0>;
			interrupt-parent = <&cavs_intc3>;
			dmas = <&lpgpdma0 6
				&lpgpdma0 7>;
			dma-names = "tx", "rx";

			status = "okay";
		};

		ssp3: ssp@77600 {
			compatible = "intel,ssp-dai";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x00077600 0x200
			       0x00078C00 0x008>;
			interrupts = <0x03 0 0>;
			interrupt-parent = <&cavs_intc3>;
			dmas = <&lpgpdma0 8
				&lpgpdma0 9>;
			dma-names = "tx", "rx";

			status = "okay";
		};

		ssp4: ssp@77800 {
			compatible = "intel,ssp-dai";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x00077800 0x200
			       0x00078C00 0x008>;
			interrupts = <0x03 0 0>;
			interrupt-parent = <&cavs_intc3>;
			dmas = <&lpgpdma0 10
				&lpgpdma0 11>;
			dma-names = "tx", "rx";

			status = "okay";
		};

		ssp5: ssp@77a00 {
			compatible = "intel,ssp-dai";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x00077A00 0x200
			       0x00078C00 0x008>;
			interrupts = <0x03 0 0>;
			interrupt-parent = <&cavs_intc3>;
			dmas = <&lpgpdma0 12
				&lpgpdma0 13>;
			dma-names = "tx", "rx";

			status = "okay";
		};
	};

	hdas {
		#address-cells = <1>;
		#size-cells = <0>;

		hda0: hda@0 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0>;
		};
		hda1: hda@1 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <1>;
		};
		hda2: hda@2 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <2>;
		};
		hda3: hda@3 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <3>;
		};
		hda4: hda@4 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <4>;
		};
		hda5: hda@5 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <5>;
		};
		hda6: hda@6 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <6>;
		};
		hda7: hda@7 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <7>;
		};
		hda8: hda@8 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <8>;
		};
		hda9: hda@9 {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <9>;
		};
		hda10: hda@a {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0x0a>;
		};
		hda11: hda@b {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0x0b>;
		};
		hda12: hda@c {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0x0c>;
		};
		hda13: hda@d {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0x0d>;
		};
		hda14: hda@e {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0x0e>;
		};
		hda15: hda@f {
			compatible = "intel,hda-dai";
			status = "okay";
			reg = <0x0f>;
		};
	};
};