1/*
2 * Copyright (c) 2020 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <st/f4/stm32f427vi.dtsi>
10#include <st/f4/stm32f427v(g-i)tx-pinctrl.dtsi>
11
12/ {
13	model = "96Boards Gumstix AeroCore 2";
14	compatible = "gumstix,aerocore2";
15
16	chosen {
17		zephyr,console = &uart7;
18		zephyr,shell-uart = &uart7;
19		zephyr,sram = &sram0;
20		zephyr,flash = &flash0;
21		zephyr,ccm = &ccm0;
22	};
23
24	leds {
25		compatible = "gpio-leds";
26		yellow_led_1: led_1 {
27			gpios = <&gpioe 10 GPIO_ACTIVE_HIGH>;
28			label = "USR1 LED";
29		};
30		blue_led_2: led_2 {
31			gpios = <&gpioe 9 GPIO_ACTIVE_HIGH>;
32			label = "USR2 LED";
33		};
34	};
35
36	aliases {
37		led0 = &yellow_led_1;
38		led1 = &blue_led_2;
39		volt-sensor0 = &vref;
40		volt-sensor1 = &vbat;
41	};
42
43};
44
45&clk_lsi {
46	status = "okay";
47};
48
49&clk_hse {
50	clock-frequency = <DT_FREQ_M(24)>;
51	status = "okay";
52};
53
54&pll {
55	div-m = <24>;
56	mul-n = <336>;
57	div-p = <2>;
58	div-q = <7>;
59	clocks = <&clk_hse>;
60	status = "okay";
61};
62
63&rcc {
64	clocks = <&pll>;
65	clock-frequency = <DT_FREQ_M(168)>;
66	ahb-prescaler = <1>;
67	apb1-prescaler = <4>;
68	apb2-prescaler = <2>;
69};
70
71&usart1 {
72	pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
73	pinctrl-names = "default";
74	current-speed = <115200>;
75	status = "okay";
76};
77
78&usart2 {
79	pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
80	pinctrl-names = "default";
81	current-speed = <115200>;
82	status = "okay";
83};
84
85&usart3 {
86	pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>;
87	pinctrl-names = "default";
88	current-speed = <115200>;
89	status = "okay";
90};
91
92&uart7 {
93	pinctrl-0 = <&uart7_tx_pe8 &uart7_rx_pe7>;
94	pinctrl-names = "default";
95	current-speed = <115200>;
96	status = "okay";
97};
98
99&uart8 {
100	pinctrl-0 = <&uart8_tx_pe1 &uart8_rx_pe0>;
101	pinctrl-names = "default";
102	current-speed = <115200>;
103	status = "okay";
104};
105
106&spi1_nss_pa4 { slew-rate = "very-high-speed"; };
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&spi2_nss_pb12 { slew-rate = "very-high-speed"; };
116
117&spi2 {
118	pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13
119		     &spi2_miso_pb14 &spi2_mosi_pb15>;
120	pinctrl-names = "default";
121	status = "okay";
122};
123
124&spi3 {
125	pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>;
126	pinctrl-names = "default";
127	status = "okay";
128};
129
130&spi4_nss_pe11 { slew-rate = "very-high-speed"; };
131
132&spi4 {
133	pinctrl-0 = <&spi4_nss_pe11 &spi4_sck_pe12
134		     &spi4_miso_pe13 &spi4_mosi_pe14>;
135	pinctrl-names = "default";
136	status = "okay";
137};
138
139&i2c2 {
140	pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
141	pinctrl-names = "default";
142	status = "okay";
143	clock-frequency = <I2C_BITRATE_FAST>;
144};
145
146zephyr_udc0: &usbotg_fs {
147	pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
148	pinctrl-names = "default";
149	status = "okay";
150};
151
152&timers4 {
153	status = "okay";
154
155	pwm4: pwm {
156		status = "okay";
157		pinctrl-0 = <&tim4_ch1_pd12
158			     &tim4_ch2_pd13
159			     &tim4_ch3_pd14
160			     &tim4_ch4_pd15>;
161		pinctrl-names = "default";
162	};
163};
164
165&timers5 {
166	status = "okay";
167
168	pwm5: pwm {
169		status = "okay";
170		pinctrl-0 = <&tim5_ch1_pa0
171			     &tim5_ch2_pa1
172			     &tim5_ch3_pa2
173			     &tim5_ch4_pa3>;
174		pinctrl-names = "default";
175	};
176};
177
178&adc1 {
179	pinctrl-0 = <&adc1_in10_pc0 &adc1_in11_pc1
180		     &adc1_in12_pc2 &adc1_in13_pc3>;
181	pinctrl-names = "default";
182	st,adc-clock-source = "SYNC";
183	st,adc-prescaler = <2>;
184	status = "okay";
185};
186
187&rtc {
188	clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
189		 <&rcc STM32_SRC_LSI RTC_SEL(2)>;
190	status = "okay";
191};
192
193&rng {
194	status = "okay";
195};
196
197&vref {
198	status = "okay";
199};
200
201&vbat {
202	status = "okay";
203};
204