xref: /linux/scripts/dtc/include-prefixes/arm/st/stm32mp15xx-phyboard-sargas.dtsi (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) 2022-2023 Steffen Trumtrar <kernel@pengutronix.de>
4 * Copyright (C) Phytec GmbH 2019-2020 - All Rights Reserved
5 * Author: Dom VOVARD <dom.vovard@linrt.com>.
6 */
7
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9#include <dt-bindings/interrupt-controller/irq.h>
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/leds/leds-pca9532.h>
12
13/ {
14	aliases {
15		mmc0 = &sdmmc1;
16		mmc1 = &sdmmc2;
17		mmc2 = &sdmmc3;
18		serial0 = &uart4;
19		serial1 = &usart3;
20		serial2 = &usart1;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26
27	gpio-keys {
28		compatible = "gpio-keys";
29
30		key-home {
31			label = "Home";
32			gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
33			linux,code = <KEY_HOME>;
34		};
35
36		key-enter {
37			label = "Enter";
38			gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
39			linux,code = <KEY_ENTER>;
40		};
41	};
42
43	sound {
44		compatible = "audio-graph-card";
45		label = "STM32MP1-PHYCORE";
46		routing =
47			"Playback", "MCLK", /* Set a route between "MCLK" and "playback" widgets */
48			"Capture", "MCLK";
49		dais = <&sai2b_port>,
50		       <&sai2a_port>;
51	};
52};
53
54&dcmi {
55	pinctrl-names = "default", "sleep";
56	pinctrl-0 = <&dcmi_pins_d>;
57	pinctrl-1 = <&dcmi_sleep_pins_d>;
58};
59
60&i2c1 {
61	pinctrl-names = "default", "sleep";
62	pinctrl-0 = <&i2c1_pins_b>;
63	pinctrl-1 = <&i2c1_sleep_pins_b>;
64	i2c-scl-rising-time-ns = <100>;
65	i2c-scl-falling-time-ns = <7>;
66	status = "okay";
67
68	codec@18 {
69		compatible = "ti,tlv320aic3007";
70		reg = <0x18>;
71		#sound-dai-cells = <0>;
72
73		ai3x-micbias-vg = <2>;
74
75		AVDD-supply = <&v3v3>;
76		IOVDD-supply = <&v3v3>;
77		DRVDD-supply = <&v3v3>;
78		DVDD-supply = <&v1v8_audio>;
79
80		clocks = <&sai2b>;
81
82		port {
83			#address-cells = <1>;
84			#size-cells = <0>;
85
86			tlv320_tx_endpoint: endpoint@0 {
87				reg = <0>;
88				remote-endpoint = <&sai2b_endpoint>;
89				frame-master;
90				bitclock-master;
91			};
92
93			tlv320_rx_endpoint: endpoint@1 {
94				reg = <1>;
95				remote-endpoint = <&sai2a_endpoint>;
96				frame-master;
97				bitclock-master;
98			};
99		};
100	};
101
102	touch@44 {
103		compatible = "st,stmpe811";
104		reg = <0x44>;
105		interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
106		interrupt-parent = <&gpioi>;
107		vio-supply = <&v3v3>;
108		vcc-supply = <&v3v3>;
109		st,sample-time = <4>;
110		st,mod-12b = <1>;
111		st,ref-sel = <0>;
112		st,adc-freq = <1>;
113
114		touchscreen {
115			compatible = "st,stmpe-ts";
116			st,ave-ctrl = <1>;
117			st,touch-det-delay = <2>;
118			st,settling = <2>;
119			st,fraction-z = <7>;
120			st,i-drive = <1>;
121		};
122	};
123
124	leds@62 {
125		compatible = "nxp,pca9533";
126		reg = <0x62>;
127
128		led-0 {
129			color = <LED_COLOR_ID_RED>;
130			function = LED_FUNCTION_POWER;
131			type = <PCA9532_TYPE_LED>;
132		};
133
134		led-1 {
135			color = <LED_COLOR_ID_GREEN>;
136			function = LED_FUNCTION_POWER;
137			type = <PCA9532_TYPE_LED>;
138		};
139
140		led-2 {
141			color = <LED_COLOR_ID_BLUE>;
142			function = LED_FUNCTION_HEARTBEAT;
143			type = <PCA9532_TYPE_LED>;
144			linux,default-trigger = "heartbeat";
145		};
146	};
147};
148
149&ltdc {
150	pinctrl-names = "default", "sleep";
151	pinctrl-0 = <&ltdc_pins_f>;
152	pinctrl-1 = <&ltdc_sleep_pins_f>;
153};
154
155&m_can2 {
156	pinctrl-names = "default", "sleep";
157	pinctrl-0 = <&m_can2_pins_a>;
158	pinctrl-1 = <&m_can2_sleep_pins_a>;
159	status = "okay";
160};
161
162&sai2 {
163	clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
164	clock-names = "pclk", "x8k", "x11k";
165	pinctrl-names = "default", "sleep";
166	pinctrl-0 = <&sai2a_pins_d>, <&sai2b_pins_d>;
167	pinctrl-1 = <&sai2a_sleep_pins_d>, <&sai2b_sleep_pins_d>;
168	status = "okay";
169};
170
171&sai2a {
172	dma-names = "rx";
173	clocks = <&rcc SAI2_K>, <&sai2b>;
174	clock-names = "sai_ck", "MCLK";
175	#clock-cells = <0>;
176	st,sync = <&sai2b 2>;
177
178	sai2a_port: port {
179		sai2a_endpoint: endpoint {
180			remote-endpoint = <&tlv320_rx_endpoint>;
181			mclk-fs = <256>;
182			dai-tdm-slot-num = <2>;
183			dai-tdm-slot-width = <16>;
184		};
185	};
186};
187
188&sai2b {
189	dma-names = "tx";
190	#clock-cells = <0>;
191
192	sai2b_port: port {
193		sai2b_endpoint: endpoint {
194			remote-endpoint = <&tlv320_tx_endpoint>;
195			mclk-fs = <256>;
196			dai-tdm-slot-num = <2>;
197			dai-tdm-slot-width = <16>;
198		};
199	};
200};
201
202&sdmmc1 {
203	pinctrl-names = "default", "opendrain", "sleep";
204	pinctrl-0 = <&sdmmc1_b4_pins_b>;
205	pinctrl-1 = <&sdmmc1_b4_od_pins_b>;
206	pinctrl-2 = <&sdmmc1_b4_sleep_pins_b>;
207	cd-gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
208	disable-wp;
209	bus-width = <4>;
210	vmmc-supply = <&v3v3>;
211	st,neg-edge;
212	status = "okay";
213};
214
215&spi1 {
216	pinctrl-names = "default", "sleep";
217	pinctrl-0 = <&spi1_pins_a>;
218	pinctrl-1 = <&spi1_sleep_pins_a>;
219	cs-gpios = <&gpioz 3 0>;
220	status = "okay";
221};
222
223&timers5 {
224	/* spare dmas for other usage */
225	/delete-property/dmas;
226	/delete-property/dma-names;
227	pwm5: pwm {
228		pinctrl-names = "default", "sleep";
229		pinctrl-0 = <&pwm5_pins_c>;
230		pinctrl-1 = <&pwm5_sleep_pins_c>;
231	};
232};
233
234&uart4 {
235	pinctrl-names = "default", "sleep", "idle";
236	pinctrl-0 = <&uart4_pins_f>;
237	pinctrl-1 = <&uart4_sleep_pins_f>;
238	pinctrl-2 = <&uart4_idle_pins_f>;
239	/delete-property/dmas;
240	/delete-property/dma-names;
241	status = "okay";
242};
243
244&usart1 {
245	pinctrl-names = "default", "sleep", "idle";
246	pinctrl-0 = <&usart1_pins_b &usart1_pins_a>;
247	pinctrl-1 = <&usart1_sleep_pins_b &usart1_sleep_pins_a>;
248	pinctrl-2 = <&usart1_idle_pins_b &usart1_idle_pins_a>;
249	uart-has-rtscts;
250	status = "okay";
251};
252
253&usart3 {
254	pinctrl-names = "default", "sleep", "idle";
255	pinctrl-0 = <&usart3_pins_a>;
256	pinctrl-1 = <&usart3_sleep_pins_a>;
257	pinctrl-2 = <&usart3_idle_pins_a>;
258	status = "okay";
259};
260
261&usbh_ehci {
262	status = "okay";
263};
264
265&usbh_ohci {
266	status = "okay";
267};
268
269&usbotg_hs {
270	phys = <&usbphyc_port1 0>;
271	phy-names = "usb2-phy";
272	status = "okay";
273};
274
275&usbphyc {
276	status = "okay";
277};
278
279&usbphyc_port0 {
280	phy-supply = <&vdd_usb>;
281};
282
283&usbphyc_port1 {
284	phy-supply = <&vdd_usb>;
285};
286