blob: 173c2298a99a83db59dd93b091cb4fe1467915a4 [file] [log] [blame]
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <nxp/nxp_ke17z.dtsi>
#include "frdm_ke17z-pinctrl.dtsi"
#include <zephyr/dt-bindings/gpio/arduino-header-r3.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/pwm/pwm.h>
/ {
model = "NXP Freedom KE17Z board";
compatible = "nxp,frdm-ke17z", "nxp,ke17z", "nxp,mke17z7";
aliases {
watchdog0 = &wdog;
led0 = &red_led;
led1 = &green_led;
led2 = &blue_led;
sw0 = &user_button_0;
sw1 = &user_button_1;
pwm-led0 = &red_pwm_led;
pwm-led1 = &green_pwm_led;
pwm-led2 = &blue_pwm_led;
mcuboot-button0 = &user_button_0;
};
chosen {
zephyr,sram = &sram_u;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,uart-mcumgr = &lpuart0;
zephyr,console = &lpuart0;
zephyr,shell-uart = &lpuart0;
};
leds {
compatible = "gpio-leds";
red_led: led_0 {
gpios = <&gpiod 10 GPIO_ACTIVE_LOW>;
label = "RGB RED";
};
green_led: led_1 {
gpios = <&gpiod 11 GPIO_ACTIVE_LOW>;
label = "RGB GREEN";
};
blue_led: led_2 {
gpios = <&gpiod 12 GPIO_ACTIVE_LOW>;
label = "RGB BLUE";
};
};
pwmleds {
compatible = "pwm-leds";
red_pwm_led: led_pwm_0 {
pwms = <&ftm2 0 PWM_HZ(20) PWM_POLARITY_INVERTED>;
label = "RED RGB PWM LED";
};
green_pwm_led: led_pwm_1 {
pwms = <&ftm2 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
label = "GREEN RGB PWM LED";
};
blue_pwm_led: led_pwm_2 {
pwms = <&ftm2 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
label = "BLUE RGB PWM LED";
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_0: button_0 {
label = "User SW2";
gpios = <&gpiod 3 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_0>;
};
user_button_1: button_1 {
label = "User SW3";
gpios = <&gpioe 14 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_1>;
};
};
arduino_header: arduino-connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <ARDUINO_HEADER_R3_A0 0 &gpioc 17 0>,
<ARDUINO_HEADER_R3_A1 0 &gpioc 16 0>,
<ARDUINO_HEADER_R3_A2 0 &gpiod 16 0>,
<ARDUINO_HEADER_R3_A3 0 &gpiod 15 0>,
<ARDUINO_HEADER_R3_A4 0 &gpioa 1 0>,
<ARDUINO_HEADER_R3_A5 0 &gpioa 0 0>,
<ARDUINO_HEADER_R3_D0 0 &gpiod 17 0>,
<ARDUINO_HEADER_R3_D1 0 &gpioe 12 0>,
<ARDUINO_HEADER_R3_D2 0 &gpiod 8 0>,
<ARDUINO_HEADER_R3_D3 0 &gpiod 9 0>,
<ARDUINO_HEADER_R3_D4 0 &gpioc 14 0>,
<ARDUINO_HEADER_R3_D5 0 &gpioa 15 0>,
<ARDUINO_HEADER_R3_D6 0 &gpioa 17 0>,
<ARDUINO_HEADER_R3_D7 0 &gpioa 14 0>,
<ARDUINO_HEADER_R3_D8 0 &gpioe 11 0>,
<ARDUINO_HEADER_R3_D9 0 &gpiob 11 0>,
<ARDUINO_HEADER_R3_D10 0 &gpiob 5 0>,
<ARDUINO_HEADER_R3_D11 0 &gpiob 4 0>,
<ARDUINO_HEADER_R3_D12 0 &gpiob 3 0>,
<ARDUINO_HEADER_R3_D13 0 &gpiob 2 0>,
<ARDUINO_HEADER_R3_D14 0 &gpioa 16 0>,
<ARDUINO_HEADER_R3_D15 0 &gpiob 8 0>;
};
};
&idle {
min-residency-us = <1>;
};
&stop {
min-residency-us = <20000>;
exit-latency-us = <13>;
};
&lpuart0 {
dmas = <&edma 1 2>, <&edma 2 3>;
dma-names = "rx", "tx";
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&lpuart0_default>;
pinctrl-names = "default";
};
&adc0 {
status = "okay";
sample-time = <12>;
vref-mv = <3300>;
pinctrl-0 = <&adc0_default>;
pinctrl-names = "default";
};
&lpi2c0 {
status = "okay";
pinctrl-0 = <&lpi2c0_default>;
pinctrl-names = "default";
};
&gpiod {
status = "okay";
};
&gpioe {
status = "okay";
};
&ftm2 {
status = "okay";
compatible = "nxp,ftm-pwm";
#pwm-cells = <3>;
clocks = <&scg KINETIS_SCG_SIRC_CLK>;
prescaler = <128>;
pinctrl-0 = <&ftm2_default>;
pinctrl-names = "default";
clock-source = "system";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/*
* Partition sizes must be aligned
* to the flash memory sector size of 2KB.
*/
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 DT_SIZE_K(44)>;
};
slot0_partition: partition@b000 {
label = "image-0";
reg = <0xb000 DT_SIZE_K(100)>;
};
slot1_partition: partition@24000 {
label = "image-1";
reg = <0x24000 DT_SIZE_K(100)>;
};
storage_partition: partition@3d000 {
label = "storage";
reg = <0x3d000 DT_SIZE_K(12)>;
};
};
};
&lpspi0 {
dmas = <&edma 0 14>, <&edma 1 15>;
dma-names = "rx", "tx";
status = "okay";
pinctrl-0 = <&lpspi0_default>;
pinctrl-names = "default";
};
&edma {
status = "okay";
};
&wdog {
status = "okay";
};
&lpit0 {
status = "okay";
};