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