Features enabled by this commit: * M7 core available with or without the Arduino MCU-based bootloader by correctly initializing the external clock source. * All LEDs, relays and the user button are mapped into the device tree (samples/common/blinky works out of the box). * USB can be used in ACM mode (samples/subsys/usb/cdc_acm works without changes). The default Zephyr console is configured to use cdc_acm_uart0 that in turn is assigned to the only USB port available. Also enable USB stack to make sure that the console is available by default and twister builds don't fail with missing device and added the default USB vendor (0x35d1 Finder SpA) and product (0x0164) numbers to match the ones used in the original product. Signed-off-by: Federico Di Gregorio <fog@dndg.it>
89 lines
1.5 KiB
Text
89 lines
1.5 KiB
Text
/*
|
|
* Copyright (c) 2023 Felipe Neves
|
|
* Copyright (c) 2024 DNDG srl
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/ {
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
status_led_1: led_1 {
|
|
gpios = <&gpioi 0 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
status_led_2: led_2 {
|
|
gpios = <&gpioi 1 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
status_led_3: led_3 {
|
|
gpios = <&gpioi 3 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
status_led_4: led_4 {
|
|
gpios = <&gpioh 15 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
led_reset: led_g {
|
|
gpios = <&gpioh 12 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
led_reset_red: led_r {
|
|
gpios = <&gpioh 11 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
led_user: led_b {
|
|
gpios = <&gpioe 5 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
relays {
|
|
compatible = "gpio-power-switches";
|
|
|
|
output_d0: d0 {
|
|
gpios = <&gpioi 6 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
output_d1: d1 {
|
|
gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
output_d2: d2 {
|
|
gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
output_d3: d3 {
|
|
gpios = <&gpioi 4 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
gpio_keys {
|
|
compatible = "gpio-keys";
|
|
|
|
user_button: button {
|
|
gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>;
|
|
zephyr,code = <INPUT_KEY_WAKEUP>;
|
|
};
|
|
};
|
|
|
|
aliases {
|
|
sw0 = &user_button;
|
|
led0 = &status_led_1;
|
|
led1 = &status_led_2;
|
|
led2 = &status_led_3;
|
|
led3 = &status_led_4;
|
|
relay1 = &output_d0;
|
|
relay2 = &output_d1;
|
|
relay3 = &output_d2;
|
|
relay4 = &output_d3;
|
|
};
|
|
};
|
|
|
|
&rcc {
|
|
d1cpre = <1>;
|
|
hpre = <2>;
|
|
d1ppre = <2>;
|
|
d2ppre1 = <2>;
|
|
d2ppre2 = <2>;
|
|
d3ppre = <2>;
|
|
};
|
|
|
|
&rtc {
|
|
status = "okay";
|
|
};
|
|
|
|
&mailbox {
|
|
status = "okay";
|
|
};
|