1/*
2 * Copyright (c) 2023 Felipe Neves
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/h7/stm32h747Xi_m4.dtsi>
9#include <st/h7/stm32h747xihx-pinctrl.dtsi>
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Arduino OPTA M4 core Programmable Logic Controller";
14	compatible = "arduino,opta-m4";
15
16	chosen {
17		zephyr,sram = &sram1;
18		zephyr,flash = &flash1;
19		zephyr,code-partition = &slot0_partition;
20	};
21
22	leds {
23		compatible = "gpio-leds";
24		status_led_1: led_1 {
25			gpios = <&gpioi 0 GPIO_ACTIVE_LOW>;
26		};
27		status_led_2: led_2 {
28			gpios = <&gpioi 1 GPIO_ACTIVE_LOW>;
29		};
30		status_led_3: led_3 {
31			gpios = <&gpioi 3 GPIO_ACTIVE_LOW>;
32		};
33		status_led_4: led_4 {
34			gpios = <&gpioh 15 GPIO_ACTIVE_LOW>;
35		};
36	};
37
38	gpio_keys {
39		compatible = "gpio-keys";
40
41		user_button: button {
42			gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>;
43			zephyr,code = <INPUT_KEY_WAKEUP>;
44		};
45	};
46
47	aliases {
48		sw0 = &user_button;
49		led0 = &status_led_1;
50	};
51};
52
53&flash1 {
54	partitions {
55		compatible = "fixed-partitions";
56		#address-cells = <1>;
57		#size-cells = <1>;
58
59		slot0_partition: partition@80000 {
60			label = "image-0";
61			reg = <0x00080000 DT_SIZE_K(512)>;
62		};
63	};
64};
65
66&rcc {
67	d1cpre = <1>;
68	hpre = <2>;
69	d1ppre = <2>;
70	d2ppre1 = <2>;
71	d2ppre2 = <2>;
72	d3ppre = <2>;
73	clock-frequency = <DT_FREQ_M(240)>;
74};
75