GNU Linux-libre 5.4.274-gnu1
[releases.git] / arch / arm / boot / dts / stm32429i-eval.dts
1 /*
2  * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This file is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  *     You should have received a copy of the GNU General Public
20  *     License along with this file; if not, write to the Free
21  *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22  *     MA 02110-1301 USA
23  *
24  * Or, alternatively,
25  *
26  *  b) Permission is hereby granted, free of charge, to any person
27  *     obtaining a copy of this software and associated documentation
28  *     files (the "Software"), to deal in the Software without
29  *     restriction, including without limitation the rights to use,
30  *     copy, modify, merge, publish, distribute, sublicense, and/or
31  *     sell copies of the Software, and to permit persons to whom the
32  *     Software is furnished to do so, subject to the following
33  *     conditions:
34  *
35  *     The above copyright notice and this permission notice shall be
36  *     included in all copies or substantial portions of the Software.
37  *
38  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45  *     OTHER DEALINGS IN THE SOFTWARE.
46  */
47
48 /dts-v1/;
49 #include "stm32f429.dtsi"
50 #include "stm32f429-pinctrl.dtsi"
51 #include <dt-bindings/input/input.h>
52 #include <dt-bindings/gpio/gpio.h>
53
54 / {
55         model = "STMicroelectronics STM32429i-EVAL board";
56         compatible = "st,stm32429i-eval", "st,stm32f429";
57
58         chosen {
59                 bootargs = "root=/dev/ram";
60                 stdout-path = "serial0:115200n8";
61         };
62
63         memory {
64                 device_type = "memory";
65                 reg = <0x00000000 0x2000000>;
66         };
67
68         aliases {
69                 serial0 = &usart1;
70         };
71
72         clocks {
73                 clk_ext_camera: clk-ext-camera {
74                         #clock-cells = <0>;
75                         compatible = "fixed-clock";
76                         clock-frequency = <24000000>;
77                 };
78         };
79
80         soc {
81                 dma-ranges = <0xc0000000 0x0 0x10000000>;
82         };
83
84         vdda: regulator-vdda {
85                 compatible = "regulator-fixed";
86                 regulator-name = "vdda";
87                 regulator-min-microvolt = <3300000>;
88                 regulator-max-microvolt = <3300000>;
89         };
90
91         vref: regulator-vref {
92                 compatible = "regulator-fixed";
93                 regulator-name = "vref";
94                 regulator-min-microvolt = <3300000>;
95                 regulator-max-microvolt = <3300000>;
96         };
97
98         leds {
99                 compatible = "gpio-leds";
100                 green {
101                         gpios = <&gpiog 6 1>;
102                         linux,default-trigger = "heartbeat";
103                 };
104                 orange {
105                         gpios = <&gpiog 7 1>;
106                 };
107                 red {
108                         gpios = <&gpiog 10 1>;
109                 };
110                 blue {
111                         gpios = <&gpiog 12 1>;
112                 };
113         };
114
115         gpio-keys {
116                 compatible = "gpio-keys";
117                 autorepeat;
118                 button-0 {
119                         label = "Wake up";
120                         linux,code = <KEY_WAKEUP>;
121                         gpios = <&gpioa 0 0>;
122                 };
123                 button-1 {
124                         label = "Tamper";
125                         linux,code = <KEY_RESTART>;
126                         gpios = <&gpioc 13 0>;
127                 };
128         };
129
130         usbotg_hs_phy: usbphy {
131                 #phy-cells = <0>;
132                 compatible = "usb-nop-xceiv";
133                 clocks = <&rcc 0 STM32F4_AHB1_CLOCK(OTGHSULPI)>;
134                 clock-names = "main_clk";
135         };
136
137         panel_rgb: panel-rgb {
138                 compatible = "ampire,am-480272h3tmqw-t01h";
139                 status = "okay";
140                 port {
141                         panel_in_rgb: endpoint {
142                                 remote-endpoint = <&ltdc_out_rgb>;
143                         };
144                 };
145         };
146
147         mmc_vcard: mmc_vcard {
148                 compatible = "regulator-fixed";
149                 regulator-name = "mmc_vcard";
150                 regulator-min-microvolt = <3300000>;
151                 regulator-max-microvolt = <3300000>;
152         };
153 };
154
155 &adc {
156         pinctrl-names = "default";
157         pinctrl-0 = <&adc3_in8_pin>;
158         vdda-supply = <&vdda>;
159         vref-supply = <&vref>;
160         status = "okay";
161         adc3: adc@200 {
162                 st,adc-channels = <8>;
163                 status = "okay";
164         };
165 };
166
167 &clk_hse {
168         clock-frequency = <25000000>;
169 };
170
171 &crc {
172         status = "okay";
173 };
174
175 &dcmi {
176         status = "okay";
177
178         port {
179                 dcmi_0: endpoint {
180                         remote-endpoint = <&ov2640_0>;
181                         bus-width = <8>;
182                         hsync-active = <0>;
183                         vsync-active = <0>;
184                         pclk-sample = <1>;
185                 };
186         };
187 };
188
189 &i2c1 {
190         pinctrl-0 = <&i2c1_pins>;
191         pinctrl-names = "default";
192         status = "okay";
193
194         ov2640: camera@30 {
195                 compatible = "ovti,ov2640";
196                 reg = <0x30>;
197                 resetb-gpios = <&stmpegpio 2 GPIO_ACTIVE_HIGH>;
198                 pwdn-gpios = <&stmpegpio 0 GPIO_ACTIVE_LOW>;
199                 clocks = <&clk_ext_camera>;
200                 clock-names = "xvclk";
201                 status = "okay";
202
203                 port {
204                         ov2640_0: endpoint {
205                                 remote-endpoint = <&dcmi_0>;
206                         };
207                 };
208         };
209
210         stmpe1600: stmpe1600@42 {
211                 compatible = "st,stmpe1600";
212                 reg = <0x42>;
213                 interrupts = <8 3>;
214                 interrupt-parent = <&gpioi>;
215                 interrupt-controller;
216                 wakeup-source;
217
218                 stmpegpio: stmpe_gpio {
219                         compatible = "st,stmpe-gpio";
220                         gpio-controller;
221                         #gpio-cells = <2>;
222                 };
223         };
224 };
225
226 &iwdg {
227         status = "okay";
228         timeout-sec = <32>;
229 };
230
231 &ltdc {
232         status = "okay";
233         pinctrl-0 = <&ltdc_pins>;
234         pinctrl-names = "default";
235         dma-ranges;
236
237         port {
238                 ltdc_out_rgb: endpoint {
239                         remote-endpoint = <&panel_in_rgb>;
240                 };
241         };
242 };
243
244 &mac {
245         status = "okay";
246         pinctrl-0       = <&ethernet_mii>;
247         pinctrl-names   = "default";
248         phy-mode        = "mii";
249         phy-handle      = <&phy1>;
250         mdio0 {
251                 #address-cells = <1>;
252                 #size-cells = <0>;
253                 compatible = "snps,dwmac-mdio";
254                 phy1: ethernet-phy@1 {
255                         reg = <1>;
256                 };
257         };
258 };
259
260 &rtc {
261         status = "okay";
262 };
263
264 &sdio {
265         status = "okay";
266         vmmc-supply = <&mmc_vcard>;
267         cd-gpios = <&stmpegpio 15 GPIO_ACTIVE_LOW>;
268         pinctrl-names = "default", "opendrain";
269         pinctrl-0 = <&sdio_pins>;
270         pinctrl-1 = <&sdio_pins_od>;
271         bus-width = <4>;
272         max-frequency = <12500000>;
273 };
274
275 &timers1 {
276         status = "okay";
277
278         pwm {
279                 pinctrl-0 = <&pwm1_pins>;
280                 pinctrl-names = "default";
281                 status = "okay";
282         };
283
284         timer@0 {
285                 status = "okay";
286         };
287 };
288
289 &timers3 {
290         status = "okay";
291
292         pwm {
293                 pinctrl-0 = <&pwm3_pins>;
294                 pinctrl-names = "default";
295                 status = "okay";
296         };
297
298         timer@2 {
299                 status = "okay";
300         };
301 };
302
303 &usart1 {
304         pinctrl-0 = <&usart1_pins_a>;
305         pinctrl-names = "default";
306         status = "okay";
307 };
308
309 &usbotg_hs {
310         dr_mode = "host";
311         phys = <&usbotg_hs_phy>;
312         phy-names = "usb2-phy";
313         pinctrl-0 = <&usbotg_hs_pins_a>;
314         pinctrl-names = "default";
315         status = "okay";
316 };