1/* 2 * Copyright (c) 2020 Steven Daglish <s.c.daglish@gmail.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/l0/stm32l011X4.dtsi> 9#include <st/l0/stm32l011k(3-4)tx-pinctrl.dtsi> 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "STMicroelectronics STM32L011K4-NUCLEO board"; 14 compatible = "st,stm32l011k4-nucleo"; 15 16 chosen { 17 zephyr,console = &usart2; 18 zephyr,shell-uart = &usart2; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 }; 22 23 leds: leds { 24 compatible = "gpio-leds"; 25 green_led_2: led_2 { 26 gpios = <&gpiob 3 GPIO_ACTIVE_HIGH>; 27 label = "User LD2"; 28 }; 29 }; 30 31 gpio_keys { 32 compatible = "gpio-keys"; 33 user_button: button { 34 label = "User"; 35 gpios = <&gpioa 12 GPIO_ACTIVE_LOW>; 36 zephyr,code = <INPUT_KEY_0>; 37 }; 38 }; 39 40 aliases { 41 led0 = &green_led_2; 42 eeprom-0 = &eeprom; 43 }; 44}; 45 46&clk_hsi { 47 status = "okay"; 48}; 49 50&pll { 51 div = <2>; 52 mul = <4>; 53 clocks = <&clk_hsi>; 54 status = "okay"; 55}; 56 57&rcc { 58 clocks = <&pll>; 59 clock-frequency = <DT_FREQ_M(32)>; 60 ahb-prescaler = <1>; 61 apb1-prescaler = <1>; 62 apb2-prescaler = <1>; 63}; 64 65&usart2 { 66 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; 67 pinctrl-names = "default"; 68 current-speed = <115200>; 69 status = "okay"; 70}; 71 72&i2c1 { 73 pinctrl-0 = <&i2c1_scl_pa4 &i2c1_sda_pa10>; 74 pinctrl-names = "default"; 75 status = "okay"; 76 clock-frequency = <I2C_BITRATE_FAST>; 77}; 78 79&spi1 { 80 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 81 pinctrl-names = "default"; 82 status = "okay"; 83}; 84 85&eeprom { 86 status = "okay"; 87}; 88