xref: /freebsd/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl-mbax4xxl.dts (revision 95eb4b873b6a8b527c5bd78d7191975dfca38998)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
4 * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>, D-82229 Seefeld, Germany.
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/net/ti-dp83867.h>
13#include <dt-bindings/phy/phy.h>
14#include <dt-bindings/pwm/pwm.h>
15#include "k3-serdes.h"
16
17#include "k3-am642-tqma64xxl.dtsi"
18
19/ {
20	compatible = "tq,am642-tqma6442l-mbax4xxl", "tq,am642-tqma6442l",
21		     "ti,am642";
22	model = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
23	chassis-type = "embedded";
24
25	aliases {
26		ethernet0 = &cpsw_port1;
27		i2c1 = &mcu_i2c0;
28		mmc1 = &sdhci1;
29		serial0 = &mcu_uart0;
30		serial1 = &mcu_uart1;
31		serial2 = &main_uart0;
32		serial3 = &main_uart1;
33		serial4 = &main_uart2;
34		serial5 = &main_uart4;
35		serial6 = &main_uart5;
36		serial7 = &main_uart3;
37		spi1 = &main_spi0;
38		spi2 = &mcu_spi0;
39	};
40
41	chosen {
42		stdout-path = &main_uart0;
43	};
44
45	gpio-keys {
46		compatible = "gpio-keys";
47		pinctrl-names = "default";
48		pinctrl-0 = <&mcu_gpio_keys_pins>;
49
50		user-button {
51			label = "USER_BUTTON";
52			linux,code = <BTN_0>;
53			gpios = <&mcu_gpio0 5 GPIO_ACTIVE_LOW>;
54		};
55	};
56
57	gpio-leds {
58		compatible = "gpio-leds";
59		pinctrl-names = "default";
60		pinctrl-0 = <&mcu_gpio_leds_pins>;
61
62		led-0 {
63			gpios = <&mcu_gpio0 8 GPIO_ACTIVE_HIGH>;
64			color = <LED_COLOR_ID_GREEN>;
65			function = LED_FUNCTION_INDICATOR;
66		};
67		led-1 {
68			gpios = <&mcu_gpio0 9 GPIO_ACTIVE_HIGH>;
69			color = <LED_COLOR_ID_YELLOW>;
70			function = LED_FUNCTION_INDICATOR;
71		};
72	};
73
74	fan0: pwm-fan {
75		compatible = "pwm-fan";
76		pinctrl-names = "default";
77		pinctrl-0 = <&pwm_fan_pins>;
78		fan-supply = <&reg_pwm_fan>;
79		#cooling-cells = <2>;
80		/* typical 25 kHz -> 40.000 nsec */
81		pwms = <&epwm5 0 40000 PWM_POLARITY_INVERTED>;
82		cooling-levels = <0 32 64 128 196 240>;
83		pulses-per-revolution = <2>;
84		interrupt-parent = <&main_gpio1>;
85		interrupts = <49 IRQ_TYPE_EDGE_FALLING>;
86		status = "disabled";
87	};
88
89	wifi_pwrseq: pwrseq-wifi {
90		compatible = "mmc-pwrseq-simple";
91		pinctrl-names = "default";
92		pinctrl-0 = <&main_mmc1_wifi_pwrseq_pins>;
93		reset-gpios = <&main_gpio0 23 GPIO_ACTIVE_LOW>;
94	};
95
96	reg_pwm_fan: regulator-pwm-fan {
97		compatible = "regulator-fixed";
98		pinctrl-names = "default";
99		pinctrl-0 = <&pwm_fan_reg_pins>;
100		regulator-name = "FAN_PWR";
101		regulator-min-microvolt = <12000000>;
102		regulator-max-microvolt = <12000000>;
103		gpio = <&main_gpio1 48 GPIO_ACTIVE_HIGH>;
104		enable-active-high;
105	};
106
107	reg_sd: regulator-sd {
108		compatible = "regulator-fixed";
109		pinctrl-names = "default";
110		pinctrl-0 = <&main_mmc1_reg_pins>;
111		regulator-name = "V_3V3_SD";
112		regulator-min-microvolt = <3300000>;
113		regulator-max-microvolt = <3300000>;
114		gpio = <&main_gpio1 43 GPIO_ACTIVE_HIGH>;
115		enable-active-high;
116	};
117};
118
119&cpsw3g {
120	pinctrl-names = "default";
121	pinctrl-0 = <&cpsw_pins>;
122};
123
124&cpsw_port1 {
125	phy-mode = "rgmii-rxid";
126	phy-handle = <&cpsw3g_phy0>;
127};
128
129&cpsw_port2 {
130	status = "disabled";
131};
132
133&cpsw3g_mdio {
134	pinctrl-names = "default";
135	pinctrl-0 = <&cpsw_mdio_pins>;
136	status = "okay";
137
138	cpsw3g_phy0: ethernet-phy@0 {
139		compatible = "ethernet-phy-ieee802.3-c22";
140		reg = <0>;
141		reset-gpios = <&main_gpio0 44 GPIO_ACTIVE_LOW>;
142		reset-assert-us = <1000>;
143		reset-deassert-us = <1000>;
144		ti,rx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
145		ti,tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
146		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
147		ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
148	};
149};
150
151&epwm5 {
152	pinctrl-names = "default";
153	pinctrl-0 = <&epwm5_pins>;
154	status = "okay";
155};
156
157&main_gpio0 {
158	pinctrl-names = "default";
159	pinctrl-0 = <&main_gpio0_digital_pins>,
160		    <&main_gpio0_hog_pins>;
161	gpio-line-names =
162		"", "", "", "", /* 0-3 */
163		"", "", "", "", /* 4-7 */
164		"", "", "", "", /* 8-11 */
165		"", "", "", "", /* 12-15 */
166		"", "", "", "", /* 16-19 */
167		"", "", "", "", /* 20-23 */
168		"", "", "EN_DIG_OUT_1", "STATUS_OUT_1", /* 24-27 */
169		"EN_DIG_OUT_2", "STATUS_OUT_2", "EN_SIG_OUT_3", "", /* 28-31 */
170		"", "", "STATUS_OUT_3", "EN_DIG_OUT_4", /* 32-35 */
171		"", "", "STATUS_OUT_4", "DIG_IN_1", /* 36-39 */
172		"DIG_IN_2", "DIG_IN_3", "DIG_IN_4"; /* 40- */
173};
174
175&main_gpio1 {
176	pinctrl-names = "default";
177	pinctrl-0 = <&main_gpio1_hog_pins>,
178		    <&main_gpio1_pru_pins>;
179	gpio-line-names =
180		"", "", "", "", /* 0-3 */
181		"", "", "", "", /* 4-7 */
182		"", "", "", "", /* 8-11 */
183		"", "", "", "", /* 12-15 */
184		"", "", "", "", /* 16-19 */
185		"", "", "", "", /* 20-23 */
186		"", "", "", "", /* 24-27 */
187		"", "", "", "", /* 28-31 */
188		"", "", "", "", /* 32-35 */
189		"", "", "", "", /* 36-39 */
190		"", "", "", "", /* 40-43 */
191		"", "", "", "", /* 44-47 */
192		"", "", "", "", /* 48-51 */
193		"", "", "", "ADC_SYNC", /* 52-55 */
194		"", "", "ADC_RST#", "ADC_DATA_RDY", /* 56-59 */
195		"", "", "", "", /* 60-63 */
196		"", "", "", "ADC_INT#", /* 64-67 */
197		"BG95_PWRKEY", "BG95_RESET"; /* 68- */
198
199	line50-hog {
200		/* See also usb0 */
201		gpio-hog;
202		gpios = <50 0>;
203		line-name = "USB0_VBUS_OC#";
204		input;
205	};
206
207	line54-hog {
208		gpio-hog;
209		gpios = <54 0>;
210		line-name = "PRG0_MDIO_SWITCH";
211		output-low;
212	};
213
214	line70-hog {
215		gpio-hog;
216		gpios = <70 0>;
217		line-name = "PHY_INT#";
218		input;
219	};
220};
221
222&main_mcan0 {
223	pinctrl-names = "default";
224	pinctrl-0 = <&main_mcan0_pins>;
225	status = "okay";
226};
227
228&main_mcan1 {
229	pinctrl-names = "default";
230	pinctrl-0 = <&main_mcan1_pins>;
231	status = "okay";
232};
233
234&main_spi0 {
235	pinctrl-names = "default";
236	pinctrl-0 = <&main_spi0_pins>;
237	ti,pindir-d0-out-d1-in;
238	status = "okay";
239
240	/* adc@0: NXP NAFE13388 */
241};
242
243/* UART/USB adapter port 1 */
244&main_uart0 {
245	pinctrl-names = "default";
246	pinctrl-0 = <&main_uart0_pins>;
247	status = "okay";
248};
249
250/*
251 * IOT Module - GNSS UART
252 *
253 * Note: We expect usage of a SYSFW that does not reserve UART1 for debug traces
254 */
255&main_uart1 {
256	pinctrl-names = "default";
257	pinctrl-0 = <&main_uart1_pins>;
258	status = "okay";
259};
260
261/* RS485 port */
262&main_uart2 {
263	pinctrl-names = "default";
264	pinctrl-0 = <&main_uart2_pins>;
265	linux,rs485-enabled-at-boot-time;
266	rs485-rts-active-low;
267	status = "okay";
268};
269
270/* Bluetooth module */
271&main_uart3 {
272	pinctrl-names = "default";
273	pinctrl-0 = <&main_uart3_pins>;
274	/*
275	 * Left disabled for now, until a way to deal with drivers and firmware
276	 * for the combined WLAN/BT module has been figured out
277	 */
278};
279
280/* IOT module - Main UART */
281&main_uart4 {
282	pinctrl-names = "default";
283	pinctrl-0 = <&main_uart4_pins>;
284	status = "okay";
285};
286
287/* IOT module - DBG UART */
288&main_uart5 {
289	pinctrl-names = "default";
290	pinctrl-0 = <&main_uart5_pins>;
291	status = "okay";
292};
293
294&main0_thermal {
295	trips {
296		main0_active0: trip-active0 {
297			temperature = <40000>;
298			hysteresis = <5000>;
299			type = "active";
300		};
301
302		main0_active1: trip-active1 {
303			temperature = <48000>;
304			hysteresis = <3000>;
305			type = "active";
306		};
307
308		main0_active2: trip-active2 {
309			temperature = <60000>;
310			hysteresis = <10000>;
311			type = "active";
312		};
313	};
314
315	cooling-maps {
316		map1 {
317			trip = <&main0_active0>;
318			cooling-device = <&fan0 1 1>;
319		};
320
321		map2 {
322			trip = <&main0_active1>;
323			cooling-device = <&fan0 2 2>;
324		};
325
326		map3 {
327			trip = <&main0_active2>;
328			cooling-device = <&fan0 3 3>;
329		};
330	};
331};
332
333&main1_thermal {
334	trips {
335		main1_active0: trip-active0 {
336			temperature = <40000>;
337			hysteresis = <5000>;
338			type = "active";
339		};
340
341		main1_active1: trip-active1 {
342			temperature = <48000>;
343			hysteresis = <3000>;
344			type = "active";
345		};
346
347		main1_active2: trip-active2 {
348			temperature = <60000>;
349			hysteresis = <10000>;
350			type = "active";
351		};
352	};
353
354	cooling-maps {
355		map1 {
356			trip = <&main1_active0>;
357			cooling-device = <&fan0 1 1>;
358		};
359
360		map2 {
361			trip = <&main1_active1>;
362			cooling-device = <&fan0 2 2>;
363		};
364
365		map3 {
366			trip = <&main1_active2>;
367			cooling-device = <&fan0 3 3>;
368		};
369	};
370};
371
372&mcu_gpio0 {
373	pinctrl-names = "default";
374	pinctrl-0 = <&mcu_gpio0_pins>;
375};
376
377&mcu_i2c0 {
378	pinctrl-names = "default";
379	pinctrl-0 = <&mcu_i2c0_pins>;
380	/* Left disabled: not functional without external pullup */
381};
382
383&mcu_spi0 {
384	pinctrl-names = "default";
385	pinctrl-0 = <&mcu_spi0_pins>;
386	ti,pindir-d0-out-d1-in;
387	status = "okay";
388};
389
390/* UART/USB adapter port 2 */
391&mcu_uart0 {
392	pinctrl-names = "default";
393	pinctrl-0 = <&mcu_uart0_pins>;
394	status = "okay";
395};
396
397/* Pin header */
398&mcu_uart1 {
399	pinctrl-names = "default";
400	pinctrl-0 = <&mcu_uart1_pins>;
401	status = "okay";
402};
403
404&serdes_ln_ctrl {
405	idle-states = <AM64_SERDES0_LANE0_USB>;
406};
407
408&serdes0 {
409	serdes0_usb_link: phy@0 {
410		reg = <0>;
411		#phy-cells = <0>;
412		resets = <&serdes_wiz0 1>;
413		cdns,num-lanes = <1>;
414		cdns,phy-type = <PHY_TYPE_USB3>;
415	};
416};
417
418&sdhci1 {
419	pinctrl-names = "default";
420	pinctrl-0 = <&main_mmc1_pins>;
421	bus-width = <4>;
422	cd-gpios = <&main_gpio1 77 GPIO_ACTIVE_LOW>;
423	disable-wp;
424	no-mmc;
425	ti,driver-strength-ohm = <50>;
426	ti,fails-without-test-cd;
427	/* Enabled by overlay */
428};
429
430&tscadc0 {
431	status = "okay";
432	adc {
433		ti,adc-channels = <0 1 2 3 4 5 6 7>;
434	};
435};
436
437&usb0 {
438	/*
439	 * The CDNS USB driver currently doesn't support overcurrent GPIOs,
440	 * so there is no overcurrent detection. The OC pin is configured
441	 * as a GPIO hog instead.
442	 */
443	pinctrl-names = "default";
444	pinctrl-0 = <&main_usb0_pins>;
445	dr_mode = "otg";
446	maximum-speed = "super-speed";
447	phys = <&serdes0_usb_link>;
448	phy-names = "cdns3,usb3-phy";
449};
450
451&usbss0 {
452	ti,vbus-divider;
453};
454
455&main_pmx0 {
456	cpsw_pins: cpsw-pins {
457		pinctrl-single,pins = <
458			/* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */
459			AM64X_IOPAD(0x01cc, PIN_INPUT, 4)
460			/* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */
461			AM64X_IOPAD(0x01d4, PIN_INPUT, 4)
462			/* (V6) PRG0_PRU1_GPO10.RGMII1_RD2 */
463			AM64X_IOPAD(0x01d8, PIN_INPUT, 4)
464			/* (V5) PRG0_PRU1_GPO17.RGMII1_RD3 */
465			AM64X_IOPAD(0x01f4, PIN_INPUT, 4)
466			/* (AA5) PRG0_PRU0_GPO10.RGMII1_RXC */
467			AM64X_IOPAD(0x0188, PIN_INPUT, 4)
468			/* (W6) PRG0_PRU0_GPO9.RGMII1_RX_CTL */
469			AM64X_IOPAD(0x0184, PIN_INPUT, 4)
470			/* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
471			AM64X_IOPAD(0x0124, PIN_OUTPUT, 4)
472			/* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
473			AM64X_IOPAD(0x012c, PIN_OUTPUT, 4)
474			/* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
475			AM64X_IOPAD(0x0130, PIN_OUTPUT, 4)
476			/* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
477			AM64X_IOPAD(0x014c, PIN_OUTPUT, 4)
478			/* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
479			AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4)
480			/* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
481			AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4)
482		>;
483	};
484
485	cpsw_mdio_pins: cpsw-mdio-pins {
486		pinctrl-single,pins = <
487			/* (R21) GPMC0_CSn3.GPIO0_44 - RESET_RGMII1# */
488			AM64X_IOPAD(0x00b4, PIN_OUTPUT, 7)
489
490			/* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
491			AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4)
492			/* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
493			AM64X_IOPAD(0x01f8, PIN_INPUT, 4)
494		>;
495	};
496
497	epwm5_pins: epwm5-pins {
498		pinctrl-single,pins = <
499			/* (W19) GPMC0_WAIT0.EHRPWM5_B */
500			AM64X_IOPAD(0x0098, PIN_OUTPUT, 3)
501		>;
502	};
503
504	/* Digital IOs */
505	main_gpio0_digital_pins: main-gpio0-digital-pins {
506		pinctrl-single,pins = <
507			/* (W20) GPMC0_AD11.GPIO0_26 - EN_DIG_OUT_1 */
508			AM64X_IOPAD(0x0068, PIN_OUTPUT, 7)
509			/* (W21) GPMC0_AD12.GPIO0_27 - STATUS_OUT_1 */
510			AM64X_IOPAD(0x006c, PIN_INPUT, 7)
511			/* (V18) GPMC0_AD13.GPIO0_28 - EN_DIG_OUT_2 */
512			AM64X_IOPAD(0x0070, PIN_OUTPUT, 7)
513			/* (Y21) GPMC0_AD14.GPIO0_29 - STATUS_OUT_2 */
514			AM64X_IOPAD(0x0074, PIN_INPUT, 7)
515			/* (Y20) GPMC0_AD15.GPIO0_30 - EN_DIG_OUT_3 */
516			AM64X_IOPAD(0x0078, PIN_OUTPUT, 7)
517			/* (T21) GPMC0_WEn.GPIO0_34 - STATUS_OUT_3 */
518			AM64X_IOPAD(0x008c, PIN_INPUT, 7)
519			/* (P17) GPMC0_BE0n_CLE.GPIO0_35 - EN_DIG_OUT_4 */
520			AM64X_IOPAD(0x0090, PIN_OUTPUT, 7)
521			/* (Y18) GPMC0_WAIT1.GPIO0_38 - STATUS_OUT_4 */
522			AM64X_IOPAD(0x009c, PIN_INPUT, 7)
523			/* (N16) GPMC0_WPn.GPIO0_39 - DIG_IN_1 */
524			AM64X_IOPAD(0x00a0, PIN_INPUT, 7)
525			/* (N17) GPMC0_DIR.GPIO0_40 - DIG_IN_2 */
526			AM64X_IOPAD(0x00a4, PIN_INPUT, 7)
527			/* (R19) GPMC0_CSn0.GPIO0_41 - DIG_IN_3 */
528			AM64X_IOPAD(0x00a8, PIN_INPUT, 7)
529			/* (R20) GPMC0_CSn1.GPIO0_42 - DIG_IN_4 */
530			AM64X_IOPAD(0x00ac, PIN_INPUT, 7)
531		>;
532	};
533
534	main_gpio0_hog_pins: main-gpio0-hog-pins {
535		pinctrl-single,pins = <
536			/* (P19) GPMC0_CSn2.GPIO0_43 - MMC1_CTRL */
537			AM64X_IOPAD(0x00b0, PIN_OUTPUT, 7)
538		>;
539	};
540
541	main_gpio1_hog_pins: main-gpio1-hog-pins {
542		pinctrl-single,pins = <
543			/* (B15) SPI1_D0.GPIO1_50 - USB0_VBUS_OC# */
544			AM64X_IOPAD(0x0228, PIN_INPUT, 7)
545			/* (B16) UART0_CTSn.GPIO1_54 - PRG0_MDIO_SWITCH */
546			AM64X_IOPAD(0x0238, PIN_OUTPUT, 7)
547			/* (C19) EXTINTn.GPIO1_70 - PHY_INT# */
548			AM64X_IOPAD(0x0278, PIN_INPUT, 7)
549		>;
550	};
551
552	main_gpio1_pru_pins: main-gpio1-pru-pins {
553		pinctrl-single,pins = <
554			/* (Y1) PRG0_PRU0_GPO0.GPIO1_0 */
555			AM64X_IOPAD(0x0160, PIN_INPUT, 7)
556			/* (R4) PRG0_PRU0_GPO1.GPIO1_1 */
557			AM64X_IOPAD(0x0164, PIN_INPUT, 7)
558			/* (U2) PRG0_PRU0_GPO2.GPIO1_2 */
559			AM64X_IOPAD(0x0168, PIN_INPUT, 7)
560			/* (V2) PRG0_PRU0_GPO3.GPIO1_3 */
561			AM64X_IOPAD(0x016c, PIN_INPUT, 7)
562			/* (AA2) PRG0_PRU0_GPO4.GPIO1_4 */
563			AM64X_IOPAD(0x0170, PIN_INPUT, 7)
564			/* (R3) PRG0_PRU0_GPO5.GPIO1_5 */
565			AM64X_IOPAD(0x0174, PIN_INPUT, 7)
566			/* (T3) PRG0_PRU0_GPO6.GPIO1_6 */
567			AM64X_IOPAD(0x0178, PIN_INPUT, 7)
568			/* (T1) PRG0_PRU0_GPO7.GPIO1_7 */
569			AM64X_IOPAD(0x017c, PIN_INPUT, 7)
570			/* (T2) PRG0_PRU0_GPO8.GPIO1_8 */
571			AM64X_IOPAD(0x0180, PIN_INPUT, 7)
572			/* (Y3) PRG0_PRU0_GPO11.GPIO1_11 */
573			AM64X_IOPAD(0x018c, PIN_INPUT, 7)
574			/* (AA3) PRG0_PRU0_GPO12.GPIO1_12 */
575			AM64X_IOPAD(0x0190, PIN_INPUT, 7)
576			/* (R6) PRG0_PRU0_GPO13.GPIO1_13 */
577			AM64X_IOPAD(0x0194, PIN_INPUT, 7)
578			/* (V4) PRG0_PRU0_GPO14.GPIO1_14 */
579			AM64X_IOPAD(0x0198, PIN_INPUT, 7)
580			/* (T5) PRG0_PRU0_GPO15.GPIO1_15 */
581			AM64X_IOPAD(0x019c, PIN_INPUT, 7)
582			/* (U4) PRG0_PRU0_GPO16.GPIO1_16 */
583			AM64X_IOPAD(0x01a0, PIN_INPUT, 7)
584			/* (U1) PRG0_PRU0_GPO17.GPIO1_17 */
585			AM64X_IOPAD(0x01a4, PIN_INPUT, 7)
586			/* (V1) PRG0_PRU0_GPO18.GPIO1_18 */
587			AM64X_IOPAD(0x01a8, PIN_INPUT, 7)
588			/* (W1) PRG0_PRU0_GPO19.GPIO1_19 */
589			AM64X_IOPAD(0x01ac, PIN_INPUT, 7)
590			/* (Y2) PRG0_PRU1_GPO0.GPIO1_20 */
591			AM64X_IOPAD(0x01b0, PIN_INPUT, 7)
592			/* (W2) PRG0_PRU1_GPO1.GPIO1_21 */
593			AM64X_IOPAD(0x01b4, PIN_INPUT, 7)
594			/* (V3) PRG0_PRU1_GPO2.GPIO1_22 */
595			AM64X_IOPAD(0x01b8, PIN_INPUT, 7)
596			/* (T4) PRG0_PRU1_GPO3.GPIO1_23 */
597			AM64X_IOPAD(0x01bc, PIN_INPUT, 7)
598			/* (W3) PRG0_PRU1_GPO4.GPIO1_24 */
599			AM64X_IOPAD(0x01c0, PIN_INPUT, 7)
600			/* (P4) PRG0_PRU1_GPO5.GPIO1_25 */
601			AM64X_IOPAD(0x01c4, PIN_INPUT, 7)
602			/* (R5) PRG0_PRU1_GPO6.GPIO1_26 */
603			AM64X_IOPAD(0x01c8, PIN_INPUT, 7)
604			/* (R1) PRG0_PRU1_GPO8.GPIO1_28 */
605			AM64X_IOPAD(0x01d0, PIN_INPUT, 7)
606			/* (W4) PRG0_PRU1_GPO11.GPIO1_31 */
607			AM64X_IOPAD(0x01dc, PIN_INPUT, 7)
608			/* (Y4) PRG0_PRU1_GPO12.GPIO1_32 */
609			AM64X_IOPAD(0x01e0, PIN_INPUT, 7)
610			/* (T6) PRG0_PRU1_GPO13.GPIO1_33 */
611			AM64X_IOPAD(0x01e4, PIN_INPUT, 7)
612			/* (U6) PRG0_PRU1_GPO14.GPIO1_34 */
613			AM64X_IOPAD(0x01e8, PIN_INPUT, 7)
614			/* (U5) PRG0_PRU1_GPO15.GPIO1_35 */
615			AM64X_IOPAD(0x01ec, PIN_INPUT, 7)
616			/* (AA4) PRG0_PRU1_GPO16.GPIO1_36 */
617			AM64X_IOPAD(0x01f0, PIN_INPUT, 7)
618			/* (P2) PRG0_MDIO0_MDIO.GPIO1_40 */
619			AM64X_IOPAD(0x0200, PIN_INPUT, 7)
620			/* (P3) PRG0_MDIO0_MDC.GPIO1_41 */
621			AM64X_IOPAD(0x0204, PIN_INPUT, 7)
622		>;
623	};
624
625	main_mcan0_pins: main-mcan0-pins {
626		pinctrl-single,pins = <
627			/* (B17) MCAN0_RX */
628			AM64X_IOPAD(0x0254, PIN_INPUT, 0)
629			/* (A17) MCAN0_TX */
630			AM64X_IOPAD(0x0250, PIN_OUTPUT, 0)
631		>;
632	};
633
634	main_mcan1_pins: main-mcan1-pins {
635		pinctrl-single,pins = <
636			/* (D17) MCAN1_RX */
637			AM64X_IOPAD(0x025c, PIN_INPUT, 0)
638			/* (C17) MCAN1_TX */
639			AM64X_IOPAD(0x0258, PIN_OUTPUT, 0)
640		>;
641	};
642
643	main_mmc1_pins: main-mmc1-pins {
644		pinctrl-single,pins = <
645			/* (J19) MMC1_CMD */
646			AM64X_IOPAD(0x0294, PIN_INPUT, 0)
647			/* (L20) MMC1_CLK */
648			AM64X_IOPAD(0x028c, PIN_INPUT, 0)
649			/* (K21) MMC1_DAT0 */
650			AM64X_IOPAD(0x0288, PIN_INPUT, 0)
651			/* (L21) MMC1_DAT1 */
652			AM64X_IOPAD(0x0284, PIN_INPUT, 0)
653			/* (K19) MMC1_DAT2 */
654			AM64X_IOPAD(0x0280, PIN_INPUT, 0)
655			/* (K18) MMC1_DAT3 */
656			AM64X_IOPAD(0x027c, PIN_INPUT, 0)
657			/* (D19) MMC1_SDCD.GPIO1_77 */
658			AM64X_IOPAD(0x0298, PIN_INPUT, 7)
659			/* (#N/A) MMC1_CLKLB */
660			AM64X_IOPAD(0x0290, PIN_INPUT, 0)
661		>;
662	};
663
664	main_mmc1_reg_pins: main-mmc1-reg-pins {
665		pinctrl-single,pins = <
666			/* (C13) SPI0_CS1.GPIO1_43 - MMC1_SD_EN */
667			AM64X_IOPAD(0x020c, PIN_OUTPUT, 7)
668		>;
669	};
670
671	main_mmc1_wifi_pwrseq_pins: main-mmc1-wifi-pwrseq-pins {
672		pinctrl-single,pins = <
673			/* (V19) GPMC0_AD8.GPIO0_23 - WIFI-BT_EN */
674			AM64X_IOPAD(0x005c, PIN_OUTPUT, 7)
675		>;
676	};
677
678	main_spi0_pins: main-spi0-pins {
679		pinctrl-single,pins = <
680			/* (D13) SPI0_CLK */
681			AM64X_IOPAD(0x0210, PIN_OUTPUT, 0)
682			/* (D12) SPI0_CS0 */
683			AM64X_IOPAD(0x0208, PIN_OUTPUT, 0)
684			/* (A13) SPI0_D0 */
685			AM64X_IOPAD(0x0214, PIN_OUTPUT, 0)
686			/* (A14) SPI0_D1 */
687			AM64X_IOPAD(0x0218, PIN_INPUT, 0)
688		>;
689	};
690
691	main_spi0_adc_pins: main-spi0-adc-pins {
692		pinctrl-single,pins = <
693			/* (A16) UART0_RTSn.GPIO1_55 - ADC_SYNC */
694			AM64X_IOPAD(0x023c, PIN_INPUT, 7)
695			/* (D16) UART1_CTSn.GPIO1_58 - ADC_RST# */
696			AM64X_IOPAD(0x0248, PIN_OUTPUT, 7)
697			/* (E16) UART1_RTSn.GPIO1_59 - ADC_DATA_RDY */
698			AM64X_IOPAD(0x024c, PIN_INPUT, 7)
699			/* (B19) I2C1_SDA.GPIO1_67 - ADC_INT# */
700			AM64X_IOPAD(0x026c, PIN_INPUT, 7)
701		>;
702	};
703
704	main_uart0_pins: main-uart0-pins {
705		pinctrl-single,pins = <
706			/* (D15) UART0_RXD */
707			AM64X_IOPAD(0x0230, PIN_INPUT, 0)
708			/* (C16) UART0_TXD */
709			AM64X_IOPAD(0x0234, PIN_OUTPUT, 0)
710		>;
711	};
712
713	main_uart1_pins: main-uart1-pins {
714		pinctrl-single,pins = <
715			/* (E15) UART1_RXD */
716			AM64X_IOPAD(0x0240, PIN_INPUT, 0)
717			/* (E14) UART1_TXD */
718			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)
719		>;
720	};
721
722	main_uart2_pins: main-uart2-pins {
723		pinctrl-single,pins = <
724			/* (T18) GPMC0_AD2.UART2_RTSn */
725			AM64X_IOPAD(0x0044, PIN_OUTPUT, 2)
726			/* (T20) GPMC0_AD0.UART2_RXD */
727			AM64X_IOPAD(0x003c, PIN_INPUT, 2)
728			/* (U21) GPMC0_AD1.UART2_TXD */
729			AM64X_IOPAD(0x0040, PIN_OUTPUT, 2)
730		>;
731	};
732
733	main_uart3_pins: main-uart3-pins {
734		pinctrl-single,pins = <
735			/* (T17) GPMC0_AD9.UART3_CTSn */
736			AM64X_IOPAD(0x0060, PIN_INPUT, 2)
737			/* (U19) GPMC0_AD5.UART3_RTSn */
738			AM64X_IOPAD(0x0050, PIN_OUTPUT, 2)
739			/* (U20) GPMC0_AD3.UART3_RXD */
740			AM64X_IOPAD(0x0048, PIN_INPUT, 2)
741			/* (U18) GPMC0_AD4.UART3_TXD */
742			AM64X_IOPAD(0x004c, PIN_OUTPUT, 2)
743		>;
744	};
745
746	main_uart4_pins: main-uart4-pins {
747		pinctrl-single,pins = <
748			/* (R16) GPMC0_AD10.UART4_CTSn */
749			AM64X_IOPAD(0x0064, PIN_INPUT, 2)
750			/* (R17) GPMC0_CLK.UART4_RTSn */
751			AM64X_IOPAD(0x007c, PIN_OUTPUT, 2)
752			/* (V20) GPMC0_AD6.UART4_RXD */
753			AM64X_IOPAD(0x0054, PIN_INPUT, 2)
754			/* (V21) GPMC0_AD7.UART4_TXD */
755			AM64X_IOPAD(0x0058, PIN_OUTPUT, 2)
756
757			/* Control GPIOs for IOT Module connected to UART4 */
758			/* (D18) ECAP0_IN_APWM_OUT.GPIO1_68 - BG95_PWRKEY */
759			AM64X_IOPAD(0x0270, PIN_OUTPUT, 7)
760			/* (A19) EXT_REFCLK1.GPIO1_69 - BG95_RESET */
761			AM64X_IOPAD(0x0274, PIN_OUTPUT, 7)
762		>;
763	};
764
765	main_uart5_pins: main-uart5-pins {
766		pinctrl-single,pins = <
767			/* (P16) GPMC0_ADVn_ALE.UART5_RXD */
768			AM64X_IOPAD(0x0084, PIN_INPUT, 2)
769			/* (R18) GPMC0_OEn_REn.UART5_TXD */
770			AM64X_IOPAD(0x0088, PIN_OUTPUT, 2)
771		>;
772	};
773
774	main_usb0_pins: main-usb0-pins {
775		pinctrl-single,pins = <
776			/* (E19) USB0_DRVVBUS */
777			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0)
778		>;
779	};
780
781	pru_icssg1_mdio_pins: pru-icssg1-mdio-pins {
782		pinctrl-single,pins = <
783			/* (A15) SPI1_D1.GPIO1_51 - RESET_PRG1_RGMII1# */
784			AM64X_IOPAD(0x022c, PIN_OUTPUT, 7)
785			/* (B14) SPI1_CS0.GPIO1_47 - RESET_PRG1_RGMII2# */
786			AM64X_IOPAD(0x021c, PIN_OUTPUT, 7)
787
788			/* (Y6) PRG1_MDIO0_MDC */
789			AM64X_IOPAD(0x015c, PIN_OUTPUT, 0)
790			/* (AA6) PRG1_MDIO0_MDIO */
791			AM64X_IOPAD(0x0158, PIN_INPUT, 0)
792		>;
793	};
794
795	pru_icssg1_rgmii1_pins: pru-icssg1-rgmii1-pins {
796		pinctrl-single,pins = <
797			/* (Y7) PRG1_PRU0_GPO0.PRG1_RGMII1_RD0 */
798			AM64X_IOPAD(0x00b8, PIN_INPUT, 2)
799			/* (U8) PRG1_PRU0_GPO1.PRG1_RGMII1_RD1 */
800			AM64X_IOPAD(0x00bc, PIN_INPUT, 2)
801			/* (W8) PRG1_PRU0_GPO2.PRG1_RGMII1_RD2 */
802			AM64X_IOPAD(0x00c0, PIN_INPUT, 2)
803			/* (V8) PRG1_PRU0_GPO3.PRG1_RGMII1_RD3 */
804			AM64X_IOPAD(0x00c4, PIN_INPUT, 2)
805			/* (AA7) PRG1_PRU0_GPO6.PRG1_RGMII1_RXC */
806			AM64X_IOPAD(0x00d0, PIN_INPUT, 2)
807			/* (Y8) PRG1_PRU0_GPO4.PRG1_RGMII1_RX_CTL */
808			AM64X_IOPAD(0x00c8, PIN_INPUT, 2)
809			/* (AA8) PRG1_PRU0_GPO11.PRG1_RGMII1_TD0 */
810			AM64X_IOPAD(0x00e4, PIN_OUTPUT, 2)
811			/* (U9) PRG1_PRU0_GPO12.PRG1_RGMII1_TD1 */
812			AM64X_IOPAD(0x00e8, PIN_OUTPUT, 2)
813			/* (W9) PRG1_PRU0_GPO13.PRG1_RGMII1_TD2 */
814			AM64X_IOPAD(0x00ec, PIN_OUTPUT, 2)
815			/* (AA9) PRG1_PRU0_GPO14.PRG1_RGMII1_TD3 */
816			AM64X_IOPAD(0x00f0, PIN_OUTPUT, 2)
817			/* (V9) PRG1_PRU0_GPO16.PRG1_RGMII1_TXC */
818			AM64X_IOPAD(0x00f8, PIN_OUTPUT, 2)
819			/* (Y9) PRG1_PRU0_GPO15.PRG1_RGMII1_TX_CTL */
820			AM64X_IOPAD(0x00f4, PIN_OUTPUT, 2)
821		>;
822	};
823
824	pru_icssg1_rgmii2_pins: pru-icssg1-rgmii2-pins {
825		pinctrl-single,pins = <
826			/* (W11) PRG1_PRU1_GPO0.PRG1_RGMII2_RD0 */
827			AM64X_IOPAD(0x0108, PIN_INPUT, 2)
828			/* (V11) PRG1_PRU1_GPO1.PRG1_RGMII2_RD1 */
829			AM64X_IOPAD(0x010c, PIN_INPUT, 2)
830			/* (AA12) PRG1_PRU1_GPO2.PRG1_RGMII2_RD2 */
831			AM64X_IOPAD(0x0110, PIN_INPUT, 2)
832			/* (Y12) PRG1_PRU1_GPO3.PRG1_RGMII2_RD3 */
833			AM64X_IOPAD(0x0114, PIN_INPUT, 2)
834			/* (U11) PRG1_PRU1_GPO6.PRG1_RGMII2_RXC */
835			AM64X_IOPAD(0x0120, PIN_INPUT, 2)
836			/* (W12) PRG1_PRU1_GPO4.PRG1_RGMII2_RX_CTL */
837			AM64X_IOPAD(0x0118, PIN_INPUT, 2)
838			/* (AA10) PRG1_PRU1_GPO11.PRG1_RGMII2_TD0 */
839			AM64X_IOPAD(0x0134, PIN_OUTPUT, 2)
840			/* (V10) PRG1_PRU1_GPO12.PRG1_RGMII2_TD1 */
841			AM64X_IOPAD(0x0138, PIN_OUTPUT, 2)
842			/* (U10) PRG1_PRU1_GPO13.PRG1_RGMII2_TD2 */
843			AM64X_IOPAD(0x013c, PIN_OUTPUT, 2)
844			/* (AA11) PRG1_PRU1_GPO14.PRG1_RGMII2_TD3 */
845			AM64X_IOPAD(0x0140, PIN_OUTPUT, 2)
846			/* (Y10) PRG1_PRU1_GPO16.PRG1_RGMII2_TXC */
847			AM64X_IOPAD(0x0148, PIN_OUTPUT, 2)
848			/* (Y11) PRG1_PRU1_GPO15.PRG1_RGMII2_TX_CTL */
849			AM64X_IOPAD(0x0144, PIN_OUTPUT, 2)
850		>;
851	};
852
853	pwm_fan_pins: pwm-fan-pins {
854		pinctrl-single,pins = <
855			/* (T19) GPMC0_BE1n.EHRPWM5_A */
856			AM64X_IOPAD(0x0094, PIN_OUTPUT, 3)
857			/* (C14) SPI1_CLK.GPIO1_49 - FAN_RPM */
858			AM64X_IOPAD(0x0224, PIN_INPUT, 7)
859		>;
860	};
861
862	pwm_fan_reg_pins: pwm-fan-reg-pins {
863		pinctrl-single,pins = <
864			/* (D14) SPI1_CS1.GPIO1_48 - FAN_PWR */
865			AM64X_IOPAD(0x0220, PIN_OUTPUT, 7)
866		>;
867	};
868};
869
870&mcu_pmx0 {
871	mcu_gpio_keys_pins: mcu-gpio-keys-pins {
872		pinctrl-single,pins = <
873			/* (A7) MCU_SPI1_CS0.MCU_GPIO0_5 */
874			AM64X_MCU_IOPAD(0x0014, PIN_INPUT, 7)
875		>;
876	};
877
878	mcu_gpio_leds_pins: mcu-gpio-leds-pins {
879		pinctrl-single,pins = <
880			/* (C7) MCU_SPI1_D0.MCU_GPIO0_8 */
881			AM64X_MCU_IOPAD(0x0020, PIN_OUTPUT, 7)
882			/* (C8) MCU_SPI1_D1.MCU_GPIO0_9 */
883			AM64X_MCU_IOPAD(0x0024, PIN_OUTPUT, 7)
884		>;
885	};
886
887	mcu_gpio0_pins: mcu-gpio0-pins {
888		pinctrl-single,pins = <
889			/* (E8) MCU_UART0_RTSn.MCU_GPIO0_0 */
890			AM64X_MCU_IOPAD(0x0034, PIN_INPUT, 7)
891			/* (D8) MCU_UART0_CTSn.MCU_GPIO0_1 */
892			AM64X_MCU_IOPAD(0x0030, PIN_INPUT, 7)
893			/* (B7) MCU_SPI1_CS1.MCU_GPIO0_6 */
894			AM64X_MCU_IOPAD(0x0018, PIN_INPUT, 7)
895			/* (D7) MCU_SPI1_CLK.MCU_GPIO0_7 */
896			AM64X_MCU_IOPAD(0x001c, PIN_INPUT, 7)
897			/* (A11) MCU_I2C1_SCL.MCU_GPIO0_20 */
898			AM64X_MCU_IOPAD(0x0050, PIN_INPUT, 7)
899			/* (B10) MCU_I2C1_SDA.MCU_GPIO0_21 */
900			AM64X_MCU_IOPAD(0x0054, PIN_INPUT, 7)
901		>;
902	};
903
904	mcu_i2c0_pins: mcu-i2c0-pins {
905		pinctrl-single,pins = <
906			/* (E9) MCU_I2C0_SCL */
907			AM64X_MCU_IOPAD(0x0048, PIN_INPUT, 0)
908			/* (A10) MCU_I2C0_SDA */
909			AM64X_MCU_IOPAD(0x004c, PIN_INPUT, 0)
910		>;
911	};
912
913	mcu_spi0_pins: mcu-spi0-pins {
914		pinctrl-single,pins = <
915			/* (E6) MCU_SPI0_CLK */
916			AM64X_MCU_IOPAD(0x0008, PIN_OUTPUT, 0)
917			/* (D6) MCU_SPI0_CS0 */
918			AM64X_MCU_IOPAD(0x0000, PIN_OUTPUT, 0)
919			/* (C6) MCU_SPI0_CS1 */
920			AM64X_MCU_IOPAD(0x0004, PIN_OUTPUT, 0)
921			/* (E7) MCU_SPI0_D0 */
922			AM64X_MCU_IOPAD(0x000c, PIN_OUTPUT, 0)
923			/* (B6) MCU_SPI0_D1 */
924			AM64X_MCU_IOPAD(0x0010, PIN_INPUT, 0)
925		>;
926	};
927
928	mcu_uart0_pins: mcu-uart0-pins {
929		pinctrl-single,pins = <
930			/* (A9) MCU_UART0_RXD */
931			AM64X_MCU_IOPAD(0x0028, PIN_INPUT, 0)
932			/* (A8) MCU_UART0_TXD */
933			AM64X_MCU_IOPAD(0x002c, PIN_OUTPUT, 0)
934		>;
935	};
936
937	mcu_uart1_pins: mcu-uart1-pins {
938		pinctrl-single,pins = <
939			/* (B8) MCU_UART1_CTSn */
940			AM64X_MCU_IOPAD(0x0040, PIN_INPUT, 0)
941			/* (B9) MCU_UART1_RTSn */
942			AM64X_MCU_IOPAD(0x0044, PIN_OUTPUT, 0)
943			/* (C9) MCU_UART1_RXD */
944			AM64X_MCU_IOPAD(0x0038, PIN_INPUT, 0)
945			/* (D9) MCU_UART1_TXD */
946			AM64X_MCU_IOPAD(0x003c, PIN_OUTPUT, 0)
947		>;
948	};
949};
950