1/*
2 * Copyright (c) 2017 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/f4/stm32f411Xe.dtsi>
9#include <st/f4/stm32f411c(c-e)ux-pinctrl.dtsi>
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Tocoding Neonkey 96boards";
14	compatible = "tocoding,neonkey";
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_0: led_0 {
26			gpios = <&gpiob 12 GPIO_ACTIVE_HIGH>;
27			label = "USR0 LED";
28		};
29		green_led_1: led_1 {
30			gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>;
31			label = "USR1 LED";
32		};
33		green_led_2: led_2 {
34			gpios = <&gpiob 14 GPIO_ACTIVE_HIGH>;
35			label = "USR2 LED";
36		};
37		green_led_3: led_3 {
38			gpios = <&gpiob 15 GPIO_ACTIVE_HIGH>;
39			label = "USR3 LED";
40		};
41	};
42
43	gpio_keys {
44		compatible = "gpio-keys";
45		user_button: button_0 {
46			label = "User";
47			gpios = <&gpiob 2 GPIO_ACTIVE_LOW>;
48			zephyr,code = <INPUT_KEY_0>;
49		};
50	};
51
52	aliases {
53		led0 = &green_led_0;
54		led1 = &green_led_1;
55		led2 = &green_led_2;
56		led3 = &green_led_3;
57		sw0 = &user_button;
58	};
59};
60
61&clk_lsi {
62	status = "okay";
63};
64
65&clk_hsi {
66	status = "okay";
67};
68
69&pll {
70	div-m = <16>;
71	mul-n = <336>;
72	div-p = <4>;
73	clocks = <&clk_hsi>;
74	status = "okay";
75};
76
77&rcc {
78	clocks = <&pll>;
79	clock-frequency = <DT_FREQ_M(84)>;
80	ahb-prescaler = <1>;
81	apb1-prescaler = <2>;
82	apb2-prescaler = <1>;
83};
84
85&usart1 {
86	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
87	pinctrl-names = "default";
88	current-speed = <115200>;
89	status = "okay";
90};
91
92&i2c1 {
93	pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
94	pinctrl-names = "default";
95	status = "okay";
96	clock-frequency = <I2C_BITRATE_FAST>;
97};
98
99&i2c2 {
100	pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>;
101	pinctrl-names = "default";
102	status = "okay";
103	clock-frequency = <I2C_BITRATE_FAST>;
104};
105
106&i2c3 {
107	pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>;
108	pinctrl-names = "default";
109	status = "okay";
110	clock-frequency = <I2C_BITRATE_STANDARD>;
111
112	lp3943@60 {
113		compatible = "ti,lp3943";
114		reg = <0x60>;
115	};
116};
117
118&spi1 {
119	pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
120		     &spi1_miso_pa6 &spi1_mosi_pa7>;
121	pinctrl-names = "default";
122	status = "okay";
123};
124
125&rtc {
126	clocks = <&rcc STM32_CLOCK(APB1, 28)>,
127		 <&rcc STM32_SRC_LSI RTC_SEL(2)>;
128	status = "okay";
129};
130