2019-05-08 02:24:03 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Vestas Wind Systems A/S
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/dts-v1/;
|
|
|
|
|
|
|
|
#include <nxp/nxp_ke18f512vlx16.dtsi>
|
|
|
|
#include <dt-bindings/clock/kinetis_scg.h>
|
2019-11-26 17:23:03 +08:00
|
|
|
#include <dt-bindings/pwm/pwm.h>
|
2019-05-08 02:24:03 +08:00
|
|
|
|
|
|
|
/ {
|
|
|
|
model = "NXP Kinetis KE18 MCU Tower System Module";
|
|
|
|
compatible = "nxp,mke18f16", "nxp,ke18f", "nxp,ke1xf";
|
|
|
|
|
|
|
|
aliases {
|
|
|
|
led0 = &orange_led;
|
|
|
|
led1 = &yellow_led;
|
|
|
|
led2 = &green_led;
|
|
|
|
led3 = &red_led;
|
|
|
|
led4 = &tri_red_led;
|
|
|
|
led5 = &tri_green_led;
|
|
|
|
led6 = &tri_blue_led;
|
2019-05-19 22:06:06 +08:00
|
|
|
pwm-led0 = &orange_pwm_led;
|
|
|
|
pwm-led1 = &yellow_pwm_led;
|
|
|
|
pwm-led2 = &green_pwm_led;
|
|
|
|
pwm-led3 = &red_pwm_led;
|
|
|
|
red-pwm-led = &tri_red_pwm_led;
|
|
|
|
green-pwm-led = &tri_green_pwm_led;
|
|
|
|
blue-pwm-led = &tri_blue_pwm_led;
|
2019-05-08 02:24:03 +08:00
|
|
|
sw0 = &user_button_3;
|
|
|
|
sw1 = &user_button_2;
|
2020-01-23 23:02:38 +08:00
|
|
|
can-primary = &can0;
|
2019-05-08 02:24:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
chosen {
|
|
|
|
zephyr,sram = &sram0;
|
|
|
|
zephyr,flash = &flash0;
|
|
|
|
zephyr,code-partition = &slot0_partition;
|
|
|
|
zephyr,console = &uart0;
|
|
|
|
zephyr,shell-uart = &uart0;
|
|
|
|
zephyr,uart-pipe = &uart0;
|
|
|
|
};
|
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
orange_led: led_0 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User LED D9";
|
|
|
|
};
|
|
|
|
yellow_led: led_1 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpioc 12 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User LED D8";
|
|
|
|
};
|
|
|
|
green_led: led_2 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpioc 11 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User LED D7";
|
|
|
|
};
|
|
|
|
red_led: led_3 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpioc 10 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User LED D6";
|
|
|
|
};
|
|
|
|
|
|
|
|
tri_red_led: led_4 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpiod 16 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User Tricolor LED D5 (Red)";
|
|
|
|
};
|
|
|
|
tri_green_led: led_5 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpiod 15 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User Tricolor LED D5 (Green)";
|
|
|
|
};
|
|
|
|
tri_blue_led: led_6 {
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpiob 5 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
label = "User Tricolor LED D5 (Blue)";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-05-19 22:06:06 +08:00
|
|
|
pwmleds {
|
|
|
|
compatible = "pwm-leds";
|
|
|
|
orange_pwm_led: led_pwm_0 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm3 7 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User PWM LED D9";
|
|
|
|
};
|
|
|
|
yellow_pwm_led: led_pwm_1 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm3 6 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User PWM LED D8";
|
|
|
|
};
|
|
|
|
green_pwm_led: led_pwm_2 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm3 5 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User PWM LED D7";
|
|
|
|
};
|
|
|
|
red_pwm_led: led_pwm_3 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm3 4 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User PWM LED D6";
|
|
|
|
};
|
|
|
|
|
|
|
|
tri_red_pwm_led: led_pwm_4 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm0 1 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User Tricolor PWM LED D5 (Red)";
|
|
|
|
};
|
|
|
|
tri_green_pwm_led: led_pwm_5 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm0 0 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User Tricolor PWM LED D5 (Green)";
|
|
|
|
};
|
|
|
|
tri_blue_pwm_led: led_pwm_6 {
|
2019-11-26 17:23:03 +08:00
|
|
|
pwms = <&pwm0 5 60000 PWM_POLARITY_INVERTED>;
|
2019-05-19 22:06:06 +08:00
|
|
|
label = "User Tricolor PWM LED D5 (Blue)";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-05-08 02:24:03 +08:00
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
|
|
|
user_button_2: button_0 {
|
|
|
|
label = "User SW2";
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpiod 3 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
};
|
|
|
|
user_button_3: button_1 {
|
|
|
|
label = "User SW3";
|
2019-08-09 07:28:40 +08:00
|
|
|
gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
|
2019-05-08 02:24:03 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&sim {
|
|
|
|
clkout-source = <1>;
|
|
|
|
clkout-divider = <0>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&scg {
|
|
|
|
sosc-freq = <8000000>;
|
|
|
|
sosc-mode = <KINETIS_SCG_SOSC_MODE_LOW_POWER>;
|
|
|
|
sosc-divider-1 = <1>;
|
|
|
|
sosc-divider-2 = <1>;
|
|
|
|
|
|
|
|
sirc-range = <8000000>;
|
|
|
|
sirc-divider-1 = <1>;
|
|
|
|
sirc-divider-2 = <2>;
|
|
|
|
|
|
|
|
firc-range = <48000000>;
|
|
|
|
firc-divider-1 = <1>;
|
|
|
|
firc-divider-2 = <1>;
|
|
|
|
|
|
|
|
spll-source = <KINETIS_SCG_SPLL_SRC_SOSC>;
|
|
|
|
spll-divider-pre = <1>;
|
|
|
|
spll-multiplier = <30>;
|
|
|
|
spll-divider-1 = <1>;
|
|
|
|
spll-divider-2 = <2>;
|
|
|
|
|
|
|
|
clk-source = <KINETIS_SCG_SCLK_SRC_SPLL>;
|
|
|
|
clk-divider-slow = <5>;
|
|
|
|
clk-divider-bus = <2>;
|
|
|
|
clk-divider-core = <1>;
|
|
|
|
|
|
|
|
clkout-source = <KINETIS_SCG_CLKOUT_SRC_FIRC>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&uart0 {
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2019-05-08 02:24:03 +08:00
|
|
|
current-speed = <115200>;
|
|
|
|
};
|
|
|
|
|
2019-11-13 19:45:26 +08:00
|
|
|
&pwm0 {
|
2019-05-19 22:06:06 +08:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2019-11-13 19:45:26 +08:00
|
|
|
&pwm3 {
|
2019-05-19 22:06:06 +08:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2019-05-14 23:06:13 +08:00
|
|
|
&i2c0 {
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2019-05-14 23:06:13 +08:00
|
|
|
|
|
|
|
fxos8700: fxos8700@1d {
|
|
|
|
compatible = "nxp,fxos8700";
|
|
|
|
reg = <0x1d>;
|
|
|
|
label = "FXOS8700";
|
2019-12-12 05:14:11 +08:00
|
|
|
reset-gpios = <&gpioc 15 GPIO_ACTIVE_HIGH>;
|
2019-05-14 23:06:13 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&i2c1 {
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2019-05-14 23:06:13 +08:00
|
|
|
};
|
|
|
|
|
2019-05-16 17:51:26 +08:00
|
|
|
&spi0 {
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2019-05-16 17:51:26 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&spi1 {
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2019-05-16 17:51:26 +08:00
|
|
|
};
|
|
|
|
|
2019-05-16 14:21:25 +08:00
|
|
|
&adc0 {
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2019-05-16 14:21:25 +08:00
|
|
|
sample-time = <12>;
|
|
|
|
};
|
|
|
|
|
2020-01-13 06:21:06 +08:00
|
|
|
&temp0 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2019-06-07 02:45:12 +08:00
|
|
|
&can0 {
|
2019-06-28 00:09:16 +08:00
|
|
|
status = "okay";
|
2019-06-07 02:45:12 +08:00
|
|
|
bus-speed = <125000>;
|
|
|
|
};
|
|
|
|
|
2019-05-08 02:24:03 +08:00
|
|
|
&flash0 {
|
|
|
|
/*
|
|
|
|
* For more information, see:
|
|
|
|
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
|
|
|
|
*/
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
boot_partition: partition@0 {
|
|
|
|
label = "mcuboot";
|
|
|
|
reg = <0x00000000 0xc000>;
|
|
|
|
};
|
|
|
|
slot0_partition: partition@c000 {
|
|
|
|
label = "image-0";
|
|
|
|
reg = <0x0000c000 0x32000>;
|
|
|
|
};
|
|
|
|
slot1_partition: partition@3e000 {
|
|
|
|
label = "image-1";
|
|
|
|
reg = <0x0003e000 0x32000>;
|
|
|
|
};
|
|
|
|
scratch_partition: partition@70000 {
|
|
|
|
label = "image-scratch";
|
|
|
|
reg = <0x00070000 0xa000>;
|
|
|
|
};
|
|
|
|
storage_partition: partition@7a000 {
|
|
|
|
label = "storage";
|
|
|
|
reg = <0x0007a000 0x00006000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|