blob: d77eb53c6aab5f9e7e684d14eea4075f13e80efe [file] [log] [blame]
Patrick Delaunaye07a86b2019-11-06 16:16:32 +01001// SPDX-License-Identifier: GPL-2.0+ OR X11
Patrice Chotardd0d64512018-02-16 13:27:03 +01002/*
Patrice Chotardfe63d3c2019-02-19 16:49:05 +01003 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
Patrice Chotardd0d64512018-02-16 13:27:03 +01004 *
Patrice Chotardd0d64512018-02-16 13:27:03 +01005 */
6
7/dts-v1/;
8#include "stm32f746.dtsi"
Patrice Chotardfe63d3c2019-02-19 16:49:05 +01009#include "stm32f746-pinctrl.dtsi"
10#include <dt-bindings/input/input.h>
Patrick Delaunaye07a86b2019-11-06 16:16:32 +010011#include <dt-bindings/interrupt-controller/irq.h>
Patrice Chotardd0d64512018-02-16 13:27:03 +010012
13/ {
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010014 model = "STMicroelectronics STM32746g-EVAL board";
15 compatible = "st,stm32746g-eval", "st,stm32f746";
Patrice Chotardd0d64512018-02-16 13:27:03 +010016
17 chosen {
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010018 bootargs = "root=/dev/ram";
Patrice Chotardd0d64512018-02-16 13:27:03 +010019 stdout-path = "serial0:115200n8";
20 };
21
22 memory {
Patrick Delaunaye07a86b2019-11-06 16:16:32 +010023 device_type = "memory";
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010024 reg = <0xc0000000 0x2000000>;
Patrice Chotardd0d64512018-02-16 13:27:03 +010025 };
26
27 aliases {
28 serial0 = &usart1;
Patrice Chotardd0d64512018-02-16 13:27:03 +010029 };
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010030
31 leds {
32 compatible = "gpio-leds";
33 green {
34 gpios = <&gpiof 10 1>;
35 linux,default-trigger = "heartbeat";
36 };
Patrick Delaunaye07a86b2019-11-06 16:16:32 +010037 orange {
38 gpios = <&stmfx_pinctrl 17 1>;
39 };
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010040 red {
41 gpios = <&gpiob 7 1>;
42 };
Patrick Delaunaye07a86b2019-11-06 16:16:32 +010043 blue {
44 gpios = <&stmfx_pinctrl 19 1>;
45 };
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010046 };
47
48 gpio_keys {
49 compatible = "gpio-keys";
50 #address-cells = <1>;
51 #size-cells = <0>;
52 autorepeat;
53 button@0 {
54 label = "Wake up";
55 linux,code = <KEY_WAKEUP>;
56 gpios = <&gpioc 13 0>;
57 };
58 };
59
Patrick Delaunaye07a86b2019-11-06 16:16:32 +010060 joystick {
61 compatible = "gpio-keys";
62 #size-cells = <0>;
63 pinctrl-0 = <&joystick_pins>;
64 pinctrl-names = "default";
65 button-0 {
66 label = "JoySel";
67 linux,code = <KEY_ENTER>;
68 interrupt-parent = <&stmfx_pinctrl>;
69 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
70 };
71 button-1 {
72 label = "JoyDown";
73 linux,code = <KEY_DOWN>;
74 interrupt-parent = <&stmfx_pinctrl>;
75 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
76 };
77 button-2 {
78 label = "JoyLeft";
79 linux,code = <KEY_LEFT>;
80 interrupt-parent = <&stmfx_pinctrl>;
81 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
82 };
83 button-3 {
84 label = "JoyRight";
85 linux,code = <KEY_RIGHT>;
86 interrupt-parent = <&stmfx_pinctrl>;
87 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
88 };
89 button-4 {
90 label = "JoyUp";
91 linux,code = <KEY_UP>;
92 interrupt-parent = <&stmfx_pinctrl>;
93 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
94 };
95 };
96
Patrice Chotardfe63d3c2019-02-19 16:49:05 +010097 usbotg_hs_phy: usb-phy {
98 #phy-cells = <0>;
99 compatible = "usb-nop-xceiv";
100 clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>;
101 clock-names = "main_clk";
102 };
103
104 mmc_vcard: mmc_vcard {
105 compatible = "regulator-fixed";
106 regulator-name = "mmc_vcard";
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
109 };
Patrice Chotardd0d64512018-02-16 13:27:03 +0100110};
111
112&clk_hse {
113 clock-frequency = <25000000>;
114};
115
Patrice Chotardfe63d3c2019-02-19 16:49:05 +0100116&crc {
117 status = "okay";
118};
119
120&i2c1 {
121 pinctrl-0 = <&i2c1_pins_b>;
122 pinctrl-names = "default";
123 i2c-scl-rising-time-ns = <185>;
124 i2c-scl-falling-time-ns = <20>;
125 status = "okay";
Patrick Delaunaye07a86b2019-11-06 16:16:32 +0100126
127 stmfx: stmfx@42 {
128 compatible = "st,stmfx-0300";
129 reg = <0x42>;
130 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
131 interrupt-parent = <&gpioi>;
132
133 stmfx_pinctrl: stmfx-pin-controller {
134 compatible = "st,stmfx-0300-pinctrl";
135 gpio-controller;
136 #gpio-cells = <2>;
137 interrupt-controller;
138 #interrupt-cells = <2>;
139 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
140
141 joystick_pins: joystick {
142 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
143 drive-push-pull;
144 bias-pull-up;
145 };
146 };
147 };
Patrice Chotardfe63d3c2019-02-19 16:49:05 +0100148};
149
150&rtc {
151 status = "okay";
152};
153
154&sdio1 {
155 status = "okay";
156 vmmc-supply = <&mmc_vcard>;
157 broken-cd;
158 pinctrl-names = "default", "opendrain";
159 pinctrl-0 = <&sdio_pins_a>;
160 pinctrl-1 = <&sdio_pins_od_a>;
161 bus-width = <4>;
Patrice Chotardd0d64512018-02-16 13:27:03 +0100162};
163
164&usart1 {
165 pinctrl-0 = <&usart1_pins_a>;
166 pinctrl-names = "default";
167 status = "okay";
168};
169
Patrice Chotardfe63d3c2019-02-19 16:49:05 +0100170&usbotg_hs {
171 dr_mode = "otg";
172 phys = <&usbotg_hs_phy>;
173 phy-names = "usb2-phy";
174 pinctrl-0 = <&usbotg_hs_pins_a>;
175 pinctrl-names = "default";
Patrice Chotardd0d64512018-02-16 13:27:03 +0100176 status = "okay";
Patrice Chotardd0d64512018-02-16 13:27:03 +0100177};