1// SPDX-License-Identifier: GPL-2.0
2/*
3 * dts file for Hisilicon Hi6220 SoC
4 *
5 * Copyright (C) 2015, HiSilicon Ltd.
6 */
7
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9#include <dt-bindings/reset/hisi,hi6220-resets.h>
10#include <dt-bindings/clock/hi6220-clock.h>
11#include <dt-bindings/pinctrl/hisi.h>
12#include <dt-bindings/thermal/thermal.h>
13
14/ {
15	compatible = "hisilicon,hi6220";
16	interrupt-parent = <&gic>;
17	#address-cells = <2>;
18	#size-cells = <2>;
19
20	psci {
21		compatible = "arm,psci-0.2";
22		method = "smc";
23	};
24
25	cpus {
26		#address-cells = <2>;
27		#size-cells = <0>;
28
29		cpu-map {
30			cluster0 {
31				core0 {
32					cpu = <&cpu0>;
33				};
34				core1 {
35					cpu = <&cpu1>;
36				};
37				core2 {
38					cpu = <&cpu2>;
39				};
40				core3 {
41					cpu = <&cpu3>;
42				};
43			};
44			cluster1 {
45				core0 {
46					cpu = <&cpu4>;
47				};
48				core1 {
49					cpu = <&cpu5>;
50				};
51				core2 {
52					cpu = <&cpu6>;
53				};
54				core3 {
55					cpu = <&cpu7>;
56				};
57			};
58		};
59
60		idle-states {
61			entry-method = "psci";
62
63			CPU_SLEEP: cpu-sleep {
64				compatible = "arm,idle-state";
65				local-timer-stop;
66				arm,psci-suspend-param = <0x0010000>;
67				entry-latency-us = <700>;
68				exit-latency-us = <250>;
69				min-residency-us = <1000>;
70			};
71
72			CLUSTER_SLEEP: cluster-sleep {
73				compatible = "arm,idle-state";
74				local-timer-stop;
75				arm,psci-suspend-param = <0x1010000>;
76				entry-latency-us = <1000>;
77				exit-latency-us = <700>;
78				min-residency-us = <2700>;
79				wakeup-latency-us = <1500>;
80			};
81		};
82
83		cpu0: cpu@0 {
84			compatible = "arm,cortex-a53";
85			device_type = "cpu";
86			reg = <0x0 0x0>;
87			enable-method = "psci";
88			next-level-cache = <&CLUSTER0_L2>;
89			clocks = <&stub_clock 0>;
90			operating-points-v2 = <&cpu_opp_table>;
91			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
92			#cooling-cells = <2>; /* min followed by max */
93			dynamic-power-coefficient = <311>;
94		};
95
96		cpu1: cpu@1 {
97			compatible = "arm,cortex-a53";
98			device_type = "cpu";
99			reg = <0x0 0x1>;
100			enable-method = "psci";
101			next-level-cache = <&CLUSTER0_L2>;
102			clocks = <&stub_clock 0>;
103			operating-points-v2 = <&cpu_opp_table>;
104			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
105			#cooling-cells = <2>; /* min followed by max */
106			dynamic-power-coefficient = <311>;
107		};
108
109		cpu2: cpu@2 {
110			compatible = "arm,cortex-a53";
111			device_type = "cpu";
112			reg = <0x0 0x2>;
113			enable-method = "psci";
114			next-level-cache = <&CLUSTER0_L2>;
115			clocks = <&stub_clock 0>;
116			operating-points-v2 = <&cpu_opp_table>;
117			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
118			#cooling-cells = <2>; /* min followed by max */
119			dynamic-power-coefficient = <311>;
120		};
121
122		cpu3: cpu@3 {
123			compatible = "arm,cortex-a53";
124			device_type = "cpu";
125			reg = <0x0 0x3>;
126			enable-method = "psci";
127			next-level-cache = <&CLUSTER0_L2>;
128			clocks = <&stub_clock 0>;
129			operating-points-v2 = <&cpu_opp_table>;
130			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
131			#cooling-cells = <2>; /* min followed by max */
132			dynamic-power-coefficient = <311>;
133		};
134
135		cpu4: cpu@100 {
136			compatible = "arm,cortex-a53";
137			device_type = "cpu";
138			reg = <0x0 0x100>;
139			enable-method = "psci";
140			next-level-cache = <&CLUSTER1_L2>;
141			clocks = <&stub_clock 0>;
142			operating-points-v2 = <&cpu_opp_table>;
143			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
144			#cooling-cells = <2>; /* min followed by max */
145			dynamic-power-coefficient = <311>;
146		};
147
148		cpu5: cpu@101 {
149			compatible = "arm,cortex-a53";
150			device_type = "cpu";
151			reg = <0x0 0x101>;
152			enable-method = "psci";
153			next-level-cache = <&CLUSTER1_L2>;
154			clocks = <&stub_clock 0>;
155			operating-points-v2 = <&cpu_opp_table>;
156			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
157			#cooling-cells = <2>; /* min followed by max */
158			dynamic-power-coefficient = <311>;
159		};
160
161		cpu6: cpu@102 {
162			compatible = "arm,cortex-a53";
163			device_type = "cpu";
164			reg = <0x0 0x102>;
165			enable-method = "psci";
166			next-level-cache = <&CLUSTER1_L2>;
167			clocks = <&stub_clock 0>;
168			operating-points-v2 = <&cpu_opp_table>;
169			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
170			#cooling-cells = <2>; /* min followed by max */
171			dynamic-power-coefficient = <311>;
172		};
173
174		cpu7: cpu@103 {
175			compatible = "arm,cortex-a53";
176			device_type = "cpu";
177			reg = <0x0 0x103>;
178			enable-method = "psci";
179			next-level-cache = <&CLUSTER1_L2>;
180			clocks = <&stub_clock 0>;
181			operating-points-v2 = <&cpu_opp_table>;
182			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
183			#cooling-cells = <2>; /* min followed by max */
184			dynamic-power-coefficient = <311>;
185		};
186
187		CLUSTER0_L2: l2-cache0 {
188			compatible = "cache";
189			cache-level = <2>;
190		};
191
192		CLUSTER1_L2: l2-cache1 {
193			compatible = "cache";
194			cache-level = <2>;
195		};
196	};
197
198	cpu_opp_table: opp-table-0 {
199		compatible = "operating-points-v2";
200		opp-shared;
201
202		opp00 {
203			opp-hz = /bits/ 64 <208000000>;
204			opp-microvolt = <1040000>;
205			clock-latency-ns = <500000>;
206		};
207		opp01 {
208			opp-hz = /bits/ 64 <432000000>;
209			opp-microvolt = <1040000>;
210			clock-latency-ns = <500000>;
211		};
212		opp02 {
213			opp-hz = /bits/ 64 <729000000>;
214			opp-microvolt = <1090000>;
215			clock-latency-ns = <500000>;
216		};
217		opp03 {
218			opp-hz = /bits/ 64 <960000000>;
219			opp-microvolt = <1180000>;
220			clock-latency-ns = <500000>;
221		};
222		opp04 {
223			opp-hz = /bits/ 64 <1200000000>;
224			opp-microvolt = <1330000>;
225			clock-latency-ns = <500000>;
226		};
227	};
228
229	gic: interrupt-controller@f6801000 {
230		compatible = "arm,gic-400";
231		reg = <0x0 0xf6801000 0 0x1000>, /* GICD */
232		      <0x0 0xf6802000 0 0x2000>, /* GICC */
233		      <0x0 0xf6804000 0 0x2000>, /* GICH */
234		      <0x0 0xf6806000 0 0x2000>; /* GICV */
235		#address-cells = <0>;
236		#interrupt-cells = <3>;
237		interrupt-controller;
238		interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
239	};
240
241	timer {
242		compatible = "arm,armv8-timer";
243		interrupt-parent = <&gic>;
244		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
245			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
246			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
247			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
248	};
249
250	soc {
251		compatible = "simple-bus";
252		#address-cells = <2>;
253		#size-cells = <2>;
254		ranges;
255
256		sram: sram@fff80000 {
257			compatible = "hisilicon,hi6220-sramctrl", "syscon";
258			reg = <0x0 0xfff80000 0x0 0x12000>;
259		};
260
261		ao_ctrl: ao_ctrl@f7800000 {
262			compatible = "hisilicon,hi6220-aoctrl", "syscon";
263			reg = <0x0 0xf7800000 0x0 0x2000>;
264			#clock-cells = <1>;
265			#reset-cells = <1>;
266		};
267
268		sys_ctrl: sys_ctrl@f7030000 {
269			compatible = "hisilicon,hi6220-sysctrl", "syscon";
270			reg = <0x0 0xf7030000 0x0 0x2000>;
271			#clock-cells = <1>;
272			#reset-cells = <1>;
273		};
274
275		media_ctrl: media_ctrl@f4410000 {
276			compatible = "hisilicon,hi6220-mediactrl", "syscon";
277			reg = <0x0 0xf4410000 0x0 0x1000>;
278			#clock-cells = <1>;
279			#reset-cells = <1>;
280		};
281
282		pm_ctrl: pm_ctrl@f7032000 {
283			compatible = "hisilicon,hi6220-pmctrl", "syscon";
284			reg = <0x0 0xf7032000 0x0 0x1000>;
285			#clock-cells = <1>;
286		};
287
288		acpu_sctrl: acpu_sctrl@f6504000 {
289			compatible = "hisilicon,hi6220-acpu-sctrl", "syscon";
290			reg = <0x0 0xf6504000 0x0 0x1000>;
291			#clock-cells = <1>;
292		};
293
294		medianoc_ade: medianoc_ade@f4520000 {
295			compatible = "syscon";
296			reg = <0x0 0xf4520000 0x0 0x4000>;
297		};
298
299		stub_clock: stub_clock {
300			compatible = "hisilicon,hi6220-stub-clk";
301			hisilicon,hi6220-clk-sram = <&sram>;
302			#clock-cells = <1>;
303			mbox-names = "mbox-tx";
304			mboxes = <&mailbox 1 0 11>;
305		};
306
307		uart0: serial@f8015000 {	/* console */
308			compatible = "arm,pl011", "arm,primecell";
309			reg = <0x0 0xf8015000 0x0 0x1000>;
310			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
311			clocks = <&ao_ctrl HI6220_UART0_PCLK>,
312				 <&ao_ctrl HI6220_UART0_PCLK>;
313			clock-names = "uartclk", "apb_pclk";
314		};
315
316		uart1: serial@f7111000 {
317			compatible = "arm,pl011", "arm,primecell";
318			reg = <0x0 0xf7111000 0x0 0x1000>;
319			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
320			clocks = <&sys_ctrl HI6220_UART1_PCLK>,
321				 <&sys_ctrl HI6220_UART1_PCLK>;
322			clock-names = "uartclk", "apb_pclk";
323			pinctrl-names = "default";
324			pinctrl-0 = <&uart1_pmx_func &uart1_cfg_func1 &uart1_cfg_func2>;
325			dmas = <&dma0 8 &dma0 9>;
326			dma-names = "rx", "tx";
327			status = "disabled";
328		};
329
330		uart2: serial@f7112000 {
331			compatible = "arm,pl011", "arm,primecell";
332			reg = <0x0 0xf7112000 0x0 0x1000>;
333			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
334			clocks = <&sys_ctrl HI6220_UART2_PCLK>,
335				 <&sys_ctrl HI6220_UART2_PCLK>;
336			clock-names = "uartclk", "apb_pclk";
337			pinctrl-names = "default";
338			pinctrl-0 = <&uart2_pmx_func &uart2_cfg_func>;
339			status = "disabled";
340		};
341
342		uart3: serial@f7113000 {
343			compatible = "arm,pl011", "arm,primecell";
344			reg = <0x0 0xf7113000 0x0 0x1000>;
345			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
346			clocks = <&sys_ctrl HI6220_UART3_PCLK>,
347				 <&sys_ctrl HI6220_UART3_PCLK>;
348			clock-names = "uartclk", "apb_pclk";
349			pinctrl-names = "default";
350			pinctrl-0 = <&uart3_pmx_func &uart3_cfg_func>;
351			status = "disabled";
352		};
353
354		uart4: serial@f7114000 {
355			compatible = "arm,pl011", "arm,primecell";
356			reg = <0x0 0xf7114000 0x0 0x1000>;
357			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
358			clocks = <&sys_ctrl HI6220_UART4_PCLK>,
359				 <&sys_ctrl HI6220_UART4_PCLK>;
360			clock-names = "uartclk", "apb_pclk";
361			pinctrl-names = "default";
362			pinctrl-0 = <&uart4_pmx_func &uart4_cfg_func>;
363			status = "disabled";
364		};
365
366		dma0: dma@f7370000 {
367			compatible = "hisilicon,k3-dma-1.0";
368			reg = <0x0 0xf7370000 0x0 0x1000>;
369			#dma-cells = <1>;
370			dma-channels = <15>;
371			dma-requests = <32>;
372			interrupts = <0 84 4>;
373			clocks = <&sys_ctrl HI6220_EDMAC_ACLK>;
374			dma-no-cci;
375			dma-type = "hi6220_dma";
376			status = "okay";
377		};
378
379		dual_timer0: timer@f8008000 {
380			compatible = "arm,sp804", "arm,primecell";
381			reg = <0x0 0xf8008000 0x0 0x1000>;
382			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
383				     <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
384			clocks = <&ao_ctrl HI6220_TIMER0_PCLK>,
385				 <&ao_ctrl HI6220_TIMER0_PCLK>,
386				 <&ao_ctrl HI6220_TIMER0_PCLK>;
387			clock-names = "timer1", "timer2", "apb_pclk";
388		};
389
390		rtc0: rtc@f8003000 {
391			compatible = "arm,pl031", "arm,primecell";
392			reg = <0x0 0xf8003000 0x0 0x1000>;
393			interrupts = <0 12 4>;
394			clocks = <&ao_ctrl HI6220_RTC0_PCLK>;
395			clock-names = "apb_pclk";
396		};
397
398		rtc1: rtc@f8004000 {
399			compatible = "arm,pl031", "arm,primecell";
400			reg = <0x0 0xf8004000 0x0 0x1000>;
401			interrupts = <0 8 4>;
402			clocks = <&ao_ctrl HI6220_RTC1_PCLK>;
403			clock-names = "apb_pclk";
404		};
405
406		pmx0: pinmux@f7010000 {
407			compatible = "pinctrl-single";
408			reg = <0x0 0xf7010000  0x0 0x27c>;
409			#address-cells = <1>;
410			#size-cells = <1>;
411			#pinctrl-cells = <1>;
412			#gpio-range-cells = <3>;
413			pinctrl-single,register-width = <32>;
414			pinctrl-single,function-mask = <7>;
415			pinctrl-single,gpio-range = <
416				&range  80  8 MUX_M0 /* gpio  3: [0..7] */
417				&range  88  8 MUX_M0 /* gpio  4: [0..7] */
418				&range  96  8 MUX_M0 /* gpio  5: [0..7] */
419				&range 104  8 MUX_M0 /* gpio  6: [0..7] */
420				&range 112  8 MUX_M0 /* gpio  7: [0..7] */
421				&range 120  2 MUX_M0 /* gpio  8: [0..1] */
422				&range   2  6 MUX_M1 /* gpio  8: [2..7] */
423				&range   8  8 MUX_M1 /* gpio  9: [0..7] */
424				&range   0  1 MUX_M1 /* gpio 10: [0]    */
425				&range  16  7 MUX_M1 /* gpio 10: [1..7] */
426				&range  23  3 MUX_M1 /* gpio 11: [0..2] */
427				&range  28  5 MUX_M1 /* gpio 11: [3..7] */
428				&range  33  3 MUX_M1 /* gpio 12: [0..2] */
429				&range  43  5 MUX_M1 /* gpio 12: [3..7] */
430				&range  48  8 MUX_M1 /* gpio 13: [0..7] */
431				&range  56  8 MUX_M1 /* gpio 14: [0..7] */
432				&range  74  6 MUX_M1 /* gpio 15: [0..5] */
433				&range 122  1 MUX_M1 /* gpio 15: [6]    */
434				&range 126  1 MUX_M1 /* gpio 15: [7]    */
435				&range 127  8 MUX_M1 /* gpio 16: [0..7] */
436				&range 135  8 MUX_M1 /* gpio 17: [0..7] */
437				&range 143  8 MUX_M1 /* gpio 18: [0..7] */
438				&range 151  8 MUX_M1 /* gpio 19: [0..7] */
439			>;
440			range: gpio-range {
441				#pinctrl-single,gpio-range-cells = <3>;
442			};
443		};
444
445		pmx1: pinmux@f7010800 {
446			compatible = "pinconf-single";
447			reg = <0x0 0xf7010800 0x0 0x28c>;
448			#address-cells = <1>;
449			#size-cells = <1>;
450			#pinctrl-cells = <1>;
451			pinctrl-single,register-width = <32>;
452		};
453
454		pmx2: pinmux@f8001800 {
455			compatible = "pinconf-single";
456			reg = <0x0 0xf8001800 0x0 0x78>;
457			#address-cells = <1>;
458			#size-cells = <1>;
459			#pinctrl-cells = <1>;
460			pinctrl-single,register-width = <32>;
461		};
462
463		gpio0: gpio@f8011000 {
464			compatible = "arm,pl061", "arm,primecell";
465			reg = <0x0 0xf8011000 0x0 0x1000>;
466			interrupts = <0 52 0x4>;
467			gpio-controller;
468			#gpio-cells = <2>;
469			interrupt-controller;
470			#interrupt-cells = <2>;
471			clocks = <&ao_ctrl 2>;
472			clock-names = "apb_pclk";
473		};
474
475		gpio1: gpio@f8012000 {
476			compatible = "arm,pl061", "arm,primecell";
477			reg = <0x0 0xf8012000 0x0 0x1000>;
478			interrupts = <0 53 0x4>;
479			gpio-controller;
480			#gpio-cells = <2>;
481			interrupt-controller;
482			#interrupt-cells = <2>;
483			clocks = <&ao_ctrl 2>;
484			clock-names = "apb_pclk";
485		};
486
487		gpio2: gpio@f8013000 {
488			compatible = "arm,pl061", "arm,primecell";
489			reg = <0x0 0xf8013000 0x0 0x1000>;
490			interrupts = <0 54 0x4>;
491			gpio-controller;
492			#gpio-cells = <2>;
493			interrupt-controller;
494			#interrupt-cells = <2>;
495			clocks = <&ao_ctrl 2>;
496			clock-names = "apb_pclk";
497		};
498
499		gpio3: gpio@f8014000 {
500			compatible = "arm,pl061", "arm,primecell";
501			reg = <0x0 0xf8014000 0x0 0x1000>;
502			interrupts = <0 55 0x4>;
503			gpio-controller;
504			#gpio-cells = <2>;
505			gpio-ranges = <&pmx0 0 80 8>;
506			interrupt-controller;
507			#interrupt-cells = <2>;
508			clocks = <&ao_ctrl 2>;
509			clock-names = "apb_pclk";
510		};
511
512		gpio4: gpio@f7020000 {
513			compatible = "arm,pl061", "arm,primecell";
514			reg = <0x0 0xf7020000 0x0 0x1000>;
515			interrupts = <0 56 0x4>;
516			gpio-controller;
517			#gpio-cells = <2>;
518			gpio-ranges = <&pmx0 0 88 8>;
519			interrupt-controller;
520			#interrupt-cells = <2>;
521			clocks = <&ao_ctrl 2>;
522			clock-names = "apb_pclk";
523		};
524
525		gpio5: gpio@f7021000 {
526			compatible = "arm,pl061", "arm,primecell";
527			reg = <0x0 0xf7021000 0x0 0x1000>;
528			interrupts = <0 57 0x4>;
529			gpio-controller;
530			#gpio-cells = <2>;
531			gpio-ranges = <&pmx0 0 96 8>;
532			interrupt-controller;
533			#interrupt-cells = <2>;
534			clocks = <&ao_ctrl 2>;
535			clock-names = "apb_pclk";
536		};
537
538		gpio6: gpio@f7022000 {
539			compatible = "arm,pl061", "arm,primecell";
540			reg = <0x0 0xf7022000 0x0 0x1000>;
541			interrupts = <0 58 0x4>;
542			gpio-controller;
543			#gpio-cells = <2>;
544			gpio-ranges = <&pmx0 0 104 8>;
545			interrupt-controller;
546			#interrupt-cells = <2>;
547			clocks = <&ao_ctrl 2>;
548			clock-names = "apb_pclk";
549		};
550
551		gpio7: gpio@f7023000 {
552			compatible = "arm,pl061", "arm,primecell";
553			reg = <0x0 0xf7023000 0x0 0x1000>;
554			interrupts = <0 59 0x4>;
555			gpio-controller;
556			#gpio-cells = <2>;
557			gpio-ranges = <&pmx0 0 112 8>;
558			interrupt-controller;
559			#interrupt-cells = <2>;
560			clocks = <&ao_ctrl 2>;
561			clock-names = "apb_pclk";
562		};
563
564		gpio8: gpio@f7024000 {
565			compatible = "arm,pl061", "arm,primecell";
566			reg = <0x0 0xf7024000 0x0 0x1000>;
567			interrupts = <0 60 0x4>;
568			gpio-controller;
569			#gpio-cells = <2>;
570			gpio-ranges = <&pmx0 0 120 2 &pmx0 2 2 6>;
571			interrupt-controller;
572			#interrupt-cells = <2>;
573			clocks = <&ao_ctrl 2>;
574			clock-names = "apb_pclk";
575		};
576
577		gpio9: gpio@f7025000 {
578			compatible = "arm,pl061", "arm,primecell";
579			reg = <0x0 0xf7025000 0x0 0x1000>;
580			interrupts = <0 61 0x4>;
581			gpio-controller;
582			#gpio-cells = <2>;
583			gpio-ranges = <&pmx0 0 8 8>;
584			interrupt-controller;
585			#interrupt-cells = <2>;
586			clocks = <&ao_ctrl 2>;
587			clock-names = "apb_pclk";
588		};
589
590		gpio10: gpio@f7026000 {
591			compatible = "arm,pl061", "arm,primecell";
592			reg = <0x0 0xf7026000 0x0 0x1000>;
593			interrupts = <0 62 0x4>;
594			gpio-controller;
595			#gpio-cells = <2>;
596			gpio-ranges = <&pmx0 0 0 1 &pmx0 1 16 7>;
597			interrupt-controller;
598			#interrupt-cells = <2>;
599			clocks = <&ao_ctrl 2>;
600			clock-names = "apb_pclk";
601		};
602
603		gpio11: gpio@f7027000 {
604			compatible = "arm,pl061", "arm,primecell";
605			reg = <0x0 0xf7027000 0x0 0x1000>;
606			interrupts = <0 63 0x4>;
607			gpio-controller;
608			#gpio-cells = <2>;
609			gpio-ranges = <&pmx0 0 23 3 &pmx0 3 28 5>;
610			interrupt-controller;
611			#interrupt-cells = <2>;
612			clocks = <&ao_ctrl 2>;
613			clock-names = "apb_pclk";
614		};
615
616		gpio12: gpio@f7028000 {
617			compatible = "arm,pl061", "arm,primecell";
618			reg = <0x0 0xf7028000 0x0 0x1000>;
619			interrupts = <0 64 0x4>;
620			gpio-controller;
621			#gpio-cells = <2>;
622			gpio-ranges = <&pmx0 0 33 3 &pmx0 3 43 5>;
623			interrupt-controller;
624			#interrupt-cells = <2>;
625			clocks = <&ao_ctrl 2>;
626			clock-names = "apb_pclk";
627		};
628
629		gpio13: gpio@f7029000 {
630			compatible = "arm,pl061", "arm,primecell";
631			reg = <0x0 0xf7029000 0x0 0x1000>;
632			interrupts = <0 65 0x4>;
633			gpio-controller;
634			#gpio-cells = <2>;
635			gpio-ranges = <&pmx0 0 48 8>;
636			interrupt-controller;
637			#interrupt-cells = <2>;
638			clocks = <&ao_ctrl 2>;
639			clock-names = "apb_pclk";
640		};
641
642		gpio14: gpio@f702a000 {
643			compatible = "arm,pl061", "arm,primecell";
644			reg = <0x0 0xf702a000 0x0 0x1000>;
645			interrupts = <0 66 0x4>;
646			gpio-controller;
647			#gpio-cells = <2>;
648			gpio-ranges = <&pmx0 0 56 8>;
649			interrupt-controller;
650			#interrupt-cells = <2>;
651			clocks = <&ao_ctrl 2>;
652			clock-names = "apb_pclk";
653		};
654
655		gpio15: gpio@f702b000 {
656			compatible = "arm,pl061", "arm,primecell";
657			reg = <0x0 0xf702b000 0x0 0x1000>;
658			interrupts = <0 67 0x4>;
659			gpio-controller;
660			#gpio-cells = <2>;
661			gpio-ranges = <
662				&pmx0 0 74 6
663				&pmx0 6 122 1
664				&pmx0 7 126 1
665			>;
666			interrupt-controller;
667			#interrupt-cells = <2>;
668			clocks = <&ao_ctrl 2>;
669			clock-names = "apb_pclk";
670		};
671
672		gpio16: gpio@f702c000 {
673			compatible = "arm,pl061", "arm,primecell";
674			reg = <0x0 0xf702c000 0x0 0x1000>;
675			interrupts = <0 68 0x4>;
676			gpio-controller;
677			#gpio-cells = <2>;
678			gpio-ranges = <&pmx0 0 127 8>;
679			interrupt-controller;
680			#interrupt-cells = <2>;
681			clocks = <&ao_ctrl 2>;
682			clock-names = "apb_pclk";
683		};
684
685		gpio17: gpio@f702d000 {
686			compatible = "arm,pl061", "arm,primecell";
687			reg = <0x0 0xf702d000 0x0 0x1000>;
688			interrupts = <0 69 0x4>;
689			gpio-controller;
690			#gpio-cells = <2>;
691			gpio-ranges = <&pmx0 0 135 8>;
692			interrupt-controller;
693			#interrupt-cells = <2>;
694			clocks = <&ao_ctrl 2>;
695			clock-names = "apb_pclk";
696		};
697
698		gpio18: gpio@f702e000 {
699			compatible = "arm,pl061", "arm,primecell";
700			reg = <0x0 0xf702e000 0x0 0x1000>;
701			interrupts = <0 70 0x4>;
702			gpio-controller;
703			#gpio-cells = <2>;
704			gpio-ranges = <&pmx0 0 143 8>;
705			interrupt-controller;
706			#interrupt-cells = <2>;
707			clocks = <&ao_ctrl 2>;
708			clock-names = "apb_pclk";
709		};
710
711		gpio19: gpio@f702f000 {
712			compatible = "arm,pl061", "arm,primecell";
713			reg = <0x0 0xf702f000 0x0 0x1000>;
714			interrupts = <0 71 0x4>;
715			gpio-controller;
716			#gpio-cells = <2>;
717			gpio-ranges = <&pmx0 0 151 8>;
718			interrupt-controller;
719			#interrupt-cells = <2>;
720			clocks = <&ao_ctrl 2>;
721			clock-names = "apb_pclk";
722		};
723
724		spi0: spi@f7106000 {
725			compatible = "arm,pl022", "arm,primecell";
726			reg = <0x0 0xf7106000 0x0 0x1000>;
727			interrupts = <0 50 4>;
728			bus-id = <0>;
729			enable-dma = <0>;
730			clocks = <&sys_ctrl HI6220_SPI_CLK>, <&sys_ctrl HI6220_SPI_CLK>;
731			clock-names = "sspclk", "apb_pclk";
732			pinctrl-names = "default";
733			pinctrl-0 = <&spi0_pmx_func &spi0_cfg_func>;
734			num-cs = <1>;
735			cs-gpios = <&gpio6 2 0>;
736			status = "disabled";
737		};
738
739		i2c0: i2c@f7100000 {
740			compatible = "snps,designware-i2c";
741			reg = <0x0 0xf7100000 0x0 0x1000>;
742			interrupts = <0 44 4>;
743			clocks = <&sys_ctrl HI6220_I2C0_CLK>;
744			i2c-sda-hold-time-ns = <300>;
745			pinctrl-names = "default";
746			pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
747			status = "disabled";
748		};
749
750		i2c1: i2c@f7101000 {
751			compatible = "snps,designware-i2c";
752			reg = <0x0 0xf7101000 0x0 0x1000>;
753			clocks = <&sys_ctrl HI6220_I2C1_CLK>;
754			interrupts = <0 45 4>;
755			i2c-sda-hold-time-ns = <300>;
756			pinctrl-names = "default";
757			pinctrl-0 = <&i2c1_pmx_func &i2c1_cfg_func>;
758			status = "disabled";
759		};
760
761		i2c2: i2c@f7102000 {
762			compatible = "snps,designware-i2c";
763			reg = <0x0 0xf7102000 0x0 0x1000>;
764			clocks = <&sys_ctrl HI6220_I2C2_CLK>;
765			interrupts = <0 46 4>;
766			i2c-sda-hold-time-ns = <300>;
767			pinctrl-names = "default";
768			pinctrl-0 = <&i2c2_pmx_func &i2c2_cfg_func>;
769			status = "disabled";
770		};
771
772		usb_phy: usbphy {
773			compatible = "hisilicon,hi6220-usb-phy";
774			#phy-cells = <0>;
775			phy-supply = <&reg_5v_hub>;
776			hisilicon,peripheral-syscon = <&sys_ctrl>;
777		};
778
779		usb: usb@f72c0000 {
780			compatible = "hisilicon,hi6220-usb";
781			reg = <0x0 0xf72c0000 0x0 0x40000>;
782			phys = <&usb_phy>;
783			phy-names = "usb2-phy";
784			clocks = <&sys_ctrl HI6220_USBOTG_HCLK>;
785			clock-names = "otg";
786			dr_mode = "otg";
787			g-rx-fifo-size = <512>;
788			g-np-tx-fifo-size = <128>;
789			g-tx-fifo-size = <128 128 128 128 128 128 128 128
790					   16  16  16  16  16  16  16>;
791			interrupts = <0 77 0x4>;
792		};
793
794		mailbox: mailbox@f7510000 {
795			compatible = "hisilicon,hi6220-mbox";
796			reg = <0x0 0xf7510000 0x0 0x1000>, /* IPC_S */
797			      <0x0 0x06dff800 0x0 0x0800>; /* Mailbox buffer */
798			interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
799			#mbox-cells = <3>;
800		};
801
802		dwmmc_0: dwmmc0@f723d000 {
803			compatible = "hisilicon,hi6220-dw-mshc";
804			reg = <0x0 0xf723d000 0x0 0x1000>;
805			interrupts = <0x0 0x48 0x4>;
806			clocks = <&sys_ctrl 2>, <&sys_ctrl 1>;
807			clock-names = "ciu", "biu";
808			resets = <&sys_ctrl PERIPH_RSTDIS0_MMC0>;
809			reset-names = "reset";
810			pinctrl-names = "default";
811			pinctrl-0 = <&emmc_pmx_func &emmc_clk_cfg_func
812				     &emmc_cfg_func &emmc_rst_cfg_func>;
813		};
814
815		dwmmc_1: dwmmc1@f723e000 {
816			compatible = "hisilicon,hi6220-dw-mshc";
817			hisilicon,peripheral-syscon = <&ao_ctrl>;
818			reg = <0x0 0xf723e000 0x0 0x1000>;
819			interrupts = <0x0 0x49 0x4>;
820			#address-cells = <0x1>;
821			#size-cells = <0x0>;
822			clocks = <&sys_ctrl 4>, <&sys_ctrl 3>;
823			clock-names = "ciu", "biu";
824			resets = <&sys_ctrl PERIPH_RSTDIS0_MMC1>;
825			reset-names = "reset";
826			pinctrl-names = "default", "idle";
827			pinctrl-0 = <&sd_pmx_func &sd_clk_cfg_func &sd_cfg_func>;
828			pinctrl-1 = <&sd_pmx_idle &sd_clk_cfg_idle &sd_cfg_idle>;
829		};
830
831		dwmmc_2: dwmmc2@f723f000 {
832			compatible = "hisilicon,hi6220-dw-mshc";
833			reg = <0x0 0xf723f000 0x0 0x1000>;
834			interrupts = <0x0 0x4a 0x4>;
835			clocks = <&sys_ctrl HI6220_MMC2_CIUCLK>, <&sys_ctrl HI6220_MMC2_CLK>;
836			clock-names = "ciu", "biu";
837			resets = <&sys_ctrl PERIPH_RSTDIS0_MMC2>;
838			reset-names = "reset";
839			pinctrl-names = "default", "idle";
840			pinctrl-0 = <&sdio_pmx_func &sdio_clk_cfg_func &sdio_cfg_func>;
841			pinctrl-1 = <&sdio_pmx_idle &sdio_clk_cfg_idle &sdio_cfg_idle>;
842		};
843
844		watchdog0: watchdog@f8005000 {
845			compatible = "arm,sp805", "arm,primecell";
846			reg = <0x0 0xf8005000 0x0 0x1000>;
847			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
848			clocks = <&ao_ctrl HI6220_WDT0_PCLK>,
849				 <&ao_ctrl HI6220_WDT0_PCLK>;
850			clock-names = "wdog_clk", "apb_pclk";
851		};
852
853		tsensor: tsensor@0,f7030700 {
854			compatible = "hisilicon,tsensor";
855			reg = <0x0 0xf7030700 0x0 0x1000>;
856			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
857			clocks = <&sys_ctrl 22>;
858			clock-names = "thermal_clk";
859			#thermal-sensor-cells = <1>;
860		};
861
862		i2s0: i2s@f7118000{
863			compatible = "hisilicon,hi6210-i2s";
864			reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
865			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
866			clocks = <&sys_ctrl HI6220_DACODEC_PCLK>,
867				 <&sys_ctrl HI6220_BBPPLL0_DIV>;
868			clock-names = "dacodec", "i2s-base";
869			dmas = <&dma0 15 &dma0 14>;
870			dma-names = "rx", "tx";
871			hisilicon,sysctrl-syscon = <&sys_ctrl>;
872			#sound-dai-cells = <1>;
873		};
874
875		thermal-zones {
876
877			cls0: cls0-thermal {
878				polling-delay = <1000>;
879				polling-delay-passive = <100>;
880				sustainable-power = <3326>;
881
882				/* sensor ID */
883				thermal-sensors = <&tsensor 2>;
884
885				trips {
886					threshold: trip-point0 {
887						temperature = <65000>;
888						hysteresis = <0>;
889						type = "passive";
890					};
891
892					target: trip-point1 {
893						temperature = <75000>;
894						hysteresis = <0>;
895						type = "passive";
896					};
897				};
898
899				cooling-maps {
900					map0 {
901						trip = <&target>;
902						cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
903								 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
904								 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
905								 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
906								 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
907								 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
908								 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
909								 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
910					};
911				};
912			};
913		};
914
915		ade: ade@f4100000 {
916			compatible = "hisilicon,hi6220-ade";
917			reg = <0x0 0xf4100000 0x0 0x7800>;
918			reg-names = "ade_base";
919			hisilicon,noc-syscon = <&medianoc_ade>;
920			resets = <&media_ctrl MEDIA_ADE>;
921			interrupts = <0 115 4>; /* ldi interrupt */
922
923			clocks = <&media_ctrl HI6220_ADE_CORE>,
924				 <&media_ctrl HI6220_CODEC_JPEG>,
925				 <&media_ctrl HI6220_ADE_PIX_SRC>;
926			/*clock name*/
927			clock-names  = "clk_ade_core",
928				       "clk_codec_jpeg",
929				       "clk_ade_pix";
930
931			assigned-clocks = <&media_ctrl HI6220_ADE_CORE>,
932				<&media_ctrl HI6220_CODEC_JPEG>;
933			assigned-clock-rates = <360000000>, <288000000>;
934			dma-coherent;
935			status = "disabled";
936
937			port {
938				ade_out: endpoint {
939					remote-endpoint = <&dsi_in>;
940				};
941			};
942		};
943
944		dsi: dsi@f4107800 {
945			compatible = "hisilicon,hi6220-dsi";
946			reg = <0x0 0xf4107800 0x0 0x100>;
947			clocks = <&media_ctrl  HI6220_DSI_PCLK>;
948			clock-names = "pclk";
949			status = "disabled";
950
951			ports {
952				#address-cells = <1>;
953				#size-cells = <0>;
954
955				/* 0 for input port */
956				port@0 {
957					reg = <0>;
958					dsi_in: endpoint {
959						remote-endpoint = <&ade_out>;
960					};
961				};
962			};
963		};
964
965		debug@f6590000 {
966			compatible = "arm,coresight-cpu-debug","arm,primecell";
967			reg = <0 0xf6590000 0 0x1000>;
968			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
969			clock-names = "apb_pclk";
970			cpu = <&cpu0>;
971		};
972
973		debug@f6592000 {
974			compatible = "arm,coresight-cpu-debug","arm,primecell";
975			reg = <0 0xf6592000 0 0x1000>;
976			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
977			clock-names = "apb_pclk";
978			cpu = <&cpu1>;
979		};
980
981		debug@f6594000 {
982			compatible = "arm,coresight-cpu-debug","arm,primecell";
983			reg = <0 0xf6594000 0 0x1000>;
984			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
985			clock-names = "apb_pclk";
986			cpu = <&cpu2>;
987		};
988
989		debug@f6596000 {
990			compatible = "arm,coresight-cpu-debug","arm,primecell";
991			reg = <0 0xf6596000 0 0x1000>;
992			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
993			clock-names = "apb_pclk";
994			cpu = <&cpu3>;
995		};
996
997		debug@f65d0000 {
998			compatible = "arm,coresight-cpu-debug","arm,primecell";
999			reg = <0 0xf65d0000 0 0x1000>;
1000			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
1001			clock-names = "apb_pclk";
1002			cpu = <&cpu4>;
1003		};
1004
1005		debug@f65d2000 {
1006			compatible = "arm,coresight-cpu-debug","arm,primecell";
1007			reg = <0 0xf65d2000 0 0x1000>;
1008			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
1009			clock-names = "apb_pclk";
1010			cpu = <&cpu5>;
1011		};
1012
1013		debug@f65d4000 {
1014			compatible = "arm,coresight-cpu-debug","arm,primecell";
1015			reg = <0 0xf65d4000 0 0x1000>;
1016			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
1017			clock-names = "apb_pclk";
1018			cpu = <&cpu6>;
1019		};
1020
1021		debug@f65d6000 {
1022			compatible = "arm,coresight-cpu-debug","arm,primecell";
1023			reg = <0 0xf65d6000 0 0x1000>;
1024			clocks = <&sys_ctrl HI6220_DAPB_CLK>;
1025			clock-names = "apb_pclk";
1026			cpu = <&cpu7>;
1027		};
1028
1029		mali: gpu@f4080000 {
1030			compatible = "hisilicon,hi6220-mali", "arm,mali-450";
1031			reg = <0x0 0xf4080000 0x0 0x00040000>;
1032			interrupt-parent = <&gic>;
1033			interrupts =	<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1034					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1035					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1036					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1037					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1038					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1039					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1040					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1041					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1042					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
1043					<GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>;
1044
1045			interrupt-names = "gp",
1046					  "gpmmu",
1047					  "pp",
1048					  "pp0",
1049					  "ppmmu0",
1050					  "pp1",
1051					  "ppmmu1",
1052					  "pp2",
1053					  "ppmmu2",
1054					  "pp3",
1055					  "ppmmu3";
1056			clocks = <&media_ctrl HI6220_G3D_CLK>,
1057				 <&media_ctrl HI6220_G3D_PCLK>;
1058			clock-names = "bus", "core";
1059			assigned-clocks = <&media_ctrl HI6220_G3D_CLK>,
1060					  <&media_ctrl HI6220_G3D_PCLK>;
1061			assigned-clock-rates = <500000000>, <144000000>;
1062			reset-names = "ao_g3d", "media_g3d";
1063			resets = <&ao_ctrl AO_G3D>, <&media_ctrl MEDIA_G3D>;
1064		};
1065	};
1066};
1067
1068#include "hi6220-coresight.dtsi"
1069