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>
8afb424b9STim Harvey#include <dt-bindings/phy/phy-imx8-pcie.h>
96f30b27cSTim Harvey
106f30b27cSTim Harvey/ {
116f30b27cSTim Harvey	aliases {
126f30b27cSTim Harvey		usb0 = &usbotg1;
136f30b27cSTim Harvey		usb1 = &usbotg2;
146f30b27cSTim Harvey	};
156f30b27cSTim Harvey
166f30b27cSTim Harvey	led-controller {
176f30b27cSTim Harvey		compatible = "gpio-leds";
186f30b27cSTim Harvey		pinctrl-names = "default";
196f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_gpio_leds>;
206f30b27cSTim Harvey
216f30b27cSTim Harvey		led-0 {
226f30b27cSTim Harvey			function = LED_FUNCTION_STATUS;
236f30b27cSTim Harvey			color = <LED_COLOR_ID_GREEN>;
246f30b27cSTim Harvey			gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
256f30b27cSTim Harvey			default-state = "on";
266f30b27cSTim Harvey			linux,default-trigger = "heartbeat";
276f30b27cSTim Harvey		};
286f30b27cSTim Harvey
296f30b27cSTim Harvey		led-1 {
306f30b27cSTim Harvey			function = LED_FUNCTION_STATUS;
316f30b27cSTim Harvey			color = <LED_COLOR_ID_RED>;
326f30b27cSTim Harvey			gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
336f30b27cSTim Harvey			default-state = "off";
346f30b27cSTim Harvey		};
356f30b27cSTim Harvey	};
366f30b27cSTim Harvey
37afb424b9STim Harvey	pcie0_refclk: pcie0-refclk {
38afb424b9STim Harvey		compatible = "fixed-clock";
39afb424b9STim Harvey		#clock-cells = <0>;
40afb424b9STim Harvey		clock-frequency = <100000000>;
41afb424b9STim Harvey	};
42afb424b9STim Harvey
436f30b27cSTim Harvey	pps {
446f30b27cSTim Harvey		compatible = "pps-gpio";
456f30b27cSTim Harvey		pinctrl-names = "default";
466f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_pps>;
476f30b27cSTim Harvey		gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
486f30b27cSTim Harvey		status = "okay";
496f30b27cSTim Harvey	};
506f30b27cSTim Harvey
516f30b27cSTim Harvey	reg_usb_otg1_vbus: regulator-usb-otg1 {
526f30b27cSTim Harvey		pinctrl-names = "default";
536f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_reg_usb1_en>;
546f30b27cSTim Harvey		compatible = "regulator-fixed";
556f30b27cSTim Harvey		regulator-name = "usb_otg1_vbus";
56bd306fdbSTim Harvey		gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
576f30b27cSTim Harvey		enable-active-high;
586f30b27cSTim Harvey		regulator-min-microvolt = <5000000>;
596f30b27cSTim Harvey		regulator-max-microvolt = <5000000>;
606f30b27cSTim Harvey	};
616f30b27cSTim Harvey};
626f30b27cSTim Harvey
636f30b27cSTim Harvey/* off-board header */
646f30b27cSTim Harvey&ecspi2 {
656f30b27cSTim Harvey	pinctrl-names = "default";
666f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_spi2>;
67c6fe862aSFabio Estevam	cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
686f30b27cSTim Harvey	status = "okay";
696f30b27cSTim Harvey};
706f30b27cSTim Harvey
719d46d9f7STim Harvey&gpio1 {
729d46d9f7STim Harvey	gpio-line-names = "", "", "", "", "", "", "pci_usb_sel", "dio0",
739d46d9f7STim Harvey		"", "dio1", "", "", "", "", "", "",
749d46d9f7STim Harvey		"", "", "", "", "", "", "", "",
759d46d9f7STim Harvey		"", "", "", "", "", "", "", "";
769d46d9f7STim Harvey};
779d46d9f7STim Harvey
789d46d9f7STim Harvey&gpio4 {
799d46d9f7STim Harvey	gpio-line-names = "", "", "", "dio2", "dio3", "", "", "pci_wdis#",
809d46d9f7STim Harvey		"", "", "", "", "", "", "", "",
819d46d9f7STim Harvey		"", "", "", "", "", "", "", "",
829d46d9f7STim Harvey		"", "", "", "", "", "", "", "";
839d46d9f7STim Harvey};
849d46d9f7STim Harvey
856f30b27cSTim Harvey&i2c2 {
866f30b27cSTim Harvey	clock-frequency = <400000>;
876f30b27cSTim Harvey	pinctrl-names = "default";
886f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_i2c2>;
896f30b27cSTim Harvey	status = "okay";
906f30b27cSTim Harvey
916f30b27cSTim Harvey	accelerometer@19 {
926f30b27cSTim Harvey		pinctrl-names = "default";
936f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_accel>;
946f30b27cSTim Harvey		compatible = "st,lis2de12";
956f30b27cSTim Harvey		reg = <0x19>;
966f30b27cSTim Harvey		st,drdy-int-pin = <1>;
976f30b27cSTim Harvey		interrupt-parent = <&gpio4>;
986f30b27cSTim Harvey		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
996f30b27cSTim Harvey		interrupt-names = "INT1";
1006f30b27cSTim Harvey	};
1016f30b27cSTim Harvey};
1026f30b27cSTim Harvey
1036f30b27cSTim Harvey/* off-board header */
1046f30b27cSTim Harvey&i2c3 {
1056f30b27cSTim Harvey	clock-frequency = <400000>;
1066f30b27cSTim Harvey	pinctrl-names = "default";
1076f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_i2c3>;
1086f30b27cSTim Harvey	status = "okay";
1096f30b27cSTim Harvey};
1106f30b27cSTim Harvey
111afb424b9STim Harvey&pcie_phy {
112afb424b9STim Harvey	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
113afb424b9STim Harvey	fsl,clkreq-unsupported;
114afb424b9STim Harvey	clocks = <&pcie0_refclk>;
115afb424b9STim Harvey	status = "okay";
116afb424b9STim Harvey};
117afb424b9STim Harvey
118afb424b9STim Harvey&pcie0 {
119afb424b9STim Harvey	pinctrl-names = "default";
120afb424b9STim Harvey	pinctrl-0 = <&pinctrl_pcie0>;
121afb424b9STim Harvey	reset-gpio = <&gpio4 6 GPIO_ACTIVE_LOW>;
122afb424b9STim Harvey	clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>,
123afb424b9STim Harvey		 <&pcie0_refclk>;
124afb424b9STim Harvey	clock-names = "pcie", "pcie_aux", "pcie_bus";
125afb424b9STim Harvey	assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
126afb424b9STim Harvey			  <&clk IMX8MM_CLK_PCIE1_CTRL>;
127afb424b9STim Harvey	assigned-clock-rates = <10000000>, <250000000>;
128afb424b9STim Harvey	assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
129afb424b9STim Harvey				 <&clk IMX8MM_SYS_PLL2_250M>;
130afb424b9STim Harvey	status = "okay";
131afb424b9STim Harvey};
132afb424b9STim Harvey
1336f30b27cSTim Harvey/* GPS */
1346f30b27cSTim Harvey&uart1 {
1356f30b27cSTim Harvey	pinctrl-names = "default";
1366f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_uart1>;
1376f30b27cSTim Harvey	status = "okay";
1386f30b27cSTim Harvey};
1396f30b27cSTim Harvey
1406f30b27cSTim Harvey/* off-board header */
1416f30b27cSTim Harvey&uart3 {
1426f30b27cSTim Harvey	pinctrl-names = "default";
1436f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_uart3>;
1446f30b27cSTim Harvey	status = "okay";
1456f30b27cSTim Harvey};
1466f30b27cSTim Harvey
1476f30b27cSTim Harvey&usbotg1 {
1486f30b27cSTim Harvey	dr_mode = "otg";
149*4c79865fSTim Harvey	over-current-active-low;
1506f30b27cSTim Harvey	vbus-supply = <&reg_usb_otg1_vbus>;
1516f30b27cSTim Harvey	status = "okay";
1526f30b27cSTim Harvey};
1536f30b27cSTim Harvey
1546f30b27cSTim Harvey&usbotg2 {
1556f30b27cSTim Harvey	dr_mode = "host";
156*4c79865fSTim Harvey	disable-over-current;
1576f30b27cSTim Harvey	status = "okay";
1586f30b27cSTim Harvey};
1596f30b27cSTim Harvey
1606f30b27cSTim Harvey&iomuxc {
1616f30b27cSTim Harvey	pinctrl-names = "default";
1626f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_hog>;
1636f30b27cSTim Harvey
1646f30b27cSTim Harvey	pinctrl_hog: hoggrp {
1656f30b27cSTim Harvey		fsl,pins = <
1666f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3		0x40000041 /* PLUG_TEST */
1676f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6	0x40000041 /* PCI_USBSEL */
1686f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7	0x40000041 /* PCIE_WDIS# */
1696f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7	0x40000041 /* DIO0 */
1706f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9	0x40000041 /* DIO1 */
1716f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3	0x40000041 /* DIO2 */
1726f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD2_GPIO4_IO4	0x40000041 /* DIO2 */
1736f30b27cSTim Harvey		>;
1746f30b27cSTim Harvey	};
1756f30b27cSTim Harvey
1766f30b27cSTim Harvey	pinctrl_accel: accelgrp {
1776f30b27cSTim Harvey		fsl,pins = <
1786f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5	0x159
1796f30b27cSTim Harvey		>;
1806f30b27cSTim Harvey	};
1816f30b27cSTim Harvey
1826f30b27cSTim Harvey	pinctrl_gpio_leds: gpioledgrp {
1836f30b27cSTim Harvey		fsl,pins = <
1846f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5	0x19
1856f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4		0x19
1866f30b27cSTim Harvey		>;
1876f30b27cSTim Harvey	};
1886f30b27cSTim Harvey
1896f30b27cSTim Harvey	pinctrl_i2c3: i2c3grp {
1906f30b27cSTim Harvey		fsl,pins = <
1916f30b27cSTim Harvey			MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL		0x400001c3
1926f30b27cSTim Harvey			MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA		0x400001c3
1936f30b27cSTim Harvey		>;
1946f30b27cSTim Harvey	};
1956f30b27cSTim Harvey
196afb424b9STim Harvey	pinctrl_pcie0: pcie0grp {
197afb424b9STim Harvey		fsl,pins = <
198afb424b9STim Harvey			MX8MM_IOMUXC_SAI1_RXD4_GPIO4_IO6	0x41
199afb424b9STim Harvey		>;
200afb424b9STim Harvey	};
201afb424b9STim Harvey
2026f30b27cSTim Harvey	pinctrl_pps: ppsgrp {
2036f30b27cSTim Harvey		fsl,pins = <
2046f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15	0x41
2056f30b27cSTim Harvey		>;
2066f30b27cSTim Harvey	};
2076f30b27cSTim Harvey
2086f30b27cSTim Harvey	pinctrl_reg_usb1_en: regusb1grp {
2096f30b27cSTim Harvey		fsl,pins = <
210bd306fdbSTim Harvey			MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10	0x41
211bd306fdbSTim Harvey			MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12	0x141
2126f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC	0x41
2136f30b27cSTim Harvey		>;
2146f30b27cSTim Harvey	};
2156f30b27cSTim Harvey
2166f30b27cSTim Harvey	pinctrl_spi2: spi2grp {
2176f30b27cSTim Harvey		fsl,pins = <
2186f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK	0xd6
2196f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI	0xd6
220dc900431SJohan Hovold			MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO	0xd6
2216f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13	0xd6
2226f30b27cSTim Harvey		>;
2236f30b27cSTim Harvey	};
2246f30b27cSTim Harvey
2256f30b27cSTim Harvey	pinctrl_uart1: uart1grp {
2266f30b27cSTim Harvey		fsl,pins = <
2276f30b27cSTim Harvey			MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX	0x140
2286f30b27cSTim Harvey			MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX	0x140
2296f30b27cSTim Harvey		>;
2306f30b27cSTim Harvey	};
2316f30b27cSTim Harvey
2326f30b27cSTim Harvey	pinctrl_uart3: uart3grp {
2336f30b27cSTim Harvey		fsl,pins = <
2346f30b27cSTim Harvey			MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX	0x140
2356f30b27cSTim Harvey			MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX	0x140
2366f30b27cSTim Harvey		>;
2376f30b27cSTim Harvey	};
2386f30b27cSTim Harvey};
239