GNU Linux-libre 4.19.264-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                 reg = <0x00000000 0x2000000>;
65         };
66
67         aliases {
68                 serial0 = &usart1;
69         };
70
71         clocks {
72                 clk_ext_camera: clk-ext-camera {
73                         #clock-cells = <0>;
74                         compatible = "fixed-clock";
75                         clock-frequency = <24000000>;
76                 };
77         };
78
79         soc {
80                 dma-ranges = <0xc0000000 0x0 0x10000000>;
81         };
82
83         regulators {
84                 compatible = "simple-bus";
85                 #address-cells = <1>;
86                 #size-cells = <0>;
87
88                 reg_vref: regulator@0 {
89                         compatible = "regulator-fixed";
90                         reg = <0>;
91                         regulator-name = "vref";
92                         regulator-min-microvolt = <3300000>;
93                         regulator-max-microvolt = <3300000>;
94                 };
95         };
96
97         leds {
98                 compatible = "gpio-leds";
99                 green {
100                         gpios = <&gpiog 6 1>;
101                         linux,default-trigger = "heartbeat";
102                 };
103                 orange {
104                         gpios = <&gpiog 7 1>;
105                 };
106                 red {
107                         gpios = <&gpiog 10 1>;
108                 };
109                 blue {
110                         gpios = <&gpiog 12 1>;
111                 };
112         };
113
114         gpio-keys {
115                 compatible = "gpio-keys";
116                 autorepeat;
117                 button-0 {
118                         label = "Wake up";
119                         linux,code = <KEY_WAKEUP>;
120                         gpios = <&gpioa 0 0>;
121                 };
122                 button-1 {
123                         label = "Tamper";
124                         linux,code = <KEY_RESTART>;
125                         gpios = <&gpioc 13 0>;
126                 };
127         };
128
129         usbotg_hs_phy: usbphy {
130                 #phy-cells = <0>;
131                 compatible = "usb-nop-xceiv";
132                 clocks = <&rcc 0 STM32F4_AHB1_CLOCK(OTGHSULPI)>;
133                 clock-names = "main_clk";
134         };
135
136         panel_rgb: panel-rgb {
137                 compatible = "ampire,am-480272h3tmqw-t01h";
138                 status = "okay";
139                 port {
140                         panel_in_rgb: endpoint {
141                                 remote-endpoint = <&ltdc_out_rgb>;
142                         };
143                 };
144         };
145
146         mmc_vcard: mmc_vcard {
147                 compatible = "regulator-fixed";
148                 regulator-name = "mmc_vcard";
149                 regulator-min-microvolt = <3300000>;
150                 regulator-max-microvolt = <3300000>;
151         };
152 };
153
154 &adc {
155         pinctrl-names = "default";
156         pinctrl-0 = <&adc3_in8_pin>;
157         vref-supply = <&reg_vref>;
158         status = "okay";
159         adc3: adc@200 {
160                 st,adc-channels = <8>;
161                 status = "okay";
162         };
163 };
164
165 &clk_hse {
166         clock-frequency = <25000000>;
167 };
168
169 &crc {
170         status = "okay";
171 };
172
173 &dcmi {
174         status = "okay";
175
176         port {
177                 dcmi_0: endpoint {
178                         remote-endpoint = <&ov2640_0>;
179                         bus-width = <8>;
180                         hsync-active = <0>;
181                         vsync-active = <0>;
182                         pclk-sample = <1>;
183                 };
184         };
185 };
186
187 &i2c1 {
188         pinctrl-0 = <&i2c1_pins>;
189         pinctrl-names = "default";
190         status = "okay";
191
192         ov2640: camera@30 {
193                 compatible = "ovti,ov2640";
194                 reg = <0x30>;
195                 resetb-gpios = <&stmpegpio 2 GPIO_ACTIVE_HIGH>;
196                 pwdn-gpios = <&stmpegpio 0 GPIO_ACTIVE_LOW>;
197                 clocks = <&clk_ext_camera>;
198                 clock-names = "xvclk";
199                 status = "okay";
200
201                 port {
202                         ov2640_0: endpoint {
203                                 remote-endpoint = <&dcmi_0>;
204                         };
205                 };
206         };
207
208         stmpe1600: stmpe1600@42 {
209                 compatible = "st,stmpe1600";
210                 reg = <0x42>;
211                 interrupts = <8 3>;
212                 interrupt-parent = <&gpioi>;
213                 interrupt-controller;
214                 wakeup-source;
215
216                 stmpegpio: stmpe_gpio {
217                         compatible = "st,stmpe-gpio";
218                         gpio-controller;
219                         #gpio-cells = <2>;
220                 };
221         };
222 };
223
224 &iwdg {
225         status = "okay";
226         timeout-sec = <32>;
227 };
228
229 &ltdc {
230         status = "okay";
231         pinctrl-0 = <&ltdc_pins>;
232         pinctrl-names = "default";
233         dma-ranges;
234
235         port {
236                 ltdc_out_rgb: endpoint {
237                         remote-endpoint = <&panel_in_rgb>;
238                 };
239         };
240 };
241
242 &mac {
243         status = "okay";
244         pinctrl-0       = <&ethernet_mii>;
245         pinctrl-names   = "default";
246         phy-mode        = "mii";
247         phy-handle      = <&phy1>;
248         mdio0 {
249                 #address-cells = <1>;
250                 #size-cells = <0>;
251                 compatible = "snps,dwmac-mdio";
252                 phy1: ethernet-phy@1 {
253                         reg = <1>;
254                 };
255         };
256 };
257
258 &rtc {
259         status = "okay";
260 };
261
262 &sdio {
263         status = "okay";
264         vmmc-supply = <&mmc_vcard>;
265         cd-gpios = <&stmpegpio 15 GPIO_ACTIVE_HIGH>;
266         cd-inverted;
267         pinctrl-names = "default", "opendrain";
268         pinctrl-0 = <&sdio_pins>;
269         pinctrl-1 = <&sdio_pins_od>;
270         bus-width = <4>;
271         max-frequency = <12500000>;
272 };
273
274 &timers1 {
275         status = "okay";
276
277         pwm {
278                 pinctrl-0 = <&pwm1_pins>;
279                 pinctrl-names = "default";
280                 status = "okay";
281         };
282
283         timer@0 {
284                 status = "okay";
285         };
286 };
287
288 &timers3 {
289         status = "okay";
290
291         pwm {
292                 pinctrl-0 = <&pwm3_pins>;
293                 pinctrl-names = "default";
294                 status = "okay";
295         };
296
297         timer@2 {
298                 status = "okay";
299         };
300 };
301
302 &usart1 {
303         pinctrl-0 = <&usart1_pins_a>;
304         pinctrl-names = "default";
305         status = "okay";
306 };
307
308 &usbotg_hs {
309         dr_mode = "host";
310         phys = <&usbotg_hs_phy>;
311         phy-names = "usb2-phy";
312         pinctrl-0 = <&usbotg_hs_pins_a>;
313         pinctrl-names = "default";
314         status = "okay";
315 };