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