1aa1a8ff2SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2aa1a8ff2SEmmanuel Vadot/* 3aa1a8ff2SEmmanuel Vadot * Copyright 2023 Gateworks Corporation 4aa1a8ff2SEmmanuel Vadot */ 5aa1a8ff2SEmmanuel Vadot 6aa1a8ff2SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 7aa1a8ff2SEmmanuel Vadot#include <dt-bindings/leds/common.h> 8aa1a8ff2SEmmanuel Vadot#include <dt-bindings/phy/phy-imx8-pcie.h> 9aa1a8ff2SEmmanuel Vadot 10aa1a8ff2SEmmanuel Vadot/ { 11*8d13bc63SEmmanuel Vadot connector { 12*8d13bc63SEmmanuel Vadot compatible = "gpio-usb-b-connector", "usb-b-connector"; 13*8d13bc63SEmmanuel Vadot pinctrl-names = "default"; 14*8d13bc63SEmmanuel Vadot pinctrl-0 = <&pinctrl_usbcon1>; 15*8d13bc63SEmmanuel Vadot type = "micro"; 16*8d13bc63SEmmanuel Vadot label = "Type-C"; 17*8d13bc63SEmmanuel Vadot id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; 18*8d13bc63SEmmanuel Vadot 19*8d13bc63SEmmanuel Vadot port { 20*8d13bc63SEmmanuel Vadot usb_dr_connector: endpoint { 21*8d13bc63SEmmanuel Vadot remote-endpoint = <&usb3_dwc>; 22*8d13bc63SEmmanuel Vadot }; 23*8d13bc63SEmmanuel Vadot }; 24*8d13bc63SEmmanuel Vadot }; 25*8d13bc63SEmmanuel Vadot 26aa1a8ff2SEmmanuel Vadot led-controller { 27aa1a8ff2SEmmanuel Vadot compatible = "gpio-leds"; 28aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 29aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_gpio_leds>; 30aa1a8ff2SEmmanuel Vadot 31aa1a8ff2SEmmanuel Vadot led-0 { 32aa1a8ff2SEmmanuel Vadot function = LED_FUNCTION_STATUS; 33aa1a8ff2SEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 34aa1a8ff2SEmmanuel Vadot gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>; 35aa1a8ff2SEmmanuel Vadot default-state = "on"; 36aa1a8ff2SEmmanuel Vadot linux,default-trigger = "heartbeat"; 37aa1a8ff2SEmmanuel Vadot }; 38aa1a8ff2SEmmanuel Vadot 39aa1a8ff2SEmmanuel Vadot led-1 { 40aa1a8ff2SEmmanuel Vadot function = LED_FUNCTION_STATUS; 41aa1a8ff2SEmmanuel Vadot color = <LED_COLOR_ID_RED>; 42aa1a8ff2SEmmanuel Vadot gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; 43aa1a8ff2SEmmanuel Vadot default-state = "off"; 44aa1a8ff2SEmmanuel Vadot }; 45aa1a8ff2SEmmanuel Vadot }; 46aa1a8ff2SEmmanuel Vadot 47aa1a8ff2SEmmanuel Vadot pcie0_refclk: clock-pcie0 { 48aa1a8ff2SEmmanuel Vadot compatible = "fixed-clock"; 49aa1a8ff2SEmmanuel Vadot #clock-cells = <0>; 50aa1a8ff2SEmmanuel Vadot clock-frequency = <100000000>; 51aa1a8ff2SEmmanuel Vadot }; 52aa1a8ff2SEmmanuel Vadot 53aa1a8ff2SEmmanuel Vadot pps { 54aa1a8ff2SEmmanuel Vadot compatible = "pps-gpio"; 55aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 56aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_pps>; 57aa1a8ff2SEmmanuel Vadot gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; 58aa1a8ff2SEmmanuel Vadot status = "okay"; 59aa1a8ff2SEmmanuel Vadot }; 60aa1a8ff2SEmmanuel Vadot}; 61aa1a8ff2SEmmanuel Vadot 62aa1a8ff2SEmmanuel Vadot/* off-board header */ 63aa1a8ff2SEmmanuel Vadot&ecspi2 { 64aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 65aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_spi2>; 66aa1a8ff2SEmmanuel Vadot cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; 67aa1a8ff2SEmmanuel Vadot status = "okay"; 68aa1a8ff2SEmmanuel Vadot}; 69aa1a8ff2SEmmanuel Vadot 70aa1a8ff2SEmmanuel Vadot&gpio4 { 71aa1a8ff2SEmmanuel Vadot gpio-line-names = 72aa1a8ff2SEmmanuel Vadot "", "", "", "", 73aa1a8ff2SEmmanuel Vadot "", "", "", "", 74aa1a8ff2SEmmanuel Vadot "dio1", "", "", "dio0", 75aa1a8ff2SEmmanuel Vadot "", "", "pci_usb_sel", "", 76aa1a8ff2SEmmanuel Vadot "", "", "", "", 77aa1a8ff2SEmmanuel Vadot "", "", "", "", 78aa1a8ff2SEmmanuel Vadot "dio3", "", "dio2", "", 79aa1a8ff2SEmmanuel Vadot "pci_wdis#", "", "", ""; 80aa1a8ff2SEmmanuel Vadot}; 81aa1a8ff2SEmmanuel Vadot 82aa1a8ff2SEmmanuel Vadot&i2c2 { 83aa1a8ff2SEmmanuel Vadot clock-frequency = <400000>; 84aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 85aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_i2c2>; 86aa1a8ff2SEmmanuel Vadot status = "okay"; 87aa1a8ff2SEmmanuel Vadot 88aa1a8ff2SEmmanuel Vadot accelerometer@19 { 89aa1a8ff2SEmmanuel Vadot compatible = "st,lis2de12"; 90aa1a8ff2SEmmanuel Vadot reg = <0x19>; 91aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 92aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_accel>; 93aa1a8ff2SEmmanuel Vadot st,drdy-int-pin = <1>; 94aa1a8ff2SEmmanuel Vadot interrupt-parent = <&gpio4>; 95aa1a8ff2SEmmanuel Vadot interrupts = <21 IRQ_TYPE_LEVEL_LOW>; 96aa1a8ff2SEmmanuel Vadot }; 97aa1a8ff2SEmmanuel Vadot}; 98aa1a8ff2SEmmanuel Vadot 99aa1a8ff2SEmmanuel Vadot&pcie_phy { 100aa1a8ff2SEmmanuel Vadot fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>; 101aa1a8ff2SEmmanuel Vadot fsl,clkreq-unsupported; 102aa1a8ff2SEmmanuel Vadot clocks = <&pcie0_refclk>; 103aa1a8ff2SEmmanuel Vadot clock-names = "ref"; 104aa1a8ff2SEmmanuel Vadot status = "okay"; 105aa1a8ff2SEmmanuel Vadot}; 106aa1a8ff2SEmmanuel Vadot 107aa1a8ff2SEmmanuel Vadot&pcie { 108aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 109aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_pcie0>; 110aa1a8ff2SEmmanuel Vadot reset-gpio = <&gpio4 29 GPIO_ACTIVE_LOW>; 111aa1a8ff2SEmmanuel Vadot status = "okay"; 112aa1a8ff2SEmmanuel Vadot}; 113aa1a8ff2SEmmanuel Vadot 114aa1a8ff2SEmmanuel Vadot/* GPS */ 115aa1a8ff2SEmmanuel Vadot&uart1 { 116aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 117aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_uart1>; 118aa1a8ff2SEmmanuel Vadot status = "okay"; 119aa1a8ff2SEmmanuel Vadot}; 120aa1a8ff2SEmmanuel Vadot 121aa1a8ff2SEmmanuel Vadot/* off-board header */ 122aa1a8ff2SEmmanuel Vadot&uart3 { 123aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 124aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_uart3>; 125aa1a8ff2SEmmanuel Vadot status = "okay"; 126aa1a8ff2SEmmanuel Vadot}; 127aa1a8ff2SEmmanuel Vadot 128aa1a8ff2SEmmanuel Vadot/* USB1 Type-C front panel */ 129aa1a8ff2SEmmanuel Vadot&usb3_0 { 130aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 131aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_usb1>; 132aa1a8ff2SEmmanuel Vadot fsl,over-current-active-low; 133aa1a8ff2SEmmanuel Vadot status = "okay"; 134aa1a8ff2SEmmanuel Vadot}; 135aa1a8ff2SEmmanuel Vadot 136aa1a8ff2SEmmanuel Vadot&usb3_phy0 { 137aa1a8ff2SEmmanuel Vadot status = "okay"; 138aa1a8ff2SEmmanuel Vadot}; 139aa1a8ff2SEmmanuel Vadot 140aa1a8ff2SEmmanuel Vadot&usb_dwc3_0 { 141aa1a8ff2SEmmanuel Vadot /* dual role is implemented but not a full featured OTG */ 142aa1a8ff2SEmmanuel Vadot adp-disable; 143aa1a8ff2SEmmanuel Vadot hnp-disable; 144aa1a8ff2SEmmanuel Vadot srp-disable; 145aa1a8ff2SEmmanuel Vadot dr_mode = "otg"; 146aa1a8ff2SEmmanuel Vadot usb-role-switch; 147aa1a8ff2SEmmanuel Vadot role-switch-default-mode = "peripheral"; 148aa1a8ff2SEmmanuel Vadot status = "okay"; 149aa1a8ff2SEmmanuel Vadot 150*8d13bc63SEmmanuel Vadot port { 151*8d13bc63SEmmanuel Vadot usb3_dwc: endpoint { 152*8d13bc63SEmmanuel Vadot remote-endpoint = <&usb_dr_connector>; 153*8d13bc63SEmmanuel Vadot }; 154aa1a8ff2SEmmanuel Vadot }; 155aa1a8ff2SEmmanuel Vadot}; 156aa1a8ff2SEmmanuel Vadot 157aa1a8ff2SEmmanuel Vadot/* USB2 - MiniPCIe socket */ 158aa1a8ff2SEmmanuel Vadot&usb3_1 { 159aa1a8ff2SEmmanuel Vadot fsl,permanently-attached; 160aa1a8ff2SEmmanuel Vadot fsl,disable-port-power-control; 161aa1a8ff2SEmmanuel Vadot status = "okay"; 162aa1a8ff2SEmmanuel Vadot}; 163aa1a8ff2SEmmanuel Vadot 164aa1a8ff2SEmmanuel Vadot&usb3_phy1 { 165aa1a8ff2SEmmanuel Vadot status = "okay"; 166aa1a8ff2SEmmanuel Vadot}; 167aa1a8ff2SEmmanuel Vadot 168aa1a8ff2SEmmanuel Vadot&usb_dwc3_1 { 169aa1a8ff2SEmmanuel Vadot dr_mode = "host"; 170aa1a8ff2SEmmanuel Vadot status = "okay"; 171aa1a8ff2SEmmanuel Vadot}; 172aa1a8ff2SEmmanuel Vadot 173aa1a8ff2SEmmanuel Vadot&iomuxc { 174aa1a8ff2SEmmanuel Vadot pinctrl-names = "default"; 175aa1a8ff2SEmmanuel Vadot pinctrl-0 = <&pinctrl_hog>; 176aa1a8ff2SEmmanuel Vadot 177aa1a8ff2SEmmanuel Vadot pinctrl_hog: hoggrp { 178aa1a8ff2SEmmanuel Vadot fsl,pins = < 179aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI1_RXD6__GPIO4_IO08 0x40000146 /* DIO1 */ 180aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI1_TXC__GPIO4_IO11 0x40000146 /* DIO0 */ 181aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI1_TXD2__GPIO4_IO14 0x40000106 /* PCIE_USBSEL */ 182aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI2_TXD0__GPIO4_IO26 0x40000146 /* DIO2 */ 183aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI2_TXFS__GPIO4_IO24 0x40000146 /* DIO3 */ 184aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x40000106 /* PCIE_WDIS# */ 185aa1a8ff2SEmmanuel Vadot >; 186aa1a8ff2SEmmanuel Vadot }; 187aa1a8ff2SEmmanuel Vadot 188aa1a8ff2SEmmanuel Vadot pinctrl_accel: accelgrp { 189aa1a8ff2SEmmanuel Vadot fsl,pins = < 190aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x150 /* IRQ */ 191aa1a8ff2SEmmanuel Vadot >; 192aa1a8ff2SEmmanuel Vadot }; 193aa1a8ff2SEmmanuel Vadot 194aa1a8ff2SEmmanuel Vadot pinctrl_gpio_leds: gpioledgrp { 195aa1a8ff2SEmmanuel Vadot fsl,pins = < 196aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01 0x6 /* LEDG */ 197aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI1_RXD3__GPIO4_IO05 0x6 /* LEDR */ 198aa1a8ff2SEmmanuel Vadot >; 199aa1a8ff2SEmmanuel Vadot }; 200aa1a8ff2SEmmanuel Vadot 201aa1a8ff2SEmmanuel Vadot pinctrl_pcie0: pcie0grp { 202aa1a8ff2SEmmanuel Vadot fsl,pins = < 203aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x106 204aa1a8ff2SEmmanuel Vadot >; 205aa1a8ff2SEmmanuel Vadot }; 206aa1a8ff2SEmmanuel Vadot 207aa1a8ff2SEmmanuel Vadot pinctrl_pps: ppsgrp { 208aa1a8ff2SEmmanuel Vadot fsl,pins = < 209aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03 0x146 210aa1a8ff2SEmmanuel Vadot >; 211aa1a8ff2SEmmanuel Vadot }; 212aa1a8ff2SEmmanuel Vadot 213aa1a8ff2SEmmanuel Vadot pinctrl_usb1: usb1grp { 214aa1a8ff2SEmmanuel Vadot fsl,pins = < 215aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 /* USB1_FLT# */ 216aa1a8ff2SEmmanuel Vadot >; 217aa1a8ff2SEmmanuel Vadot }; 218aa1a8ff2SEmmanuel Vadot 219aa1a8ff2SEmmanuel Vadot pinctrl_usbcon1: usbcon1grp { 220aa1a8ff2SEmmanuel Vadot fsl,pins = < 221aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x140 /* USB1_ID */ 222aa1a8ff2SEmmanuel Vadot >; 223aa1a8ff2SEmmanuel Vadot }; 224aa1a8ff2SEmmanuel Vadot 225aa1a8ff2SEmmanuel Vadot pinctrl_spi2: spi2grp { 226aa1a8ff2SEmmanuel Vadot fsl,pins = < 227aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x140 228aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x140 229aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x140 230aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x140 231aa1a8ff2SEmmanuel Vadot >; 232aa1a8ff2SEmmanuel Vadot }; 233aa1a8ff2SEmmanuel Vadot 234aa1a8ff2SEmmanuel Vadot pinctrl_uart1: uart1grp { 235aa1a8ff2SEmmanuel Vadot fsl,pins = < 236aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140 237aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140 238aa1a8ff2SEmmanuel Vadot >; 239aa1a8ff2SEmmanuel Vadot }; 240aa1a8ff2SEmmanuel Vadot 241aa1a8ff2SEmmanuel Vadot pinctrl_uart3: uart3grp { 242aa1a8ff2SEmmanuel Vadot fsl,pins = < 243aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140 244aa1a8ff2SEmmanuel Vadot MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140 245aa1a8ff2SEmmanuel Vadot >; 246aa1a8ff2SEmmanuel Vadot }; 247aa1a8ff2SEmmanuel Vadot}; 248