1/*
2 * Copyright (c) 2022 Joylab AG <team@joylab.ch>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/g0/stm32g031X8.dtsi>
9#include <st/g0/stm32g031k(4-6-8)tx-pinctrl.dtsi>
10#include "arduino_nano_r3_connector.dtsi"
11
12/ {
13	model = "STMicroelectronics STM32G031K8-NUCLEO board";
14	compatible = "st,stm32g031k8-nucleo";
15
16	chosen {
17		zephyr,console = &usart2;
18		zephyr,shell-uart = &usart2;
19		zephyr,sram = &sram0;
20		zephyr,flash = &flash0;
21	};
22
23	leds: leds {
24		compatible = "gpio-leds";
25		green_led_3: led_3 {
26			gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
27			label = "User LD3";
28		};
29	};
30
31	aliases {
32		led0 = &green_led_3;
33	};
34};
35
36&clk_hsi {
37	status = "okay";
38};
39
40&pll {
41	div-m = <1>;
42	mul-n = <8>;
43	div-r = <2>;
44	clocks = <&clk_hsi>;
45	status = "okay";
46};
47
48&rcc {
49	clocks = <&pll>;
50	clock-frequency = <DT_FREQ_M(64)>;
51	ahb-prescaler = <1>;
52	apb1-prescaler = <1>;
53};
54
55&usart1 {
56	pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
57	pinctrl-names = "default";
58	current-speed = <115200>;
59};
60
61&usart2 {
62	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
63	pinctrl-names = "default";
64	current-speed = <115200>;
65	status = "okay";
66};
67
68&i2c1 {
69	pinctrl-0 = <&i2c1_scl_pa9 &i2c1_sda_pa10>;
70	pinctrl-names = "default";
71	clock-frequency = <I2C_BITRATE_FAST>;
72	status = "okay";
73};
74
75&i2c2 {
76	pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>;
77	pinctrl-names = "default";
78	clock-frequency = <I2C_BITRATE_FAST>;
79	status = "okay";
80};
81
82&spi1 {
83	pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>;
84	pinctrl-names = "default";
85	status = "okay";
86};
87