Merge branch 'rework/fixup-for-5.15' into for-linus
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp15xx-dhcom-pdk2.dtsi
1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2 /*
3  * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de>
4  */
5
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/pwm/pwm.h>
8
9 / {
10         aliases {
11                 serial0 = &uart4;
12                 serial1 = &usart3;
13                 serial2 = &uart8;
14         };
15
16         chosen {
17                 stdout-path = "serial0:115200n8";
18         };
19
20         clk_ext_audio_codec: clock-codec {
21                 compatible = "fixed-clock";
22                 #clock-cells = <0>;
23                 clock-frequency = <24000000>;
24         };
25
26         display_bl: display-bl {
27                 compatible = "pwm-backlight";
28                 pwms = <&pwm2 3 500000 PWM_POLARITY_INVERTED>;
29                 brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>;
30                 default-brightness-level = <8>;
31                 enable-gpios = <&gpioi 0 GPIO_ACTIVE_HIGH>;
32                 status = "okay";
33         };
34
35         gpio-keys-polled {
36                 compatible = "gpio-keys-polled";
37                 poll-interval = <20>;
38
39                 /*
40                  * The EXTi IRQ line 3 is shared with touchscreen and ethernet,
41                  * so mark this as polled GPIO key.
42                  */
43                 button-0 {
44                         label = "TA1-GPIO-A";
45                         linux,code = <KEY_A>;
46                         gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
47                 };
48
49                 /*
50                  * The EXTi IRQ line 0 is shared with PMIC,
51                  * so mark this as polled GPIO key.
52                  */
53                 button-2 {
54                         label = "TA3-GPIO-C";
55                         linux,code = <KEY_C>;
56                         gpios = <&gpiog 0 GPIO_ACTIVE_LOW>;
57                 };
58         };
59
60         gpio-keys {
61                 compatible = "gpio-keys";
62
63                 button-1 {
64                         label = "TA2-GPIO-B";
65                         linux,code = <KEY_B>;
66                         gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
67                         wakeup-source;
68                 };
69
70                 button-3 {
71                         label = "TA4-GPIO-D";
72                         linux,code = <KEY_D>;
73                         gpios = <&gpiod 12 GPIO_ACTIVE_LOW>;
74                         wakeup-source;
75                 };
76         };
77
78         led {
79                 compatible = "gpio-leds";
80
81                 led-0 {
82                         label = "green:led5";
83                         gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
84                         default-state = "off";
85                 };
86
87                 led-1 {
88                         label = "green:led6";
89                         gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
90                         default-state = "off";
91                 };
92
93                 led-2 {
94                         label = "green:led7";
95                         gpios = <&gpioi 2 GPIO_ACTIVE_HIGH>;
96                         default-state = "off";
97                 };
98
99                 led-3 {
100                         label = "green:led8";
101                         gpios = <&gpioi 3 GPIO_ACTIVE_HIGH>;
102                         default-state = "off";
103                 };
104         };
105
106         panel {
107                 compatible = "edt,etm0700g0edh6";
108                 backlight = <&display_bl>;
109
110                 port {
111                         lcd_panel_in: endpoint {
112                                 remote-endpoint = <&lcd_display_out>;
113                         };
114                 };
115         };
116
117         sound {
118                 compatible = "audio-graph-card";
119                 routing =
120                         "MIC_IN", "Capture",
121                         "Capture", "Mic Bias",
122                         "Playback", "HP_OUT";
123                 dais = <&sai2a_port &sai2b_port>;
124                 status = "okay";
125         };
126 };
127
128 &cec {
129         pinctrl-names = "default";
130         pinctrl-0 = <&cec_pins_a>;
131         status = "okay";
132 };
133
134 &i2c2 { /* Header X22 */
135         pinctrl-names = "default";
136         pinctrl-0 = <&i2c2_pins_a>;
137         i2c-scl-rising-time-ns = <185>;
138         i2c-scl-falling-time-ns = <20>;
139         status = "okay";
140         /* spare dmas for other usage */
141         /delete-property/dmas;
142         /delete-property/dma-names;
143         status = "okay";
144 };
145
146 &i2c5 { /* Header X21 */
147         pinctrl-names = "default";
148         pinctrl-0 = <&i2c5_pins_a>;
149         i2c-scl-rising-time-ns = <185>;
150         i2c-scl-falling-time-ns = <20>;
151         status = "okay";
152         /* spare dmas for other usage */
153         /delete-property/dmas;
154         /delete-property/dma-names;
155
156         sgtl5000: codec@a {
157                 compatible = "fsl,sgtl5000";
158                 reg = <0x0a>;
159                 #sound-dai-cells = <0>;
160                 clocks = <&clk_ext_audio_codec>;
161                 VDDA-supply = <&v3v3>;
162                 VDDIO-supply = <&vdd>;
163
164                 sgtl5000_port: port {
165                         #address-cells = <1>;
166                         #size-cells = <0>;
167
168                         sgtl5000_tx_endpoint: endpoint@0 {
169                                 reg = <0>;
170                                 remote-endpoint = <&sai2a_endpoint>;
171                                 frame-master;
172                                 bitclock-master;
173                         };
174
175                         sgtl5000_rx_endpoint: endpoint@1 {
176                                 reg = <1>;
177                                 remote-endpoint = <&sai2b_endpoint>;
178                                 frame-master;
179                                 bitclock-master;
180                         };
181                 };
182
183         };
184
185         touchscreen@38 {
186                 compatible = "edt,edt-ft5406";
187                 reg = <0x38>;
188                 interrupt-parent = <&gpiog>;
189                 interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
190         };
191 };
192
193 &ltdc {
194         pinctrl-names = "default", "sleep";
195         pinctrl-0 = <&ltdc_pins_b>;
196         pinctrl-1 = <&ltdc_sleep_pins_b>;
197         status = "okay";
198
199         port {
200                 lcd_display_out: endpoint {
201                         remote-endpoint = <&lcd_panel_in>;
202                 };
203         };
204 };
205
206 &sai2 {
207         clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
208         clock-names = "pclk", "x8k", "x11k";
209         pinctrl-names = "default", "sleep";
210         pinctrl-0 = <&sai2a_pins_b &sai2b_pins_b>;
211         pinctrl-1 = <&sai2a_sleep_pins_b &sai2b_sleep_pins_b>;
212         status = "okay";
213
214         sai2a: audio-controller@4400b004 {
215                 #clock-cells = <0>;
216                 dma-names = "tx";
217                 clocks = <&rcc SAI2_K>;
218                 clock-names = "sai_ck";
219                 status = "okay";
220
221                 sai2a_port: port {
222                         sai2a_endpoint: endpoint {
223                                 remote-endpoint = <&sgtl5000_tx_endpoint>;
224                                 format = "i2s";
225                                 mclk-fs = <512>;
226                                 dai-tdm-slot-num = <2>;
227                                 dai-tdm-slot-width = <16>;
228                         };
229                 };
230         };
231
232         sai2b: audio-controller@4400b024 {
233                 dma-names = "rx";
234                 st,sync = <&sai2a 2>;
235                 clocks = <&rcc SAI2_K>, <&sai2a>;
236                 clock-names = "sai_ck", "MCLK";
237                 status = "okay";
238
239                 sai2b_port: port {
240                         sai2b_endpoint: endpoint {
241                                 remote-endpoint = <&sgtl5000_rx_endpoint>;
242                                 format = "i2s";
243                                 mclk-fs = <512>;
244                                 dai-tdm-slot-num = <2>;
245                                 dai-tdm-slot-width = <16>;
246                         };
247                 };
248         };
249 };
250
251 &timers2 {
252         /* spare dmas for other usage (un-delete to enable pwm capture) */
253         /delete-property/dmas;
254         /delete-property/dma-names;
255         status = "okay";
256         pwm2: pwm {
257                 pinctrl-0 = <&pwm2_pins_a>;
258                 pinctrl-names = "default";
259                 status = "okay";
260         };
261         timer@1 {
262                 status = "okay";
263         };
264 };
265
266 &usart3 {
267         pinctrl-names = "default";
268         pinctrl-0 = <&usart3_pins_a>;
269         status = "okay";
270 };
271
272 &uart8 {
273         pinctrl-names = "default";
274         pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
275         uart-has-rtscts;
276         status = "okay";
277 };
278
279 &usbh_ehci {
280         phys = <&usbphyc_port0>;
281         status = "okay";
282 };
283
284 &usbotg_hs {
285         dr_mode = "otg";
286         pinctrl-0 = <&usbotg_hs_pins_a>;
287         pinctrl-names = "default";
288         phy-names = "usb2-phy";
289         phys = <&usbphyc_port1 0>;
290         vbus-supply = <&vbus_otg>;
291         status = "okay";
292 };
293
294 &usbphyc {
295         status = "okay";
296 };
297
298 &usbphyc_port0 {
299         phy-supply = <&vdd_usb>;
300 };
301
302 &usbphyc_port1 {
303         phy-supply = <&vdd_usb>;
304 };