summaryrefslogtreecommitdiffstats
path: root/kernel/arch/powerpc/boot/dts/ac14xx.dts
blob: a1b883730b3169d8171c06c4fdc2d50cfe874b41 (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
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
/*
 * Device Tree Source for the MPC5121e based ac14xx board
 *
 * Copyright 2012 Anatolij Gustschin <agust@denx.de>
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */


#include <mpc5121.dtsi>

/ {
	model = "ac14xx";
	compatible = "ifm,ac14xx", "fsl,mpc5121";
	#address-cells = <1>;
	#size-cells = <1>;

	aliases {
		serial0 = &serial0;
		serial1 = &serial7;
		spi4 = &spi4;
		spi5 = &spi5;
	};

	cpus {
		PowerPC,5121@0 {
			timebase-frequency = <40000000>;	/*  40 MHz (csb/4) */
			bus-frequency = <160000000>;		/* 160 MHz csb bus */
			clock-frequency = <400000000>;		/* 400 MHz ppc core */
		};
	};

	memory {
		reg = <0x00000000 0x10000000>;			/* 256MB at 0 */
	};

	nfc@40000000 {
		status = "disabled";
	};

	localbus@80000020 {
		ranges = <0x0 0x0 0xfc000000 0x04000000	/* CS0: NOR flash */
			  0x1 0x0 0xe0000000 0x00010000 /* CS1: FRAM */
			  0x2 0x0 0xe0100000 0x00080000 /* CS2: asi1 */
			  0x3 0x0 0xe0300000 0x00020000 /* CS3: comm */
			  0x5 0x0 0xe0400000 0x00010000 /* CS5: safety */
			  0x6 0x0 0xe0200000 0x00080000>; /* CS6: asi2 */

		flash@0,0 {
			compatible = "cfi-flash";
			reg = <0 0x00000000 0x04000000>;
			#address-cells = <1>;
			#size-cells = <1>;
			bank-width = <2>;
			device-width = <2>;

			partition@0 {
				label = "dtb-kernel-production";
				reg = <0x00000000 0x00400000>;
			};
			partition@1 {
				label = "filesystem-production";
				reg = <0x00400000 0x03400000>;
			};

			partition@2 {
				label = "recovery";
				reg = <0x03800000 0x00700000>;
			};

			partition@3 {
				label = "uboot-code";
				reg = <0x03f00000 0x00040000>;
			};
			partition@4 {
				label = "uboot-env1";
				reg = <0x03f40000 0x00020000>;
			};
			partition@5 {
				label = "uboot-env2";
				reg = <0x03f60000 0x00020000>;
			};
		};

		fram@1,0 {
			compatible = "ifm,ac14xx-fram", "linux,uio-pdrv-genirq";
			reg = <1 0x00000000 0x00010000>;
		};

		asi@2,0 {
			/* masters mapping: CS, CS offset, size */
			reg = <2 0x00000000 0x00080000
			       6 0x00000000 0x00080000>;
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "ifm,ac14xx-asi-fpga";
			gpios = <
				&gpio_pic 26 0	/* prog */
				&gpio_pic 27 0	/* done */
				&gpio_pic 10 0	/* reset */
				>;

			master@1 {
				interrupts = <20 0x2>;
				interrupt-parent = <&gpio_pic>;
				chipselect = <2 0x00009000 0x00009100>;
				label = "AS-i master 1";
			};

			master@2 {
				interrupts = <21 0x2>;
				interrupt-parent = <&gpio_pic>;
				chipselect = <6 0x00009000 0x00009100>;
				label = "AS-i master 2";
			};
		};

		netx@3,0 {
			compatible = "ifm,netx";
			reg = <0x3 0x00000000 0x00020000>;
			chipselect = <3 0x00101140 0x00203100>;
			interrupts = <17 0x8>;
			gpios = <&gpio_pic 15 0>;
		};

		safety@5,0 {
			compatible = "ifm,safety";
			reg = <0x5 0x00000000 0x00010000>;
			chipselect = <5 0x00009000 0x00009100>;
			interrupts = <22 0x2>;
			interrupt-parent = <&gpio_pic>;
			gpios = <
				&gpio_pic 12 0	/* prog */
				&gpio_pic 11 0	/* done */
				>;
		};
	};

	clocks {
		osc {
			clock-frequency = <25000000>;
		};
	};

	soc@80000000 {
		bus-frequency = <80000000>;	/* 80 MHz ips bus */

		clock@f00 {
			compatible = "fsl,mpc5121rev2-clock", "fsl,mpc5121-clock";
		};

		/*
		 * GPIO PIC:
		 * interrupts cell = <pin nr, sense>
		 * sense == 8: Level, low assertion
		 * sense == 2: Edge, high-to-low change
		 */
		gpio_pic: gpio@1100 {
			gpio-controller;
			#gpio-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
		};

		sdhc@1500 {
			cd-gpios = <&gpio_pic 23 0>;	/* card detect */
			wp-gpios = <&gpio_pic 24 0>;	/* write protect */
			wp-inverted;			/* WP active high */
		};

		i2c@1700 {
			/* use Fast-mode */
			clock-frequency = <400000>;

			at24@30 {
				compatible = "at24,24c01";
				reg = <0x30>;
			};

			at24@31 {
				compatible = "at24,24c01";
				reg = <0x31>;
			};

			temp@48 {
				compatible = "ad,ad7414";
				reg = <0x48>;
			};

			at24@50 {
				compatible = "at24,24c01";
				reg = <0x50>;
			};

			at24@51 {
				compatible = "at24,24c01";
				reg = <0x51>;
			};

			at24@52 {
				compatible = "at24,24c01";
				reg = <0x52>;
			};

			at24@53 {
				compatible = "at24,24c01";
				reg = <0x53>;
			};

			at24@54 {
				compatible = "at24,24c01";
				reg = <0x54>;
			};

			at24@55 {
				compatible = "at24,24c01";
				reg = <0x55>;
			};

			at24@56 {
				compatible = "at24,24c01";
				reg = <0x56>;
			};

			at24@57 {
				compatible = "at24,24c01";
				reg = <0x57>;
			};

			rtc@68 {
				compatible = "stm,m41t00";
				reg = <0x68>;
			};
		};

		axe_pic: axe-base@2000 {
			compatible = "fsl,mpc5121-axe-base";
			reg = <0x2000 0x100>;
			interrupts = <42 0x8>;
			interrupt-controller;
			#interrupt-cells = <2>;
		};

		axe-app {
			compatible = "fsl,mpc5121-axe-app";
			interrupt-parent = <&axe_pic>;
			interrupts = <
					/* soft interrupts */
					0 0x0	1 0x0	2 0x0	3 0x0
					4 0x0	5 0x0	6 0x0	7 0x0
					/* fifo interrupts */
					8 0x0	9 0x0	10 0x0	11 0x0
				>;
		};

		display@2100 {
			edid = [00 FF FF FF FF FF FF 00 14 94 00 00 00 00 00 00
				0A 12 01 03 80 1C 23 78 CA 88 FF 94 52 54 8E 27
				1E 4C 50 00 00 00 01 01 01 01 01 01 01 01 01 01
				01 01 01 01 01 01 FB 00 B0 14 00 DC 05 00 08 04
				21 00 1C 23 00 00 00 18 00 00 00 FD 00 38 3C 1F
				3C 01 0A 20 20 20 20 20 20 20 00 00 00 FC 00 45
				54 30 31 38 30 30 33 44 4D 55 0A 0A 00 00 00 10
				00 41 30 30 30 30 30 30 30 30 30 30 30 31 00 D5];
		};

		can@2300 {
			status = "disabled";
		};

		can@2380 {
			status = "disabled";
		};

		viu@2400 {
			status = "disabled";
		};

		mdio@2800 {
			phy0: ethernet-phy@1f {
				compatible = "smsc,lan8700";
				reg = <0x1f>;
			};
		};

		enet: ethernet@2800 {
			phy-handle = <&phy0>;
		};

		usb@3000 {
			status = "disabled";
		};

		usb@4000 {
			status = "disabled";
		};

		/* PSC3 serial port A, aka ttyPSC0 */
		serial0: psc@11300 {
			compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
			fsl,rx-fifo-size = <512>;
			fsl,tx-fifo-size = <512>;
		};

		/* PSC4 in SPI mode */
		spi4: psc@11400 {
			compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc";
			fsl,rx-fifo-size = <768>;
			fsl,tx-fifo-size = <768>;
			#address-cells = <1>;
			#size-cells = <0>;
			num-cs = <1>;
			cs-gpios = <&gpio_pic 25 0>;

			flash: m25p128@0 {
				compatible = "st,m25p128";
				spi-max-frequency = <20000000>;
				reg = <0>;
				#address-cells = <1>;
				#size-cells = <1>;

				partition@0 {
					label = "spi-flash0";
					reg = <0x00000000 0x01000000>;
				};
			};
		};

		/* PSC5 in SPI mode */
		spi5: psc@11500 {
			compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc";
			fsl,mode = "spi-master";
			fsl,rx-fifo-size = <128>;
			fsl,tx-fifo-size = <128>;
			#address-cells = <1>;
			#size-cells = <0>;

			lcd@0 {
				compatible = "ilitek,ili922x";
				reg = <0>;
				spi-max-frequency = <100000>;
				spi-cpol;
				spi-cpha;
			};
		};

		/* PSC7 serial port C, aka ttyPSC2 */
		serial7: psc@11700 {
			compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
			fsl,rx-fifo-size = <512>;
			fsl,tx-fifo-size = <512>;
		};

		matrix_keypad@0 {
			compatible = "gpio-matrix-keypad";
			debounce-delay-ms = <5>;
			col-scan-delay-us = <1>;
			gpio-activelow;
			col-gpios-binary;
			col-switch-delay-ms = <200>;

			col-gpios = <&gpio_pic 1 0>;	/* pin1 */

			row-gpios = <&gpio_pic 2 0	/* pin2 */
				     &gpio_pic 3 0	/* pin3 */
				     &gpio_pic 4 0>;	/* pin4 */

			linux,keymap = <0x0000006e	/* FN LEFT */
					0x01000067	/* UP */
					0x02000066	/* FN RIGHT */
					0x00010069	/* LEFT */
					0x0101006a	/* DOWN */
					0x0201006c>;	/* RIGHT */
		};
	};

	leds {
		compatible = "gpio-leds";

		backlight {
			label = "backlight";
			gpios = <&gpio_pic 0 0>;
			default-state = "keep";
		};
		green {
			label = "green";
			gpios = <&gpio_pic 18 0>;
			default-state = "keep";
		};
		red {
			label = "red";
			gpios = <&gpio_pic 19 0>;
			default-state = "keep";
		};
	};
};