1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 */
6
7#include "meson-g12-common.dtsi"
8#include <dt-bindings/clock/axg-audio-clkc.h>
9#include <dt-bindings/power/meson-sm1-power.h>
10#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
11#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
12
13/ {
14	compatible = "amlogic,sm1";
15
16	tdmif_a: audio-controller-0 {
17		compatible = "amlogic,axg-tdm-iface";
18		#sound-dai-cells = <0>;
19		sound-name-prefix = "TDM_A";
20		clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
21			 <&clkc_audio AUD_CLKID_MST_A_SCLK>,
22			 <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
23		clock-names = "mclk", "sclk", "lrclk";
24		status = "disabled";
25	};
26
27	tdmif_b: audio-controller-1 {
28		compatible = "amlogic,axg-tdm-iface";
29		#sound-dai-cells = <0>;
30		sound-name-prefix = "TDM_B";
31		clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
32			 <&clkc_audio AUD_CLKID_MST_B_SCLK>,
33			 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
34		clock-names = "mclk", "sclk", "lrclk";
35		status = "disabled";
36	};
37
38	tdmif_c: audio-controller-2 {
39		compatible = "amlogic,axg-tdm-iface";
40		#sound-dai-cells = <0>;
41		sound-name-prefix = "TDM_C";
42		clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
43			 <&clkc_audio AUD_CLKID_MST_C_SCLK>,
44			 <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
45		clock-names = "mclk", "sclk", "lrclk";
46		status = "disabled";
47	};
48
49	cpus {
50		#address-cells = <0x2>;
51		#size-cells = <0x0>;
52
53		cpu0: cpu@0 {
54			device_type = "cpu";
55			compatible = "arm,cortex-a55";
56			reg = <0x0 0x0>;
57			enable-method = "psci";
58			next-level-cache = <&l2>;
59		};
60
61		cpu1: cpu@1 {
62			device_type = "cpu";
63			compatible = "arm,cortex-a55";
64			reg = <0x0 0x1>;
65			enable-method = "psci";
66			next-level-cache = <&l2>;
67		};
68
69		cpu2: cpu@2 {
70			device_type = "cpu";
71			compatible = "arm,cortex-a55";
72			reg = <0x0 0x2>;
73			enable-method = "psci";
74			next-level-cache = <&l2>;
75		};
76
77		cpu3: cpu@3 {
78			device_type = "cpu";
79			compatible = "arm,cortex-a55";
80			reg = <0x0 0x3>;
81			enable-method = "psci";
82			next-level-cache = <&l2>;
83		};
84
85		l2: l2-cache0 {
86			compatible = "cache";
87		};
88	};
89
90	cpu_opp_table: opp-table {
91		compatible = "operating-points-v2";
92		opp-shared;
93
94		opp-100000000 {
95			opp-hz = /bits/ 64 <100000000>;
96			opp-microvolt = <730000>;
97		};
98
99		opp-250000000 {
100			opp-hz = /bits/ 64 <250000000>;
101			opp-microvolt = <730000>;
102		};
103
104		opp-500000000 {
105			opp-hz = /bits/ 64 <500000000>;
106			opp-microvolt = <730000>;
107		};
108
109		opp-667000000 {
110			opp-hz = /bits/ 64 <666666666>;
111			opp-microvolt = <750000>;
112		};
113
114		opp-1000000000 {
115			opp-hz = /bits/ 64 <1000000000>;
116			opp-microvolt = <770000>;
117		};
118
119		opp-1200000000 {
120			opp-hz = /bits/ 64 <1200000000>;
121			opp-microvolt = <780000>;
122		};
123
124		opp-1404000000 {
125			opp-hz = /bits/ 64 <1404000000>;
126			opp-microvolt = <790000>;
127		};
128
129		opp-1512000000 {
130			opp-hz = /bits/ 64 <1500000000>;
131			opp-microvolt = <800000>;
132		};
133
134		opp-1608000000 {
135			opp-hz = /bits/ 64 <1608000000>;
136			opp-microvolt = <810000>;
137		};
138
139		opp-1704000000 {
140			opp-hz = /bits/ 64 <1704000000>;
141			opp-microvolt = <850000>;
142		};
143
144		opp-1800000000 {
145			opp-hz = /bits/ 64 <1800000000>;
146			opp-microvolt = <900000>;
147		};
148
149		opp-1908000000 {
150			opp-hz = /bits/ 64 <1908000000>;
151			opp-microvolt = <950000>;
152		};
153	};
154};
155
156&apb {
157	audio: bus@60000 {
158		compatible = "simple-bus";
159		reg = <0x0 0x60000 0x0 0x1000>;
160		#address-cells = <2>;
161		#size-cells = <2>;
162		ranges = <0x0 0x0 0x0 0x60000 0x0 0x1000>;
163
164		clkc_audio: clock-controller@0 {
165			status = "disabled";
166			compatible = "amlogic,sm1-audio-clkc";
167			reg = <0x0 0x0 0x0 0xb4>;
168			#clock-cells = <1>;
169			#reset-cells = <1>;
170
171			clocks = <&clkc CLKID_AUDIO>,
172				 <&clkc CLKID_MPLL0>,
173				 <&clkc CLKID_MPLL1>,
174				 <&clkc CLKID_MPLL2>,
175				 <&clkc CLKID_MPLL3>,
176				 <&clkc CLKID_HIFI_PLL>,
177				 <&clkc CLKID_FCLK_DIV3>,
178				 <&clkc CLKID_FCLK_DIV4>,
179				 <&clkc CLKID_FCLK_DIV5>;
180			clock-names = "pclk",
181				      "mst_in0",
182				      "mst_in1",
183				      "mst_in2",
184				      "mst_in3",
185				      "mst_in4",
186				      "mst_in5",
187				      "mst_in6",
188				      "mst_in7";
189
190			resets = <&reset RESET_AUDIO>;
191		};
192
193		toddr_a: audio-controller@100 {
194			compatible = "amlogic,sm1-toddr",
195				     "amlogic,axg-toddr";
196			reg = <0x0 0x100 0x0 0x2c>;
197			#sound-dai-cells = <0>;
198			sound-name-prefix = "TODDR_A";
199			interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>;
200			clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
201			resets = <&arb AXG_ARB_TODDR_A>,
202				 <&clkc_audio AUD_RESET_TODDR_A>;
203			reset-names = "arb", "rst";
204			status = "disabled";
205		};
206
207		toddr_b: audio-controller@140 {
208			compatible = "amlogic,sm1-toddr",
209				     "amlogic,axg-toddr";
210			reg = <0x0 0x140 0x0 0x2c>;
211			#sound-dai-cells = <0>;
212			sound-name-prefix = "TODDR_B";
213			interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>;
214			clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
215			resets = <&arb AXG_ARB_TODDR_B>,
216				 <&clkc_audio AUD_RESET_TODDR_B>;
217			reset-names = "arb", "rst";
218			status = "disabled";
219		};
220
221		toddr_c: audio-controller@180 {
222			compatible = "amlogic,sm1-toddr",
223				     "amlogic,axg-toddr";
224			reg = <0x0 0x180 0x0 0x2c>;
225			#sound-dai-cells = <0>;
226			sound-name-prefix = "TODDR_C";
227			interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>;
228			clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
229			resets = <&arb AXG_ARB_TODDR_C>,
230				 <&clkc_audio AUD_RESET_TODDR_C>;
231			reset-names = "arb", "rst";
232			status = "disabled";
233		};
234
235		frddr_a: audio-controller@1c0 {
236			compatible = "amlogic,sm1-frddr",
237				     "amlogic,axg-frddr";
238			reg = <0x0 0x1c0 0x0 0x2c>;
239			#sound-dai-cells = <0>;
240			sound-name-prefix = "FRDDR_A";
241			interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
242			clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
243			resets = <&arb AXG_ARB_FRDDR_A>,
244				 <&clkc_audio AUD_RESET_FRDDR_A>;
245			reset-names = "arb", "rst";
246			status = "disabled";
247		};
248
249		frddr_b: audio-controller@200 {
250			compatible = "amlogic,sm1-frddr",
251				     "amlogic,axg-frddr";
252			reg = <0x0 0x200 0x0 0x2c>;
253			#sound-dai-cells = <0>;
254			sound-name-prefix = "FRDDR_B";
255			interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>;
256			clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
257			resets = <&arb AXG_ARB_FRDDR_B>,
258				 <&clkc_audio AUD_RESET_FRDDR_B>;
259			reset-names = "arb", "rst";
260			status = "disabled";
261		};
262
263		frddr_c: audio-controller@240 {
264			compatible = "amlogic,sm1-frddr",
265				     "amlogic,axg-frddr";
266			reg = <0x0 0x240 0x0 0x2c>;
267			#sound-dai-cells = <0>;
268			sound-name-prefix = "FRDDR_C";
269			interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>;
270			clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
271			resets = <&arb AXG_ARB_FRDDR_C>,
272				 <&clkc_audio AUD_RESET_FRDDR_C>;
273			reset-names = "arb", "rst";
274			status = "disabled";
275		};
276
277		arb: reset-controller@280 {
278			status = "disabled";
279			compatible = "amlogic,meson-sm1-audio-arb";
280			reg = <0x0 0x280 0x0 0x4>;
281			#reset-cells = <1>;
282			clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
283		};
284
285		tdmin_a: audio-controller@300 {
286			compatible = "amlogic,sm1-tdmin",
287				     "amlogic,axg-tdmin";
288			reg = <0x0 0x300 0x0 0x40>;
289			sound-name-prefix = "TDMIN_A";
290			resets = <&clkc_audio AUD_RESET_TDMIN_A>;
291			clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
292				 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
293				 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
294				 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
295				 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
296			clock-names = "pclk", "sclk", "sclk_sel",
297				      "lrclk", "lrclk_sel";
298			status = "disabled";
299		};
300
301		tdmin_b: audio-controller@340 {
302			compatible = "amlogic,sm1-tdmin",
303				     "amlogic,axg-tdmin";
304			reg = <0x0 0x340 0x0 0x40>;
305			sound-name-prefix = "TDMIN_B";
306			resets = <&clkc_audio AUD_RESET_TDMIN_B>;
307			clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
308				 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
309				 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
310				 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
311				 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
312			clock-names = "pclk", "sclk", "sclk_sel",
313				      "lrclk", "lrclk_sel";
314			status = "disabled";
315		};
316
317		tdmin_c: audio-controller@380 {
318			compatible = "amlogic,sm1-tdmin",
319				     "amlogic,axg-tdmin";
320			reg = <0x0 0x380 0x0 0x40>;
321			sound-name-prefix = "TDMIN_C";
322			resets = <&clkc_audio AUD_RESET_TDMIN_C>;
323			clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
324				 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
325				 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
326				 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
327				 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
328			clock-names = "pclk", "sclk", "sclk_sel",
329				      "lrclk", "lrclk_sel";
330			status = "disabled";
331		};
332
333		tdmin_lb: audio-controller@3c0 {
334			compatible = "amlogic,sm1-tdmin",
335				     "amlogic,axg-tdmin";
336			reg = <0x0 0x3c0 0x0 0x40>;
337			sound-name-prefix = "TDMIN_LB";
338			resets = <&clkc_audio AUD_RESET_TDMIN_LB>;
339			clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
340				 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
341				 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
342				 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
343				 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
344			clock-names = "pclk", "sclk", "sclk_sel",
345				      "lrclk", "lrclk_sel";
346			status = "disabled";
347		};
348
349		tdmout_a: audio-controller@500 {
350			compatible = "amlogic,sm1-tdmout";
351			reg = <0x0 0x500 0x0 0x40>;
352			sound-name-prefix = "TDMOUT_A";
353			resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
354			clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
355				 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
356				 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
357				 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
358				 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
359			clock-names = "pclk", "sclk", "sclk_sel",
360				      "lrclk", "lrclk_sel";
361			status = "disabled";
362		};
363
364		tdmout_b: audio-controller@540 {
365			compatible = "amlogic,sm1-tdmout";
366			reg = <0x0 0x540 0x0 0x40>;
367			sound-name-prefix = "TDMOUT_B";
368			resets = <&clkc_audio AUD_RESET_TDMOUT_B>;
369			clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
370				 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
371				 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
372				 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
373				 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
374			clock-names = "pclk", "sclk", "sclk_sel",
375				      "lrclk", "lrclk_sel";
376			status = "disabled";
377		};
378
379		tdmout_c: audio-controller@580 {
380			compatible = "amlogic,sm1-tdmout";
381			reg = <0x0 0x580 0x0 0x40>;
382			sound-name-prefix = "TDMOUT_C";
383			resets = <&clkc_audio AUD_RESET_TDMOUT_C>;
384			clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
385				 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
386				 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
387				 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
388				 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
389			clock-names = "pclk", "sclk", "sclk_sel",
390				      "lrclk", "lrclk_sel";
391			status = "disabled";
392		};
393
394		tohdmitx: audio-controller@744 {
395			compatible = "amlogic,sm1-tohdmitx",
396				     "amlogic,g12a-tohdmitx";
397			reg = <0x0 0x744 0x0 0x4>;
398			#sound-dai-cells = <1>;
399			sound-name-prefix = "TOHDMITX";
400			resets = <&clkc_audio AUD_RESET_TOHDMITX>;
401			status = "disabled";
402		};
403
404		toddr_d: audio-controller@840 {
405			compatible = "amlogic,sm1-toddr",
406				     "amlogic,axg-toddr";
407			reg = <0x0 0x840 0x0 0x2c>;
408			#sound-dai-cells = <0>;
409			sound-name-prefix = "TODDR_D";
410			interrupts = <GIC_SPI 49 IRQ_TYPE_EDGE_RISING>;
411			clocks = <&clkc_audio AUD_CLKID_TODDR_D>;
412			resets = <&arb AXG_ARB_TODDR_D>,
413				 <&clkc_audio AUD_RESET_TODDR_D>;
414			reset-names = "arb", "rst";
415			status = "disabled";
416		};
417
418		frddr_d: audio-controller@880 {
419			 compatible = "amlogic,sm1-frddr",
420				      "amlogic,axg-frddr";
421			reg = <0x0 0x880 0x0 0x2c>;
422			#sound-dai-cells = <0>;
423			sound-name-prefix = "FRDDR_D";
424			interrupts = <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
425			clocks = <&clkc_audio AUD_CLKID_FRDDR_D>;
426			resets = <&arb AXG_ARB_FRDDR_D>,
427				 <&clkc_audio AUD_RESET_FRDDR_D>;
428			reset-names = "arb", "rst";
429			status = "disabled";
430		};
431	};
432
433	pdm: audio-controller@61000 {
434		compatible = "amlogic,sm1-pdm",
435			     "amlogic,axg-pdm";
436		reg = <0x0 0x61000 0x0 0x34>;
437		#sound-dai-cells = <0>;
438		sound-name-prefix = "PDM";
439		clocks = <&clkc_audio AUD_CLKID_PDM>,
440			 <&clkc_audio AUD_CLKID_PDM_DCLK>,
441			 <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
442		clock-names = "pclk", "dclk", "sysclk";
443		status = "disabled";
444	};
445};
446
447&cecb_AO {
448	compatible = "amlogic,meson-sm1-ao-cec";
449};
450
451&clk_msr {
452	compatible = "amlogic,meson-sm1-clk-measure";
453};
454
455
456&clkc {
457	compatible = "amlogic,sm1-clkc";
458};
459
460&ethmac {
461	power-domains = <&pwrc PWRC_SM1_ETH_ID>;
462};
463
464&gpio_intc {
465	compatible = "amlogic,meson-sm1-gpio-intc",
466		     "amlogic,meson-gpio-intc";
467};
468
469&pcie {
470	power-domains = <&pwrc PWRC_SM1_PCIE_ID>;
471};
472
473&pwrc {
474	compatible = "amlogic,meson-sm1-pwrc";
475};
476
477&simplefb_cvbs {
478	power-domains = <&pwrc PWRC_SM1_VPU_ID>;
479};
480
481&simplefb_hdmi {
482	power-domains = <&pwrc PWRC_SM1_VPU_ID>;
483};
484
485&vdec {
486	compatible = "amlogic,sm1-vdec";
487};
488
489&vpu {
490	power-domains = <&pwrc PWRC_SM1_VPU_ID>;
491};
492
493&usb {
494	power-domains = <&pwrc PWRC_SM1_USB_ID>;
495};
496