xref: /linux/arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts (revision 40d269c000bda9fcd276a0412a9cebd3f6e344c5)
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,fails-without-test-cd;
426	/* Enabled by overlay */
427};
428
429&tscadc0 {
430	status = "okay";
431	adc {
432		ti,adc-channels = <0 1 2 3 4 5 6 7>;
433	};
434};
435
436&usb0 {
437	/*
438	 * The CDNS USB driver currently doesn't support overcurrent GPIOs,
439	 * so there is no overcurrent detection. The OC pin is configured
440	 * as a GPIO hog instead.
441	 */
442	pinctrl-names = "default";
443	pinctrl-0 = <&main_usb0_pins>;
444	dr_mode = "otg";
445	maximum-speed = "super-speed";
446	phys = <&serdes0_usb_link>;
447	phy-names = "cdns3,usb3-phy";
448};
449
450&usbss0 {
451	ti,vbus-divider;
452};
453
454&main_pmx0 {
455	cpsw_pins: cpsw-pins {
456		pinctrl-single,pins = <
457			/* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */
458			AM64X_IOPAD(0x01cc, PIN_INPUT, 4)
459			/* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */
460			AM64X_IOPAD(0x01d4, PIN_INPUT, 4)
461			/* (V6) PRG0_PRU1_GPO10.RGMII1_RD2 */
462			AM64X_IOPAD(0x01d8, PIN_INPUT, 4)
463			/* (V5) PRG0_PRU1_GPO17.RGMII1_RD3 */
464			AM64X_IOPAD(0x01f4, PIN_INPUT, 4)
465			/* (AA5) PRG0_PRU0_GPO10.RGMII1_RXC */
466			AM64X_IOPAD(0x0188, PIN_INPUT, 4)
467			/* (W6) PRG0_PRU0_GPO9.RGMII1_RX_CTL */
468			AM64X_IOPAD(0x0184, PIN_INPUT, 4)
469			/* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
470			AM64X_IOPAD(0x0124, PIN_OUTPUT, 4)
471			/* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
472			AM64X_IOPAD(0x012c, PIN_OUTPUT, 4)
473			/* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
474			AM64X_IOPAD(0x0130, PIN_OUTPUT, 4)
475			/* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
476			AM64X_IOPAD(0x014c, PIN_OUTPUT, 4)
477			/* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
478			AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4)
479			/* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
480			AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4)
481		>;
482	};
483
484	cpsw_mdio_pins: cpsw-mdio-pins {
485		pinctrl-single,pins = <
486			/* (R21) GPMC0_CSn3.GPIO0_44 - RESET_RGMII1# */
487			AM64X_IOPAD(0x00b4, PIN_OUTPUT, 7)
488
489			/* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
490			AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4)
491			/* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
492			AM64X_IOPAD(0x01f8, PIN_INPUT, 4)
493		>;
494	};
495
496	epwm5_pins: epwm5-pins {
497		pinctrl-single,pins = <
498			/* (W19) GPMC0_WAIT0.EHRPWM5_B */
499			AM64X_IOPAD(0x0098, PIN_OUTPUT, 3)
500		>;
501	};
502
503	/* Digital IOs */
504	main_gpio0_digital_pins: main-gpio0-digital-pins {
505		pinctrl-single,pins = <
506			/* (W20) GPMC0_AD11.GPIO0_26 - EN_DIG_OUT_1 */
507			AM64X_IOPAD(0x0068, PIN_OUTPUT, 7)
508			/* (W21) GPMC0_AD12.GPIO0_27 - STATUS_OUT_1 */
509			AM64X_IOPAD(0x006c, PIN_INPUT, 7)
510			/* (V18) GPMC0_AD13.GPIO0_28 - EN_DIG_OUT_2 */
511			AM64X_IOPAD(0x0070, PIN_OUTPUT, 7)
512			/* (Y21) GPMC0_AD14.GPIO0_29 - STATUS_OUT_2 */
513			AM64X_IOPAD(0x0074, PIN_INPUT, 7)
514			/* (Y20) GPMC0_AD15.GPIO0_30 - EN_DIG_OUT_3 */
515			AM64X_IOPAD(0x0078, PIN_OUTPUT, 7)
516			/* (T21) GPMC0_WEn.GPIO0_34 - STATUS_OUT_3 */
517			AM64X_IOPAD(0x008c, PIN_INPUT, 7)
518			/* (P17) GPMC0_BE0n_CLE.GPIO0_35 - EN_DIG_OUT_4 */
519			AM64X_IOPAD(0x0090, PIN_OUTPUT, 7)
520			/* (Y18) GPMC0_WAIT1.GPIO0_38 - STATUS_OUT_4 */
521			AM64X_IOPAD(0x009c, PIN_INPUT, 7)
522			/* (N16) GPMC0_WPn.GPIO0_39 - DIG_IN_1 */
523			AM64X_IOPAD(0x00a0, PIN_INPUT, 7)
524			/* (N17) GPMC0_DIR.GPIO0_40 - DIG_IN_2 */
525			AM64X_IOPAD(0x00a4, PIN_INPUT, 7)
526			/* (R19) GPMC0_CSn0.GPIO0_41 - DIG_IN_3 */
527			AM64X_IOPAD(0x00a8, PIN_INPUT, 7)
528			/* (R20) GPMC0_CSn1.GPIO0_42 - DIG_IN_4 */
529			AM64X_IOPAD(0x00ac, PIN_INPUT, 7)
530		>;
531	};
532
533	main_gpio0_hog_pins: main-gpio0-hog-pins {
534		pinctrl-single,pins = <
535			/* (P19) GPMC0_CSn2.GPIO0_43 - MMC1_CTRL */
536			AM64X_IOPAD(0x00b0, PIN_OUTPUT, 7)
537		>;
538	};
539
540	main_gpio1_hog_pins: main-gpio1-hog-pins {
541		pinctrl-single,pins = <
542			/* (B15) SPI1_D0.GPIO1_50 - USB0_VBUS_OC# */
543			AM64X_IOPAD(0x0228, PIN_INPUT, 7)
544			/* (B16) UART0_CTSn.GPIO1_54 - PRG0_MDIO_SWITCH */
545			AM64X_IOPAD(0x0238, PIN_OUTPUT, 7)
546			/* (C19) EXTINTn.GPIO1_70 - PHY_INT# */
547			AM64X_IOPAD(0x0278, PIN_INPUT, 7)
548		>;
549	};
550
551	main_gpio1_pru_pins: main-gpio1-pru-pins {
552		pinctrl-single,pins = <
553			/* (Y1) PRG0_PRU0_GPO0.GPIO1_0 */
554			AM64X_IOPAD(0x0160, PIN_INPUT, 7)
555			/* (R4) PRG0_PRU0_GPO1.GPIO1_1 */
556			AM64X_IOPAD(0x0164, PIN_INPUT, 7)
557			/* (U2) PRG0_PRU0_GPO2.GPIO1_2 */
558			AM64X_IOPAD(0x0168, PIN_INPUT, 7)
559			/* (V2) PRG0_PRU0_GPO3.GPIO1_3 */
560			AM64X_IOPAD(0x016c, PIN_INPUT, 7)
561			/* (AA2) PRG0_PRU0_GPO4.GPIO1_4 */
562			AM64X_IOPAD(0x0170, PIN_INPUT, 7)
563			/* (R3) PRG0_PRU0_GPO5.GPIO1_5 */
564			AM64X_IOPAD(0x0174, PIN_INPUT, 7)
565			/* (T3) PRG0_PRU0_GPO6.GPIO1_6 */
566			AM64X_IOPAD(0x0178, PIN_INPUT, 7)
567			/* (T1) PRG0_PRU0_GPO7.GPIO1_7 */
568			AM64X_IOPAD(0x017c, PIN_INPUT, 7)
569			/* (T2) PRG0_PRU0_GPO8.GPIO1_8 */
570			AM64X_IOPAD(0x0180, PIN_INPUT, 7)
571			/* (Y3) PRG0_PRU0_GPO11.GPIO1_11 */
572			AM64X_IOPAD(0x018c, PIN_INPUT, 7)
573			/* (AA3) PRG0_PRU0_GPO12.GPIO1_12 */
574			AM64X_IOPAD(0x0190, PIN_INPUT, 7)
575			/* (R6) PRG0_PRU0_GPO13.GPIO1_13 */
576			AM64X_IOPAD(0x0194, PIN_INPUT, 7)
577			/* (V4) PRG0_PRU0_GPO14.GPIO1_14 */
578			AM64X_IOPAD(0x0198, PIN_INPUT, 7)
579			/* (T5) PRG0_PRU0_GPO15.GPIO1_15 */
580			AM64X_IOPAD(0x019c, PIN_INPUT, 7)
581			/* (U4) PRG0_PRU0_GPO16.GPIO1_16 */
582			AM64X_IOPAD(0x01a0, PIN_INPUT, 7)
583			/* (U1) PRG0_PRU0_GPO17.GPIO1_17 */
584			AM64X_IOPAD(0x01a4, PIN_INPUT, 7)
585			/* (V1) PRG0_PRU0_GPO18.GPIO1_18 */
586			AM64X_IOPAD(0x01a8, PIN_INPUT, 7)
587			/* (W1) PRG0_PRU0_GPO19.GPIO1_19 */
588			AM64X_IOPAD(0x01ac, PIN_INPUT, 7)
589			/* (Y2) PRG0_PRU1_GPO0.GPIO1_20 */
590			AM64X_IOPAD(0x01b0, PIN_INPUT, 7)
591			/* (W2) PRG0_PRU1_GPO1.GPIO1_21 */
592			AM64X_IOPAD(0x01b4, PIN_INPUT, 7)
593			/* (V3) PRG0_PRU1_GPO2.GPIO1_22 */
594			AM64X_IOPAD(0x01b8, PIN_INPUT, 7)
595			/* (T4) PRG0_PRU1_GPO3.GPIO1_23 */
596			AM64X_IOPAD(0x01bc, PIN_INPUT, 7)
597			/* (W3) PRG0_PRU1_GPO4.GPIO1_24 */
598			AM64X_IOPAD(0x01c0, PIN_INPUT, 7)
599			/* (P4) PRG0_PRU1_GPO5.GPIO1_25 */
600			AM64X_IOPAD(0x01c4, PIN_INPUT, 7)
601			/* (R5) PRG0_PRU1_GPO6.GPIO1_26 */
602			AM64X_IOPAD(0x01c8, PIN_INPUT, 7)
603			/* (R1) PRG0_PRU1_GPO8.GPIO1_28 */
604			AM64X_IOPAD(0x01d0, PIN_INPUT, 7)
605			/* (W4) PRG0_PRU1_GPO11.GPIO1_31 */
606			AM64X_IOPAD(0x01dc, PIN_INPUT, 7)
607			/* (Y4) PRG0_PRU1_GPO12.GPIO1_32 */
608			AM64X_IOPAD(0x01e0, PIN_INPUT, 7)
609			/* (T6) PRG0_PRU1_GPO13.GPIO1_33 */
610			AM64X_IOPAD(0x01e4, PIN_INPUT, 7)
611			/* (U6) PRG0_PRU1_GPO14.GPIO1_34 */
612			AM64X_IOPAD(0x01e8, PIN_INPUT, 7)
613			/* (U5) PRG0_PRU1_GPO15.GPIO1_35 */
614			AM64X_IOPAD(0x01ec, PIN_INPUT, 7)
615			/* (AA4) PRG0_PRU1_GPO16.GPIO1_36 */
616			AM64X_IOPAD(0x01f0, PIN_INPUT, 7)
617			/* (P2) PRG0_MDIO0_MDIO.GPIO1_40 */
618			AM64X_IOPAD(0x0200, PIN_INPUT, 7)
619			/* (P3) PRG0_MDIO0_MDC.GPIO1_41 */
620			AM64X_IOPAD(0x0204, PIN_INPUT, 7)
621		>;
622	};
623
624	main_mcan0_pins: main-mcan0-pins {
625		pinctrl-single,pins = <
626			/* (B17) MCAN0_RX */
627			AM64X_IOPAD(0x0254, PIN_INPUT, 0)
628			/* (A17) MCAN0_TX */
629			AM64X_IOPAD(0x0250, PIN_OUTPUT, 0)
630		>;
631	};
632
633	main_mcan1_pins: main-mcan1-pins {
634		pinctrl-single,pins = <
635			/* (D17) MCAN1_RX */
636			AM64X_IOPAD(0x025c, PIN_INPUT, 0)
637			/* (C17) MCAN1_TX */
638			AM64X_IOPAD(0x0258, PIN_OUTPUT, 0)
639		>;
640	};
641
642	main_mmc1_pins: main-mmc1-pins {
643		pinctrl-single,pins = <
644			/* (J19) MMC1_CMD */
645			AM64X_IOPAD(0x0294, PIN_INPUT, 0)
646			/* (L20) MMC1_CLK */
647			AM64X_IOPAD(0x028c, PIN_INPUT, 0)
648			/* (K21) MMC1_DAT0 */
649			AM64X_IOPAD(0x0288, PIN_INPUT, 0)
650			/* (L21) MMC1_DAT1 */
651			AM64X_IOPAD(0x0284, PIN_INPUT, 0)
652			/* (K19) MMC1_DAT2 */
653			AM64X_IOPAD(0x0280, PIN_INPUT, 0)
654			/* (K18) MMC1_DAT3 */
655			AM64X_IOPAD(0x027c, PIN_INPUT, 0)
656			/* (D19) MMC1_SDCD.GPIO1_77 */
657			AM64X_IOPAD(0x0298, PIN_INPUT, 7)
658			/* (#N/A) MMC1_CLKLB */
659			AM64X_IOPAD(0x0290, PIN_INPUT, 0)
660		>;
661	};
662
663	main_mmc1_reg_pins: main-mmc1-reg-pins {
664		pinctrl-single,pins = <
665			/* (C13) SPI0_CS1.GPIO1_43 - MMC1_SD_EN */
666			AM64X_IOPAD(0x020c, PIN_OUTPUT, 7)
667		>;
668	};
669
670	main_mmc1_wifi_pwrseq_pins: main-mmc1-wifi-pwrseq-pins {
671		pinctrl-single,pins = <
672			/* (V19) GPMC0_AD8.GPIO0_23 - WIFI-BT_EN */
673			AM64X_IOPAD(0x005c, PIN_OUTPUT, 7)
674		>;
675	};
676
677	main_spi0_pins: main-spi0-pins {
678		pinctrl-single,pins = <
679			/* (D13) SPI0_CLK */
680			AM64X_IOPAD(0x0210, PIN_OUTPUT, 0)
681			/* (D12) SPI0_CS0 */
682			AM64X_IOPAD(0x0208, PIN_OUTPUT, 0)
683			/* (A13) SPI0_D0 */
684			AM64X_IOPAD(0x0214, PIN_OUTPUT, 0)
685			/* (A14) SPI0_D1 */
686			AM64X_IOPAD(0x0218, PIN_INPUT, 0)
687		>;
688	};
689
690	main_spi0_adc_pins: main-spi0-adc-pins {
691		pinctrl-single,pins = <
692			/* (A16) UART0_RTSn.GPIO1_55 - ADC_SYNC */
693			AM64X_IOPAD(0x023c, PIN_INPUT, 7)
694			/* (D16) UART1_CTSn.GPIO1_58 - ADC_RST# */
695			AM64X_IOPAD(0x0248, PIN_OUTPUT, 7)
696			/* (E16) UART1_RTSn.GPIO1_59 - ADC_DATA_RDY */
697			AM64X_IOPAD(0x024c, PIN_INPUT, 7)
698			/* (B19) I2C1_SDA.GPIO1_67 - ADC_INT# */
699			AM64X_IOPAD(0x026c, PIN_INPUT, 7)
700		>;
701	};
702
703	main_uart0_pins: main-uart0-pins {
704		pinctrl-single,pins = <
705			/* (D15) UART0_RXD */
706			AM64X_IOPAD(0x0230, PIN_INPUT, 0)
707			/* (C16) UART0_TXD */
708			AM64X_IOPAD(0x0234, PIN_OUTPUT, 0)
709		>;
710	};
711
712	main_uart1_pins: main-uart1-pins {
713		pinctrl-single,pins = <
714			/* (E15) UART1_RXD */
715			AM64X_IOPAD(0x0240, PIN_INPUT, 0)
716			/* (E14) UART1_TXD */
717			AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)
718		>;
719	};
720
721	main_uart2_pins: main-uart2-pins {
722		pinctrl-single,pins = <
723			/* (T18) GPMC0_AD2.UART2_RTSn */
724			AM64X_IOPAD(0x0044, PIN_OUTPUT, 2)
725			/* (T20) GPMC0_AD0.UART2_RXD */
726			AM64X_IOPAD(0x003c, PIN_INPUT, 2)
727			/* (U21) GPMC0_AD1.UART2_TXD */
728			AM64X_IOPAD(0x0040, PIN_OUTPUT, 2)
729		>;
730	};
731
732	main_uart3_pins: main-uart3-pins {
733		pinctrl-single,pins = <
734			/* (T17) GPMC0_AD9.UART3_CTSn */
735			AM64X_IOPAD(0x0060, PIN_INPUT, 2)
736			/* (U19) GPMC0_AD5.UART3_RTSn */
737			AM64X_IOPAD(0x0050, PIN_OUTPUT, 2)
738			/* (U20) GPMC0_AD3.UART3_RXD */
739			AM64X_IOPAD(0x0048, PIN_INPUT, 2)
740			/* (U18) GPMC0_AD4.UART3_TXD */
741			AM64X_IOPAD(0x004c, PIN_OUTPUT, 2)
742		>;
743	};
744
745	main_uart4_pins: main-uart4-pins {
746		pinctrl-single,pins = <
747			/* (R16) GPMC0_AD10.UART4_CTSn */
748			AM64X_IOPAD(0x0064, PIN_INPUT, 2)
749			/* (R17) GPMC0_CLK.UART4_RTSn */
750			AM64X_IOPAD(0x007c, PIN_OUTPUT, 2)
751			/* (V20) GPMC0_AD6.UART4_RXD */
752			AM64X_IOPAD(0x0054, PIN_INPUT, 2)
753			/* (V21) GPMC0_AD7.UART4_TXD */
754			AM64X_IOPAD(0x0058, PIN_OUTPUT, 2)
755
756			/* Control GPIOs for IOT Module connected to UART4 */
757			/* (D18) ECAP0_IN_APWM_OUT.GPIO1_68 - BG95_PWRKEY */
758			AM64X_IOPAD(0x0270, PIN_OUTPUT, 7)
759			/* (A19) EXT_REFCLK1.GPIO1_69 - BG95_RESET */
760			AM64X_IOPAD(0x0274, PIN_OUTPUT, 7)
761		>;
762	};
763
764	main_uart5_pins: main-uart5-pins {
765		pinctrl-single,pins = <
766			/* (P16) GPMC0_ADVn_ALE.UART5_RXD */
767			AM64X_IOPAD(0x0084, PIN_INPUT, 2)
768			/* (R18) GPMC0_OEn_REn.UART5_TXD */
769			AM64X_IOPAD(0x0088, PIN_OUTPUT, 2)
770		>;
771	};
772
773	main_usb0_pins: main-usb0-pins {
774		pinctrl-single,pins = <
775			/* (E19) USB0_DRVVBUS */
776			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0)
777		>;
778	};
779
780	pru_icssg1_mdio_pins: pru-icssg1-mdio-pins {
781		pinctrl-single,pins = <
782			/* (A15) SPI1_D1.GPIO1_51 - RESET_PRG1_RGMII1# */
783			AM64X_IOPAD(0x022c, PIN_OUTPUT, 7)
784			/* (B14) SPI1_CS0.GPIO1_47 - RESET_PRG1_RGMII2# */
785			AM64X_IOPAD(0x021c, PIN_OUTPUT, 7)
786
787			/* (Y6) PRG1_MDIO0_MDC */
788			AM64X_IOPAD(0x015c, PIN_OUTPUT, 0)
789			/* (AA6) PRG1_MDIO0_MDIO */
790			AM64X_IOPAD(0x0158, PIN_INPUT, 0)
791		>;
792	};
793
794	pru_icssg1_rgmii1_pins: pru-icssg1-rgmii1-pins {
795		pinctrl-single,pins = <
796			/* (Y7) PRG1_PRU0_GPO0.PRG1_RGMII1_RD0 */
797			AM64X_IOPAD(0x00b8, PIN_INPUT, 2)
798			/* (U8) PRG1_PRU0_GPO1.PRG1_RGMII1_RD1 */
799			AM64X_IOPAD(0x00bc, PIN_INPUT, 2)
800			/* (W8) PRG1_PRU0_GPO2.PRG1_RGMII1_RD2 */
801			AM64X_IOPAD(0x00c0, PIN_INPUT, 2)
802			/* (V8) PRG1_PRU0_GPO3.PRG1_RGMII1_RD3 */
803			AM64X_IOPAD(0x00c4, PIN_INPUT, 2)
804			/* (AA7) PRG1_PRU0_GPO6.PRG1_RGMII1_RXC */
805			AM64X_IOPAD(0x00d0, PIN_INPUT, 2)
806			/* (Y8) PRG1_PRU0_GPO4.PRG1_RGMII1_RX_CTL */
807			AM64X_IOPAD(0x00c8, PIN_INPUT, 2)
808			/* (AA8) PRG1_PRU0_GPO11.PRG1_RGMII1_TD0 */
809			AM64X_IOPAD(0x00e4, PIN_OUTPUT, 2)
810			/* (U9) PRG1_PRU0_GPO12.PRG1_RGMII1_TD1 */
811			AM64X_IOPAD(0x00e8, PIN_OUTPUT, 2)
812			/* (W9) PRG1_PRU0_GPO13.PRG1_RGMII1_TD2 */
813			AM64X_IOPAD(0x00ec, PIN_OUTPUT, 2)
814			/* (AA9) PRG1_PRU0_GPO14.PRG1_RGMII1_TD3 */
815			AM64X_IOPAD(0x00f0, PIN_OUTPUT, 2)
816			/* (V9) PRG1_PRU0_GPO16.PRG1_RGMII1_TXC */
817			AM64X_IOPAD(0x00f8, PIN_OUTPUT, 2)
818			/* (Y9) PRG1_PRU0_GPO15.PRG1_RGMII1_TX_CTL */
819			AM64X_IOPAD(0x00f4, PIN_OUTPUT, 2)
820		>;
821	};
822
823	pru_icssg1_rgmii2_pins: pru-icssg1-rgmii2-pins {
824		pinctrl-single,pins = <
825			/* (W11) PRG1_PRU1_GPO0.PRG1_RGMII2_RD0 */
826			AM64X_IOPAD(0x0108, PIN_INPUT, 2)
827			/* (V11) PRG1_PRU1_GPO1.PRG1_RGMII2_RD1 */
828			AM64X_IOPAD(0x010c, PIN_INPUT, 2)
829			/* (AA12) PRG1_PRU1_GPO2.PRG1_RGMII2_RD2 */
830			AM64X_IOPAD(0x0110, PIN_INPUT, 2)
831			/* (Y12) PRG1_PRU1_GPO3.PRG1_RGMII2_RD3 */
832			AM64X_IOPAD(0x0114, PIN_INPUT, 2)
833			/* (U11) PRG1_PRU1_GPO6.PRG1_RGMII2_RXC */
834			AM64X_IOPAD(0x0120, PIN_INPUT, 2)
835			/* (W12) PRG1_PRU1_GPO4.PRG1_RGMII2_RX_CTL */
836			AM64X_IOPAD(0x0118, PIN_INPUT, 2)
837			/* (AA10) PRG1_PRU1_GPO11.PRG1_RGMII2_TD0 */
838			AM64X_IOPAD(0x0134, PIN_OUTPUT, 2)
839			/* (V10) PRG1_PRU1_GPO12.PRG1_RGMII2_TD1 */
840			AM64X_IOPAD(0x0138, PIN_OUTPUT, 2)
841			/* (U10) PRG1_PRU1_GPO13.PRG1_RGMII2_TD2 */
842			AM64X_IOPAD(0x013c, PIN_OUTPUT, 2)
843			/* (AA11) PRG1_PRU1_GPO14.PRG1_RGMII2_TD3 */
844			AM64X_IOPAD(0x0140, PIN_OUTPUT, 2)
845			/* (Y10) PRG1_PRU1_GPO16.PRG1_RGMII2_TXC */
846			AM64X_IOPAD(0x0148, PIN_OUTPUT, 2)
847			/* (Y11) PRG1_PRU1_GPO15.PRG1_RGMII2_TX_CTL */
848			AM64X_IOPAD(0x0144, PIN_OUTPUT, 2)
849		>;
850	};
851
852	pwm_fan_pins: pwm-fan-pins {
853		pinctrl-single,pins = <
854			/* (T19) GPMC0_BE1n.EHRPWM5_A */
855			AM64X_IOPAD(0x0094, PIN_OUTPUT, 3)
856			/* (C14) SPI1_CLK.GPIO1_49 - FAN_RPM */
857			AM64X_IOPAD(0x0224, PIN_INPUT, 7)
858		>;
859	};
860
861	pwm_fan_reg_pins: pwm-fan-reg-pins {
862		pinctrl-single,pins = <
863			/* (D14) SPI1_CS1.GPIO1_48 - FAN_PWR */
864			AM64X_IOPAD(0x0220, PIN_OUTPUT, 7)
865		>;
866	};
867};
868
869&mcu_pmx0 {
870	mcu_gpio_keys_pins: mcu-gpio-keys-pins {
871		pinctrl-single,pins = <
872			/* (A7) MCU_SPI1_CS0.MCU_GPIO0_5 */
873			AM64X_MCU_IOPAD(0x0014, PIN_INPUT, 7)
874		>;
875	};
876
877	mcu_gpio_leds_pins: mcu-gpio-leds-pins {
878		pinctrl-single,pins = <
879			/* (C7) MCU_SPI1_D0.MCU_GPIO0_8 */
880			AM64X_MCU_IOPAD(0x0020, PIN_OUTPUT, 7)
881			/* (C8) MCU_SPI1_D1.MCU_GPIO0_9 */
882			AM64X_MCU_IOPAD(0x0024, PIN_OUTPUT, 7)
883		>;
884	};
885
886	mcu_gpio0_pins: mcu-gpio0-pins {
887		pinctrl-single,pins = <
888			/* (E8) MCU_UART0_RTSn.MCU_GPIO0_0 */
889			AM64X_MCU_IOPAD(0x0034, PIN_INPUT, 7)
890			/* (D8) MCU_UART0_CTSn.MCU_GPIO0_1 */
891			AM64X_MCU_IOPAD(0x0030, PIN_INPUT, 7)
892			/* (B7) MCU_SPI1_CS1.MCU_GPIO0_6 */
893			AM64X_MCU_IOPAD(0x0018, PIN_INPUT, 7)
894			/* (D7) MCU_SPI1_CLK.MCU_GPIO0_7 */
895			AM64X_MCU_IOPAD(0x001c, PIN_INPUT, 7)
896			/* (A11) MCU_I2C1_SCL.MCU_GPIO0_20 */
897			AM64X_MCU_IOPAD(0x0050, PIN_INPUT, 7)
898			/* (B10) MCU_I2C1_SDA.MCU_GPIO0_21 */
899			AM64X_MCU_IOPAD(0x0054, PIN_INPUT, 7)
900		>;
901	};
902
903	mcu_i2c0_pins: mcu-i2c0-pins {
904		pinctrl-single,pins = <
905			/* (E9) MCU_I2C0_SCL */
906			AM64X_MCU_IOPAD(0x0048, PIN_INPUT, 0)
907			/* (A10) MCU_I2C0_SDA */
908			AM64X_MCU_IOPAD(0x004c, PIN_INPUT, 0)
909		>;
910	};
911
912	mcu_spi0_pins: mcu-spi0-pins {
913		pinctrl-single,pins = <
914			/* (E6) MCU_SPI0_CLK */
915			AM64X_MCU_IOPAD(0x0008, PIN_OUTPUT, 0)
916			/* (D6) MCU_SPI0_CS0 */
917			AM64X_MCU_IOPAD(0x0000, PIN_OUTPUT, 0)
918			/* (C6) MCU_SPI0_CS1 */
919			AM64X_MCU_IOPAD(0x0004, PIN_OUTPUT, 0)
920			/* (E7) MCU_SPI0_D0 */
921			AM64X_MCU_IOPAD(0x000c, PIN_OUTPUT, 0)
922			/* (B6) MCU_SPI0_D1 */
923			AM64X_MCU_IOPAD(0x0010, PIN_INPUT, 0)
924		>;
925	};
926
927	mcu_uart0_pins: mcu-uart0-pins {
928		pinctrl-single,pins = <
929			/* (A9) MCU_UART0_RXD */
930			AM64X_MCU_IOPAD(0x0028, PIN_INPUT, 0)
931			/* (A8) MCU_UART0_TXD */
932			AM64X_MCU_IOPAD(0x002c, PIN_OUTPUT, 0)
933		>;
934	};
935
936	mcu_uart1_pins: mcu-uart1-pins {
937		pinctrl-single,pins = <
938			/* (B8) MCU_UART1_CTSn */
939			AM64X_MCU_IOPAD(0x0040, PIN_INPUT, 0)
940			/* (B9) MCU_UART1_RTSn */
941			AM64X_MCU_IOPAD(0x0044, PIN_OUTPUT, 0)
942			/* (C9) MCU_UART1_RXD */
943			AM64X_MCU_IOPAD(0x0038, PIN_INPUT, 0)
944			/* (D9) MCU_UART1_TXD */
945			AM64X_MCU_IOPAD(0x003c, PIN_OUTPUT, 0)
946		>;
947	};
948};
949