blob: 30daabd10a2eb70c0f3dabf0ee2bfbee248db16e [file] [log] [blame]
Patrick Delaunaye07a86b2019-11-06 16:16:32 +01001// SPDX-License-Identifier: GPL-2.0+ OR X11
Patrice Chotard46b1e542017-12-12 09:49:32 +01002/*
Patrice Chotard71dfd5f2019-02-18 22:54:35 +01003 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
Patrice Chotard46b1e542017-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 Chotard61c88ac2020-11-06 08:11:58 +010010#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/gpio/gpio.h>
Patrice Chotard46b1e542017-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 Chotard61c88ac2020-11-06 08:11:58 +010022 memory@90000000 {
Patrick Delaunaye07a86b2019-11-06 16:16:32 +010023 device_type = "memory";
Patrice Chotard46b1e542017-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 Chotard61c88ac2020-11-06 08:11:58 +010033 led-red {
Patrice Chotard46b1e542017-12-12 09:49:32 +010034 gpios = <&gpiog 14 0>;
35 };
Patrice Chotard61c88ac2020-11-06 08:11:58 +010036 led-green {
Patrice Chotard46b1e542017-12-12 09:49:32 +010037 gpios = <&gpiog 13 0>;
38 linux,default-trigger = "heartbeat";
39 };
40 };
41
Patrice Chotard9f603e22022-09-23 13:20:33 +020042 gpio-keys {
Patrice Chotard46b1e542017-12-12 09:49:32 +010043 compatible = "gpio-keys";
Patrice Chotard46b1e542017-12-12 09:49:32 +010044 autorepeat;
Patrice Chotard9f603e22022-09-23 13:20:33 +020045 button-0 {
Patrice Chotard46b1e542017-12-12 09:49:32 +010046 label = "User";
47 linux,code = <KEY_HOME>;
48 gpios = <&gpioa 0 0>;
49 };
50 };
51
52 /* This turns on vbus for otg for host mode (dwc2) */
53 vcc5v_otg: vcc5v-otg-regulator {
54 compatible = "regulator-fixed";
55 gpio = <&gpioc 4 0>;
56 regulator-name = "vcc5_host1";
57 regulator-always-on;
58 };
59};
60
61&clk_hse {
62 clock-frequency = <8000000>;
63};
64
65&crc {
66 status = "okay";
67};
68
Patrice Chotard61c88ac2020-11-06 08:11:58 +010069&i2c3 {
70 pinctrl-names = "default";
71 pinctrl-0 = <&i2c3_pins>;
72 clock-frequency = <100000>;
73 status = "okay";
74
75 stmpe811@41 {
76 compatible = "st,stmpe811";
77 reg = <0x41>;
78 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
79 interrupt-parent = <&gpioa>;
80 /* 3.25 MHz ADC clock speed */
81 st,adc-freq = <1>;
82 /* 12-bit ADC */
83 st,mod-12b = <1>;
84 /* internal ADC reference */
85 st,ref-sel = <0>;
86 /* ADC converstion time: 80 clocks */
87 st,sample-time = <4>;
88
89 stmpe_touchscreen {
90 compatible = "st,stmpe-ts";
91 /* 8 sample average control */
92 st,ave-ctrl = <3>;
93 /* 7 length fractional part in z */
94 st,fraction-z = <7>;
95 /*
96 * 50 mA typical 80 mA max touchscreen drivers
97 * current limit value
98 */
99 st,i-drive = <1>;
100 /* 1 ms panel driver settling time */
101 st,settling = <3>;
102 /* 5 ms touch detect interrupt delay */
103 st,touch-det-delay = <5>;
104 };
105
106 stmpe_adc {
107 compatible = "st,stmpe-adc";
108 /* forbid to use ADC channels 3-0 (touch) */
109 st,norequest-mask = <0x0F>;
110 };
111 };
112};
113
114&ltdc {
115 status = "okay";
116 pinctrl-0 = <&ltdc_pins_b>;
117 pinctrl-names = "default";
118
119 port {
120 ltdc_out_rgb: endpoint {
121 remote-endpoint = <&panel_in_rgb>;
122 };
123 };
124};
125
Patrice Chotard46b1e542017-12-12 09:49:32 +0100126&rtc {
127 assigned-clocks = <&rcc 1 CLK_RTC>;
128 assigned-clock-parents = <&rcc 1 CLK_LSI>;
129 status = "okay";
130};
131
Patrice Chotard61c88ac2020-11-06 08:11:58 +0100132&spi5 {
133 status = "okay";
134 pinctrl-0 = <&spi5_pins>;
135 pinctrl-names = "default";
136 #address-cells = <1>;
137 #size-cells = <0>;
138 cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>, <&gpioc 2 GPIO_ACTIVE_LOW>;
139
140 l3gd20: l3gd20@0 {
141 compatible = "st,l3gd20-gyro";
142 spi-max-frequency = <10000000>;
143 st,drdy-int-pin = <2>;
144 interrupt-parent = <&gpioa>;
145 interrupts = <1 IRQ_TYPE_EDGE_RISING>,
146 <2 IRQ_TYPE_EDGE_RISING>;
147 reg = <0>;
148 status = "okay";
149 };
150
151 display: display@1{
152 /* Connect panel-ilitek-9341 to ltdc */
Patrice Chotard9f603e22022-09-23 13:20:33 +0200153 compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341";
Patrice Chotard61c88ac2020-11-06 08:11:58 +0100154 reg = <1>;
155 spi-3wire;
156 spi-max-frequency = <10000000>;
157 dc-gpios = <&gpiod 13 0>;
158 port {
159 panel_in_rgb: endpoint {
160 remote-endpoint = <&ltdc_out_rgb>;
161 };
162 };
163 };
164};
165
Patrice Chotard9f603e22022-09-23 13:20:33 +0200166&timers5 {
167 /* Override timer5 to act as clockevent */
168 compatible = "st,stm32-timer";
169 interrupts = <50>;
170 status = "okay";
171 /delete-property/#address-cells;
172 /delete-property/#size-cells;
173 /delete-property/clock-names;
174 /delete-node/pwm;
175 /delete-node/timer@4;
176};
177
Patrice Chotard46b1e542017-12-12 09:49:32 +0100178&usart1 {
179 pinctrl-0 = <&usart1_pins_a>;
180 pinctrl-names = "default";
181 status = "okay";
182};
183
184&usbotg_hs {
185 compatible = "st,stm32f4x9-fsotg";
186 dr_mode = "host";
187 pinctrl-0 = <&usbotg_fs_pins_b>;
188 pinctrl-names = "default";
189 status = "okay";
190};