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
11/ {
12	model = "STMicroelectronics STM32VLDISCOVERY board";
13	compatible = "st,stm32vldiscovery";
14
15	chosen {
16		zephyr,console = &usart1;
17		zephyr,shell-uart = &usart1;
18		zephyr,sram = &sram0;
19		zephyr,flash = &flash0;
20	};
21
22	leds {
23		compatible = "gpio-leds";
24		green_led: ld3 {
25			gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>;
26			label = "User LD3";
27		};
28		blue_led: ld4 {
29			gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
30			label = "User LD4";
31		};
32	};
33
34	gpio_keys {
35		compatible = "gpio-keys";
36		user_button: button {
37			label = "User";
38			gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
39		};
40	};
41
42	aliases {
43		led0 = &green_led;
44		led1 = &blue_led;
45		sw0 = &user_button;
46	};
47};
48
49&clk_hsi {
50	status = "okay";
51};
52
53&pll {
54	mul = <6>;
55	prediv = <1>;
56	clocks = <&clk_hsi>;
57	status = "okay";
58};
59
60&rcc {
61	clocks = <&pll>;
62	clock-frequency = <DT_FREQ_M(24)>;
63	ahb-prescaler = <1>;
64	apb1-prescaler = <2>;
65	apb2-prescaler = <1>;
66};
67
68&usart1 {
69	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
70	pinctrl-names = "default";
71	current-speed = <115200>;
72	status = "okay";
73};
74
75&usart2 {
76	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
77	pinctrl-names = "default";
78	current-speed = <115200>;
79	status = "okay";
80};
81
82&usart3 {
83	pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;
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&i2c2 {
97	pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
98	pinctrl-names = "default";
99	status = "okay";
100	clock-frequency = <I2C_BITRATE_FAST>;
101};
102
103&spi1 {
104	pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5
105		     &spi1_miso_master_pa6 &spi1_mosi_master_pa7>;
106	pinctrl-names = "default";
107	status = "okay";
108};
109
110&spi2 {
111	pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13
112		     &spi2_miso_master_pb14 &spi2_mosi_master_pb15>;
113	pinctrl-names = "default";
114	status = "okay";
115};
116
117&timers1 {
118	st,prescaler = <10000>;
119	status = "okay";
120
121	pwm1: pwm {
122		status = "okay";
123		pinctrl-0 = <&tim1_ch1_pwm_out_pa8>;
124		pinctrl-names = "default";
125	};
126};
127