summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/hi3716.dtsi
blob: 5eea43c055f5b8a29628719528a4fbd88d4194b2 (plain)
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
/*
 * Copyright (c) 2013 Linaro Ltd.
 * Copyright (c) 2013 Hisilicon Limited.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * publishhed by the Free Software Foundation.
 */

/include/ "skeleton.dtsi"

/ {
	aliases {
		serial0 = &uart0;
	};

	gic: interrupt-controller@fc001000 {
		compatible = "arm,cortex-a9-gic";
		#interrupt-cells = <3>;
		#address-cells = <0>;
		interrupt-controller;
		/* gic dist base, gic cpu base */
		reg = <0xf8a01000 0x1000>, <0xf8a00100 0x100>;
	};

	soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		device_type = "soc";
		interrupt-parent = <&gic>;
		ranges;

		amba {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "arm,amba-bus";
			ranges;

			timer0: timer@f8002000 {
				compatible = "arm,sp804", "arm,primecell";
				reg = <0xf8002000 0x1000>;
				/* timer00 & timer01 */
				interrupts = <0 24 4>;
				clocks = <&osc24m>;
				status = "disabled";
			};

			timer1: timer@f8a29000 {
				/*
				 * Only used in NORMAL state, not available ins
				 * SLOW or DOZE state.
				 * The rate is fixed in 24MHz.
				 */
				compatible = "arm,sp804", "arm,primecell";
				reg = <0xf8a29000 0x1000>;
				/* timer10 & timer11 */
				interrupts = <0 25 4>;
				clocks = <&osc24m>;
				status = "disabled";
			};

			timer2: timer@f8a2a000 {
				compatible = "arm,sp804", "arm,primecell";
				reg = <0xf8a2a000 0x1000>;
				/* timer20 & timer21 */
				interrupts = <0 26 4>;
				clocks = <&osc24m>;
				status = "disabled";
			};

			timer3: timer@f8a2b000 {
				compatible = "arm,sp804", "arm,primecell";
				reg = <0xf8a2b000 0x1000>;
				/* timer30 & timer31 */
				interrupts = <0 27 4>;
				clocks = <&osc24m>;
				status = "disabled";
			};

			timer4: timer@f8a81000 {
				compatible = "arm,sp804", "arm,primecell";
				reg = <0xf8a81000 0x1000>;
				/* timer30 & timer31 */
				interrupts = <0 28 4>;
				clocks = <&osc24m>;
				status = "disabled";
			};

			uart0: uart@f8b00000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xf8b00000 0x1000>;
				interrupts = <0 49 4>;
				clocks = <&bpll_fout0_div 1>;
				clock-names = "apb_pclk";
				status = "disabled";
			};

			uart1: uart@f8006000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xf8006000 0x1000>;
				interrupts = <0 50 4>;
				clocks = <&bpll_fout0_div 1>;
				clock-names = "apb_pclk";
				status = "disabled";
			};

			uart2: uart@f8b02000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xf8b02000 0x1000>;
				interrupts = <0 51 4>;
				clocks = <&bpll_fout0_div 1>;
				clock-names = "apb_pclk";
				status = "disabled";
			};

			uart3: uart@f8b03000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xf8b03000 0x1000>;
				interrupts = <0 52 4>;
				clocks = <&bpll_fout0_div 1>;
				clock-names = "apb_pclk";
				status = "disabled";
			};

			uart4: uart@f8b04000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xf8b04000 0x1000>;
				interrupts = <0 53 4>;
				clocks = <&bpll_fout0_div 1>;
				clock-names = "apb_pclk";
				status = "disabled";
			};
		};

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

			osc24m: osc {
				compatible = "fixed-clock";
				#clock-cells = <0>;
				clock-frequency = <24000000>;
				clock-output-names = "osc24mhz";
			};

			bpll: bpll {
				compatible = "hisilicon,hi3716-fixed-pll";
				#clock-cells = <1>;
				clocks = <&osc24m>;
				clock-frequency = <1200000000>,
						  <600000000>,
						  <300000000>,
						  <200000000>,
						  <150000000>;
				clock-output-names = "bpll_fout0",
						     "bpll_fout1",
						     "bpll_fout2",
						     "bpll_fout3",
						     "bpll_fout4";
			};

			bpll_fout0_div: bpll_fout0_div {/* 1200Mhz */
				compatible = "hisilicon,hi3716-fixed-divider";
				#clock-cells = <1>;
				clocks = <&bpll 0>;
				div-table = <3 14 25 50>;
				clock-output-names = "fout0_400m", "fout0_86m",
							"fout0_48m", "fout0_24m";
			};

			bpll_fout1_div: bpll_fout1_div {
				compatible = "hisilicon,hi3716-fixed-divider";
				#clock-cells = <0>;
				clocks = <&bpll 1>;
				div-table = <10>;
				clock-output-names = "fout1_60m";
			};

			bpll_fout2_div: bpll_fout2_div {
				compatible = "hisilicon,hi3716-fixed-divider";
				#clock-cells = <0>;
				clocks = <&bpll 2>;
				div-table = <4>;
				clock-output-names = "fout2_75m";
			};

			bpll_fout3_div: bpll_fout3_div {
				compatible = "hisilicon,hi3716-fixed-divider";
				#clock-cells = <1>;
				clocks = <&bpll 3>;
				div-table = <2 4 5 8>;
				clock-output-names = "fout3_100m", "fout3_50m",
							"fout3_40m", "fout3_25m";
			};

			clk_sfc_mux: clk_sfc_mux {
				compatible = "hisilicon,hi3716-clk-mux";
				#clock-cells = <0>;
				/* clks: 24M 75M 100M 150M 200M */
				clocks = <&osc24m>, <&bpll_fout2_div>,
				       <&bpll_fout3_div 0>, <&bpll 4>, <&bpll 3>;

				/* offset mux_shift mux_width */
				mux-reg = <0x5c 8 3>;
				/* mux reg value to choose clks */
				mux-table = <0 7 6 4 5>;

				clock-output-names = "sfc_mux";
			};

			clk_sfc: clk_sfc {
				compatible = "hisilicon,hi3716-clk-gate";
				#clock-cells = <0>;
				clocks = <&clk_sfc_mux>;

				/* offset, enable, reset */
				gate-reg = <0x5c 0 4>;

				clock-output-names = "sfc";
			};
		};

		local_timer@f8a00600 {
			compatible = "arm,cortex-a9-twd-timer";
			reg = <0xf8a00600 0x20>;
			interrupts = <1 13 0xf01>;
		};

		l2: l2-cache {
			compatible = "arm,pl310-cache";
			reg = <0xf8a10000 0x100000>;
			interrupts = <0 15 4>;
			cache-unified;
			cache-level = <2>;
			hisilicon,l2cache-aux = <0x00050000 0xfff0ffff>;
		};

		sctrl@f8000000 {
			compatible = "hisilicon,sctrl";
			reg = <0xf8000000 0x1000>;
			smp_reg = <0xc0>;
			reboot_reg = <0x4>;
		};

		clkbase@f8a22000 {
			compatible = "hisilicon,clkbase";
			reg = <0xf8a22000 0x1000>;
		};

		cpuctrl@f8a22000 {
			compatible = "hisilicon,cpuctrl";
			reg = <0xf8a22000 0x2000>;
		};
	};
};