1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright 2020 Gateworks Corporation 4 */ 5 6#include <dt-bindings/gpio/gpio.h> 7#include <dt-bindings/leds/common.h> 8#include <dt-bindings/phy/phy-imx8-pcie.h> 9 10/ { 11 aliases { 12 usb0 = &usbotg1; 13 usb1 = &usbotg2; 14 }; 15 16 led-controller { 17 compatible = "gpio-leds"; 18 pinctrl-names = "default"; 19 pinctrl-0 = <&pinctrl_gpio_leds>; 20 21 led-0 { 22 function = LED_FUNCTION_STATUS; 23 color = <LED_COLOR_ID_GREEN>; 24 gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>; 25 default-state = "on"; 26 linux,default-trigger = "heartbeat"; 27 }; 28 29 led-1 { 30 function = LED_FUNCTION_STATUS; 31 color = <LED_COLOR_ID_RED>; 32 gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; 33 default-state = "off"; 34 }; 35 }; 36 37 pcie0_refclk: pcie0-refclk { 38 compatible = "fixed-clock"; 39 #clock-cells = <0>; 40 clock-frequency = <100000000>; 41 }; 42 43 pps { 44 compatible = "pps-gpio"; 45 pinctrl-names = "default"; 46 pinctrl-0 = <&pinctrl_pps>; 47 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 48 status = "okay"; 49 }; 50 51 reg_usb_otg1_vbus: regulator-usb-otg1 { 52 pinctrl-names = "default"; 53 pinctrl-0 = <&pinctrl_reg_usb1_en>; 54 compatible = "regulator-fixed"; 55 regulator-name = "usb_otg1_vbus"; 56 gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>; 57 enable-active-high; 58 regulator-min-microvolt = <5000000>; 59 regulator-max-microvolt = <5000000>; 60 }; 61}; 62 63/* off-board header */ 64&ecspi2 { 65 pinctrl-names = "default"; 66 pinctrl-0 = <&pinctrl_spi2>; 67 cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; 68 status = "okay"; 69}; 70 71&gpio1 { 72 gpio-line-names = "", "", "", "", "", "", "pci_usb_sel", "dio0", 73 "", "dio1", "", "", "", "", "", "", 74 "", "", "", "", "", "", "", "", 75 "", "", "", "", "", "", "", ""; 76}; 77 78&gpio4 { 79 gpio-line-names = "", "", "", "dio2", "dio3", "", "", "pci_wdis#", 80 "", "", "", "", "", "", "", "", 81 "", "", "", "", "", "", "", "", 82 "", "", "", "", "", "", "", ""; 83}; 84 85&i2c2 { 86 clock-frequency = <400000>; 87 pinctrl-names = "default"; 88 pinctrl-0 = <&pinctrl_i2c2>; 89 status = "okay"; 90 91 accelerometer@19 { 92 pinctrl-names = "default"; 93 pinctrl-0 = <&pinctrl_accel>; 94 compatible = "st,lis2de12"; 95 reg = <0x19>; 96 st,drdy-int-pin = <1>; 97 interrupt-parent = <&gpio4>; 98 interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 99 }; 100}; 101 102/* off-board header */ 103&i2c3 { 104 clock-frequency = <400000>; 105 pinctrl-names = "default"; 106 pinctrl-0 = <&pinctrl_i2c3>; 107 status = "okay"; 108}; 109 110&pcie_phy { 111 fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>; 112 fsl,clkreq-unsupported; 113 clocks = <&pcie0_refclk>; 114 clock-names = "ref"; 115 status = "okay"; 116}; 117 118&pcie0 { 119 pinctrl-names = "default"; 120 pinctrl-0 = <&pinctrl_pcie0>; 121 reset-gpio = <&gpio4 6 GPIO_ACTIVE_LOW>; 122 clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&pcie0_refclk>, 123 <&clk IMX8MM_CLK_PCIE1_AUX>; 124 assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>, 125 <&clk IMX8MM_CLK_PCIE1_CTRL>; 126 assigned-clock-rates = <10000000>, <250000000>; 127 assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>, 128 <&clk IMX8MM_SYS_PLL2_250M>; 129 status = "okay"; 130}; 131 132/* GPS */ 133&uart1 { 134 pinctrl-names = "default"; 135 pinctrl-0 = <&pinctrl_uart1>; 136 status = "okay"; 137}; 138 139/* off-board header */ 140&uart3 { 141 pinctrl-names = "default"; 142 pinctrl-0 = <&pinctrl_uart3>; 143 status = "okay"; 144}; 145 146&usbotg1 { 147 dr_mode = "otg"; 148 over-current-active-low; 149 vbus-supply = <®_usb_otg1_vbus>; 150 status = "okay"; 151}; 152 153&usbotg2 { 154 dr_mode = "host"; 155 disable-over-current; 156 status = "okay"; 157}; 158 159&iomuxc { 160 pinctrl-names = "default"; 161 pinctrl-0 = <&pinctrl_hog>; 162 163 pinctrl_hog: hoggrp { 164 fsl,pins = < 165 MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3 0x40000041 /* PLUG_TEST */ 166 MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x40000041 /* PCI_USBSEL */ 167 MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7 0x40000041 /* PCIE_WDIS# */ 168 MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x40000041 /* DIO0 */ 169 MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x40000041 /* DIO1 */ 170 MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3 0x40000041 /* DIO2 */ 171 MX8MM_IOMUXC_SAI1_RXD2_GPIO4_IO4 0x40000041 /* DIO2 */ 172 >; 173 }; 174 175 pinctrl_accel: accelgrp { 176 fsl,pins = < 177 MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5 0x159 178 >; 179 }; 180 181 pinctrl_gpio_leds: gpioledgrp { 182 fsl,pins = < 183 MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x19 184 MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4 0x19 185 >; 186 }; 187 188 pinctrl_i2c3: i2c3grp { 189 fsl,pins = < 190 MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 191 MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 192 >; 193 }; 194 195 pinctrl_pcie0: pcie0grp { 196 fsl,pins = < 197 MX8MM_IOMUXC_SAI1_RXD4_GPIO4_IO6 0x41 198 >; 199 }; 200 201 pinctrl_pps: ppsgrp { 202 fsl,pins = < 203 MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x41 204 >; 205 }; 206 207 pinctrl_reg_usb1_en: regusb1grp { 208 fsl,pins = < 209 MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x41 210 MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x141 211 MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x41 212 >; 213 }; 214 215 pinctrl_spi2: spi2grp { 216 fsl,pins = < 217 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6 218 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6 219 MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6 220 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6 221 >; 222 }; 223 224 pinctrl_uart1: uart1grp { 225 fsl,pins = < 226 MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140 227 MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140 228 >; 229 }; 230 231 pinctrl_uart3: uart3grp { 232 fsl,pins = < 233 MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140 234 MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140 235 >; 236 }; 237}; 238