blob: 0e6445a539e56520029637c9074ca972012cf4cb [file] [log] [blame]
Patrick Delaunayc5c90692019-11-06 16:16:32 +01001// SPDX-License-Identifier: GPL-2.0+ OR X11
Patrice Chotard10363512018-02-16 13:27:03 +01002/*
Patrice Chotard24dffa52019-02-19 16:49:05 +01003 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
Patrice Chotard10363512018-02-16 13:27:03 +01004 *
Patrice Chotard10363512018-02-16 13:27:03 +01005 */
6
7/dts-v1/;
8#include "stm32f746.dtsi"
Patrice Chotard24dffa52019-02-19 16:49:05 +01009#include "stm32f746-pinctrl.dtsi"
10#include <dt-bindings/input/input.h>
Patrick Delaunayc5c90692019-11-06 16:16:32 +010011#include <dt-bindings/interrupt-controller/irq.h>
Patrice Chotard10363512018-02-16 13:27:03 +010012
13/ {
Patrice Chotard24dffa52019-02-19 16:49:05 +010014 model = "STMicroelectronics STM32746g-EVAL board";
15 compatible = "st,stm32746g-eval", "st,stm32f746";
Patrice Chotard10363512018-02-16 13:27:03 +010016
17 chosen {
Patrice Chotard24dffa52019-02-19 16:49:05 +010018 bootargs = "root=/dev/ram";
Patrice Chotard10363512018-02-16 13:27:03 +010019 stdout-path = "serial0:115200n8";
20 };
21
Patrice Chotard62f56162020-11-06 08:11:58 +010022 memory@c0000000 {
Patrick Delaunayc5c90692019-11-06 16:16:32 +010023 device_type = "memory";
Patrice Chotard24dffa52019-02-19 16:49:05 +010024 reg = <0xc0000000 0x2000000>;
Patrice Chotard10363512018-02-16 13:27:03 +010025 };
26
27 aliases {
28 serial0 = &usart1;
Patrice Chotard10363512018-02-16 13:27:03 +010029 };
Patrice Chotard24dffa52019-02-19 16:49:05 +010030
31 leds {
32 compatible = "gpio-leds";
Patrice Chotard62f56162020-11-06 08:11:58 +010033 led-green {
Patrice Chotard24dffa52019-02-19 16:49:05 +010034 gpios = <&gpiof 10 1>;
35 linux,default-trigger = "heartbeat";
36 };
Patrice Chotard62f56162020-11-06 08:11:58 +010037 led-orange {
Patrick Delaunayc5c90692019-11-06 16:16:32 +010038 gpios = <&stmfx_pinctrl 17 1>;
39 };
Patrice Chotard62f56162020-11-06 08:11:58 +010040 led-red {
Patrice Chotard24dffa52019-02-19 16:49:05 +010041 gpios = <&gpiob 7 1>;
42 };
Patrice Chotard62f56162020-11-06 08:11:58 +010043 led-blue {
Patrick Delaunayc5c90692019-11-06 16:16:32 +010044 gpios = <&stmfx_pinctrl 19 1>;
45 };
Patrice Chotard24dffa52019-02-19 16:49:05 +010046 };
47
Patrice Chotard83975322022-09-23 13:20:33 +020048 gpio-keys {
Patrice Chotard24dffa52019-02-19 16:49:05 +010049 compatible = "gpio-keys";
Patrice Chotard24dffa52019-02-19 16:49:05 +010050 autorepeat;
Patrice Chotard83975322022-09-23 13:20:33 +020051 button-0 {
Patrice Chotard24dffa52019-02-19 16:49:05 +010052 label = "Wake up";
53 linux,code = <KEY_WAKEUP>;
54 gpios = <&gpioc 13 0>;
55 };
56 };
57
Patrick Delaunayc5c90692019-11-06 16:16:32 +010058 joystick {
59 compatible = "gpio-keys";
Patrick Delaunayc5c90692019-11-06 16:16:32 +010060 pinctrl-0 = <&joystick_pins>;
61 pinctrl-names = "default";
62 button-0 {
63 label = "JoySel";
64 linux,code = <KEY_ENTER>;
65 interrupt-parent = <&stmfx_pinctrl>;
66 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
67 };
68 button-1 {
69 label = "JoyDown";
70 linux,code = <KEY_DOWN>;
71 interrupt-parent = <&stmfx_pinctrl>;
72 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
73 };
74 button-2 {
75 label = "JoyLeft";
76 linux,code = <KEY_LEFT>;
77 interrupt-parent = <&stmfx_pinctrl>;
78 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
79 };
80 button-3 {
81 label = "JoyRight";
82 linux,code = <KEY_RIGHT>;
83 interrupt-parent = <&stmfx_pinctrl>;
84 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
85 };
86 button-4 {
87 label = "JoyUp";
88 linux,code = <KEY_UP>;
89 interrupt-parent = <&stmfx_pinctrl>;
90 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
91 };
92 };
93
Patrice Chotard24dffa52019-02-19 16:49:05 +010094 usbotg_hs_phy: usb-phy {
95 #phy-cells = <0>;
96 compatible = "usb-nop-xceiv";
97 clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>;
98 clock-names = "main_clk";
99 };
100
101 mmc_vcard: mmc_vcard {
102 compatible = "regulator-fixed";
103 regulator-name = "mmc_vcard";
104 regulator-min-microvolt = <3300000>;
105 regulator-max-microvolt = <3300000>;
106 };
Patrice Chotard10363512018-02-16 13:27:03 +0100107};
108
109&clk_hse {
110 clock-frequency = <25000000>;
111};
112
Patrice Chotard24dffa52019-02-19 16:49:05 +0100113&crc {
114 status = "okay";
Patrice Chotard10363512018-02-16 13:27:03 +0100115};
116
Patrice Chotard24dffa52019-02-19 16:49:05 +0100117&i2c1 {
118 pinctrl-0 = <&i2c1_pins_b>;
Patrice Chotard10363512018-02-16 13:27:03 +0100119 pinctrl-names = "default";
Patrice Chotard24dffa52019-02-19 16:49:05 +0100120 i2c-scl-rising-time-ns = <185>;
121 i2c-scl-falling-time-ns = <20>;
122 status = "okay";
Patrick Delaunayc5c90692019-11-06 16:16:32 +0100123
124 stmfx: stmfx@42 {
125 compatible = "st,stmfx-0300";
126 reg = <0x42>;
127 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
128 interrupt-parent = <&gpioi>;
129
Patrice Chotard62f56162020-11-06 08:11:58 +0100130 stmfx_pinctrl: pinctrl {
Patrick Delaunayc5c90692019-11-06 16:16:32 +0100131 compatible = "st,stmfx-0300-pinctrl";
132 gpio-controller;
133 #gpio-cells = <2>;
134 interrupt-controller;
135 #interrupt-cells = <2>;
136 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
137
138 joystick_pins: joystick {
139 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
140 drive-push-pull;
141 bias-pull-up;
142 };
143 };
144 };
Patrice Chotard24dffa52019-02-19 16:49:05 +0100145};
146
147&rtc {
Patrice Chotard10363512018-02-16 13:27:03 +0100148 status = "okay";
Patrice Chotard10363512018-02-16 13:27:03 +0100149};
150
Patrice Chotard24dffa52019-02-19 16:49:05 +0100151&sdio1 {
Patrice Chotard10363512018-02-16 13:27:03 +0100152 status = "okay";
Patrice Chotard24dffa52019-02-19 16:49:05 +0100153 vmmc-supply = <&mmc_vcard>;
154 broken-cd;
Patrice Chotard10363512018-02-16 13:27:03 +0100155 pinctrl-names = "default", "opendrain";
Patrice Chotard24dffa52019-02-19 16:49:05 +0100156 pinctrl-0 = <&sdio_pins_a>;
157 pinctrl-1 = <&sdio_pins_od_a>;
Patrice Chotard10363512018-02-16 13:27:03 +0100158 bus-width = <4>;
Patrice Chotard24dffa52019-02-19 16:49:05 +0100159};
160
Patrice Chotard83975322022-09-23 13:20:33 +0200161&timers5 {
162 /* Override timer5 to act as clockevent */
163 compatible = "st,stm32-timer";
164 interrupts = <50>;
165 status = "okay";
166 /delete-property/#address-cells;
167 /delete-property/#size-cells;
168 /delete-property/clock-names;
169 /delete-node/pwm;
170 /delete-node/timer@4;
171};
172
Patrice Chotard24dffa52019-02-19 16:49:05 +0100173&usart1 {
174 pinctrl-0 = <&usart1_pins_a>;
175 pinctrl-names = "default";
176 status = "okay";
177};
178
179&usbotg_hs {
180 dr_mode = "otg";
181 phys = <&usbotg_hs_phy>;
182 phy-names = "usb2-phy";
183 pinctrl-0 = <&usbotg_hs_pins_a>;
184 pinctrl-names = "default";
185 status = "okay";
Patrice Chotard10363512018-02-16 13:27:03 +0100186};