2019-04-06 21:08:09 +08:00
|
|
|
/* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
|
2020-10-22 02:41:50 +08:00
|
|
|
#include <mem.h>
|
2017-04-06 04:19:24 +08:00
|
|
|
#include "armv6-m.dtsi"
|
2023-04-16 02:33:59 +08:00
|
|
|
#include <zephyr/dt-bindings/adc/adc.h>
|
2022-05-06 17:02:05 +08:00
|
|
|
#include <zephyr/dt-bindings/clock/kinetis_sim.h>
|
|
|
|
#include <zephyr/dt-bindings/clock/kinetis_mcg.h>
|
|
|
|
#include <zephyr/dt-bindings/gpio/gpio.h>
|
|
|
|
#include <zephyr/dt-bindings/i2c/i2c.h>
|
|
|
|
#include <zephyr/dt-bindings/pwm/pwm.h>
|
2017-04-06 04:19:24 +08:00
|
|
|
|
|
|
|
/ {
|
2020-04-06 22:59:03 +08:00
|
|
|
chosen {
|
|
|
|
zephyr,entropy = &trng;
|
|
|
|
};
|
|
|
|
|
2017-04-06 04:19:24 +08:00
|
|
|
cpus {
|
2017-07-16 02:57:32 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
|
2017-04-06 04:19:24 +08:00
|
|
|
cpu@0 {
|
2017-07-16 02:57:32 +08:00
|
|
|
device_type = "cpu";
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "arm,cortex-m0+";
|
2017-07-16 02:57:32 +08:00
|
|
|
reg = <0>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-07-21 20:43:01 +08:00
|
|
|
sram0: memory@20000000 {
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "mmio-sram";
|
2020-10-22 02:41:50 +08:00
|
|
|
reg = <0x20000000 DT_SIZE_K(16)>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2022-03-01 05:51:22 +08:00
|
|
|
/* Dummy pinctrl node, filled with pin mux options at board level */
|
|
|
|
pinctrl: pinctrl {
|
|
|
|
compatible = "nxp,kinetis-pinctrl";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2017-04-06 04:19:24 +08:00
|
|
|
soc {
|
|
|
|
mcg: clock-controller@40064000 {
|
2021-03-05 01:02:48 +08:00
|
|
|
compatible = "nxp,kinetis-mcg";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x40064000 0x13>;
|
2021-03-05 01:02:48 +08:00
|
|
|
#clock-cells = <1>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
osc: clock-controller@40065000 {
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "nxp,kw41z-osc";
|
|
|
|
reg = <0x40065000 0x4>;
|
|
|
|
enable-external-reference;
|
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
rtc: rtc@4003d000 {
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "nxp,kw41z-rtc";
|
|
|
|
reg = <0x4003d000 0x20>;
|
|
|
|
clock-frequency = <32768>;
|
|
|
|
};
|
|
|
|
|
|
|
|
sim: sim@40047000 {
|
2017-08-26 06:13:39 +08:00
|
|
|
compatible = "nxp,kinetis-sim";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x40047000 0x1060>;
|
2018-05-21 21:27:00 +08:00
|
|
|
#clock-cells = <3>;
|
2021-03-05 01:02:48 +08:00
|
|
|
|
|
|
|
core_clk {
|
|
|
|
compatible = "fixed-factor-clock";
|
|
|
|
clocks = <&mcg KINETIS_MCG_OUT_CLK>;
|
|
|
|
clock-div = <1>;
|
|
|
|
#clock-cells = <0>;
|
|
|
|
};
|
|
|
|
|
|
|
|
flash_clk {
|
|
|
|
compatible = "fixed-factor-clock";
|
|
|
|
clocks = <&mcg KINETIS_MCG_OUT_CLK>;
|
|
|
|
clock-div = <2>;
|
|
|
|
#clock-cells = <0>;
|
|
|
|
};
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2020-04-23 02:46:15 +08:00
|
|
|
ftfa: flash-controller@40020000 {
|
2018-01-30 03:24:08 +08:00
|
|
|
compatible = "nxp,kinetis-ftfa";
|
|
|
|
reg = <0x40020000 0x2c>;
|
|
|
|
interrupts = <5 0>;
|
2022-08-20 00:41:21 +08:00
|
|
|
status = "disabled";
|
2018-01-30 03:24:08 +08:00
|
|
|
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
flash0: flash@0 {
|
|
|
|
compatible = "soc-nv-flash";
|
2020-10-22 02:41:50 +08:00
|
|
|
reg = <0 DT_SIZE_K(512)>;
|
2018-02-01 03:55:35 +08:00
|
|
|
erase-block-size = <1024>;
|
2018-01-30 03:24:08 +08:00
|
|
|
write-block-size = <4>;
|
|
|
|
};
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2017-07-11 23:38:09 +08:00
|
|
|
i2c0: i2c@40066000 {
|
|
|
|
compatible = "nxp,kinetis-i2c";
|
2017-08-11 00:25:49 +08:00
|
|
|
clock-frequency = <I2C_BITRATE_STANDARD>;
|
2017-07-11 23:38:09 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
reg = <0x40066000 0x1000>;
|
|
|
|
interrupts = <8 0>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_BUS_CLK 0x1034 6>;
|
2017-07-11 23:38:09 +08:00
|
|
|
status = "disabled";
|
|
|
|
};
|
|
|
|
|
|
|
|
i2c1: i2c@40067000 {
|
|
|
|
compatible = "nxp,kinetis-i2c";
|
2017-08-11 00:25:49 +08:00
|
|
|
clock-frequency = <I2C_BITRATE_STANDARD>;
|
2017-07-11 23:38:09 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
reg = <0x40067000 0x1000>;
|
|
|
|
interrupts = <9 0>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_CORESYS_CLK 0x1034 7>;
|
2017-07-11 23:38:09 +08:00
|
|
|
status = "disabled";
|
|
|
|
};
|
|
|
|
|
2017-04-06 04:19:24 +08:00
|
|
|
lpuart0: lpuart@40054000 {
|
2017-06-20 09:28:55 +08:00
|
|
|
compatible = "nxp,kinetis-lpuart";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x40054000 0x18>;
|
|
|
|
interrupts = <12 0>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_CORESYS_CLK 0x1038 20>;
|
2017-04-06 04:19:24 +08:00
|
|
|
|
|
|
|
status = "disabled";
|
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
porta: pinmux@40049000 {
|
2017-06-20 09:43:45 +08:00
|
|
|
compatible = "nxp,kinetis-pinmux";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x40049000 0xa4>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_BUS_CLK 0x1038 9>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
portb: pinmux@4004a000 {
|
2017-06-20 09:43:45 +08:00
|
|
|
compatible = "nxp,kinetis-pinmux";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x4004a000 0xa4>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_BUS_CLK 0x1038 10>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
portc: pinmux@4004b000 {
|
2017-06-20 09:43:45 +08:00
|
|
|
compatible = "nxp,kinetis-pinmux";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x4004b000 0xa4>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_BUS_CLK 0x1038 11>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
gpioa: gpio@400ff000 {
|
2017-06-20 09:56:08 +08:00
|
|
|
compatible = "nxp,kinetis-gpio";
|
2020-02-13 02:34:35 +08:00
|
|
|
status = "disabled";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x400ff000 0x40>;
|
|
|
|
interrupts = <30 2>;
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
2020-04-16 04:37:30 +08:00
|
|
|
nxp,kinetis-port = <&porta>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
gpiob: gpio@400ff040 {
|
2017-06-20 09:56:08 +08:00
|
|
|
compatible = "nxp,kinetis-gpio";
|
2020-02-13 02:34:35 +08:00
|
|
|
status = "disabled";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x400ff040 0x40>;
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
2020-04-16 04:37:30 +08:00
|
|
|
nxp,kinetis-port = <&portb>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
gpioc: gpio@400ff080 {
|
2017-06-20 09:56:08 +08:00
|
|
|
compatible = "nxp,kinetis-gpio";
|
2020-02-13 02:34:35 +08:00
|
|
|
status = "disabled";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x400ff080 0x40>;
|
|
|
|
interrupts = <31 2>;
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
2020-04-16 04:37:30 +08:00
|
|
|
nxp,kinetis-port = <&portc>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
spi0: spi@4002c000 {
|
2018-04-17 03:57:38 +08:00
|
|
|
compatible = "nxp,kinetis-dspi";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x4002c000 0x9C>;
|
2018-04-17 03:57:38 +08:00
|
|
|
interrupts = <10 3>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_BUS_CLK 0x103C 12>;
|
2021-05-04 04:01:16 +08:00
|
|
|
status = "disabled";
|
2017-04-06 04:19:24 +08:00
|
|
|
|
2018-02-21 22:18:19 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
spi1: spi@4002d000 {
|
2018-04-17 03:57:38 +08:00
|
|
|
compatible = "nxp,kinetis-dspi";
|
2017-04-06 04:19:24 +08:00
|
|
|
reg = <0x4002d000 0x9C>;
|
2018-04-17 03:57:38 +08:00
|
|
|
interrupts = <29 3>;
|
2017-08-26 06:13:39 +08:00
|
|
|
clocks = <&sim KINETIS_SIM_BUS_CLK 0x103C 13>;
|
2017-04-06 04:19:24 +08:00
|
|
|
status = "disabled";
|
2018-02-21 22:18:19 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
tpm0: pwm@40038000 {
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "nxp,kw41z-pwm";
|
|
|
|
reg = <0x40038000 0x88>;
|
|
|
|
prescaler = <2>;
|
|
|
|
period = <1000>;
|
|
|
|
/* channel information needed - fixme */
|
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
tpm1: pwm@40039000 {
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "nxp,kw41z-pwm";
|
|
|
|
reg = <0x40039000 0x88>;
|
|
|
|
prescaler = <2>;
|
|
|
|
period = <1000>;
|
|
|
|
/* channel information needed - fixme */
|
|
|
|
};
|
|
|
|
|
2020-04-16 04:37:30 +08:00
|
|
|
tpm2: pwm@4003a000 {
|
2017-04-06 04:19:24 +08:00
|
|
|
compatible = "nxp,kw41z-pwm";
|
|
|
|
reg = <0x4003a000 0x88>;
|
|
|
|
prescaler = <2>;
|
|
|
|
period = <1000>;
|
|
|
|
/* channel information needed - fixme */
|
|
|
|
};
|
2017-07-12 09:49:08 +08:00
|
|
|
|
|
|
|
adc0: adc@4003b000{
|
|
|
|
compatible = "nxp,kinetis-adc16";
|
|
|
|
reg = <0x4003b000 0x70>;
|
|
|
|
interrupts = <15 0>;
|
|
|
|
status = "disabled";
|
2019-08-23 00:08:13 +08:00
|
|
|
#io-channel-cells = <1>;
|
2017-07-12 09:49:08 +08:00
|
|
|
};
|
2018-11-03 19:50:44 +08:00
|
|
|
|
|
|
|
trng: random@40029000 {
|
|
|
|
compatible = "nxp,kinetis-trng";
|
|
|
|
reg = <0x40029000 0x1000>;
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2018-11-03 19:50:44 +08:00
|
|
|
interrupts = <13 0>;
|
|
|
|
};
|
2017-04-06 04:19:24 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&nvic {
|
|
|
|
arm,num-irq-priority-bits = <2>;
|
|
|
|
};
|