summaryrefslogtreecommitdiffstats
path: root/sys/boot/fdt/dts/arm/annapurna-alpine.dts
blob: 100d2d046feb733020d215c5a11a3c37b1dff85a (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
/*-
 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com>
 * Copyright (c) 2015 Semihalf
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * $FreeBSD$
 */

/dts-v1/;

/ {
	model = "annapurna,alpine";
	#address-cells = <1>;
	#size-cells = <1>;

	aliases {
		serial0 = &serial0;
	};

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

		cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a15";
			reg = <0x0>;
			d-cache-line-size = <64>;	// 64 bytes
			i-cache-line-size = <64>;	// 64 bytes
			d-cache-size = <0x8000>;	// L1, 32K
			i-cache-size = <0x8000>;	// L1, 32K
			timebase-frequency = <0>;
			bus-frequency = <375000000>;
			clock-frequency = <0>;
		};

		cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a15";
			reg = <0x0>;
			d-cache-line-size = <64>;	// 64 bytes
			i-cache-line-size = <64>;	// 64 bytes
			d-cache-size = <0x8000>;	// L1, 32K
			i-cache-size = <0x8000>;	// L1, 32K
			timebase-frequency = <0>;
			bus-frequency = <375000000>;
			clock-frequency = <0>;
		};

		cpu@2 {
			device_type = "cpu";
			compatible = "arm,cortex-a15";
			reg = <0x0>;
			d-cache-line-size = <64>;	// 64 bytes
			i-cache-line-size = <64>;	// 64 bytes
			d-cache-size = <0x8000>;	// L1, 32K
			i-cache-size = <0x8000>;	// L1, 32K
			timebase-frequency = <0>;
			bus-frequency = <375000000>;
			clock-frequency = <0>;
		};

		cpu@3 {
			device_type = "cpu";
			compatible = "arm,cortex-a15";
			reg = <0x0>;
			d-cache-line-size = <64>;	// 64 bytes
			i-cache-line-size = <64>;	// 64 bytes
			d-cache-size = <0x8000>;	// L1, 32K
			i-cache-size = <0x8000>;	// L1, 32K
			timebase-frequency = <0>;
			bus-frequency = <375000000>;
			clock-frequency = <0>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x00100000 0x7ff00000>;	// 2047MB at 1MB
	};

	soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges = <0x0 0xfb000000 0x03000000>;
		bus-frequency = <0>;

		MPIC: interrupt-controller {
			compatible = "arm,gic";
			reg =	< 0x1000 0x1000 >,	/* Distributor Registers */
				< 0x2000 0x2000 >;	/* CPU Interface Registers */
			interrupt-controller;
			#address-cells = <0>;
			#interrupt-cells = <3>;

		// In intr[2], bits[3:0] are trigger type and level flags.
		//   1 = low-to-high edge triggered
		//   2 = high-to-low edge triggered
		//   4 = active high level-sensitive
		//   8 = active low level-sensitive
		// The hardware only supports active-high-level or rising-edge.

		};

		generic_timer {
			compatible = "arm,sp804";
			reg = <0x02890000 0x1000>;
			interrupts = <0 9 4>;
			interrupt-parent = <&MPIC>;
			clock-frequency = <375000000>;
		};

		cpu_resume {
			compatible = "annapurna-labs,al-cpu-resume";
			reg = <0x00ff5ec0 0x30>;
		};

		nb_service {
			compatible = "annapurna-labs,al-nb-service";
			reg = <0x00070000 0x10000>;
			interrupts =	<0 32 4>,
					<0 33 4>,
					<0 34 4>,
					<0 35 4>;
			interrupt-parent = <&MPIC>;
		};

		wdt0 {
			compatible = "arm,sp805", "arm,primecell";
			reg = <0x288c000 0x1000>;
			interrupt-parent = <&MPIC>;
		};

		serial0: serial@2883000 {
			compatible = "ns16550";
			reg = <0x2883000 0x20>;
			reg-shift = <2>;
			current-speed = <115200>;
			clock-frequency = <375000000>;
			interrupts = <0 17 4>;
			interrupt-parent = <&MPIC>;
		};
	};

	pcie-internal {
		compatible = "annapurna-labs,al-internal-pcie";
		device_type = "pci";
		#size-cells = <2>;
		#address-cells = <3>;
		interrupt-parent = <&MPIC>;
		interrupt-map-mask = <0xf800 0 0 7>;
		interrupt-map = <0x3000 0 0 1 &MPIC 0 32 4>, // USB adapter
				<0x3800 0 0 1 &MPIC 0 36 4>,
				<0x4000 0 0 1 &MPIC 0 43 4>, // SATA 0 (PCIe expander)
				<0x4800 0 0 1 &MPIC 0 44 1>; // SATA 1 (onboard)

		// ranges:
		// - ECAM - non prefetchable config space
		// - 32 bit non prefetchable memory space
		ranges = <0x00000000 0x0 0xfbc00000 0xfbc00000 0x0 0x100000
			  0x02000000 0x0 0xfe000000 0xfe000000 0x0 0x1000000>;

		bus-range = <0x00 0x00>;
	};

// WORKAROUND: enabling PCIe controller when no card is plugged in
// leads to kernel panic because u-boot disables PCIe controller if no link
// is detected. Just be kind and compatible with Linux
/*	// External PCIe Controller 0
	pcie-external0 {
		compatible = "annapurna-labs,al-external-pcie";
		reg = <0xfd800000 0x00020000>;
		device_type = "pci";
		#size-cells = <2>;
		#address-cells = <3>;
		interrupt-parent = <&MPIC>;
		interrupt-map-mask = <0x00 0 0 7>;
		interrupt-map = <0x0000 0 0 1 &MPIC 0 40 4>;

		// ranges:
		// Controller 0:
		// - ECAM - non prefetchable config space: 2MB
		// - IO - IO port space 64KB, reserve 64KB from target memory windows
		//   real IO address on the pci bus starts at 0x10000
		// - 32 bit non prefetchable memory space: 128MB - 64KB

		ranges = <0x00000000 0x0 0xfb600000 0xfb600000 0x0 0x00200000
			0x01000000 0x0 0x00010000 0xe0000000 0x0 0x00010000
			0x02000000 0x0 0xe1000000 0xe1000000 0x0 0x06f00000>;

		bus-range = <0x00 0xff>;
	};

	// External PCIe Controllers 1
	pcie-external1 {
		compatible = "annapurna-labs,al-external-pcie";
		reg = <0xfd820000 0x00020000>;
		device_type = "pci";
		#size-cells = <2>;
		#address-cells = <3>;
		interrupt-parent = <&MPIC>;
		interrupt-map-mask = <0x0 0 0 7>;
		interrupt-map = <0x0000 0 0 1 &MPIC 0 41 4>;

		// ranges:
		// - ECAM - non prefetchable config space: 2MB
		// - IO - IO port space 64KB, reserve 64KB from target memory windows
		//   real IO address on the pci bus starts at 0x20000
		// - 32 bit non prefetchable memory space: 64MB - 64KB
		ranges = <0x00000000 0x0 0xfb800000 0xfb800000 0x0 0x00200000
			  0x01000000 0x0 0x00020000 0xe8000000 0x0 0x00010000
			  0x02000000 0x0 0xe8100000 0xe8100000 0x0 0x02ff0000>;

		bus-range = <0x00 0xff>;
	}; */

	chosen {
		stdin = "serial0";
		stdout = "serial0";
		stddbg = "serial0";
	};
};
OpenPOWER on IntegriCloud