xref: /optee_os/core/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dtsi (revision 949b0c0c6256c79b714d188839b67a85ec5a0b3b)
1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2/*
3 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
4 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 * Copyright (C) 2020 Marek Vasut <marex@denx.de>
6 */
7
8/* Avenger96 uses DHCOR SoM configured for 1V8 IO operation */
9#include "stm32mp15xx-dhcor-io1v8.dtsi"
10
11/ {
12	aliases {
13		ethernet0 = &ethernet0;
14		mmc0 = &sdmmc1;
15		serial0 = &uart4;
16		serial1 = &uart7;
17		serial2 = &usart2;
18		spi0 = &qspi;
19	};
20
21	/* XTal Q1 */
22	cec_clock: clk-cec-fixed {
23		#clock-cells = <0>;
24		compatible = "fixed-clock";
25		clock-frequency = <24000000>;
26	};
27
28	chosen {
29		stdout-path = "serial0:115200n8";
30	};
31
32	hdmi-out {
33		compatible = "hdmi-connector";
34		type = "a";
35
36		port {
37			hdmi_con: endpoint {
38				remote-endpoint = <&adv7513_out>;
39			};
40		};
41	};
42
43	led {
44		compatible = "gpio-leds";
45		led1 {
46			label = "green:user0";
47			gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
48			linux,default-trigger = "heartbeat";
49			default-state = "off";
50		};
51
52		led2 {
53			label = "green:user1";
54			gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
55			linux,default-trigger = "mmc0";
56			default-state = "off";
57		};
58
59		led3 {
60			label = "green:user2";
61			gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
62			linux,default-trigger = "mmc1";
63			default-state = "off";
64		};
65
66		led4 {
67			label = "green:user3";
68			gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
69			linux,default-trigger = "none";
70			default-state = "off";
71			panic-indicator;
72		};
73	};
74
75	sd_switch: regulator-sd_switch {
76		compatible = "regulator-gpio";
77		regulator-name = "sd_switch";
78		regulator-min-microvolt = <1800000>;
79		regulator-max-microvolt = <2900000>;
80		regulator-type = "voltage";
81		regulator-always-on;
82
83		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
84		gpios-states = <0>;
85		states = <1800000 0x1>,
86			 <2900000 0x0>;
87		status = "disabled";
88	};
89
90	sound {
91		compatible = "audio-graph-card";
92		label = "STM32MP1-AV96-HDMI";
93		dais = <&sai2a_port>;
94		status = "okay";
95	};
96
97	wlan_pwr: regulator-wlan {
98		compatible = "regulator-fixed";
99
100		regulator-name = "wl-reg";
101		regulator-min-microvolt = <3300000>;
102		regulator-max-microvolt = <3300000>;
103
104		gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
105		enable-active-high;
106	};
107};
108
109&adc {
110	pinctrl-names = "default";
111	pinctrl-0 = <&adc12_ain_pins_b>;
112	vdd-supply = <&vdd>;
113	vdda-supply = <&vdda>;
114	vref-supply = <&vdda>;
115	status = "okay";
116
117	adc1: adc@0 {
118		st,adc-channels = <0 1 6>;
119		st,min-sample-time-nsecs = <5000>;
120		status = "okay";
121	};
122
123	adc2: adc@100 {
124		st,adc-channels = <0 1 2>;
125		st,min-sample-time-nsecs = <5000>;
126		status = "okay";
127	};
128};
129
130&ethernet0 {
131	status = "okay";
132	pinctrl-0 = <&ethernet0_rgmii_pins_c>;
133	pinctrl-1 = <&ethernet0_rgmii_sleep_pins_c>;
134	pinctrl-names = "default", "sleep";
135	phy-mode = "rgmii";
136	max-speed = <1000>;
137	phy-handle = <&phy0>;
138
139	mdio0 {
140		#address-cells = <1>;
141		#size-cells = <0>;
142		compatible = "snps,dwmac-mdio";
143		reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
144		reset-delay-us = <1000>;
145		reset-post-delay-us = <1000>;
146
147		phy0: ethernet-phy@7 {
148			reg = <7>;
149
150			rxc-skew-ps = <1500>;
151			rxdv-skew-ps = <540>;
152			rxd0-skew-ps = <420>;
153			rxd1-skew-ps = <420>;
154			rxd2-skew-ps = <420>;
155			rxd3-skew-ps = <420>;
156
157			txc-skew-ps = <1440>;
158			txen-skew-ps = <540>;
159			txd0-skew-ps = <420>;
160			txd1-skew-ps = <420>;
161			txd2-skew-ps = <420>;
162			txd3-skew-ps = <420>;
163		};
164	};
165};
166
167&gpioa {
168	gpio-line-names = "", "", "", "",
169			  "", "", "", "",
170			  "", "", "", "AV96-K",
171			  "AV96-I", "", "AV96-A", "";
172};
173
174&gpiob {
175	gpio-line-names = "", "", "", "",
176			  "", "AV96-J", "", "",
177			  "", "", "", "AV96-B",
178			  "", "AV96-L", "", "";
179};
180
181&gpioc {
182	gpio-line-names = "", "", "", "AV96-C",
183			  "", "", "", "",
184			  "", "", "", "",
185			  "", "", "", "";
186};
187
188&gpiod {
189	gpio-line-names = "", "", "", "",
190			  "", "", "", "",
191			  "AV96-D", "", "", "",
192			  "", "", "AV96-E", "AV96-F";
193};
194
195&gpiof {
196	gpio-line-names = "", "", "", "",
197			  "", "", "", "",
198			  "", "", "", "",
199			  "AV96-G", "AV96-H", "", "";
200};
201
202&i2c1 {	/* X6 I2C1 */
203	pinctrl-names = "default";
204	pinctrl-0 = <&i2c1_pins_b>;
205	i2c-scl-rising-time-ns = <185>;
206	i2c-scl-falling-time-ns = <20>;
207	status = "disabled";
208	/delete-property/dmas;
209	/delete-property/dma-names;
210};
211
212&i2c2 {	/* X6 I2C2 */
213	pinctrl-names = "default";
214	pinctrl-0 = <&i2c2_pins_c>;
215	i2c-scl-rising-time-ns = <185>;
216	i2c-scl-falling-time-ns = <20>;
217	status = "disabled";
218	/delete-property/dmas;
219	/delete-property/dma-names;
220};
221
222&i2c4 {
223	hdmi-transmitter@3d {
224		compatible = "adi,adv7513";
225		reg = <0x3d>, <0x4d>, <0x2d>, <0x5d>;
226		reg-names = "main", "edid", "cec", "packet";
227		clocks = <&cec_clock>;
228		clock-names = "cec";
229
230		avdd-supply = <&v3v3>;
231		dvdd-supply = <&v3v3>;
232		pvdd-supply = <&v3v3>;
233		dvdd-3v-supply = <&v3v3>;
234		bgvdd-supply = <&v3v3>;
235
236		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
237		interrupt-parent = <&gpiog>;
238
239		status = "okay";
240
241		adi,input-depth = <8>;
242		adi,input-colorspace = "rgb";
243		adi,input-clock = "1x";
244
245		ports {
246			#address-cells = <1>;
247			#size-cells = <0>;
248
249			port@0 {
250				reg = <0>;
251				adv7513_in: endpoint {
252					remote-endpoint = <&ltdc_ep0_out>;
253				};
254			};
255
256			port@1 {
257				reg = <1>;
258				adv7513_out: endpoint {
259					remote-endpoint = <&hdmi_con>;
260				};
261			};
262
263			port@2 {
264				reg = <2>;
265				adv7513_i2s0: endpoint {
266					remote-endpoint = <&sai2a_endpoint>;
267				};
268			};
269		};
270	};
271};
272
273&ltdc {
274	pinctrl-names = "default", "sleep";
275	pinctrl-0 = <&ltdc_pins_d>;
276	pinctrl-1 = <&ltdc_sleep_pins_d>;
277	status = "okay";
278
279	port {
280		#address-cells = <1>;
281		#size-cells = <0>;
282
283		ltdc_ep0_out: endpoint@0 {
284			reg = <0>;
285			remote-endpoint = <&adv7513_in>;
286		};
287	};
288};
289
290&sai2 {
291	clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
292	pinctrl-names = "default", "sleep";
293	pinctrl-0 = <&sai2a_pins_c>;
294	pinctrl-1 = <&sai2a_sleep_pins_c>;
295	clock-names = "pclk", "x8k", "x11k";
296	status = "okay";
297
298	sai2a: audio-controller@4400b004 {
299		#clock-cells = <0>;
300		dma-names = "tx";
301		clocks = <&rcc SAI2_K>;
302		clock-names = "sai_ck";
303		status = "okay";
304
305		sai2a_port: port {
306			sai2a_endpoint: endpoint {
307				remote-endpoint = <&adv7513_i2s0>;
308				format = "i2s";
309				mclk-fs = <256>;
310			};
311		};
312	};
313};
314
315&sdmmc1 {
316	pinctrl-names = "default", "opendrain", "sleep";
317	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
318	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
319	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
320	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
321	disable-wp;
322	st,sig-dir;
323	st,neg-edge;
324	st,use-ckin;
325	bus-width = <4>;
326	vmmc-supply = <&vdd_sd>;
327	vqmmc-supply = <&sd_switch>;
328	status = "okay";
329};
330
331&sdmmc2 {
332	pinctrl-names = "default", "opendrain", "sleep";
333	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_c>;
334	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_c>;
335	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_c>;
336	bus-width = <8>;
337	mmc-ddr-1_8v;
338	no-sd;
339	no-sdio;
340	non-removable;
341	st,neg-edge;
342	vmmc-supply = <&v3v3>;
343	vqmmc-supply = <&vdd_io>;
344	status = "okay";
345};
346
347&sdmmc3 {
348	pinctrl-names = "default", "opendrain", "sleep";
349	pinctrl-0 = <&sdmmc3_b4_pins_b>;
350	pinctrl-1 = <&sdmmc3_b4_od_pins_b>;
351	pinctrl-2 = <&sdmmc3_b4_sleep_pins_b>;
352	broken-cd;
353	non-removable;
354	st,neg-edge;
355	bus-width = <4>;
356	vmmc-supply = <&wlan_pwr>;
357	status = "okay";
358
359	#address-cells = <1>;
360	#size-cells = <0>;
361	brcmf: bcrmf@1 {
362		reg = <1>;
363		compatible = "brcm,bcm4329-fmac";
364	};
365};
366
367&spi2 {
368	pinctrl-names = "default";
369	pinctrl-0 = <&spi2_pins_a>;
370	cs-gpios = <&gpioi 0 0>;
371	status = "disabled";
372	/delete-property/dmas;
373	/delete-property/dma-names;
374};
375
376&uart4 {
377	/* On Low speed expansion header */
378	label = "LS-UART1";
379	pinctrl-names = "default";
380	pinctrl-0 = <&uart4_pins_b>;
381	/delete-property/dmas;
382	/delete-property/dma-names;
383	status = "okay";
384};
385
386&uart7 {
387	/* On Low speed expansion header */
388	label = "LS-UART0";
389	pinctrl-names = "default";
390	pinctrl-0 = <&uart7_pins_a>;
391	uart-has-rtscts;
392	/delete-property/dmas;
393	/delete-property/dma-names;
394	status = "okay";
395};
396
397/* Bluetooth */
398&usart2 {
399	pinctrl-names = "default", "sleep";
400	pinctrl-0 = <&usart2_pins_a>;
401	pinctrl-1 = <&usart2_sleep_pins_a>;
402	st,hw-flow-ctrl;
403	/delete-property/dmas;
404	/delete-property/dma-names;
405	status = "okay";
406
407	bluetooth {
408		compatible = "brcm,bcm43438-bt";
409		max-speed = <3000000>;
410		shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
411	};
412};
413
414&usbh_ehci {
415	phys = <&usbphyc_port0>;
416	phy-names = "usb";
417	status = "okay";
418};
419
420&usbotg_hs {
421	pinctrl-0 = <&usbotg_hs_pins_a>;
422	pinctrl-names = "default";
423	phy-names = "usb2-phy";
424	phys = <&usbphyc_port1 0>;
425	status = "okay";
426	vbus-supply = <&vbus_otg>;
427};
428
429&usbphyc {
430	status = "okay";
431};
432
433&usbphyc_port0 {
434	phy-supply = <&vdd_usb>;
435};
436
437&usbphyc_port1 {
438	phy-supply = <&vdd_usb>;
439};
440