Boot Linux faster!

Check our new training course

Boot Linux faster!

Check our new training course
and Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

  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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
/*
 * Copyright (c) 2019 Vestas Wind Systems A/S
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <arm/armv7-m.dtsi>
#include <dt-bindings/clock/kinetis_pcc.h>
#include <dt-bindings/clock/kinetis_scg.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/i2c/i2c.h>

/ {
	aliases {
		watchdog0 = &wdog;
		uart-0 = &lpuart0;
		uart-1 = &lpuart1;
		uart-2 = &lpuart2;
		i2c-0 = &lpi2c0;
		i2c-1 = &lpi2c1;
		spi-0 = &lpspi0;
		spi-1 = &lpspi1;
		pinmux-a = &porta;
		pinmux-b = &portb;
		pinmux-c = &portc;
		pinmux-d = &portd;
		pinmux-e = &porte;
		gpio-a = &gpioa;
		gpio-b = &gpiob;
		gpio-c = &gpioc;
		gpio-d = &gpiod;
		gpio-e = &gpioe;
		adc-0 = &adc0;
		adc-1 = &adc1;
		adc-2 = &adc2;
	};

	chosen {
		zephyr,flash-controller = &ftfe;
	};

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

		cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-m4f";
			reg = <0>;
		};
	};

	temp0: temp0 {
		compatible = "nxp,kinetis-temperature";
		io-channels = <&adc0 26>, <&adc0 27>;
		io-channel-names = "SENSOR", "BANDGAP";
		bandgap-voltage = <1000000>;
		vtemp25 = <740500>;
		sensor-slope-cold = <1564>;
		sensor-slope-hot = <1564>;
		label = "TEMP0";
		status = "disabled";
	};

	temp1: temp1 {
		compatible = "nxp,kinetis-temperature";
		io-channels = <&adc1 26>, <&adc1 27>;
		io-channel-names = "SENSOR", "BANDGAP";
		bandgap-voltage = <1000000>;
		vtemp25 = <740500>;
		sensor-slope-cold = <1564>;
		sensor-slope-hot = <1564>;
		label = "TEMP1";
		status = "disabled";
	};

	temp2: temp2 {
		compatible = "nxp,kinetis-temperature";
		io-channels = <&adc2 26>, <&adc2 27>;
		io-channel-names = "SENSOR", "BANDGAP";
		bandgap-voltage = <1000000>;
		vtemp25 = <740500>;
		sensor-slope-cold = <1564>;
		sensor-slope-hot = <1564>;
		label = "TEMP2";
		status = "disabled";
	};

	soc {
		mpu: mpu@4000d000 {
			compatible = "nxp,kinetis-mpu";
			reg = <0x4000d000 0x1000>;
			status = "disabled";
		};

		sim: sim@40048000 {
			compatible = "nxp,kinetis-ke1xf-sim";
			reg = <0x40048000 0x1000>;
			label = "SIM";
		};

		scg: scg@40064000 {
			compatible = "nxp,kinetis-scg";
			reg = <0x40064000 0x1000>;
			label = "SCG";
			#clock-cells = <1>;
		};

		pmc: pmc@4007d000 {
			reg = <0x4007d000 0x1000>;
			label = "PMC";

			lpo: lpo128k {
			/* LPO clock */
				compatible = "fixed-clock";
				clock-frequency = <128000>;
				#clock-cells = <0>;
			};
		};

		pcc: pcc@40065000 {
			compatible = "nxp,kinetis-pcc";
			reg = <0x40065000 0x1000>;
			label = "PCC";
			#clock-cells = <2>;
		};

		rtc: rtc@4003d000 {
			compatible = "nxp,kinetis-rtc";
			reg = <0x4003d000 0x1000>;
			interrupts = <46 0>, <47 0>;
			interrupt-names = "alarm", "seconds";
			clock-frequency = <32768>;
			prescaler = <32768>;
			label = "RTC_0";
		};

		dac0: dac@4003f000 {
			compatible = "nxp,kinetis-dac32";
			reg = <0x4003f000 0x1000>;
			interrupts = <56 0>;
			clocks = <&scg KINETIS_SCG_BUS_CLK>;
			voltage-reference = <1>;
			buffered;
			label = "DAC_0";
			status = "disabled";
			#io-channel-cells = <1>;
		};

		lptmr0: lptmr@40040000 {
			compatible = "nxp,kinetis-lptmr";
			reg = <0x40040000 0x1000>;
			interrupts = <58 0>;
			clock-frequency = <128000>;
			prescaler = <1>;
			clk-source = <1>;
			label = "LPTMR_0";
		};

		wdog: watchdog@40052000 {
			compatible = "nxp,kinetis-wdog32";
			reg = <0x40052000 0x1000>;
			interrupts = <22 0>;
			clocks = <&lpo>;
			clk-source = <1>;
			clk-divider = <256>;
			label = "WDT_0";
		};

		ftfe: flash-controller@40020000 {
			compatible = "nxp,kinetis-ftfe";
			label = "FLASH_CTRL";
			reg = <0x40020000 0x1000>;
			interrupts = <18 0>, <19 0>;
			interrupt-names = "command-complete", "read-collision";

			#address-cells = <1>;
			#size-cells = <1>;
		};

		lpuart0: uart@4006a000 {
			compatible = "nxp,kinetis-lpuart";
			reg = <0x4006a000 0x1000>;
			interrupts = <31 0>, <32 0>;
			interrupt-names = "transmit", "receive";
			clocks = <&pcc 0x1a8 KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "UART_0";
			status = "disabled";
		};

		lpuart1: uart@4006b000 {
			compatible = "nxp,kinetis-lpuart";
			reg = <0x4006b000 0x1000>;
			interrupts = <33 0>, <34 0>;
			interrupt-names = "transmit", "receive";
			clocks = <&pcc 0x1ac KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "UART_1";
			status = "disabled";
		};

		lpuart2: uart@4006c000 {
			compatible = "nxp,kinetis-lpuart";
			reg = <0x4006c000 0x1000>;
			interrupts = <35 0>, <36 0>;
			interrupt-names = "transmit", "receive";
			clocks = <&pcc 0x1b0 KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "UART_2";
			status = "disabled";
		};

		lpi2c0: i2c@40066000 {
			compatible = "nxp,imx-lpi2c";
			clock-frequency = <I2C_BITRATE_STANDARD>;
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x40066000 0x1000>;
			interrupts = <24 0>;
			clocks = <&pcc 0x198 KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "I2C_0";
			status = "disabled";
		};

		lpi2c1: i2c@40067000 {
			compatible = "nxp,imx-lpi2c";
			clock-frequency = <I2C_BITRATE_STANDARD>;
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x40067000 0x1000>;
			interrupts = <25 0>;
			clocks = <&pcc 0x19c KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "I2C_1";
			status = "disabled";
		};

		lpspi0: spi@4002c000 {
			compatible = "nxp,imx-lpspi";
			reg = <0x4002c000 0x1000>;
			interrupts = <26 0>;
			clocks = <&pcc 0xb0 KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "SPI_0";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		lpspi1: spi@4002d000 {
			compatible = "nxp,imx-lpspi";
			reg = <0x4002d000 0x1000>;
			interrupts = <27 0>;
			clocks = <&pcc 0xb4 KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "SPI_1";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		flexcan0: can@40024000 {
			compatible = "nxp,kinetis-flexcan";
			reg = <0x40024000 0x1000>;
			interrupts = <78 0>, <79 0>, <80 0>, <81 0>;
			interrupt-names = "warning", "error", "wake-up",
					  "mb-0-15";
			clocks = <&scg KINETIS_SCG_BUS_CLK>;
			clk-source = <1>;
			label = "CAN_0";
			sjw = <1>;
			prop-seg = <1>;
			phase-seg1 = <3>;
			phase-seg2 = <2>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		flexcan1: can@40025000 {
			compatible = "nxp,kinetis-flexcan";
			reg = <0x40025000 0x1000>;
			interrupts = <85 0>, <86 0>, <87 0>, <88 0>;
			interrupt-names = "warning", "error", "wake-up",
					  "mb-0-15";
			clocks = <&scg KINETIS_SCG_BUS_CLK>;
			clk-source = <1>;
			label = "CAN_1";
			sjw = <1>;
			prop-seg = <1>;
			phase-seg1 = <3>;
			phase-seg2 = <2>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		porta: pinmux@40049000 {
			compatible = "nxp,kinetis-pinmux";
			reg = <0x40049000 0x1000>;
			clocks = <&pcc 0x124 KINETIS_PCC_SRC_NONE_OR_EXT>;
		};

		portb: pinmux@4004a000 {
			compatible = "nxp,kinetis-pinmux";
			reg = <0x4004a000 0x1000>;
			clocks = <&pcc 0x128 KINETIS_PCC_SRC_NONE_OR_EXT>;
		};

		portc: pinmux@4004b000 {
			compatible = "nxp,kinetis-pinmux";
			reg = <0x4004b000 0x1000>;
			clocks = <&pcc 0x12c KINETIS_PCC_SRC_NONE_OR_EXT>;
		};

		portd: pinmux@4004c000 {
			compatible = "nxp,kinetis-pinmux";
			reg = <0x4004c000 0x1000>;
			clocks = <&pcc 0x130 KINETIS_PCC_SRC_NONE_OR_EXT>;
		};

		porte: pinmux@4004d000 {
			compatible = "nxp,kinetis-pinmux";
			reg = <0x4004d000 0x1000>;
			clocks = <&pcc 0x134 KINETIS_PCC_SRC_NONE_OR_EXT>;
		};

		gpioa: gpio@400ff000 {
			compatible = "nxp,kinetis-gpio";
			status = "disabled";
			reg = <0x400ff000 0x40>;
			interrupts = <59 2>;
			label = "GPIO_0";
			gpio-controller;
			#gpio-cells = <2>;
			nxp,kinetis-port = <&porta>;
		};

		gpiob: gpio@400ff040 {
			compatible = "nxp,kinetis-gpio";
			status = "disabled";
			reg = <0x400ff040 0x40>;
			interrupts = <60 2>;
			label = "GPIO_1";
			gpio-controller;
			#gpio-cells = <2>;
			nxp,kinetis-port = <&portb>;
		};

		gpioc: gpio@400ff080 {
			compatible = "nxp,kinetis-gpio";
			status = "disabled";
			reg = <0x400ff080 0x40>;
			interrupts = <61 2>;
			label = "GPIO_2";
			gpio-controller;
			#gpio-cells = <2>;
			nxp,kinetis-port = <&portc>;
		};

		gpiod: gpio@400ff0c0 {
			compatible = "nxp,kinetis-gpio";
			status = "disabled";
			reg = <0x400ff0c0 0x40>;
			interrupts = <62 2>;
			label = "GPIO_3";
			gpio-controller;
			#gpio-cells = <2>;
			nxp,kinetis-port = <&portd>;
		};

		gpioe: gpio@400ff100 {
			compatible = "nxp,kinetis-gpio";
			status = "disabled";
			reg = <0x400ff100 0x40>;
			interrupts = <63 2>;
			label = "GPIO_4";
			gpio-controller;
			#gpio-cells = <2>;
			nxp,kinetis-port = <&porte>;
		};

		adc0: adc@4003b000 {
			compatible = "nxp,kinetis-adc12";
			reg = <0x4003b000 0x1000>;
			interrupts = <39 0>;
			clocks = <&pcc 0xec KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "ADC_0";
			clk-source = <0>;
			clk-divider = <1>;
			status = "disabled";
			#io-channel-cells = <1>;
		};

		adc1: adc@40027000 {
			compatible = "nxp,kinetis-adc12";
			reg = <0x40027000 0x1000>;
			interrupts = <73 0>;
			clocks = <&pcc 0x9c KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "ADC_1";
			clk-source = <0>;
			clk-divider = <1>;
			status = "disabled";
			#io-channel-cells = <1>;
		};

		adc2: adc@4003c000 {
			compatible = "nxp,kinetis-adc12";
			reg = <0x4003c000 0x1000>;
			interrupts = <74 0>;
			clocks = <&pcc 0xf0 KINETIS_PCC_SRC_FIRC_ASYNC>;
			label = "ADC_2";
			clk-source = <0>;
			clk-divider = <1>;
			status = "disabled";
			#io-channel-cells = <1>;
		};

		ftm0: ftm@40038000 {
			compatible = "nxp,kinetis-ftm";
			reg = <0x40038000 0x1000>;
			interrupts = <42 0>;
			clocks = <&pcc 0xe0 KINETIS_PCC_SRC_FIRC_ASYNC>;
			prescaler = <16>;
			label = "FTM_0";
			status = "disabled";
		};

		ftm1: ftm@40039000 {
			compatible = "nxp,kinetis-ftm";
			reg = <0x40039000 0x1000>;
			interrupts = <43 0>;
			clocks = <&pcc 0xe4 KINETIS_PCC_SRC_FIRC_ASYNC>;
			prescaler = <16>;
			label = "FTM_1";
			status = "disabled";
		};

		ftm2: ftm@4003a000 {
			compatible = "nxp,kinetis-ftm";
			reg = <0x4003a000 0x1000>;
			interrupts = <44 0>;
			clocks = <&pcc 0xe8 KINETIS_PCC_SRC_FIRC_ASYNC>;
			prescaler = <16>;
			label = "FTM_2";
			status = "disabled";
		};

		ftm3: ftm@40026000 {
			compatible = "nxp,kinetis-ftm";
			reg = <0x40026000 0x1000>;
			interrupts = <71 0>;
			clocks = <&pcc 0x98 KINETIS_PCC_SRC_FIRC_ASYNC>;
			prescaler = <16>;
			label = "FTM_3";
			status = "disabled";
		};
	};
};

&nvic {
	arm,num-irq-priority-bits = <4>;
};