1/*
2 * Copyright (c) 2020 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <st/l5/stm32l552Xe.dtsi>
8#include <st/l5/stm32l552z(c-e)txq-pinctrl.dtsi>
9#include "arduino_r3_connector.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	leds: leds {
14		compatible = "gpio-leds";
15		green_led_1: led_1 {
16			gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>;
17			label = "User LD1";
18		};
19		blue_led_1: led_2 {
20			gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>;
21			label = "User LD2";
22		};
23		red_led_1: led_3 {
24			gpios = <&gpioa 9 GPIO_ACTIVE_HIGH>;
25			label = "User LD3";
26		};
27	};
28
29	gpio_keys {
30		compatible = "gpio-keys";
31		user_button: button {
32			label = "User";
33			gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
34			zephyr,code = <INPUT_KEY_0>;
35		};
36	};
37
38	aliases {
39		die-temp0 = &die_temp;
40		volt-sensor0 = &vref;
41		volt-sensor1 = &vbat;
42	};
43};
44
45&clk_hsi48 {
46	status = "okay";
47};
48
49&clk_msi {
50	status = "okay";
51	msi-range = <6>;
52};
53
54&pll {
55	div-m = <1>;
56	mul-n = <55>;
57	div-p = <7>;
58	div-q = <2>;
59	div-r = <2>;
60	clocks = <&clk_msi>;
61	status = "okay";
62};
63
64&rcc {
65	clocks = <&pll>;
66	clock-frequency = <DT_FREQ_M(110)>;
67	ahb-prescaler = <1>;
68	apb1-prescaler = <1>;
69	apb2-prescaler = <1>;
70};
71
72&rng {
73	status = "okay";
74};
75
76&dac1 {
77	status = "okay";
78	pinctrl-0 = <&dac1_out1_pa4>;
79	pinctrl-names = "default";
80};
81
82&adc1 {
83	pinctrl-0 = <&adc1_in1_pc0>;
84	pinctrl-names = "default";
85	st,adc-clock-source = "SYNC";
86	st,adc-prescaler = <4>;
87	status = "okay";
88};
89
90&die_temp {
91	status = "okay";
92};
93
94&lpuart1 {
95	pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>;
96	pinctrl-names = "default";
97	current-speed = <115200>;
98	status = "okay";
99};
100
101&usart3 {
102	pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>;
103	pinctrl-names = "default";
104	current-speed = <115200>;
105	status = "okay";
106};
107
108&spi1 {
109	pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
110			&spi1_miso_pa6 &spi1_mosi_pa7>;
111	pinctrl-names = "default";
112	status = "okay";
113};
114
115&vref {
116	status = "okay";
117};
118
119&vbat {
120	status = "okay";
121};
122