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