1/* 2 * Copyright (c) 2019 Libre Solar Technologies GmbH 3 * Copyright (c) 2020 Sparks, Circuits and Robotics SL 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9#include <st/l4/stm32l452Xe.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "STMicroelectronics STM32L452RE-NUCLEO board"; 15 compatible = "st,stm32l452re-nucleo"; 16 17 chosen { 18 zephyr,console = &usart2; 19 zephyr,shell-uart = &usart2; 20 zephyr,sram = &sram0; 21 zephyr,flash = &flash0; 22 zephyr,canbus = &can1; 23 }; 24 25 gpio_keys { 26 compatible = "gpio-keys"; 27 user_button: button { 28 label = "User"; 29 gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 30 zephyr,code = <INPUT_KEY_0>; 31 }; 32 }; 33 34 aliases { 35 sw0 = &user_button; 36 }; 37}; 38 39&clk_lsi { 40 status = "okay"; 41}; 42 43&clk_hsi { 44 status = "okay"; 45}; 46 47&pll { 48 div-m = <1>; 49 mul-n = <20>; 50 div-p = <7>; 51 div-q = <2>; 52 div-r = <4>; 53 clocks = <&clk_hsi>; 54 status = "okay"; 55}; 56 57&rcc { 58 clocks = <&pll>; 59 clock-frequency = <DT_FREQ_M(80)>; 60 ahb-prescaler = <1>; 61 apb1-prescaler = <1>; 62 apb2-prescaler = <1>; 63}; 64 65&usart1 { 66 pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; 67 pinctrl-names = "default"; 68 current-speed = <115200>; 69}; 70 71&usart2 { 72 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; 73 pinctrl-names = "default"; 74 current-speed = <115200>; 75 status = "okay"; 76}; 77 78&spi1 { 79 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 80 pinctrl-names = "default"; 81 cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 82 status = "okay"; 83}; 84 85&i2c1 { 86 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb7>; 87 pinctrl-names = "default"; 88 clock-frequency = <I2C_BITRATE_FAST>; 89 status = "okay"; 90}; 91 92&timers2 { 93 status = "okay"; 94 95 pwm2: pwm { 96 status = "okay"; 97 pinctrl-0 = <&tim2_ch1_pa0>; 98 pinctrl-names = "default"; 99 }; 100}; 101 102&can1 { 103 pinctrl-0 = <&can1_rx_pa11 &can1_tx_pa12>; 104 pinctrl-names = "default"; 105 bus-speed = <125000>; 106 status = "okay"; 107}; 108 109&rtc { 110 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 111 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 112 status = "okay"; 113}; 114 115&flash0 { 116 partitions { 117 compatible = "fixed-partitions"; 118 #address-cells = <1>; 119 #size-cells = <1>; 120 /* 121 * Reserve the final 16 KiB for file system partition 122 */ 123 storage_partition: partition@7c000 { 124 label = "storage"; 125 reg = <0x0007c000 0x00008000>; 126 }; 127 }; 128}; 129