134 lines
2.5 KiB
Plaintext
134 lines
2.5 KiB
Plaintext
/*
|
|
* Copyright (c) 2021 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/ {
|
|
chosen {
|
|
zephyr,console = &cdc_acm_uart0;
|
|
zephyr,shell-uart = &cdc_acm_uart0;
|
|
};
|
|
|
|
aliases {
|
|
led-r = &pwm_led_r;
|
|
led-g = &pwm_led_g;
|
|
led-b = &pwm_led_b;
|
|
led-w = &pwm_led_w;
|
|
motors-enable = &motors_enable;
|
|
m1-dir = &m1_dir;
|
|
m1-step = &m1_step;
|
|
m1-sensor = &m1_sensor;
|
|
m2-dir = &m2_dir;
|
|
m2-step = &m2_step;
|
|
m2-sensor = &m2_sensor;
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
led_r: led_r {
|
|
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
led_g: led_g {
|
|
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
led_b: led_b {
|
|
gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
led_w: led_w {
|
|
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
steppers {
|
|
compatible = "gpio-leds";
|
|
motors_enable: motors_enable {
|
|
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
m1_dir: m1_dir {
|
|
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
m1_step: m1_step {
|
|
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
m2_dir: m2_dir {
|
|
gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
m2_step: m2_step {
|
|
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
sensors {
|
|
compatible = "gpio-keys";
|
|
polling-mode;
|
|
m1_sensor: m1_sensor {
|
|
gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
m2_sensor: m2_sensor {
|
|
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
pwmleds {
|
|
compatible = "pwm-leds";
|
|
status = "okay";
|
|
pwm_led_r: pwm_led_r {
|
|
pwms = <&pwm 9 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
label = "PWM LED R";
|
|
};
|
|
pwm_led_g: pwm_led_g {
|
|
pwms = <&pwm 11 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
label = "PWM LED G";
|
|
};
|
|
pwm_led_b: pwm_led_b {
|
|
pwms = <&pwm 5 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
label = "PWM LED B";
|
|
};
|
|
pwm_led_w: pwm_led_w {
|
|
pwms = <&pwm 1 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
label = "PWM LED W";
|
|
};
|
|
};
|
|
};
|
|
|
|
&flash0 {
|
|
partitions {
|
|
code_partition: partition@100 {
|
|
compatible = "zephyr,mapped-partition";
|
|
reg = <0x100 (DT_SIZE_M(16) - 0x100 - 0x10000 - 0x1000)>;
|
|
read-only;
|
|
};
|
|
|
|
storage_partition: partition@fef000 {
|
|
label = "storage";
|
|
reg = <0xfef000 0x10000>;
|
|
};
|
|
|
|
settings_partition: partition@fff000 {
|
|
label = "settings";
|
|
reg = <0xfff000 0x1000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&zephyr_udc0 {
|
|
cdc_acm_uart0: cdc_acm_uart0 {
|
|
compatible = "zephyr,cdc-acm-uart";
|
|
};
|
|
};
|
|
|
|
&pinctrl {
|
|
pwm0_default: pwm0_default {
|
|
group1 {
|
|
pinmux = <PWM_4B_P25>, <PWM_5B_P27>, <PWM_2B_P21>, <PWM_0B_P17>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&pwm {
|
|
status = "okay";
|
|
pinctrl-0 = <&pwm0_default>;
|
|
pinctrl-names = "default";
|
|
};
|