196 lines
3.8 KiB
Plaintext
196 lines
3.8 KiB
Plaintext
/*
|
|
* Copyright (c) 2017 Fenix Engineering Solutions
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include <st/f4/stm32f411Xe.dtsi>
|
|
#include <st/f4/stm32f411v(c-e)tx-pinctrl.dtsi>
|
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
|
|
|
/ {
|
|
model = "STMicroelectronics STM32F411E-DISCO board";
|
|
compatible = "st,stm32f411e-disco";
|
|
|
|
chosen {
|
|
zephyr,console = &usart2;
|
|
zephyr,shell-uart = &usart2;
|
|
zephyr,uart-mcumgr = &usart2;
|
|
zephyr,sram = &sram0;
|
|
zephyr,flash = &flash0;
|
|
zephyr,code-partition = &slot0_partition;
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
orange_led_3: led_3 {
|
|
gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
|
|
label = "User LD3";
|
|
};
|
|
green_led_4: led_4 {
|
|
gpios = <&gpiod 12 GPIO_ACTIVE_HIGH>;
|
|
label = "User LD4";
|
|
};
|
|
red_led_5: led_5 {
|
|
gpios = <&gpiod 14 GPIO_ACTIVE_HIGH>;
|
|
label = "User LD5";
|
|
};
|
|
blue_led_6: led_6 {
|
|
gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
|
|
label = "User LD6";
|
|
};
|
|
};
|
|
|
|
pwmleds {
|
|
compatible = "pwm-leds";
|
|
green_pwm_led: green_pwm_led {
|
|
pwms = <&pwm4 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
|
};
|
|
orange_pwm_led: orange_pwm_led {
|
|
pwms = <&pwm4 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
|
};
|
|
red_pwm_led: red_pwm_led {
|
|
pwms = <&pwm4 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
|
};
|
|
blue_pwm_led: blue_pwm_led {
|
|
pwms = <&pwm4 4 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
|
};
|
|
};
|
|
|
|
gpio_keys {
|
|
compatible = "gpio-keys";
|
|
user_button: button {
|
|
label = "User";
|
|
gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
|
|
zephyr,code = <INPUT_KEY_0>;
|
|
};
|
|
};
|
|
|
|
aliases {
|
|
led0 = &orange_led_3;
|
|
led1 = &green_led_4;
|
|
led2 = &red_led_5;
|
|
led3 = &blue_led_6;
|
|
sw0 = &user_button;
|
|
pwm-led0 = &green_pwm_led;
|
|
pwm-led1 = &orange_pwm_led;
|
|
pwm-led2 = &red_pwm_led;
|
|
pwm-led3 = &blue_pwm_led;
|
|
magn0 = &lsm303agr_magn;
|
|
accel0 = &lsm303agr_accel;
|
|
mcuboot-button0 = &user_button;
|
|
mcuboot-led0 = &orange_led_3;
|
|
};
|
|
};
|
|
|
|
&clk_lsi {
|
|
status = "okay";
|
|
};
|
|
|
|
&clk_hse {
|
|
clock-frequency = <DT_FREQ_M(8)>;
|
|
status = "okay";
|
|
};
|
|
|
|
&pll {
|
|
div-m = <4>;
|
|
mul-n = <96>;
|
|
div-p = <2>;
|
|
div-q = <4>;
|
|
clocks = <&clk_hse>;
|
|
status = "okay";
|
|
};
|
|
|
|
&rcc {
|
|
clocks = <&pll>;
|
|
clock-frequency = <DT_FREQ_M(96)>;
|
|
ahb-prescaler = <1>;
|
|
apb1-prescaler = <2>;
|
|
apb2-prescaler = <1>;
|
|
};
|
|
|
|
&timers4 {
|
|
st,prescaler = <10000>;
|
|
status = "okay";
|
|
|
|
pwm4: pwm {
|
|
status = "okay";
|
|
pinctrl-0 = <&tim4_ch1_pd12
|
|
&tim4_ch2_pd13
|
|
&tim4_ch3_pd14
|
|
&tim4_ch4_pd15>;
|
|
pinctrl-names = "default";
|
|
};
|
|
};
|
|
|
|
&i2c1 {
|
|
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb9>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
clock-frequency = <I2C_BITRATE_FAST>;
|
|
|
|
lsm303agr_magn: lsm303agr-magn@1e {
|
|
compatible = "st,lis2mdl", "st,lsm303agr-magn";
|
|
status = "okay";
|
|
reg = <0x1e>;
|
|
irq-gpios = <&gpioe 2 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
lsm303agr_accel: lsm303agr-accel@19 {
|
|
compatible = "st,lis2dh", "st,lsm303agr-accel";
|
|
status = "okay";
|
|
reg = <0x19>;
|
|
irq-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>,
|
|
<&gpioe 5 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
&usart2 {
|
|
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
|
|
pinctrl-names = "default";
|
|
current-speed = <115200>;
|
|
status = "okay";
|
|
};
|
|
|
|
&rtc {
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
|
|
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
|
|
status = "okay";
|
|
};
|
|
|
|
zephyr_udc0: &usbotg_fs {
|
|
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
};
|
|
|
|
&flash0 {
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
boot_partition: partition@0 {
|
|
label = "mcuboot";
|
|
reg = <0x00000000 DT_SIZE_K(64)>;
|
|
read-only;
|
|
};
|
|
|
|
slot0_partition: partition@20000 {
|
|
label = "image-0";
|
|
reg = <0x00020000 DT_SIZE_K(128)>;
|
|
};
|
|
|
|
slot1_partition: partition@40000 {
|
|
label = "image-1";
|
|
reg = <0x00040000 DT_SIZE_K(128)>;
|
|
};
|
|
|
|
scratch_partition: partition@60000 {
|
|
label = "image-scratch";
|
|
reg = <0x00060000 DT_SIZE_K(128)>;
|
|
};
|
|
};
|
|
};
|