1/*
2 * Copyright (c) 2019 SEAL AG
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/g0/stm32g031X6.dtsi>
9#include <st/g0/stm32g031j(4-6)mx-pinctrl.dtsi>
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "STMicroelectronics STM32G0316 Discovery board";
14	compatible = "st,stm32g0316-disco";
15
16	aliases {
17		led0 = &green_led_1;
18		sw0 = &user_button;
19		watchdog0 = &iwdg;
20	};
21
22	chosen {
23		zephyr,console = &usart1;
24		zephyr,shell-uart = &usart1;
25		zephyr,sram = &sram0;
26		zephyr,flash = &flash0;
27	};
28
29	leds {
30		compatible = "gpio-leds";
31		green_led_1: led_2 {
32			gpios = <&gpioa 12 GPIO_ACTIVE_LOW>;
33			label = "User LD2";
34		};
35	};
36
37	gpio_keys {
38		compatible = "gpio-keys";
39		user_button: button {
40			label = "User";
41			gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
42			zephyr,code = <INPUT_KEY_0>;
43		};
44	};
45};
46
47&clk_hsi {
48	status = "okay";
49};
50
51&pll {
52	div-m = <1>;
53	mul-n = <8>;
54	div-p = <2>;
55	div-q = <2>;
56	div-r = <2>;
57	clocks = <&clk_hsi>;
58	status = "okay";
59};
60
61&rcc {
62	clocks = <&pll>;
63	clock-frequency = <DT_FREQ_M(64)>;
64	ahb-prescaler = <1>;
65	apb1-prescaler = <1>;
66};
67
68&pinctrl {
69	remap-pa11;
70};
71
72&usart1 {
73	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pb7>;
74	pinctrl-names = "default";
75	current-speed = <115200>;
76	status = "okay";
77};
78
79&iwdg {
80	status = "okay";
81};
82