xref: /linux/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts (revision 0cac5ce06e524755b3dac1e0a060b05992076d93)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright (C) 2025 Toradex
4 *
5 * https://www.toradex.com/computer-on-modules/aquila-arm-family/ti-am69
6 * https://www.toradex.com/products/carrier-board/aquila-development-board-kit
7 */
8
9/dts-v1/;
10
11#include <dt-bindings/pwm/pwm.h>
12#include "k3-am69-aquila.dtsi"
13
14/ {
15	model = "Toradex Aquila AM69 on Aquila Development Board";
16	compatible = "toradex,aquila-am69-dev",
17		     "toradex,aquila-am69",
18		     "ti,j784s4";
19
20	aliases {
21		eeprom1 = &carrier_eeprom;
22	};
23
24	reg_1v8_sw: regulator-1v8-sw {
25		compatible = "regulator-fixed";
26		regulator-max-microvolt = <1800000>;
27		regulator-min-microvolt = <1800000>;
28		regulator-name = "Carrier_1V8";
29	};
30
31	reg_3v3_dp: regulator-3v3-dp {
32		compatible = "regulator-fixed";
33		pinctrl-names = "default";
34		pinctrl-0 = <&pinctrl_gpio_21_dp>;
35		/* Aquila GPIO_21_DP (AQUILA B57) */
36		gpio = <&main_gpio0 37 GPIO_ACTIVE_HIGH>;
37		enable-active-high;
38		regulator-max-microvolt = <3300000>;
39		regulator-min-microvolt = <3300000>;
40		regulator-name = "DP_3V3";
41		startup-delay-us = <10000>;
42	};
43
44	dp0-connector {
45		compatible = "dp-connector";
46		dp-pwr-supply = <&reg_3v3_dp>;
47		label = "Display Port";
48		type = "full-size";
49
50		port {
51			dp0_connector_in: endpoint {
52				remote-endpoint = <&dp0_out>;
53			};
54		};
55	};
56
57	sound {
58		compatible = "simple-audio-card";
59		simple-audio-card,bitclock-master = <&codec_dai>;
60		simple-audio-card,format = "i2s";
61		simple-audio-card,frame-master = <&codec_dai>;
62		simple-audio-card,name = "aquila-wm8904";
63		simple-audio-card,mclk-fs = <256>;
64		simple-audio-card,routing =
65			"Headphone Jack", "HPOUTL",
66			"Headphone Jack", "HPOUTR",
67			"IN2L", "Line In Jack",
68			"IN2R", "Line In Jack",
69			"Microphone Jack", "MICBIAS",
70			"IN1L", "Microphone Jack",
71			"IN1R", "Digital Mic";
72		simple-audio-card,widgets =
73			"Microphone", "Microphone Jack",
74			"Microphone", "Digital Mic",
75			"Headphone", "Headphone Jack",
76			"Line", "Line In Jack";
77
78		codec_dai: simple-audio-card,codec {
79			sound-dai = <&wm8904_1a>;
80		};
81
82		simple-audio-card,cpu {
83			sound-dai = <&mcasp4>;
84		};
85	};
86};
87
88/* Aquila CTRL_PWR_BTN_MICO# */
89&aquila_key_power {
90	status = "okay";
91};
92
93/* Aquila CTRL_WAKE1_MICO# */
94&aquila_key_wake {
95	status = "okay";
96};
97
98/* On-module ETH_1 MDIO */
99&davinci_mdio {
100	status = "okay";
101};
102
103&dp0_ports {
104	port@4 {
105		reg = <4>;
106		dp0_out: endpoint {
107			remote-endpoint = <&dp0_connector_in>;
108		};
109	};
110};
111
112&dss {
113	status = "okay";
114};
115
116&main0_thermal {
117	cooling-maps {
118		map0 {
119			cooling-device = <&fan 1 1>;
120			trip = <&main0_alert0>;
121		};
122
123		map1 {
124			cooling-device = <&fan 2 2>;
125			trip = <&main0_alert1>;
126		};
127	};
128};
129
130&main1_thermal {
131	cooling-maps {
132		map0 {
133			cooling-device = <&fan 1 1>;
134			trip = <&main1_alert0>;
135		};
136
137		map1 {
138			cooling-device = <&fan 2 2>;
139			trip = <&main1_alert1>;
140		};
141	};
142};
143
144&main2_thermal {
145	cooling-maps {
146		map0 {
147			cooling-device = <&fan 1 1>;
148			trip = <&main2_alert0>;
149		};
150
151		map1 {
152			cooling-device = <&fan 2 2>;
153			trip = <&main2_alert1>;
154		};
155	};
156};
157
158&main3_thermal {
159	cooling-maps {
160		map0 {
161			cooling-device = <&fan 1 1>;
162			trip = <&main3_alert0>;
163		};
164
165		map1 {
166			cooling-device = <&fan 2 2>;
167			trip = <&main3_alert1>;
168		};
169	};
170};
171
172&main4_thermal {
173	cooling-maps {
174		map0 {
175			cooling-device = <&fan 1 1>;
176			trip = <&main4_alert0>;
177		};
178
179		map1 {
180			cooling-device = <&fan 2 2>;
181			trip = <&main4_alert1>;
182		};
183	};
184};
185
186/* Aquila ETH_2 */
187&main_cpsw0 {
188	status = "okay";
189};
190
191/* Aquila ETH_2 SGMII PHY */
192&main_cpsw0_port8 {
193	phy-handle = <&cpsw0_port8_phy4>;
194	status = "okay";
195};
196
197/* Aquila ETH_2_XGMII_MDIO */
198&main_cpsw0_mdio {
199	status = "okay";
200
201	cpsw0_port8_phy4: ethernet-phy@4 {
202		reg = <4>;
203		pinctrl-names = "default";
204		pinctrl-0 = <&pinctrl_eth2_int>;
205		interrupt-parent = <&main_gpio0>;
206		interrupts = <44 IRQ_TYPE_EDGE_FALLING>;
207	};
208};
209
210/* Aquila PWM_1 */
211&main_ehrpwm0 {
212	status = "okay";
213};
214
215/* Aquila PWM_4_DP */
216&main_ehrpwm2 {
217	status = "okay";
218};
219
220/* Aquila PWM_2 */
221&main_ehrpwm1 {
222	status = "okay";
223};
224
225/* Aquila PWM_3_DSI */
226&main_ehrpwm5 {
227	status = "okay";
228};
229
230&main_gpio0 {
231	pinctrl-names = "default";
232	pinctrl-0 = <&pinctrl_gpio_01>,  /* Aquila GPIO_01 */
233		    <&pinctrl_gpio_02>,  /* Aquila GPIO_02 */
234		    <&pinctrl_gpio_03>;  /* Aquila GPIO_03 */
235};
236
237/* Aquila I2C_3_DSI1 */
238&main_i2c0 {
239	status = "okay";
240
241	i2c-mux@70 {
242		compatible = "nxp,pca9543";
243		reg = <0x70>;
244		#address-cells = <1>;
245		#size-cells = <0>;
246
247		/* I2C on DSI Connector Pin #4 and #6 */
248		i2c_dsi_0: i2c@0 {
249			reg = <0>;
250			#address-cells = <1>;
251			#size-cells = <0>;
252		};
253
254		/* I2C on DSI Connector Pin #52 and #54 */
255		i2c_dsi_1: i2c@1 {
256			reg = <1>;
257			#address-cells = <1>;
258			#size-cells = <0>;
259		};
260	};
261};
262
263/* Aquila I2C_4_CSI1 */
264&main_i2c1 {
265	status = "okay";
266};
267
268/* Aquila I2C_5_CSI2 */
269&main_i2c2 {
270	status = "okay";
271};
272
273/* Aquila I2C_6 */
274&main_i2c5 {
275	status = "okay";
276};
277
278/* Aquila CAN_1 */
279&main_mcan10 {
280	status = "okay";
281};
282
283/* Aquila CAN_3 */
284&main_mcan13 {
285	status = "okay";
286};
287
288/* Aquila SD_1 */
289&main_sdhci1 {
290	status = "okay";
291};
292
293/* Aquila SPI_2 */
294&main_spi0 {
295	status = "okay";
296};
297
298/* Aquila SPI_1 */
299&main_spi2 {
300	status = "okay";
301};
302
303/* Aquila UART_1 */
304&main_uart4 {
305	status = "okay";
306};
307
308/* Aquila UART_3, used as the Linux console */
309&main_uart8 {
310	status = "okay";
311};
312
313/* Aquila I2S_1 */
314&mcasp4 {
315	status = "okay";
316};
317
318&mcu_cpsw {
319	status = "okay";
320};
321
322/* On-module ETH_1 RGMII */
323&mcu_cpsw_port1 {
324	status = "okay";
325};
326
327/* Aquila I2C_1 */
328&mcu_i2c0 {
329	clock-frequency = <100000>;
330	status = "okay";
331
332	fan_controller: fan@18 {
333		compatible = "ti,amc6821";
334		reg = <0x18>;
335		#pwm-cells = <2>;
336
337		fan: fan {
338			cooling-levels = <102 179 255>;
339			#cooling-cells = <2>;
340			pwms = <&fan_controller 40000 PWM_POLARITY_INVERTED>;
341		};
342	};
343
344	wm8904_1a: audio-codec@1a {
345		compatible = "wlf,wm8904";
346		reg = <0x1a>;
347		pinctrl-names = "default";
348		pinctrl-0 = <&pinctrl_audio_extrefclk1>;
349		#sound-dai-cells = <0>;
350		clocks = <&audio_refclk1>;
351		clock-names = "mclk";
352		AVDD-supply = <&reg_1v8_sw>;
353		CPVDD-supply = <&reg_1v8_sw>;
354		DBVDD-supply = <&reg_1v8_sw>;
355		DCVDD-supply = <&reg_1v8_sw>;
356		MICVDD-supply = <&reg_1v8_sw>;
357
358		wlf,drc-cfg-names = "default", "peaklimiter";
359		/*
360		 * Config registers per name, respectively:
361		 * KNEE_IP = 0,   KNEE_OP = 0,     HI_COMP = 1,   LO_COMP = 1
362		 * KNEE_IP = -24, KNEE_OP = -6,    HI_COMP = 1/4, LO_COMP = 1
363		 */
364		wlf,drc-cfg-regs = /bits/ 16 <0x01af 0x3248 0x0000 0x0000>,
365				   /bits/ 16 <0x04af 0x324b 0x0010 0x0408>;
366
367		/* GPIO1 = DMIC_CLK, don't touch others */
368		wlf,gpio-cfg = <0x0018>, <0xffff>, <0xffff>, <0xffff>;
369
370		wlf,in1r-as-dmicdat2;
371	};
372
373	/* Current measurement into module VCC */
374	hwmon@41 {
375		compatible = "ti,ina226";
376		reg = <0x41>;
377		shunt-resistor = <5000>;
378	};
379
380	temperature-sensor@4f {
381		compatible = "ti,tmp1075";
382		reg = <0x4f>;
383	};
384
385	/* USB-C OTG (TCPC USB PD PHY) */
386	tcpc@52 {
387		compatible = "nxp,ptn5110", "tcpci";
388		reg = <0x52>;
389		pinctrl-names = "default";
390		pinctrl-0 = <&pinctrl_usb1_int>;
391		interrupt-parent = <&main_gpio0>;
392		interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
393
394		connector {
395			compatible = "usb-c-connector";
396			data-role = "dual";
397			label = "USB-C OTG";
398			power-role = "dual";
399			try-power-role = "sink";
400			self-powered;
401			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
402			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
403			op-sink-microwatt = <1000000>;
404
405			ports {
406				#address-cells = <1>;
407				#size-cells = <0>;
408
409				port@0 {
410					reg = <0>;
411
412					usb_1_con_hs: endpoint {
413						remote-endpoint = <&usb0_hs>;
414					};
415				};
416
417				port@1 {
418					reg = <1>;
419
420					usb_1_con_ss: endpoint {
421						remote-endpoint = <&usb0_ss_mux>;
422					};
423				};
424			};
425		};
426	};
427
428	carrier_eeprom: eeprom@57 {
429		compatible = "st,24c02", "atmel,24c02";
430		reg = <0x57>;
431		pagesize = <16>;
432	};
433};
434
435/* Aquila I2C_2 */
436&mcu_i2c1 {
437	status = "okay";
438};
439
440/* Aquila CAN_2 */
441&mcu_mcan0 {
442	status = "okay";
443};
444
445/* Aquila CAN_4 */
446&mcu_mcan1 {
447	status = "okay";
448};
449
450/* Aquila UART_4 */
451&mcu_uart0 {
452	status = "okay";
453};
454
455&mhdp {
456	status = "okay";
457};
458
459/* Aquila QSPI_1 */
460&ospi0 {
461	pinctrl-names = "default";
462	pinctrl-0 = <&pinctrl_mcu_ospi0_4bit>, <&pinctrl_mcu_ospi0_cs0>;
463	status = "okay";
464
465	flash@0 {
466		compatible = "jedec,spi-nor";
467		reg = <0x0>;
468		spi-max-frequency = <66000000>;
469		spi-rx-bus-width = <4>;
470		spi-tx-bus-width = <4>;
471		cdns,read-delay = <0>;
472		cdns,tchsh-ns = <3>;
473		cdns,tsd2d-ns = <10>;
474		cdns,tshsl-ns = <30>;
475		cdns,tslch-ns = <8>;
476	};
477};
478
479/* Aquila PCIE_1 */
480&pcie0_rc {
481	status = "okay";
482};
483
484/* Aquila PCIE_2 */
485&pcie1_rc {
486	status = "okay";
487};
488
489&serdes2 {
490	status = "okay";
491};
492
493&serdes4 {
494	status = "okay";
495};
496
497&serdes_wiz2 {
498	status = "okay";
499};
500
501&serdes_wiz4 {
502	status = "okay";
503};
504
505/* Aquila ADC_[1-4] */
506&tscadc0 {
507	status = "okay";
508};
509
510&usbss0 {
511	status = "okay";
512};
513
514&usb0ss_mux {
515	status = "okay";
516
517	port {
518		usb0_ss_mux: endpoint {
519			remote-endpoint = <&usb_1_con_ss>;
520		};
521	};
522};
523
524&usb0 {
525	status = "okay";
526
527	port {
528		usb0_hs: endpoint {
529			remote-endpoint = <&usb_1_con_hs>;
530		};
531	};
532};
533
534&wkup0_thermal {
535	cooling-maps {
536		map0 {
537			cooling-device = <&fan 1 1>;
538			trip = <&wkup0_alert0>;
539		};
540
541		map1 {
542			cooling-device = <&fan 2 2>;
543			trip = <&wkup0_alert1>;
544		};
545	};
546};
547
548&wkup1_thermal {
549	cooling-maps {
550		map0 {
551			cooling-device = <&fan 1 1>;
552			trip = <&wkup1_alert0>;
553		};
554
555		map1 {
556			cooling-device = <&fan 2 2>;
557			trip = <&wkup1_alert1>;
558		};
559	};
560};
561
562&wkup_gpio0 {
563	pinctrl-names = "default";
564	pinctrl-0 = <&pinctrl_gpio_04>,       /* Aquila GPIO_04 */
565		    <&pinctrl_gpio_05>,       /* Aquila GPIO_05 */
566		    <&pinctrl_gpio_06>,       /* Aquila GPIO_06 */
567		    <&pinctrl_gpio_07>,       /* Aquila GPIO_07 */
568		    <&pinctrl_gpio_08>;       /* Aquila GPIO_08 */
569};
570
571/* Aquila UART_2, through RS485 transceiver */
572&wkup_uart0 {
573	linux,rs485-enabled-at-boot-time;
574	rs485-rx-during-tx;
575	status = "okay";
576};
577