1*46b1e54bSPatrice Chotard/*
2*46b1e54bSPatrice Chotard * Copyright (C) 2015, STMicroelectronics - All Rights Reserved
3*46b1e54bSPatrice Chotard * Author(s):  Maxime Coquelin <mcoquelin.stm32@gmail.com> for STMicroelectronics.
4*46b1e54bSPatrice Chotard *
5*46b1e54bSPatrice Chotard * This file is dual-licensed: you can use it either under the terms
6*46b1e54bSPatrice Chotard * of the GPL or the X11 license, at your option. Note that this dual
7*46b1e54bSPatrice Chotard * licensing only applies to this file, and not this project as a
8*46b1e54bSPatrice Chotard * whole.
9*46b1e54bSPatrice Chotard *
10*46b1e54bSPatrice Chotard *  a) This file is free software; you can redistribute it and/or
11*46b1e54bSPatrice Chotard *     modify it under the terms of the GNU General Public License as
12*46b1e54bSPatrice Chotard *     published by the Free Software Foundation; either version 2 of the
13*46b1e54bSPatrice Chotard *     License, or (at your option) any later version.
14*46b1e54bSPatrice Chotard *
15*46b1e54bSPatrice Chotard *     This file is distributed in the hope that it will be useful,
16*46b1e54bSPatrice Chotard *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17*46b1e54bSPatrice Chotard *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*46b1e54bSPatrice Chotard *     GNU General Public License for more details.
19*46b1e54bSPatrice Chotard *
20*46b1e54bSPatrice Chotard * Or, alternatively,
21*46b1e54bSPatrice Chotard *
22*46b1e54bSPatrice Chotard *  b) Permission is hereby granted, free of charge, to any person
23*46b1e54bSPatrice Chotard *     obtaining a copy of this software and associated documentation
24*46b1e54bSPatrice Chotard *     files (the "Software"), to deal in the Software without
25*46b1e54bSPatrice Chotard *     restriction, including without limitation the rights to use,
26*46b1e54bSPatrice Chotard *     copy, modify, merge, publish, distribute, sublicense, and/or
27*46b1e54bSPatrice Chotard *     sell copies of the Software, and to permit persons to whom the
28*46b1e54bSPatrice Chotard *     Software is furnished to do so, subject to the following
29*46b1e54bSPatrice Chotard *     conditions:
30*46b1e54bSPatrice Chotard *
31*46b1e54bSPatrice Chotard *     The above copyright notice and this permission notice shall be
32*46b1e54bSPatrice Chotard *     included in all copies or substantial portions of the Software.
33*46b1e54bSPatrice Chotard *
34*46b1e54bSPatrice Chotard *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35*46b1e54bSPatrice Chotard *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36*46b1e54bSPatrice Chotard *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37*46b1e54bSPatrice Chotard *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38*46b1e54bSPatrice Chotard *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39*46b1e54bSPatrice Chotard *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40*46b1e54bSPatrice Chotard *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41*46b1e54bSPatrice Chotard *     OTHER DEALINGS IN THE SOFTWARE.
42*46b1e54bSPatrice Chotard */
43*46b1e54bSPatrice Chotard
44*46b1e54bSPatrice Chotard/dts-v1/;
45*46b1e54bSPatrice Chotard#include "stm32f429.dtsi"
46*46b1e54bSPatrice Chotard#include "stm32f429-pinctrl.dtsi"
47*46b1e54bSPatrice Chotard#include <dt-bindings/input/input.h>
48*46b1e54bSPatrice Chotard
49*46b1e54bSPatrice Chotard/ {
50*46b1e54bSPatrice Chotard	model = "STMicroelectronics STM32F429i-DISCO board";
51*46b1e54bSPatrice Chotard	compatible = "st,stm32f429i-disco", "st,stm32f429";
52*46b1e54bSPatrice Chotard
53*46b1e54bSPatrice Chotard	chosen {
54*46b1e54bSPatrice Chotard		bootargs = "root=/dev/ram";
55*46b1e54bSPatrice Chotard		stdout-path = "serial0:115200n8";
56*46b1e54bSPatrice Chotard	};
57*46b1e54bSPatrice Chotard
58*46b1e54bSPatrice Chotard	memory {
59*46b1e54bSPatrice Chotard		reg = <0x90000000 0x800000>;
60*46b1e54bSPatrice Chotard	};
61*46b1e54bSPatrice Chotard
62*46b1e54bSPatrice Chotard	aliases {
63*46b1e54bSPatrice Chotard		serial0 = &usart1;
64*46b1e54bSPatrice Chotard	};
65*46b1e54bSPatrice Chotard
66*46b1e54bSPatrice Chotard	leds {
67*46b1e54bSPatrice Chotard		compatible = "gpio-leds";
68*46b1e54bSPatrice Chotard		red {
69*46b1e54bSPatrice Chotard			gpios = <&gpiog 14 0>;
70*46b1e54bSPatrice Chotard		};
71*46b1e54bSPatrice Chotard		green {
72*46b1e54bSPatrice Chotard			gpios = <&gpiog 13 0>;
73*46b1e54bSPatrice Chotard			linux,default-trigger = "heartbeat";
74*46b1e54bSPatrice Chotard		};
75*46b1e54bSPatrice Chotard	};
76*46b1e54bSPatrice Chotard
77*46b1e54bSPatrice Chotard	gpio_keys {
78*46b1e54bSPatrice Chotard		compatible = "gpio-keys";
79*46b1e54bSPatrice Chotard		#size-cells = <0>;
80*46b1e54bSPatrice Chotard		autorepeat;
81*46b1e54bSPatrice Chotard		button@0 {
82*46b1e54bSPatrice Chotard			label = "User";
83*46b1e54bSPatrice Chotard			linux,code = <KEY_HOME>;
84*46b1e54bSPatrice Chotard			gpios = <&gpioa 0 0>;
85*46b1e54bSPatrice Chotard		};
86*46b1e54bSPatrice Chotard	};
87*46b1e54bSPatrice Chotard
88*46b1e54bSPatrice Chotard	/* This turns on vbus for otg for host mode (dwc2) */
89*46b1e54bSPatrice Chotard	vcc5v_otg: vcc5v-otg-regulator {
90*46b1e54bSPatrice Chotard		compatible = "regulator-fixed";
91*46b1e54bSPatrice Chotard		gpio = <&gpioc 4 0>;
92*46b1e54bSPatrice Chotard		regulator-name = "vcc5_host1";
93*46b1e54bSPatrice Chotard		regulator-always-on;
94*46b1e54bSPatrice Chotard	};
95*46b1e54bSPatrice Chotard};
96*46b1e54bSPatrice Chotard
97*46b1e54bSPatrice Chotard&clk_hse {
98*46b1e54bSPatrice Chotard	clock-frequency = <8000000>;
99*46b1e54bSPatrice Chotard};
100*46b1e54bSPatrice Chotard
101*46b1e54bSPatrice Chotard&crc {
102*46b1e54bSPatrice Chotard	status = "okay";
103*46b1e54bSPatrice Chotard};
104*46b1e54bSPatrice Chotard
105*46b1e54bSPatrice Chotard&rtc {
106*46b1e54bSPatrice Chotard	assigned-clocks = <&rcc 1 CLK_RTC>;
107*46b1e54bSPatrice Chotard	assigned-clock-parents = <&rcc 1 CLK_LSI>;
108*46b1e54bSPatrice Chotard	status = "okay";
109*46b1e54bSPatrice Chotard};
110*46b1e54bSPatrice Chotard
111*46b1e54bSPatrice Chotard&usart1 {
112*46b1e54bSPatrice Chotard	pinctrl-0 = <&usart1_pins_a>;
113*46b1e54bSPatrice Chotard	pinctrl-names = "default";
114*46b1e54bSPatrice Chotard	status = "okay";
115*46b1e54bSPatrice Chotard};
116*46b1e54bSPatrice Chotard
117*46b1e54bSPatrice Chotard&usbotg_hs {
118*46b1e54bSPatrice Chotard	compatible = "st,stm32f4x9-fsotg";
119*46b1e54bSPatrice Chotard	dr_mode = "host";
120*46b1e54bSPatrice Chotard	pinctrl-0 = <&usbotg_fs_pins_b>;
121*46b1e54bSPatrice Chotard	pinctrl-names = "default";
122*46b1e54bSPatrice Chotard	status = "okay";
123*46b1e54bSPatrice Chotard};
124