16f30b27cSTim Harvey// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
26f30b27cSTim Harvey/*
36f30b27cSTim Harvey * Copyright 2020 Gateworks Corporation
46f30b27cSTim Harvey */
56f30b27cSTim Harvey
66f30b27cSTim Harvey#include <dt-bindings/gpio/gpio.h>
76f30b27cSTim Harvey#include <dt-bindings/leds/common.h>
86f30b27cSTim Harvey
96f30b27cSTim Harvey/ {
106f30b27cSTim Harvey	aliases {
116f30b27cSTim Harvey		usb0 = &usbotg1;
126f30b27cSTim Harvey		usb1 = &usbotg2;
136f30b27cSTim Harvey	};
146f30b27cSTim Harvey
156f30b27cSTim Harvey	led-controller {
166f30b27cSTim Harvey		compatible = "gpio-leds";
176f30b27cSTim Harvey		pinctrl-names = "default";
186f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_gpio_leds>;
196f30b27cSTim Harvey
206f30b27cSTim Harvey		led-0 {
216f30b27cSTim Harvey			function = LED_FUNCTION_STATUS;
226f30b27cSTim Harvey			color = <LED_COLOR_ID_GREEN>;
236f30b27cSTim Harvey			gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
246f30b27cSTim Harvey			default-state = "on";
256f30b27cSTim Harvey			linux,default-trigger = "heartbeat";
266f30b27cSTim Harvey		};
276f30b27cSTim Harvey
286f30b27cSTim Harvey		led-1 {
296f30b27cSTim Harvey			function = LED_FUNCTION_STATUS;
306f30b27cSTim Harvey			color = <LED_COLOR_ID_RED>;
316f30b27cSTim Harvey			gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
326f30b27cSTim Harvey			default-state = "off";
336f30b27cSTim Harvey		};
346f30b27cSTim Harvey	};
356f30b27cSTim Harvey
366f30b27cSTim Harvey	pps {
376f30b27cSTim Harvey		compatible = "pps-gpio";
386f30b27cSTim Harvey		pinctrl-names = "default";
396f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_pps>;
406f30b27cSTim Harvey		gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
416f30b27cSTim Harvey		status = "okay";
426f30b27cSTim Harvey	};
436f30b27cSTim Harvey
446f30b27cSTim Harvey	reg_usb_otg1_vbus: regulator-usb-otg1 {
456f30b27cSTim Harvey		pinctrl-names = "default";
466f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_reg_usb1_en>;
476f30b27cSTim Harvey		compatible = "regulator-fixed";
486f30b27cSTim Harvey		regulator-name = "usb_otg1_vbus";
49*bd306fdbSTim Harvey		gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
506f30b27cSTim Harvey		enable-active-high;
516f30b27cSTim Harvey		regulator-min-microvolt = <5000000>;
526f30b27cSTim Harvey		regulator-max-microvolt = <5000000>;
536f30b27cSTim Harvey	};
546f30b27cSTim Harvey};
556f30b27cSTim Harvey
566f30b27cSTim Harvey/* off-board header */
576f30b27cSTim Harvey&ecspi2 {
586f30b27cSTim Harvey	pinctrl-names = "default";
596f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_spi2>;
606f30b27cSTim Harvey	cs-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>;
616f30b27cSTim Harvey	status = "okay";
626f30b27cSTim Harvey};
636f30b27cSTim Harvey
646f30b27cSTim Harvey&i2c2 {
656f30b27cSTim Harvey	clock-frequency = <400000>;
666f30b27cSTim Harvey	pinctrl-names = "default";
676f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_i2c2>;
686f30b27cSTim Harvey	status = "okay";
696f30b27cSTim Harvey
706f30b27cSTim Harvey	accelerometer@19 {
716f30b27cSTim Harvey		pinctrl-names = "default";
726f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_accel>;
736f30b27cSTim Harvey		compatible = "st,lis2de12";
746f30b27cSTim Harvey		reg = <0x19>;
756f30b27cSTim Harvey		st,drdy-int-pin = <1>;
766f30b27cSTim Harvey		interrupt-parent = <&gpio4>;
776f30b27cSTim Harvey		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
786f30b27cSTim Harvey		interrupt-names = "INT1";
796f30b27cSTim Harvey	};
806f30b27cSTim Harvey};
816f30b27cSTim Harvey
826f30b27cSTim Harvey/* off-board header */
836f30b27cSTim Harvey&i2c3 {
846f30b27cSTim Harvey	clock-frequency = <400000>;
856f30b27cSTim Harvey	pinctrl-names = "default";
866f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_i2c3>;
876f30b27cSTim Harvey	status = "okay";
886f30b27cSTim Harvey};
896f30b27cSTim Harvey
906f30b27cSTim Harvey/* GPS */
916f30b27cSTim Harvey&uart1 {
926f30b27cSTim Harvey	pinctrl-names = "default";
936f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_uart1>;
946f30b27cSTim Harvey	status = "okay";
956f30b27cSTim Harvey};
966f30b27cSTim Harvey
976f30b27cSTim Harvey/* off-board header */
986f30b27cSTim Harvey&uart3 {
996f30b27cSTim Harvey	pinctrl-names = "default";
1006f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_uart3>;
1016f30b27cSTim Harvey	status = "okay";
1026f30b27cSTim Harvey};
1036f30b27cSTim Harvey
1046f30b27cSTim Harvey&usbotg1 {
1056f30b27cSTim Harvey	dr_mode = "otg";
1066f30b27cSTim Harvey	vbus-supply = <&reg_usb_otg1_vbus>;
1076f30b27cSTim Harvey	status = "okay";
1086f30b27cSTim Harvey};
1096f30b27cSTim Harvey
1106f30b27cSTim Harvey&usbotg2 {
1116f30b27cSTim Harvey	dr_mode = "host";
1126f30b27cSTim Harvey	status = "okay";
1136f30b27cSTim Harvey};
1146f30b27cSTim Harvey
1156f30b27cSTim Harvey&iomuxc {
1166f30b27cSTim Harvey	pinctrl-names = "default";
1176f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_hog>;
1186f30b27cSTim Harvey
1196f30b27cSTim Harvey	pinctrl_hog: hoggrp {
1206f30b27cSTim Harvey		fsl,pins = <
1216f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3		0x40000041 /* PLUG_TEST */
1226f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6	0x40000041 /* PCI_USBSEL */
1236f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7	0x40000041 /* PCIE_WDIS# */
1246f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7	0x40000041 /* DIO0 */
1256f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9	0x40000041 /* DIO1 */
1266f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3	0x40000041 /* DIO2 */
1276f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD2_GPIO4_IO4	0x40000041 /* DIO2 */
1286f30b27cSTim Harvey		>;
1296f30b27cSTim Harvey	};
1306f30b27cSTim Harvey
1316f30b27cSTim Harvey	pinctrl_accel: accelgrp {
1326f30b27cSTim Harvey		fsl,pins = <
1336f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5	0x159
1346f30b27cSTim Harvey		>;
1356f30b27cSTim Harvey	};
1366f30b27cSTim Harvey
1376f30b27cSTim Harvey	pinctrl_gpio_leds: gpioledgrp {
1386f30b27cSTim Harvey		fsl,pins = <
1396f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5	0x19
1406f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4		0x19
1416f30b27cSTim Harvey		>;
1426f30b27cSTim Harvey	};
1436f30b27cSTim Harvey
1446f30b27cSTim Harvey	pinctrl_i2c3: i2c3grp {
1456f30b27cSTim Harvey		fsl,pins = <
1466f30b27cSTim Harvey			MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL		0x400001c3
1476f30b27cSTim Harvey			MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA		0x400001c3
1486f30b27cSTim Harvey		>;
1496f30b27cSTim Harvey	};
1506f30b27cSTim Harvey
1516f30b27cSTim Harvey	pinctrl_pps: ppsgrp {
1526f30b27cSTim Harvey		fsl,pins = <
1536f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15	0x41
1546f30b27cSTim Harvey		>;
1556f30b27cSTim Harvey	};
1566f30b27cSTim Harvey
1576f30b27cSTim Harvey	pinctrl_reg_usb1_en: regusb1grp {
1586f30b27cSTim Harvey		fsl,pins = <
159*bd306fdbSTim Harvey			MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10	0x41
160*bd306fdbSTim Harvey			MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12	0x141
1616f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC	0x41
1626f30b27cSTim Harvey		>;
1636f30b27cSTim Harvey	};
1646f30b27cSTim Harvey
1656f30b27cSTim Harvey	pinctrl_spi2: spi2grp {
1666f30b27cSTim Harvey		fsl,pins = <
1676f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK	0xd6
1686f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI	0xd6
1696f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK	0xd6
1706f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13	0xd6
1716f30b27cSTim Harvey		>;
1726f30b27cSTim Harvey	};
1736f30b27cSTim Harvey
1746f30b27cSTim Harvey	pinctrl_uart1: uart1grp {
1756f30b27cSTim Harvey		fsl,pins = <
1766f30b27cSTim Harvey			MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX	0x140
1776f30b27cSTim Harvey			MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX	0x140
1786f30b27cSTim Harvey		>;
1796f30b27cSTim Harvey	};
1806f30b27cSTim Harvey
1816f30b27cSTim Harvey	pinctrl_uart3: uart3grp {
1826f30b27cSTim Harvey		fsl,pins = <
1836f30b27cSTim Harvey			MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX	0x140
1846f30b27cSTim Harvey			MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX	0x140
1856f30b27cSTim Harvey		>;
1866f30b27cSTim Harvey	};
1876f30b27cSTim Harvey};
188