1/* 2 * Copyright (c) 2020 Sebastian Schwabe <sebastian.schwabe@mailbox.tu-dresden.de> 3 * Fabian Paschke <fabian.paschke@eas.iis.fraunhofer.de> 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9#include <st/f3/stm32f303X8.dtsi> 10#include <st/f3/stm32f303k(6-8)tx-pinctrl.dtsi> 11 12/ { 13 model = "STMicroelectronics STM32F303K8-NUCLEO board"; 14 compatible = "st,stm32f303k8-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_3: green_led_3 { 26 gpios = <&gpiob 3 GPIO_ACTIVE_HIGH>; 27 label = "LD3"; 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 = <1>; 55 mul = <9>; 56 clocks = <&clk_hsi>; 57 status = "okay"; 58}; 59 60&rcc { 61 clocks = <&pll>; 62 clock-frequency = <DT_FREQ_M(36)>; 63 ahb-prescaler = <1>; 64 apb1-prescaler = <2>; 65 apb2-prescaler = <1>; 66 adc12-prescaler = <0>; 67}; 68 69&timers2 { 70 status = "okay"; 71 72 pwm2: pwm { 73 status = "okay"; 74 pinctrl-0 = <&tim2_ch2_pb3>; 75 pinctrl-names = "default"; 76 }; 77}; 78 79&usart2 { 80 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; 81 pinctrl-names = "default"; 82 current-speed = <115200>; 83 status = "okay"; 84}; 85 86&i2c1 { 87 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 88 pinctrl-names = "default"; 89 status = "okay"; 90 clock-frequency = <I2C_BITRATE_FAST>; 91}; 92 93&spi1 { 94 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 95 &spi1_miso_pa6 &spi1_mosi_pa7>; 96 pinctrl-names = "default"; 97 status = "okay"; 98}; 99 100&adc1 { 101 pinctrl-0 = <&adc1_in1_pa0>; 102 pinctrl-names = "default"; 103 st,adc-clock-source = <SYNC>; 104 st,adc-prescaler = <2>; 105 status = "okay"; 106}; 107 108&rtc { 109 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 110 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 111 status = "okay"; 112}; 113 114&vref { 115 status = "okay"; 116}; 117 118&vbat { 119 status = "okay"; 120}; 121