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
526f30b27cSTim Harvey/* off-board header */
536f30b27cSTim Harvey&ecspi2 {
546f30b27cSTim Harvey	pinctrl-names = "default";
556f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_spi2>;
56c6fe862aSFabio Estevam	cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
576f30b27cSTim Harvey	status = "okay";
586f30b27cSTim Harvey};
596f30b27cSTim Harvey
609d46d9f7STim Harvey&gpio1 {
619d46d9f7STim Harvey	gpio-line-names = "", "", "", "", "", "", "pci_usb_sel", "dio0",
629d46d9f7STim Harvey		"", "dio1", "", "", "", "", "", "",
639d46d9f7STim Harvey		"", "", "", "", "", "", "", "",
649d46d9f7STim Harvey		"", "", "", "", "", "", "", "";
659d46d9f7STim Harvey};
669d46d9f7STim Harvey
679d46d9f7STim Harvey&gpio4 {
689d46d9f7STim Harvey	gpio-line-names = "", "", "", "dio2", "dio3", "", "", "pci_wdis#",
699d46d9f7STim Harvey		"", "", "", "", "", "", "", "",
709d46d9f7STim Harvey		"", "", "", "", "", "", "", "",
719d46d9f7STim Harvey		"", "", "", "", "", "", "", "";
729d46d9f7STim Harvey};
739d46d9f7STim Harvey
746f30b27cSTim Harvey&i2c2 {
756f30b27cSTim Harvey	clock-frequency = <400000>;
766f30b27cSTim Harvey	pinctrl-names = "default";
776f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_i2c2>;
786f30b27cSTim Harvey	status = "okay";
796f30b27cSTim Harvey
806f30b27cSTim Harvey	accelerometer@19 {
816f30b27cSTim Harvey		pinctrl-names = "default";
826f30b27cSTim Harvey		pinctrl-0 = <&pinctrl_accel>;
836f30b27cSTim Harvey		compatible = "st,lis2de12";
846f30b27cSTim Harvey		reg = <0x19>;
856f30b27cSTim Harvey		st,drdy-int-pin = <1>;
866f30b27cSTim Harvey		interrupt-parent = <&gpio4>;
876f30b27cSTim Harvey		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
886f30b27cSTim Harvey		interrupt-names = "INT1";
896f30b27cSTim Harvey	};
906f30b27cSTim Harvey};
916f30b27cSTim Harvey
926f30b27cSTim Harvey/* off-board header */
936f30b27cSTim Harvey&i2c3 {
946f30b27cSTim Harvey	clock-frequency = <400000>;
956f30b27cSTim Harvey	pinctrl-names = "default";
966f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_i2c3>;
976f30b27cSTim Harvey	status = "okay";
986f30b27cSTim Harvey};
996f30b27cSTim Harvey
100afb424b9STim Harvey&pcie_phy {
101afb424b9STim Harvey	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
102afb424b9STim Harvey	fsl,clkreq-unsupported;
103afb424b9STim Harvey	clocks = <&pcie0_refclk>;
104450cec4fSTim Harvey	clock-names = "ref";
105afb424b9STim Harvey	status = "okay";
106afb424b9STim Harvey};
107afb424b9STim Harvey
108afb424b9STim Harvey&pcie0 {
109afb424b9STim Harvey	pinctrl-names = "default";
110afb424b9STim Harvey	pinctrl-0 = <&pinctrl_pcie0>;
111afb424b9STim Harvey	reset-gpio = <&gpio4 6 GPIO_ACTIVE_LOW>;
1123c033fb1SMarek Vasut	clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&pcie0_refclk>,
1133c033fb1SMarek Vasut		 <&clk IMX8MM_CLK_PCIE1_AUX>;
114afb424b9STim Harvey	assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
115afb424b9STim Harvey			  <&clk IMX8MM_CLK_PCIE1_CTRL>;
116afb424b9STim Harvey	assigned-clock-rates = <10000000>, <250000000>;
117afb424b9STim Harvey	assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
118afb424b9STim Harvey				 <&clk IMX8MM_SYS_PLL2_250M>;
119afb424b9STim Harvey	status = "okay";
120afb424b9STim Harvey};
121afb424b9STim Harvey
1226f30b27cSTim Harvey/* GPS */
1236f30b27cSTim Harvey&uart1 {
1246f30b27cSTim Harvey	pinctrl-names = "default";
1256f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_uart1>;
1266f30b27cSTim Harvey	status = "okay";
1276f30b27cSTim Harvey};
1286f30b27cSTim Harvey
1296f30b27cSTim Harvey/* off-board header */
1306f30b27cSTim Harvey&uart3 {
1316f30b27cSTim Harvey	pinctrl-names = "default";
1326f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_uart3>;
1336f30b27cSTim Harvey	status = "okay";
1346f30b27cSTim Harvey};
1356f30b27cSTim Harvey
1366f30b27cSTim Harvey&usbotg1 {
137*93c17dc0STim Harvey	pinctrl-names = "default";
138*93c17dc0STim Harvey	pinctrl-0 = <&pinctrl_usbotg1>;
1396f30b27cSTim Harvey	dr_mode = "otg";
1404c79865fSTim Harvey	over-current-active-low;
1416f30b27cSTim Harvey	status = "okay";
1426f30b27cSTim Harvey};
1436f30b27cSTim Harvey
1446f30b27cSTim Harvey&usbotg2 {
1456f30b27cSTim Harvey	dr_mode = "host";
1464c79865fSTim Harvey	disable-over-current;
1476f30b27cSTim Harvey	status = "okay";
1486f30b27cSTim Harvey};
1496f30b27cSTim Harvey
1506f30b27cSTim Harvey&iomuxc {
1516f30b27cSTim Harvey	pinctrl-names = "default";
1526f30b27cSTim Harvey	pinctrl-0 = <&pinctrl_hog>;
1536f30b27cSTim Harvey
1546f30b27cSTim Harvey	pinctrl_hog: hoggrp {
1556f30b27cSTim Harvey		fsl,pins = <
1566f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3		0x40000041 /* PLUG_TEST */
1576f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6	0x40000041 /* PCI_USBSEL */
1586f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7	0x40000041 /* PCIE_WDIS# */
1596f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7	0x40000041 /* DIO0 */
1606f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9	0x40000041 /* DIO1 */
1616f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3	0x40000041 /* DIO2 */
1626f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD2_GPIO4_IO4	0x40000041 /* DIO2 */
1636f30b27cSTim Harvey		>;
1646f30b27cSTim Harvey	};
1656f30b27cSTim Harvey
1666f30b27cSTim Harvey	pinctrl_accel: accelgrp {
1676f30b27cSTim Harvey		fsl,pins = <
1686f30b27cSTim Harvey			MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5	0x159
1696f30b27cSTim Harvey		>;
1706f30b27cSTim Harvey	};
1716f30b27cSTim Harvey
1726f30b27cSTim Harvey	pinctrl_gpio_leds: gpioledgrp {
1736f30b27cSTim Harvey		fsl,pins = <
1746f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5	0x19
1756f30b27cSTim Harvey			MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4		0x19
1766f30b27cSTim Harvey		>;
1776f30b27cSTim Harvey	};
1786f30b27cSTim Harvey
1796f30b27cSTim Harvey	pinctrl_i2c3: i2c3grp {
1806f30b27cSTim Harvey		fsl,pins = <
1816f30b27cSTim Harvey			MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL		0x400001c3
1826f30b27cSTim Harvey			MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA		0x400001c3
1836f30b27cSTim Harvey		>;
1846f30b27cSTim Harvey	};
1856f30b27cSTim Harvey
186afb424b9STim Harvey	pinctrl_pcie0: pcie0grp {
187afb424b9STim Harvey		fsl,pins = <
188afb424b9STim Harvey			MX8MM_IOMUXC_SAI1_RXD4_GPIO4_IO6	0x41
189afb424b9STim Harvey		>;
190afb424b9STim Harvey	};
191afb424b9STim Harvey
1926f30b27cSTim Harvey	pinctrl_pps: ppsgrp {
1936f30b27cSTim Harvey		fsl,pins = <
1946f30b27cSTim Harvey			MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15	0x41
1956f30b27cSTim Harvey		>;
1966f30b27cSTim Harvey	};
1976f30b27cSTim Harvey
1986f30b27cSTim Harvey	pinctrl_spi2: spi2grp {
1996f30b27cSTim Harvey		fsl,pins = <
2006f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK	0xd6
2016f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI	0xd6
202dc900431SJohan Hovold			MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO	0xd6
2036f30b27cSTim Harvey			MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13	0xd6
2046f30b27cSTim Harvey		>;
2056f30b27cSTim Harvey	};
2066f30b27cSTim Harvey
2076f30b27cSTim Harvey	pinctrl_uart1: uart1grp {
2086f30b27cSTim Harvey		fsl,pins = <
2096f30b27cSTim Harvey			MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX	0x140
2106f30b27cSTim Harvey			MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX	0x140
2116f30b27cSTim Harvey		>;
2126f30b27cSTim Harvey	};
2136f30b27cSTim Harvey
2146f30b27cSTim Harvey	pinctrl_uart3: uart3grp {
2156f30b27cSTim Harvey		fsl,pins = <
2166f30b27cSTim Harvey			MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX	0x140
2176f30b27cSTim Harvey			MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX	0x140
2186f30b27cSTim Harvey		>;
2196f30b27cSTim Harvey	};
220*93c17dc0STim Harvey
221*93c17dc0STim Harvey	pinctrl_usbotg1: usbotg1grp {
222*93c17dc0STim Harvey		fsl,pins = <
223*93c17dc0STim Harvey			MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12	0x141
224*93c17dc0STim Harvey			MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC	0x41
225*93c17dc0STim Harvey		>;
226*93c17dc0STim Harvey	};
2276f30b27cSTim Harvey};
228