blob: 42477c8d3ffbf2d2b17bec55734363174d53c2ea [file] [log] [blame]
Patrick Delaunayc5c90692019-11-06 16:16:32 +01001// SPDX-License-Identifier: GPL-2.0+ OR X11
Patrice Chotardf13ff072017-12-12 09:49:32 +01002/*
Patrice Chotard2f4b6422019-02-18 22:54:35 +01003 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
Patrice Chotardf13ff072017-12-12 09:49:32 +01004 */
5
6/dts-v1/;
7#include "stm32f429.dtsi"
8#include "stm32f429-pinctrl.dtsi"
9#include <dt-bindings/input/input.h>
Patrice Chotard62f56162020-11-06 08:11:58 +010010#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/gpio/gpio.h>
Patrice Chotardf13ff072017-12-12 09:49:32 +010012
13/ {
14 model = "STMicroelectronics STM32F429i-DISCO board";
15 compatible = "st,stm32f429i-disco", "st,stm32f429";
16
17 chosen {
18 bootargs = "root=/dev/ram";
19 stdout-path = "serial0:115200n8";
20 };
21
Patrice Chotard62f56162020-11-06 08:11:58 +010022 memory@90000000 {
Patrick Delaunayc5c90692019-11-06 16:16:32 +010023 device_type = "memory";
Patrice Chotardf13ff072017-12-12 09:49:32 +010024 reg = <0x90000000 0x800000>;
25 };
26
27 aliases {
28 serial0 = &usart1;
29 };
30
31 leds {
32 compatible = "gpio-leds";
Patrice Chotard62f56162020-11-06 08:11:58 +010033 led-red {
Patrice Chotardf13ff072017-12-12 09:49:32 +010034 gpios = <&gpiog 14 0>;
35 };
Patrice Chotard62f56162020-11-06 08:11:58 +010036 led-green {
Patrice Chotardf13ff072017-12-12 09:49:32 +010037 gpios = <&gpiog 13 0>;
38 linux,default-trigger = "heartbeat";
39 };
40 };
41
42 gpio_keys {
43 compatible = "gpio-keys";
Patrice Chotard2f4b6422019-02-18 22:54:35 +010044 #address-cells = <1>;
Patrice Chotardf13ff072017-12-12 09:49:32 +010045 #size-cells = <0>;
46 autorepeat;
47 button@0 {
48 label = "User";
49 linux,code = <KEY_HOME>;
50 gpios = <&gpioa 0 0>;
51 };
52 };
53
54 /* This turns on vbus for otg for host mode (dwc2) */
55 vcc5v_otg: vcc5v-otg-regulator {
56 compatible = "regulator-fixed";
57 gpio = <&gpioc 4 0>;
58 regulator-name = "vcc5_host1";
59 regulator-always-on;
60 };
61};
62
63&clk_hse {
64 clock-frequency = <8000000>;
65};
66
67&crc {
68 status = "okay";
69};
70
Patrice Chotard62f56162020-11-06 08:11:58 +010071&i2c3 {
72 pinctrl-names = "default";
73 pinctrl-0 = <&i2c3_pins>;
74 clock-frequency = <100000>;
75 status = "okay";
76
77 stmpe811@41 {
78 compatible = "st,stmpe811";
79 reg = <0x41>;
80 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
81 interrupt-parent = <&gpioa>;
82 /* 3.25 MHz ADC clock speed */
83 st,adc-freq = <1>;
84 /* 12-bit ADC */
85 st,mod-12b = <1>;
86 /* internal ADC reference */
87 st,ref-sel = <0>;
88 /* ADC converstion time: 80 clocks */
89 st,sample-time = <4>;
90
91 stmpe_touchscreen {
92 compatible = "st,stmpe-ts";
93 /* 8 sample average control */
94 st,ave-ctrl = <3>;
95 /* 7 length fractional part in z */
96 st,fraction-z = <7>;
97 /*
98 * 50 mA typical 80 mA max touchscreen drivers
99 * current limit value
100 */
101 st,i-drive = <1>;
102 /* 1 ms panel driver settling time */
103 st,settling = <3>;
104 /* 5 ms touch detect interrupt delay */
105 st,touch-det-delay = <5>;
106 };
107
108 stmpe_adc {
109 compatible = "st,stmpe-adc";
110 /* forbid to use ADC channels 3-0 (touch) */
111 st,norequest-mask = <0x0F>;
112 };
113 };
114};
115
116&ltdc {
117 status = "okay";
118 pinctrl-0 = <&ltdc_pins_b>;
119 pinctrl-names = "default";
120
121 port {
122 ltdc_out_rgb: endpoint {
123 remote-endpoint = <&panel_in_rgb>;
124 };
125 };
126};
127
Patrice Chotardf13ff072017-12-12 09:49:32 +0100128&rtc {
129 assigned-clocks = <&rcc 1 CLK_RTC>;
130 assigned-clock-parents = <&rcc 1 CLK_LSI>;
131 status = "okay";
132};
133
Patrice Chotard62f56162020-11-06 08:11:58 +0100134&spi5 {
135 status = "okay";
136 pinctrl-0 = <&spi5_pins>;
137 pinctrl-names = "default";
138 #address-cells = <1>;
139 #size-cells = <0>;
140 cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>, <&gpioc 2 GPIO_ACTIVE_LOW>;
141
142 l3gd20: l3gd20@0 {
143 compatible = "st,l3gd20-gyro";
144 spi-max-frequency = <10000000>;
145 st,drdy-int-pin = <2>;
146 interrupt-parent = <&gpioa>;
147 interrupts = <1 IRQ_TYPE_EDGE_RISING>,
148 <2 IRQ_TYPE_EDGE_RISING>;
149 reg = <0>;
150 status = "okay";
151 };
152
153 display: display@1{
154 /* Connect panel-ilitek-9341 to ltdc */
155 compatible = "st,sf-tc240t-9370-t";
156 reg = <1>;
157 spi-3wire;
158 spi-max-frequency = <10000000>;
159 dc-gpios = <&gpiod 13 0>;
160 port {
161 panel_in_rgb: endpoint {
162 remote-endpoint = <&ltdc_out_rgb>;
163 };
164 };
165 };
166};
167
Patrice Chotardf13ff072017-12-12 09:49:32 +0100168&usart1 {
169 pinctrl-0 = <&usart1_pins_a>;
170 pinctrl-names = "default";
171 status = "okay";
172};
173
174&usbotg_hs {
175 compatible = "st,stm32f4x9-fsotg";
176 dr_mode = "host";
177 pinctrl-0 = <&usbotg_fs_pins_b>;
178 pinctrl-names = "default";
179 status = "okay";
180};