1/* 2 * Copyright (c) 2020 Jonas Eriksson, Up to Code AB 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f1/stm32f100Xb.dtsi> 9#include <st/f1/stm32f100r(8-b)tx-pinctrl.dtsi> 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "STMicroelectronics STM32VLDISCOVERY board"; 14 compatible = "st,stm32vldiscovery"; 15 16 chosen { 17 zephyr,console = &usart1; 18 zephyr,shell-uart = &usart1; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 }; 22 23 leds { 24 compatible = "gpio-leds"; 25 green_led: ld3 { 26 gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>; 27 label = "User LD3"; 28 }; 29 blue_led: ld4 { 30 gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>; 31 label = "User LD4"; 32 }; 33 }; 34 35 gpio_keys { 36 compatible = "gpio-keys"; 37 user_button: button { 38 label = "User"; 39 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 40 zephyr,code = <INPUT_KEY_0>; 41 }; 42 }; 43 44 aliases { 45 led0 = &green_led; 46 led1 = &blue_led; 47 sw0 = &user_button; 48 }; 49}; 50 51&clk_hsi { 52 status = "okay"; 53}; 54 55&pll { 56 mul = <6>; 57 prediv = <1>; 58 clocks = <&clk_hsi>; 59 status = "okay"; 60}; 61 62&rcc { 63 clocks = <&pll>; 64 clock-frequency = <DT_FREQ_M(24)>; 65 ahb-prescaler = <1>; 66 apb1-prescaler = <2>; 67 apb2-prescaler = <1>; 68}; 69 70&usart1 { 71 pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; 72 pinctrl-names = "default"; 73 current-speed = <115200>; 74 status = "okay"; 75}; 76 77&usart2 { 78 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; 79 pinctrl-names = "default"; 80 current-speed = <115200>; 81 status = "okay"; 82}; 83 84&usart3 { 85 pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; 86 pinctrl-names = "default"; 87 current-speed = <115200>; 88 status = "okay"; 89}; 90 91&i2c1 { 92 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 93 pinctrl-names = "default"; 94 status = "okay"; 95 clock-frequency = <I2C_BITRATE_FAST>; 96}; 97 98&i2c2 { 99 pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; 100 pinctrl-names = "default"; 101 status = "okay"; 102 clock-frequency = <I2C_BITRATE_FAST>; 103}; 104 105&spi1 { 106 pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 107 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; 108 pinctrl-names = "default"; 109 status = "okay"; 110}; 111 112&spi2 { 113 pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 114 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; 115 pinctrl-names = "default"; 116 status = "okay"; 117}; 118 119&timers1 { 120 st,prescaler = <10000>; 121 status = "okay"; 122 123 pwm1: pwm { 124 status = "okay"; 125 pinctrl-0 = <&tim1_ch1_pwm_out_pa8>; 126 pinctrl-names = "default"; 127 }; 128}; 129