1/* 2 * Copyright (c) 2019-2021 Vestas Wind Systems A/S 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <arm/armv7-m.dtsi> 8#include <zephyr/dt-bindings/adc/adc.h> 9#include <zephyr/dt-bindings/clock/kinetis_pcc.h> 10#include <zephyr/dt-bindings/clock/kinetis_scg.h> 11#include <zephyr/dt-bindings/gpio/gpio.h> 12#include <zephyr/dt-bindings/i2c/i2c.h> 13 14/ { 15 aliases { 16 watchdog0 = &wdog; 17 }; 18 19 chosen { 20 zephyr,flash-controller = &ftfe; 21 }; 22 23 cpus { 24 #address-cells = <1>; 25 #size-cells = <0>; 26 27 cpu0: cpu@0 { 28 device_type = "cpu"; 29 compatible = "arm,cortex-m4f"; 30 reg = <0>; 31 cpu-power-states = <&idle &stop &pstop1 &pstop2>; 32 }; 33 34 power-states { 35 idle: idle { 36 compatible = "zephyr,power-state"; 37 power-state-name = "runtime-idle"; 38 }; 39 40 stop: stop { 41 compatible = "zephyr,power-state"; 42 power-state-name = "suspend-to-idle"; 43 substate-id = <0>; 44 }; 45 46 pstop1: pstop1 { 47 compatible = "zephyr,power-state"; 48 power-state-name = "suspend-to-idle"; 49 substate-id = <1>; 50 }; 51 52 pstop2: pstop2 { 53 compatible = "zephyr,power-state"; 54 power-state-name = "suspend-to-idle"; 55 substate-id = <2>; 56 }; 57 }; 58 }; 59 60 temp0: temp0 { 61 compatible = "nxp,kinetis-temperature"; 62 io-channels = <&adc0 26>, <&adc0 27>; 63 io-channel-names = "SENSOR", "BANDGAP"; 64 bandgap-voltage = <1000000>; 65 vtemp25 = <740500>; 66 sensor-slope-cold = <1564>; 67 sensor-slope-hot = <1564>; 68 status = "disabled"; 69 }; 70 71 temp1: temp1 { 72 compatible = "nxp,kinetis-temperature"; 73 io-channels = <&adc1 26>, <&adc1 27>; 74 io-channel-names = "SENSOR", "BANDGAP"; 75 bandgap-voltage = <1000000>; 76 vtemp25 = <740500>; 77 sensor-slope-cold = <1564>; 78 sensor-slope-hot = <1564>; 79 status = "disabled"; 80 }; 81 82 temp2: temp2 { 83 compatible = "nxp,kinetis-temperature"; 84 io-channels = <&adc2 26>, <&adc2 27>; 85 io-channel-names = "SENSOR", "BANDGAP"; 86 bandgap-voltage = <1000000>; 87 vtemp25 = <740500>; 88 sensor-slope-cold = <1564>; 89 sensor-slope-hot = <1564>; 90 status = "disabled"; 91 }; 92 93 /* Dummy pinctrl node, filled with pin mux options at board level */ 94 pinctrl: pinctrl { 95 compatible = "nxp,kinetis-pinctrl"; 96 status = "okay"; 97 }; 98 99 soc { 100 edma: dma-controller@40008000 { 101 compatible = "nxp,mcux-edma"; 102 dma-channels = <16>; 103 dma-requests = <64>; 104 nxp,mem2mem; 105 reg = <0x40008000 0x1000>, <0x40021000 0x1000>; 106 interrupts = <0 0>, <1 0>, <2 0>, <3 0>, 107 <4 0>, <5 0>, <6 0>, <7 0>, 108 <8 0>, <9 0>, <10 0>, <11 0>, 109 <12 0>, <13 0>, <14 0>, <15 0>, 110 <16 0>; 111 status = "disabled"; 112 #dma-cells = <2>; 113 }; 114 115 mpu: mpu@4000d000 { 116 compatible = "nxp,kinetis-mpu"; 117 reg = <0x4000d000 0x1000>; 118 status = "disabled"; 119 }; 120 121 sim: sim@40048000 { 122 compatible = "nxp,kinetis-ke1xf-sim"; 123 reg = <0x40048000 0x1000>; 124 }; 125 126 scg: scg@40064000 { 127 compatible = "nxp,kinetis-scg"; 128 reg = <0x40064000 0x1000>; 129 #clock-cells = <1>; 130 131 sosc_clk: sosc_clk { 132 compatible = "fixed-clock"; 133 status = "disabled"; 134 #clock-cells = <0>; 135 }; 136 137 sirc_clk: sirc_clk { 138 compatible = "fixed-clock"; 139 clock-frequency = <8000000>; 140 #clock-cells = <0>; 141 }; 142 143 firc_clk: firc_clk { 144 compatible = "fixed-clock"; 145 clock-frequency = <48000000>; 146 #clock-cells = <0>; 147 }; 148 149 pll: pll { 150 compatible = "fixed-factor-clock"; 151 clocks = <&sosc_clk>; 152 clock-div = <1>; 153 clock-mult = <16>; 154 #clock-cells = <0>; 155 }; 156 157 spll_clk: spll_clk { 158 compatible = "fixed-factor-clock"; 159 clocks = <&pll>; 160 clock-div = <2>; 161 #clock-cells = <0>; 162 }; 163 164 core_clk: core_clk { 165 compatible = "fixed-factor-clock"; 166 clocks = <&firc_clk>; 167 clock-div = <1>; 168 #clock-cells = <0>; 169 }; 170 171 bus_clk: bus_clk { 172 compatible = "fixed-factor-clock"; 173 clocks = <&core_clk>; 174 clock-div = <1>; 175 #clock-cells = <0>; 176 }; 177 178 slow_clk: slow_clk { 179 compatible = "fixed-factor-clock"; 180 clocks = <&core_clk>; 181 clock-div = <2>; 182 #clock-cells = <0>; 183 }; 184 185 clkout_clk: clkout_clk { 186 compatible = "fixed-factor-clock"; 187 status = "disabled"; 188 clocks = <&firc_clk>; 189 #clock-cells = <0>; 190 }; 191 192 splldiv1_clk: splldiv1_clk { 193 compatible = "fixed-factor-clock"; 194 clocks = <&spll_clk>; 195 clock-div = <0>; 196 #clock-cells = <0>; 197 }; 198 199 splldiv2_clk: splldiv2_clk { 200 compatible = "fixed-factor-clock"; 201 clocks = <&spll_clk>; 202 clock-div = <0>; 203 #clock-cells = <0>; 204 }; 205 206 sircdiv1_clk: sircdiv1_clk { 207 compatible = "fixed-factor-clock"; 208 clocks = <&sirc_clk>; 209 clock-div = <0>; 210 #clock-cells = <0>; 211 }; 212 213 sircdiv2_clk: sircdiv2_clk { 214 compatible = "fixed-factor-clock"; 215 clocks = <&sirc_clk>; 216 clock-div = <0>; 217 #clock-cells = <0>; 218 }; 219 220 fircdiv1_clk: fircdiv1_clk { 221 compatible = "fixed-factor-clock"; 222 clocks = <&firc_clk>; 223 clock-div = <0>; 224 #clock-cells = <0>; 225 }; 226 227 fircdiv2_clk: fircdiv2_clk { 228 compatible = "fixed-factor-clock"; 229 clocks = <&firc_clk>; 230 clock-div = <0>; 231 #clock-cells = <0>; 232 }; 233 234 soscdiv1_clk: soscdiv1_clk { 235 compatible = "fixed-factor-clock"; 236 clocks = <&sosc_clk>; 237 clock-div = <0>; 238 #clock-cells = <0>; 239 }; 240 241 soscdiv2_clk: soscdiv2_clk { 242 compatible = "fixed-factor-clock"; 243 clocks = <&sosc_clk>; 244 clock-div = <0>; 245 #clock-cells = <0>; 246 }; 247 }; 248 249 pmc: pmc@4007d000 { 250 reg = <0x4007d000 0x1000>; 251 252 lpo: lpo128k { 253 /* LPO clock */ 254 compatible = "fixed-clock"; 255 clock-frequency = <128000>; 256 #clock-cells = <0>; 257 }; 258 }; 259 260 pcc: pcc@40065000 { 261 compatible = "nxp,kinetis-pcc"; 262 reg = <0x40065000 0x1000>; 263 #clock-cells = <2>; 264 }; 265 266 rtc: rtc@4003d000 { 267 compatible = "nxp,kinetis-rtc"; 268 reg = <0x4003d000 0x1000>; 269 interrupts = <46 0>, <47 0>; 270 interrupt-names = "alarm", "seconds"; 271 clock-frequency = <32768>; 272 prescaler = <32768>; 273 }; 274 275 dac0: dac@4003f000 { 276 compatible = "nxp,kinetis-dac32"; 277 reg = <0x4003f000 0x1000>; 278 interrupts = <56 0>; 279 clocks = <&scg KINETIS_SCG_BUS_CLK>; 280 voltage-reference = <1>; 281 buffered; 282 status = "disabled"; 283 #io-channel-cells = <1>; 284 }; 285 286 lptmr0: lptmr@40040000 { 287 compatible = "nxp,kinetis-lptmr"; 288 reg = <0x40040000 0x1000>; 289 interrupts = <58 0>; 290 clock-frequency = <128000>; 291 prescaler = <1>; 292 clk-source = <1>; 293 }; 294 295 wdog: watchdog@40052000 { 296 compatible = "nxp,kinetis-wdog32"; 297 reg = <0x40052000 0x1000>; 298 interrupts = <22 0>; 299 clocks = <&lpo>; 300 clk-source = <1>; 301 clk-divider = <256>; 302 }; 303 304 pwt: pwt@40056000 { 305 compatible = "nxp,kinetis-pwt"; 306 reg = <0x40056000 0x1000>; 307 interrupts = <29 0>; 308 clocks = <&scg KINETIS_SCG_BUS_CLK>; 309 prescaler = <1>; 310 status = "disabled"; 311 312 #pwm-cells = <3>; 313 }; 314 315 ftfe: flash-controller@40020000 { 316 compatible = "nxp,kinetis-ftfe"; 317 reg = <0x40020000 0x1000>; 318 interrupts = <18 0>, <19 0>; 319 interrupt-names = "command-complete", "read-collision"; 320 321 #address-cells = <1>; 322 #size-cells = <1>; 323 }; 324 325 lpuart0: uart@4006a000 { 326 compatible = "nxp,kinetis-lpuart"; 327 reg = <0x4006a000 0x1000>; 328 interrupts = <31 0>, <32 0>; 329 interrupt-names = "transmit", "receive"; 330 clocks = <&pcc 0x1a8 KINETIS_PCC_SRC_FIRC_ASYNC>; 331 dmas = <&edma 1 2>, <&edma 2 3>; 332 dma-names = "rx", "tx"; 333 status = "disabled"; 334 }; 335 336 lpuart1: uart@4006b000 { 337 compatible = "nxp,kinetis-lpuart"; 338 reg = <0x4006b000 0x1000>; 339 interrupts = <33 0>, <34 0>; 340 interrupt-names = "transmit", "receive"; 341 clocks = <&pcc 0x1ac KINETIS_PCC_SRC_FIRC_ASYNC>; 342 dmas = <&edma 3 4>, <&edma 4 5>; 343 dma-names = "rx", "tx"; 344 status = "disabled"; 345 }; 346 347 lpuart2: uart@4006c000 { 348 compatible = "nxp,kinetis-lpuart"; 349 reg = <0x4006c000 0x1000>; 350 interrupts = <35 0>, <36 0>; 351 interrupt-names = "transmit", "receive"; 352 clocks = <&pcc 0x1b0 KINETIS_PCC_SRC_FIRC_ASYNC>; 353 dmas = <&edma 5 6>, <&edma 5 7>; 354 dma-names = "rx", "tx"; 355 status = "disabled"; 356 }; 357 358 lpi2c0: i2c@40066000 { 359 compatible = "nxp,imx-lpi2c"; 360 clock-frequency = <I2C_BITRATE_STANDARD>; 361 #address-cells = <1>; 362 #size-cells = <0>; 363 reg = <0x40066000 0x1000>; 364 interrupts = <24 0>; 365 clocks = <&pcc 0x198 KINETIS_PCC_SRC_FIRC_ASYNC>; 366 status = "disabled"; 367 }; 368 369 lpi2c1: i2c@40067000 { 370 compatible = "nxp,imx-lpi2c"; 371 clock-frequency = <I2C_BITRATE_STANDARD>; 372 #address-cells = <1>; 373 #size-cells = <0>; 374 reg = <0x40067000 0x1000>; 375 interrupts = <25 0>; 376 clocks = <&pcc 0x19c KINETIS_PCC_SRC_FIRC_ASYNC>; 377 status = "disabled"; 378 }; 379 380 lpspi0: spi@4002c000 { 381 compatible = "nxp,imx-lpspi"; 382 reg = <0x4002c000 0x1000>; 383 interrupts = <26 0>; 384 clocks = <&pcc 0xb0 KINETIS_PCC_SRC_FIRC_ASYNC>; 385 status = "disabled"; 386 #address-cells = <1>; 387 #size-cells = <0>; 388 }; 389 390 lpspi1: spi@4002d000 { 391 compatible = "nxp,imx-lpspi"; 392 reg = <0x4002d000 0x1000>; 393 interrupts = <27 0>; 394 clocks = <&pcc 0xb4 KINETIS_PCC_SRC_FIRC_ASYNC>; 395 status = "disabled"; 396 #address-cells = <1>; 397 #size-cells = <0>; 398 }; 399 400 flexcan0: can@40024000 { 401 compatible = "nxp,flexcan"; 402 reg = <0x40024000 0x1000>; 403 interrupts = <78 0>, <79 0>, <80 0>, <81 0>; 404 interrupt-names = "warning", "error", "wake-up", 405 "mb-0-15"; 406 clocks = <&scg KINETIS_SCG_BUS_CLK>; 407 clk-source = <1>; 408 sample-point = <875>; 409 status = "disabled"; 410 }; 411 412 flexcan1: can@40025000 { 413 compatible = "nxp,flexcan"; 414 reg = <0x40025000 0x1000>; 415 interrupts = <85 0>, <86 0>, <87 0>, <88 0>; 416 interrupt-names = "warning", "error", "wake-up", 417 "mb-0-15"; 418 clocks = <&scg KINETIS_SCG_BUS_CLK>; 419 clk-source = <1>; 420 sample-point = <875>; 421 status = "disabled"; 422 }; 423 424 porta: pinmux@40049000 { 425 compatible = "nxp,kinetis-pinmux"; 426 reg = <0x40049000 0x1000>; 427 clocks = <&pcc 0x124 KINETIS_PCC_SRC_NONE_OR_EXT>; 428 }; 429 430 portb: pinmux@4004a000 { 431 compatible = "nxp,kinetis-pinmux"; 432 reg = <0x4004a000 0x1000>; 433 clocks = <&pcc 0x128 KINETIS_PCC_SRC_NONE_OR_EXT>; 434 }; 435 436 portc: pinmux@4004b000 { 437 compatible = "nxp,kinetis-pinmux"; 438 reg = <0x4004b000 0x1000>; 439 clocks = <&pcc 0x12c KINETIS_PCC_SRC_NONE_OR_EXT>; 440 }; 441 442 portd: pinmux@4004c000 { 443 compatible = "nxp,kinetis-pinmux"; 444 reg = <0x4004c000 0x1000>; 445 clocks = <&pcc 0x130 KINETIS_PCC_SRC_NONE_OR_EXT>; 446 }; 447 448 porte: pinmux@4004d000 { 449 compatible = "nxp,kinetis-pinmux"; 450 reg = <0x4004d000 0x1000>; 451 clocks = <&pcc 0x134 KINETIS_PCC_SRC_NONE_OR_EXT>; 452 }; 453 454 gpioa: gpio@400ff000 { 455 compatible = "nxp,kinetis-gpio"; 456 status = "disabled"; 457 reg = <0x400ff000 0x40>; 458 interrupts = <59 2>; 459 gpio-controller; 460 #gpio-cells = <2>; 461 nxp,kinetis-port = <&porta>; 462 }; 463 464 gpiob: gpio@400ff040 { 465 compatible = "nxp,kinetis-gpio"; 466 status = "disabled"; 467 reg = <0x400ff040 0x40>; 468 interrupts = <60 2>; 469 gpio-controller; 470 #gpio-cells = <2>; 471 nxp,kinetis-port = <&portb>; 472 }; 473 474 gpioc: gpio@400ff080 { 475 compatible = "nxp,kinetis-gpio"; 476 status = "disabled"; 477 reg = <0x400ff080 0x40>; 478 interrupts = <61 2>; 479 gpio-controller; 480 #gpio-cells = <2>; 481 nxp,kinetis-port = <&portc>; 482 }; 483 484 gpiod: gpio@400ff0c0 { 485 compatible = "nxp,kinetis-gpio"; 486 status = "disabled"; 487 reg = <0x400ff0c0 0x40>; 488 interrupts = <62 2>; 489 gpio-controller; 490 #gpio-cells = <2>; 491 nxp,kinetis-port = <&portd>; 492 }; 493 494 gpioe: gpio@400ff100 { 495 compatible = "nxp,kinetis-gpio"; 496 status = "disabled"; 497 reg = <0x400ff100 0x40>; 498 interrupts = <63 2>; 499 gpio-controller; 500 #gpio-cells = <2>; 501 nxp,kinetis-port = <&porte>; 502 }; 503 504 adc0: adc@4003b000 { 505 compatible = "nxp,kinetis-adc12"; 506 reg = <0x4003b000 0x1000>; 507 interrupts = <39 0>; 508 clocks = <&pcc 0xec KINETIS_PCC_SRC_FIRC_ASYNC>; 509 clk-source = <0>; 510 clk-divider = <1>; 511 status = "disabled"; 512 #io-channel-cells = <1>; 513 }; 514 515 adc1: adc@40027000 { 516 compatible = "nxp,kinetis-adc12"; 517 reg = <0x40027000 0x1000>; 518 interrupts = <73 0>; 519 clocks = <&pcc 0x9c KINETIS_PCC_SRC_FIRC_ASYNC>; 520 clk-source = <0>; 521 clk-divider = <1>; 522 status = "disabled"; 523 #io-channel-cells = <1>; 524 }; 525 526 adc2: adc@4003c000 { 527 compatible = "nxp,kinetis-adc12"; 528 reg = <0x4003c000 0x1000>; 529 interrupts = <74 0>; 530 clocks = <&pcc 0xf0 KINETIS_PCC_SRC_FIRC_ASYNC>; 531 clk-source = <0>; 532 clk-divider = <1>; 533 status = "disabled"; 534 #io-channel-cells = <1>; 535 }; 536 537 ftm0: ftm@40038000 { 538 compatible = "nxp,kinetis-ftm"; 539 reg = <0x40038000 0x1000>; 540 interrupts = <42 0>; 541 clocks = <&pcc 0xe0 KINETIS_PCC_SRC_FIRC_ASYNC>; 542 prescaler = <16>; 543 status = "disabled"; 544 }; 545 546 ftm1: ftm@40039000 { 547 compatible = "nxp,kinetis-ftm"; 548 reg = <0x40039000 0x1000>; 549 interrupts = <43 0>; 550 clocks = <&pcc 0xe4 KINETIS_PCC_SRC_FIRC_ASYNC>; 551 prescaler = <16>; 552 status = "disabled"; 553 }; 554 555 ftm2: ftm@4003a000 { 556 compatible = "nxp,kinetis-ftm"; 557 reg = <0x4003a000 0x1000>; 558 interrupts = <44 0>; 559 clocks = <&pcc 0xe8 KINETIS_PCC_SRC_FIRC_ASYNC>; 560 prescaler = <16>; 561 status = "disabled"; 562 }; 563 564 ftm3: ftm@40026000 { 565 compatible = "nxp,kinetis-ftm"; 566 reg = <0x40026000 0x1000>; 567 interrupts = <71 0>; 568 clocks = <&pcc 0x98 KINETIS_PCC_SRC_FIRC_ASYNC>; 569 prescaler = <16>; 570 status = "disabled"; 571 }; 572 573 cmp0: cmp@40073000 { 574 compatible = "nxp,kinetis-acmp"; 575 reg = <0x40073000 0x1000>; 576 interrupts = <40 0>; 577 clocks = <&scg KINETIS_SCG_BUS_CLK>; 578 status = "disabled"; 579 #io-channel-cells = <2>; 580 }; 581 582 cmp1: cmp@40074000 { 583 compatible = "nxp,kinetis-acmp"; 584 reg = <0x40074000 0x1000>; 585 interrupts = <41 0>; 586 clocks = <&scg KINETIS_SCG_BUS_CLK>; 587 status = "disabled"; 588 #io-channel-cells = <2>; 589 }; 590 591 cmp2: cmp@40075000 { 592 compatible = "nxp,kinetis-acmp"; 593 reg = <0x40075000 0x1000>; 594 interrupts = <70 0>; 595 clocks = <&scg KINETIS_SCG_BUS_CLK>; 596 status = "disabled"; 597 #io-channel-cells = <2>; 598 }; 599 }; 600}; 601 602&nvic { 603 arm,num-irq-priority-bits = <4>; 604}; 605