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