2018-03-07 06:06:03 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018, Reto Schneider <code@reto-schneider.ch>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/dts-v1/;
|
2018-09-27 21:23:16 +08:00
|
|
|
#include <st/f4/stm32f407Xg.dtsi>
|
2020-10-06 19:32:35 +08:00
|
|
|
#include <st/f4/stm32f407z(e-g)tx-pinctrl.dtsi>
|
2023-08-03 18:52:22 +08:00
|
|
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
2018-03-07 06:06:03 +08:00
|
|
|
|
|
|
|
/ {
|
|
|
|
model = "Olimex STM32-H407 board";
|
2020-09-25 20:57:24 +08:00
|
|
|
compatible = "olimex,stm32-h407";
|
2018-03-07 06:06:03 +08:00
|
|
|
|
|
|
|
chosen {
|
|
|
|
zephyr,console = &usart2;
|
2018-11-27 19:11:04 +08:00
|
|
|
zephyr,shell-uart = &usart2;
|
2018-03-07 06:06:03 +08:00
|
|
|
zephyr,sram = &sram0;
|
|
|
|
zephyr,flash = &flash0;
|
|
|
|
zephyr,ccm = &ccm0;
|
|
|
|
};
|
2017-11-24 17:08:03 +08:00
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
2018-09-19 01:45:43 +08:00
|
|
|
green_led_2: led_2 {
|
2019-10-04 00:30:21 +08:00
|
|
|
gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
|
2017-11-24 17:08:03 +08:00
|
|
|
label = "User LD2";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
2018-09-21 07:25:55 +08:00
|
|
|
user_button: button {
|
2017-11-24 17:08:03 +08:00
|
|
|
label = "User";
|
2019-10-04 00:30:21 +08:00
|
|
|
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
|
2023-08-03 18:52:22 +08:00
|
|
|
zephyr,code = <INPUT_KEY_0>;
|
2017-11-24 17:08:03 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
aliases {
|
|
|
|
led0 = &green_led_2;
|
|
|
|
sw0 = &user_button;
|
|
|
|
};
|
2018-03-07 06:06:03 +08:00
|
|
|
};
|
|
|
|
|
2022-09-07 15:13:35 +08:00
|
|
|
&clk_lsi {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2021-05-04 16:25:29 +08:00
|
|
|
&clk_hse {
|
|
|
|
clock-frequency = <DT_FREQ_M(12)>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&pll {
|
2023-01-10 22:21:14 +08:00
|
|
|
div-m = <12>;
|
|
|
|
mul-n = <336>;
|
2021-05-04 16:25:29 +08:00
|
|
|
div-p = <2>;
|
|
|
|
div-q = <7>;
|
|
|
|
clocks = <&clk_hse>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&rcc {
|
|
|
|
clocks = <&pll>;
|
|
|
|
clock-frequency = <DT_FREQ_M(168)>;
|
|
|
|
ahb-prescaler = <1>;
|
|
|
|
apb1-prescaler = <4>;
|
|
|
|
apb2-prescaler = <2>;
|
|
|
|
};
|
|
|
|
|
2018-03-07 06:06:03 +08:00
|
|
|
&usart2 {
|
2020-10-06 19:32:35 +08:00
|
|
|
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
|
2021-09-07 22:38:13 +08:00
|
|
|
pinctrl-names = "default";
|
2018-03-07 06:06:03 +08:00
|
|
|
current-speed = <115200>;
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2018-03-07 06:06:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&usart3 {
|
2020-10-06 19:32:35 +08:00
|
|
|
pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;
|
2021-09-07 22:38:13 +08:00
|
|
|
pinctrl-names = "default";
|
2018-03-07 06:06:03 +08:00
|
|
|
current-speed = <115200>;
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2018-03-07 06:06:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&usart6 {
|
2020-10-06 19:32:35 +08:00
|
|
|
pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>;
|
2021-09-07 22:38:13 +08:00
|
|
|
pinctrl-names = "default";
|
2018-03-07 06:06:03 +08:00
|
|
|
current-speed = <115200>;
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2018-03-07 06:06:03 +08:00
|
|
|
};
|
2018-06-21 00:51:42 +08:00
|
|
|
|
|
|
|
&rtc {
|
2022-09-07 15:13:35 +08:00
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
|
|
|
|
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
|
2019-06-15 01:31:16 +08:00
|
|
|
status = "okay";
|
2018-06-21 00:51:42 +08:00
|
|
|
};
|
2020-04-03 17:55:50 +08:00
|
|
|
|
|
|
|
&rng {
|
|
|
|
status = "okay";
|
|
|
|
};
|
2020-10-21 23:49:48 +08:00
|
|
|
|
2022-06-17 16:26:57 +08:00
|
|
|
zephyr_udc0: &usbotg_fs {
|
2020-10-21 23:49:48 +08:00
|
|
|
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
|
2021-11-08 20:52:59 +08:00
|
|
|
pinctrl-names = "default";
|
2020-10-21 23:49:48 +08:00
|
|
|
};
|