1/* 2 * Copyright (c) 2018 Anthony Kreft <anthony.kreft@gmail.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/l0/stm32l053X8.dtsi> 9#include <st/l0/stm32l053r(6-8)tx-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include "st_morpho_connector.dtsi" 12#include <zephyr/dt-bindings/input/input-event-codes.h> 13 14/ { 15 model = "STMicroelectronics STM32L053R8-NUCLEO board"; 16 compatible = "st,stm32l053r8-nucleo"; 17 18 chosen { 19 zephyr,console = &usart2; 20 zephyr,shell-uart = &usart2; 21 zephyr,sram = &sram0; 22 zephyr,flash = &flash0; 23 }; 24 25 leds: leds { 26 compatible = "gpio-leds"; 27 green_led_2: led_2 { 28 gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; 29 label = "User LD2"; 30 }; 31 }; 32 33 gpio_keys { 34 compatible = "gpio-keys"; 35 user_button: button { 36 label = "User"; 37 gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 38 zephyr,code = <INPUT_KEY_0>; 39 }; 40 }; 41 42 aliases { 43 led0 = &green_led_2; 44 sw0 = &user_button; 45 eeprom-0 = &eeprom; 46 }; 47}; 48 49&clk_hse { 50 hse-bypass; 51 clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ 52 status = "okay"; 53}; 54 55&pll { 56 clocks = <&clk_hse>; 57 mul = <8>; 58 div = <2>; 59 status = "okay"; 60}; 61 62&rcc { 63 clocks = <&pll>; 64 clock-frequency = <DT_FREQ_M(32)>; 65 ahb-prescaler = <1>; 66 apb1-prescaler = <1>; 67 apb2-prescaler = <1>; 68}; 69 70/* Due to limited available memory, don't enable gpiod and gpiof */ 71/* (Test cases fail due to 'SRAM' region overflow) */ 72&gpiod {status = "disabled";}; 73&gpioh {status = "disabled";}; 74 75&usart1 { 76 pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; 77 pinctrl-names = "default"; 78 current-speed = <115200>; 79}; 80 81&usart2 { 82 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; 83 pinctrl-names = "default"; 84 current-speed = <115200>; 85 status = "okay"; 86}; 87 88&i2c1 { 89 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 90 pinctrl-names = "default"; 91 status = "okay"; 92 clock-frequency = <I2C_BITRATE_FAST>; 93}; 94 95&spi1 { 96 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 97 pinctrl-names = "default"; 98 status = "okay"; 99}; 100 101&eeprom { 102 status = "okay"; 103}; 104