xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/stm32f469-disco.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Copyright 2016 - Lee Jones <lee.jones@linaro.org>
3*4882a593Smuzhiyun *
4*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms
5*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual
6*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a
7*4882a593Smuzhiyun * whole.
8*4882a593Smuzhiyun *
9*4882a593Smuzhiyun *  a) This file is free software; you can redistribute it and/or
10*4882a593Smuzhiyun *     modify it under the terms of the GNU General Public License as
11*4882a593Smuzhiyun *     published by the Free Software Foundation; either version 2 of the
12*4882a593Smuzhiyun *     License, or (at your option) any later version.
13*4882a593Smuzhiyun *
14*4882a593Smuzhiyun *     This file is distributed in the hope that it will be useful,
15*4882a593Smuzhiyun *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16*4882a593Smuzhiyun *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*4882a593Smuzhiyun *     GNU General Public License for more details.
18*4882a593Smuzhiyun *
19*4882a593Smuzhiyun *     You should have received a copy of the GNU General Public
20*4882a593Smuzhiyun *     License along with this file; if not, write to the Free
21*4882a593Smuzhiyun *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22*4882a593Smuzhiyun *     MA 02110-1301 USA
23*4882a593Smuzhiyun *
24*4882a593Smuzhiyun * Or, alternatively,
25*4882a593Smuzhiyun *
26*4882a593Smuzhiyun *  b) Permission is hereby granted, free of charge, to any person
27*4882a593Smuzhiyun *     obtaining a copy of this software and associated documentation
28*4882a593Smuzhiyun *     files (the "Software"), to deal in the Software without
29*4882a593Smuzhiyun *     restriction, including without limitation the rights to use,
30*4882a593Smuzhiyun *     copy, modify, merge, publish, distribute, sublicense, and/or
31*4882a593Smuzhiyun *     sell copies of the Software, and to permit persons to whom the
32*4882a593Smuzhiyun *     Software is furnished to do so, subject to the following
33*4882a593Smuzhiyun *     conditions:
34*4882a593Smuzhiyun *
35*4882a593Smuzhiyun *     The above copyright notice and this permission notice shall be
36*4882a593Smuzhiyun *     included in all copies or substantial portions of the Software.
37*4882a593Smuzhiyun *
38*4882a593Smuzhiyun *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39*4882a593Smuzhiyun *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40*4882a593Smuzhiyun *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41*4882a593Smuzhiyun *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42*4882a593Smuzhiyun *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43*4882a593Smuzhiyun *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44*4882a593Smuzhiyun *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45*4882a593Smuzhiyun *     OTHER DEALINGS IN THE SOFTWARE.
46*4882a593Smuzhiyun */
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun/dts-v1/;
49*4882a593Smuzhiyun#include "stm32f469.dtsi"
50*4882a593Smuzhiyun#include "stm32f469-pinctrl.dtsi"
51*4882a593Smuzhiyun#include <dt-bindings/gpio/gpio.h>
52*4882a593Smuzhiyun#include <dt-bindings/input/input.h>
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun/ {
55*4882a593Smuzhiyun	model = "STMicroelectronics STM32F469i-DISCO board";
56*4882a593Smuzhiyun	compatible = "st,stm32f469i-disco", "st,stm32f469";
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun	chosen {
59*4882a593Smuzhiyun		bootargs = "root=/dev/ram";
60*4882a593Smuzhiyun		stdout-path = "serial0:115200n8";
61*4882a593Smuzhiyun	};
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun	memory@00000000 {
64*4882a593Smuzhiyun		device_type = "memory";
65*4882a593Smuzhiyun		reg = <0x00000000 0x1000000>;
66*4882a593Smuzhiyun	};
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun	aliases {
69*4882a593Smuzhiyun		serial0 = &usart3;
70*4882a593Smuzhiyun	};
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun	mmc_vcard: mmc_vcard {
73*4882a593Smuzhiyun		compatible = "regulator-fixed";
74*4882a593Smuzhiyun		regulator-name = "mmc_vcard";
75*4882a593Smuzhiyun		regulator-min-microvolt = <3300000>;
76*4882a593Smuzhiyun		regulator-max-microvolt = <3300000>;
77*4882a593Smuzhiyun	};
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun	vdd_dsi: vdd-dsi {
80*4882a593Smuzhiyun		compatible = "regulator-fixed";
81*4882a593Smuzhiyun		regulator-name = "vdd_dsi";
82*4882a593Smuzhiyun		regulator-min-microvolt = <3300000>;
83*4882a593Smuzhiyun		regulator-max-microvolt = <3300000>;
84*4882a593Smuzhiyun	};
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun	soc {
87*4882a593Smuzhiyun		dma-ranges = <0xc0000000 0x0 0x10000000>;
88*4882a593Smuzhiyun	};
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun	leds {
91*4882a593Smuzhiyun		compatible = "gpio-leds";
92*4882a593Smuzhiyun		led-green {
93*4882a593Smuzhiyun			gpios = <&gpiog 6 GPIO_ACTIVE_LOW>;
94*4882a593Smuzhiyun			linux,default-trigger = "heartbeat";
95*4882a593Smuzhiyun		};
96*4882a593Smuzhiyun		led-orange {
97*4882a593Smuzhiyun			gpios = <&gpiod 4 GPIO_ACTIVE_LOW>;
98*4882a593Smuzhiyun		};
99*4882a593Smuzhiyun		led-red {
100*4882a593Smuzhiyun			gpios = <&gpiod 5 GPIO_ACTIVE_LOW>;
101*4882a593Smuzhiyun		};
102*4882a593Smuzhiyun		led-blue {
103*4882a593Smuzhiyun			gpios = <&gpiok 3 GPIO_ACTIVE_LOW>;
104*4882a593Smuzhiyun		};
105*4882a593Smuzhiyun	};
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun	gpio-keys {
108*4882a593Smuzhiyun		compatible = "gpio-keys";
109*4882a593Smuzhiyun		autorepeat;
110*4882a593Smuzhiyun		button-0 {
111*4882a593Smuzhiyun			label = "User";
112*4882a593Smuzhiyun			linux,code = <KEY_WAKEUP>;
113*4882a593Smuzhiyun			gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
114*4882a593Smuzhiyun		};
115*4882a593Smuzhiyun	};
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun	/* This turns on vbus for otg for host mode (dwc2) */
118*4882a593Smuzhiyun	vcc5v_otg: vcc5v-otg-regulator {
119*4882a593Smuzhiyun		compatible = "regulator-fixed";
120*4882a593Smuzhiyun		enable-active-high;
121*4882a593Smuzhiyun		gpio = <&gpiob 2 GPIO_ACTIVE_HIGH>;
122*4882a593Smuzhiyun		regulator-name = "vcc5_host1";
123*4882a593Smuzhiyun		regulator-always-on;
124*4882a593Smuzhiyun	};
125*4882a593Smuzhiyun};
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun&rcc {
128*4882a593Smuzhiyun	compatible = "st,stm32f469-rcc", "st,stm32f42xx-rcc", "st,stm32-rcc";
129*4882a593Smuzhiyun};
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun&clk_hse {
132*4882a593Smuzhiyun	clock-frequency = <8000000>;
133*4882a593Smuzhiyun};
134*4882a593Smuzhiyun
135*4882a593Smuzhiyun&dsi {
136*4882a593Smuzhiyun	#address-cells = <1>;
137*4882a593Smuzhiyun	#size-cells = <0>;
138*4882a593Smuzhiyun	status = "okay";
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	ports {
141*4882a593Smuzhiyun		#address-cells = <1>;
142*4882a593Smuzhiyun		#size-cells = <0>;
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun		port@0 {
145*4882a593Smuzhiyun			reg = <0>;
146*4882a593Smuzhiyun			dsi_in: endpoint {
147*4882a593Smuzhiyun				remote-endpoint = <&ltdc_out_dsi>;
148*4882a593Smuzhiyun			};
149*4882a593Smuzhiyun		};
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun		port@1 {
152*4882a593Smuzhiyun			reg = <1>;
153*4882a593Smuzhiyun			dsi_out: endpoint {
154*4882a593Smuzhiyun				remote-endpoint = <&dsi_panel_in>;
155*4882a593Smuzhiyun			};
156*4882a593Smuzhiyun		};
157*4882a593Smuzhiyun	};
158*4882a593Smuzhiyun
159*4882a593Smuzhiyun	panel-dsi@0 {
160*4882a593Smuzhiyun		compatible = "orisetech,otm8009a";
161*4882a593Smuzhiyun		reg = <0>; /* dsi virtual channel (0..3) */
162*4882a593Smuzhiyun		reset-gpios = <&gpioh 7 GPIO_ACTIVE_LOW>;
163*4882a593Smuzhiyun		power-supply = <&vdd_dsi>;
164*4882a593Smuzhiyun		status = "okay";
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun		port {
167*4882a593Smuzhiyun			dsi_panel_in: endpoint {
168*4882a593Smuzhiyun				remote-endpoint = <&dsi_out>;
169*4882a593Smuzhiyun			};
170*4882a593Smuzhiyun		};
171*4882a593Smuzhiyun	};
172*4882a593Smuzhiyun};
173*4882a593Smuzhiyun
174*4882a593Smuzhiyun&ltdc {
175*4882a593Smuzhiyun	status = "okay";
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun	port {
178*4882a593Smuzhiyun		ltdc_out_dsi: endpoint@0 {
179*4882a593Smuzhiyun			remote-endpoint = <&dsi_in>;
180*4882a593Smuzhiyun		};
181*4882a593Smuzhiyun	};
182*4882a593Smuzhiyun};
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun&rtc {
185*4882a593Smuzhiyun	status = "okay";
186*4882a593Smuzhiyun};
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun&timers1 {
189*4882a593Smuzhiyun	status = "okay";
190*4882a593Smuzhiyun
191*4882a593Smuzhiyun	pwm {
192*4882a593Smuzhiyun		pinctrl-0 = <&pwm1_pins>;
193*4882a593Smuzhiyun		pinctrl-names = "default";
194*4882a593Smuzhiyun		status = "okay";
195*4882a593Smuzhiyun	};
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun	timer@0 {
198*4882a593Smuzhiyun		status = "okay";
199*4882a593Smuzhiyun	};
200*4882a593Smuzhiyun};
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun&timers3 {
203*4882a593Smuzhiyun	status = "okay";
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun	pwm {
206*4882a593Smuzhiyun		pinctrl-0 = <&pwm3_pins>;
207*4882a593Smuzhiyun		pinctrl-names = "default";
208*4882a593Smuzhiyun		status = "okay";
209*4882a593Smuzhiyun	};
210*4882a593Smuzhiyun
211*4882a593Smuzhiyun	timer@2 {
212*4882a593Smuzhiyun		status = "okay";
213*4882a593Smuzhiyun	};
214*4882a593Smuzhiyun};
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun&sdio {
217*4882a593Smuzhiyun	status = "okay";
218*4882a593Smuzhiyun	vmmc-supply = <&mmc_vcard>;
219*4882a593Smuzhiyun	cd-gpios = <&gpiog 2 GPIO_ACTIVE_LOW>;
220*4882a593Smuzhiyun	broken-cd;
221*4882a593Smuzhiyun	pinctrl-names = "default", "opendrain";
222*4882a593Smuzhiyun	pinctrl-0 = <&sdio_pins>;
223*4882a593Smuzhiyun	pinctrl-1 = <&sdio_pins_od>;
224*4882a593Smuzhiyun	bus-width = <4>;
225*4882a593Smuzhiyun};
226*4882a593Smuzhiyun
227*4882a593Smuzhiyun&usart3 {
228*4882a593Smuzhiyun	pinctrl-0 = <&usart3_pins_a>;
229*4882a593Smuzhiyun	pinctrl-names = "default";
230*4882a593Smuzhiyun	status = "okay";
231*4882a593Smuzhiyun};
232*4882a593Smuzhiyun
233*4882a593Smuzhiyun&usbotg_fs {
234*4882a593Smuzhiyun	dr_mode = "host";
235*4882a593Smuzhiyun	pinctrl-0 = <&usbotg_fs_pins_a>;
236*4882a593Smuzhiyun	pinctrl-names = "default";
237*4882a593Smuzhiyun	status = "okay";
238*4882a593Smuzhiyun};
239