1/* 2 * Copyright (c) 2017, Erwin Rol <erwin@erwinrol.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f4/stm32f405Xg.dtsi> 9#include <st/f4/stm32f405rgtx-pinctrl.dtsi> 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "Olimex STM32-P405 board"; 14 compatible = "olimex,stm32-p405"; 15 16 chosen { 17 zephyr,console = &usart2; 18 zephyr,shell-uart = &usart2; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 zephyr,ccm = &ccm0; 22 zephyr,canbus = &can1; 23 }; 24 25 leds { 26 compatible = "gpio-leds"; 27 green_led_1: led_1 { 28 gpios = <&gpioc 12 GPIO_ACTIVE_HIGH>; 29 label = "LED1"; 30 }; 31 }; 32 33 gpio_keys { 34 compatible = "gpio-keys"; 35 user_button: button { 36 label = "Key"; 37 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 38 zephyr,code = <INPUT_KEY_0>; 39 }; 40 }; 41 42 aliases { 43 led0 = &green_led_1; 44 sw0 = &user_button; 45 }; 46}; 47 48&clk_lsi { 49 status = "okay"; 50}; 51 52&clk_hse { 53 clock-frequency = <DT_FREQ_M(8)>; 54 status = "okay"; 55}; 56 57&pll { 58 div-m = <4>; 59 mul-n = <168>; 60 div-p = <2>; 61 div-q = <7>; 62 clocks = <&clk_hse>; 63 status = "okay"; 64}; 65 66&rcc { 67 clocks = <&pll>; 68 clock-frequency = <DT_FREQ_M(168)>; 69 ahb-prescaler = <1>; 70 apb1-prescaler = <4>; 71 apb2-prescaler = <2>; 72}; 73 74&usart2 { 75 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; 76 pinctrl-names = "default"; 77 current-speed = <115200>; 78 status = "okay"; 79}; 80 81&rtc { 82 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 83 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 84 status = "okay"; 85}; 86 87&can1 { 88 pinctrl-0 = <&can1_rx_pb8 &can1_tx_pb9>; 89 pinctrl-names = "default"; 90 status = "okay"; 91 92 can-transceiver { 93 max-bitrate = <1000000>; 94 }; 95}; 96 97&rng { 98 status = "okay"; 99}; 100