1/* 2 * Copyright (c) 2021 Sebastian Schwabe <sebastian.schwabe@mailbox.tu-dresden.de> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f0/stm32f031X6.dtsi> 9#include <st/f0/stm32f031k6tx-pinctrl.dtsi> 10 11/ { 12 model = "STMicroelectronics STM32F031K6-NUCLEO board"; 13 compatible = "st,stm32f031k6-nucleo"; 14 15 chosen { 16 zephyr,console = &usart1; 17 zephyr,shell-uart = &usart1; 18 zephyr,sram = &sram0; 19 zephyr,flash = &flash0; 20 }; 21 22 leds: leds { 23 compatible = "gpio-leds"; 24 green_led_3: led_3 { 25 gpios = <&gpiob 3 GPIO_ACTIVE_HIGH>; 26 label = "User LD3"; 27 }; 28 }; 29 30 pwmleds { 31 compatible = "pwm-leds"; 32 green_pwm_led: green_pwm_led { 33 pwms = <&pwm2 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 34 }; 35 }; 36 37 aliases { 38 led0 = &green_led_3; 39 pwm-led0 = &green_pwm_led; 40 volt-sensor0 = &vref; 41 volt-sensor1 = &vbat; 42 }; 43}; 44 45&clk_lsi { 46 status = "okay"; 47}; 48 49&clk_hsi { 50 status = "okay"; 51}; 52 53&pll { 54 prediv = <4>; 55 mul = <12>; 56 clocks = <&clk_hsi>; 57 status = "okay"; 58}; 59 60&rcc { 61 clocks = <&pll>; 62 clock-frequency = <DT_FREQ_M(48)>; 63 ahb-prescaler = <1>; 64 apb1-prescaler = <1>; 65}; 66 67/* Due to limited available memory, don't enable gpiod and gpiof */ 68/* (Test cases fail due to 'SRAM' region overflow) */ 69&gpiod {status = "disabled";}; 70&gpiof {status = "disabled";}; 71 72&timers2 { 73 status = "okay"; 74 75 pwm2: pwm { 76 status = "okay"; 77 pinctrl-0 = <&tim2_ch2_pb3>; 78 pinctrl-names = "default"; 79 }; 80}; 81 82&usart1 { 83 pinctrl-0 = <&usart1_tx_pa2 &usart1_rx_pa15>; 84 pinctrl-names = "default"; 85 current-speed = <115200>; 86 status = "okay"; 87}; 88 89&i2c1 { 90 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 91 pinctrl-names = "default"; 92 status = "okay"; 93 clock-frequency = <I2C_BITRATE_FAST>; 94}; 95 96&spi1 { 97 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 98 &spi1_miso_pa6 &spi1_mosi_pa7>; 99 pinctrl-names = "default"; 100 status = "okay"; 101}; 102 103&adc1 { 104 pinctrl-0 = <&adc_in0_pa0>; 105 pinctrl-names = "default"; 106 st,adc-clock-source = <SYNC>; 107 st,adc-prescaler = <4>; 108 status = "okay"; 109}; 110 111&rtc { 112 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 113 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 114 status = "okay"; 115}; 116 117&vref { 118 status = "okay"; 119}; 120 121&vbat { 122 status = "okay"; 123}; 124