1*5f62a964SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*5f62a964SEmmanuel Vadot/* 3*5f62a964SEmmanuel Vadot * Copyright (C) 2024 Marek Vasut <marex@denx.de> 4*5f62a964SEmmanuel Vadot * 5*5f62a964SEmmanuel Vadot * DHCOM iMX8MP variant: 6*5f62a964SEmmanuel Vadot * DHCM-iMX8ML8-C160-R204-F1638-SPI16-E2-CAN2-RTC-I-01D2 7*5f62a964SEmmanuel Vadot * DHCOM PCB number: 660-100 or newer 8*5f62a964SEmmanuel Vadot * DRC02 PCB number: 568-100 or newer 9*5f62a964SEmmanuel Vadot */ 10*5f62a964SEmmanuel Vadot 11*5f62a964SEmmanuel Vadot/dts-v1/; 12*5f62a964SEmmanuel Vadot 13*5f62a964SEmmanuel Vadot#include <dt-bindings/leds/common.h> 14*5f62a964SEmmanuel Vadot#include <dt-bindings/phy/phy-imx8-pcie.h> 15*5f62a964SEmmanuel Vadot#include "imx8mp-dhcom-som.dtsi" 16*5f62a964SEmmanuel Vadot 17*5f62a964SEmmanuel Vadot/ { 18*5f62a964SEmmanuel Vadot model = "DH electronics i.MX8M Plus DHCOM on DRC02"; 19*5f62a964SEmmanuel Vadot compatible = "dh,imx8mp-dhcom-drc02", "dh,imx8mp-dhcom-som", 20*5f62a964SEmmanuel Vadot "fsl,imx8mp"; 21*5f62a964SEmmanuel Vadot 22*5f62a964SEmmanuel Vadot chosen { 23*5f62a964SEmmanuel Vadot stdout-path = &uart1; 24*5f62a964SEmmanuel Vadot }; 25*5f62a964SEmmanuel Vadot}; 26*5f62a964SEmmanuel Vadot 27*5f62a964SEmmanuel Vadot&eqos { /* First ethernet */ 28*5f62a964SEmmanuel Vadot pinctrl-0 = <&pinctrl_eqos_rmii>; 29*5f62a964SEmmanuel Vadot phy-handle = <ðphy0f>; 30*5f62a964SEmmanuel Vadot phy-mode = "rmii"; 31*5f62a964SEmmanuel Vadot 32*5f62a964SEmmanuel Vadot assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, 33*5f62a964SEmmanuel Vadot <&clk IMX8MP_SYS_PLL2_100M>, 34*5f62a964SEmmanuel Vadot <&clk IMX8MP_SYS_PLL2_50M>; 35*5f62a964SEmmanuel Vadot assigned-clock-rates = <0>, <100000000>, <50000000>; 36*5f62a964SEmmanuel Vadot}; 37*5f62a964SEmmanuel Vadot 38*5f62a964SEmmanuel Vadotðphy0g { /* Micrel KSZ9131RNXI */ 39*5f62a964SEmmanuel Vadot status = "disabled"; 40*5f62a964SEmmanuel Vadot}; 41*5f62a964SEmmanuel Vadot 42*5f62a964SEmmanuel Vadotðphy0f { /* SMSC LAN8740Ai */ 43*5f62a964SEmmanuel Vadot status = "okay"; 44*5f62a964SEmmanuel Vadot}; 45*5f62a964SEmmanuel Vadot 46*5f62a964SEmmanuel Vadot&fec { /* Second ethernet */ 47*5f62a964SEmmanuel Vadot pinctrl-0 = <&pinctrl_fec_rmii>; 48*5f62a964SEmmanuel Vadot phy-handle = <ðphy1f>; 49*5f62a964SEmmanuel Vadot phy-mode = "rmii"; 50*5f62a964SEmmanuel Vadot status = "okay"; 51*5f62a964SEmmanuel Vadot 52*5f62a964SEmmanuel Vadot assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, 53*5f62a964SEmmanuel Vadot <&clk IMX8MP_SYS_PLL2_100M>, 54*5f62a964SEmmanuel Vadot <&clk IMX8MP_SYS_PLL2_50M>, 55*5f62a964SEmmanuel Vadot <&clk IMX8MP_SYS_PLL2_50M>; 56*5f62a964SEmmanuel Vadot assigned-clock-rates = <0>, <100000000>, <50000000>, <0>; 57*5f62a964SEmmanuel Vadot}; 58*5f62a964SEmmanuel Vadot 59*5f62a964SEmmanuel Vadotðphy1f { /* SMSC LAN8740Ai */ 60*5f62a964SEmmanuel Vadot status = "okay"; 61*5f62a964SEmmanuel Vadot}; 62*5f62a964SEmmanuel Vadot 63*5f62a964SEmmanuel Vadot&flexcan1 { 64*5f62a964SEmmanuel Vadot status = "okay"; 65*5f62a964SEmmanuel Vadot}; 66*5f62a964SEmmanuel Vadot 67*5f62a964SEmmanuel Vadot&flexcan2 { 68*5f62a964SEmmanuel Vadot status = "okay"; 69*5f62a964SEmmanuel Vadot}; 70*5f62a964SEmmanuel Vadot 71*5f62a964SEmmanuel Vadot&gpio1 { 72*5f62a964SEmmanuel Vadot gpio-line-names = 73*5f62a964SEmmanuel Vadot "DRC02-In1", "", "", "", "", "DHCOM-I", "DRC02-HW2", "DRC02-HW0", 74*5f62a964SEmmanuel Vadot "DHCOM-B", "DHCOM-A", "", "DHCOM-H", "", "", "", "", 75*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", "", 76*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", ""; 77*5f62a964SEmmanuel Vadot 78*5f62a964SEmmanuel Vadot /* 79*5f62a964SEmmanuel Vadot * NOTE: On DRC02, the RS485_RX_En is controlled by a separate 80*5f62a964SEmmanuel Vadot * GPIO line, however the i.MX8 UART driver assumes RX happens 81*5f62a964SEmmanuel Vadot * during TX anyway and that it only controls drive enable DE 82*5f62a964SEmmanuel Vadot * line. Hence, the RX is always enabled here. 83*5f62a964SEmmanuel Vadot */ 84*5f62a964SEmmanuel Vadot rs485-rx-en-hog { 85*5f62a964SEmmanuel Vadot gpio-hog; 86*5f62a964SEmmanuel Vadot gpios = <13 0>; /* GPIO Q */ 87*5f62a964SEmmanuel Vadot line-name = "rs485-rx-en"; 88*5f62a964SEmmanuel Vadot output-low; 89*5f62a964SEmmanuel Vadot }; 90*5f62a964SEmmanuel Vadot}; 91*5f62a964SEmmanuel Vadot 92*5f62a964SEmmanuel Vadot&gpio2 { 93*5f62a964SEmmanuel Vadot gpio-line-names = 94*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", "", 95*5f62a964SEmmanuel Vadot "DHCOM-O", "DHCOM-N", "", "SOM-HW1", "", "", "", "", 96*5f62a964SEmmanuel Vadot "", "", "", "", "DRC02-In2", "", "", "", 97*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", ""; 98*5f62a964SEmmanuel Vadot}; 99*5f62a964SEmmanuel Vadot 100*5f62a964SEmmanuel Vadot&gpio3 { 101*5f62a964SEmmanuel Vadot gpio-line-names = 102*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", "", 103*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "SOM-HW0", "", 104*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "SOM-MEM0", "SOM-MEM1", 105*5f62a964SEmmanuel Vadot "SOM-MEM2", "SOM-HW2", "", "", "", "", "", ""; 106*5f62a964SEmmanuel Vadot}; 107*5f62a964SEmmanuel Vadot 108*5f62a964SEmmanuel Vadot&gpio4 { 109*5f62a964SEmmanuel Vadot gpio-line-names = 110*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", "", 111*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", "", 112*5f62a964SEmmanuel Vadot "", "", "", "SOM-HW1", "", "", "", "", 113*5f62a964SEmmanuel Vadot "", "", "", "DRC02-Out2", "", "", "", ""; 114*5f62a964SEmmanuel Vadot}; 115*5f62a964SEmmanuel Vadot 116*5f62a964SEmmanuel Vadot&gpio5 { 117*5f62a964SEmmanuel Vadot gpio-line-names = 118*5f62a964SEmmanuel Vadot "", "", "DHCOM-C", "", "", "", "", "", 119*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", "", 120*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "DHCOM-E", "DRC02-Out1", 121*5f62a964SEmmanuel Vadot "", "", "", "", "", "", "", ""; 122*5f62a964SEmmanuel Vadot}; 123*5f62a964SEmmanuel Vadot 124*5f62a964SEmmanuel Vadot/* No HS connector on this SoM variant, so no HDMI, PCIe and only USB HS. */ 125*5f62a964SEmmanuel Vadot&hdmi_blk_ctrl { 126*5f62a964SEmmanuel Vadot status = "disabled"; 127*5f62a964SEmmanuel Vadot}; 128*5f62a964SEmmanuel Vadot 129*5f62a964SEmmanuel Vadot&hdmi_pvi { 130*5f62a964SEmmanuel Vadot status = "disabled"; 131*5f62a964SEmmanuel Vadot}; 132*5f62a964SEmmanuel Vadot 133*5f62a964SEmmanuel Vadot&hdmi_tx { 134*5f62a964SEmmanuel Vadot status = "disabled"; 135*5f62a964SEmmanuel Vadot}; 136*5f62a964SEmmanuel Vadot 137*5f62a964SEmmanuel Vadot&hdmi_tx_phy { 138*5f62a964SEmmanuel Vadot status = "disabled"; 139*5f62a964SEmmanuel Vadot}; 140*5f62a964SEmmanuel Vadot 141*5f62a964SEmmanuel Vadot&i2c3 { 142*5f62a964SEmmanuel Vadot /* Resistive touch controller not populated on this one SoM variant. */ 143*5f62a964SEmmanuel Vadot touchscreen@49 { 144*5f62a964SEmmanuel Vadot status = "disabled"; 145*5f62a964SEmmanuel Vadot }; 146*5f62a964SEmmanuel Vadot}; 147*5f62a964SEmmanuel Vadot 148*5f62a964SEmmanuel Vadot&irqsteer_hdmi { 149*5f62a964SEmmanuel Vadot status = "disabled"; 150*5f62a964SEmmanuel Vadot}; 151*5f62a964SEmmanuel Vadot 152*5f62a964SEmmanuel Vadot&lcdif3 { 153*5f62a964SEmmanuel Vadot status = "disabled"; 154*5f62a964SEmmanuel Vadot}; 155*5f62a964SEmmanuel Vadot 156*5f62a964SEmmanuel Vadot&pcie_phy { 157*5f62a964SEmmanuel Vadot status = "disabled"; 158*5f62a964SEmmanuel Vadot}; 159*5f62a964SEmmanuel Vadot 160*5f62a964SEmmanuel Vadot&pcie { 161*5f62a964SEmmanuel Vadot status = "disabled"; 162*5f62a964SEmmanuel Vadot}; 163*5f62a964SEmmanuel Vadot 164*5f62a964SEmmanuel Vadot/* Console UART */ 165*5f62a964SEmmanuel Vadot&pinctrl_uart1 { 166*5f62a964SEmmanuel Vadot fsl,pins = < 167*5f62a964SEmmanuel Vadot /* No pull-ups on DRC02, enable in-SoC pull-ups */ 168*5f62a964SEmmanuel Vadot MX8MP_IOMUXC_SAI2_RXC__UART1_DCE_RX 0x149 169*5f62a964SEmmanuel Vadot MX8MP_IOMUXC_SAI2_RXFS__UART1_DCE_TX 0x149 170*5f62a964SEmmanuel Vadot >; 171*5f62a964SEmmanuel Vadot}; 172*5f62a964SEmmanuel Vadot 173*5f62a964SEmmanuel Vadot&pinctrl_uart3 { 174*5f62a964SEmmanuel Vadot fsl,pins = < 175*5f62a964SEmmanuel Vadot /* No pull-ups on DRC02, enable in-SoC pull-ups */ 176*5f62a964SEmmanuel Vadot MX8MP_IOMUXC_ECSPI1_SCLK__UART3_DCE_RX 0x149 177*5f62a964SEmmanuel Vadot MX8MP_IOMUXC_ECSPI1_MOSI__UART3_DCE_TX 0x149 178*5f62a964SEmmanuel Vadot >; 179*5f62a964SEmmanuel Vadot}; 180*5f62a964SEmmanuel Vadot 181*5f62a964SEmmanuel Vadot&uart1 { 182*5f62a964SEmmanuel Vadot /* 183*5f62a964SEmmanuel Vadot * Due to the use of CAN2 the signals for CAN2 Tx and Rx are routed to 184*5f62a964SEmmanuel Vadot * DHCOM UART1 RTS/CTS pins. Therefore this UART have to use DHCOM GPIOs 185*5f62a964SEmmanuel Vadot * for RTS/CTS. So configure DHCOM GPIO I as RTS and GPIO M as CTS. 186*5f62a964SEmmanuel Vadot */ 187*5f62a964SEmmanuel Vadot /delete-property/ uart-has-rtscts; 188*5f62a964SEmmanuel Vadot cts-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>; /* GPIO M */ 189*5f62a964SEmmanuel Vadot pinctrl-0 = <&pinctrl_uart1 &pinctrl_dhcom_i &pinctrl_dhcom_m>; 190*5f62a964SEmmanuel Vadot pinctrl-names = "default"; 191*5f62a964SEmmanuel Vadot rts-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */ 192*5f62a964SEmmanuel Vadot}; 193*5f62a964SEmmanuel Vadot 194*5f62a964SEmmanuel Vadot&uart3 { 195*5f62a964SEmmanuel Vadot /* 196*5f62a964SEmmanuel Vadot * On DRC02 this UART is used as RS485 interface and RS485_TX_En is 197*5f62a964SEmmanuel Vadot * controlled by DHCOM GPIO P. So remove RTS/CTS pins and the property 198*5f62a964SEmmanuel Vadot * uart-has-rtscts from this UART and add the DHCOM GPIO P pin via 199*5f62a964SEmmanuel Vadot * rts-gpios. The RS485_RX_En is controlled by DHCOM GPIO Q, see gpio1 200*5f62a964SEmmanuel Vadot * node above. 201*5f62a964SEmmanuel Vadot */ 202*5f62a964SEmmanuel Vadot /delete-property/ uart-has-rtscts; 203*5f62a964SEmmanuel Vadot linux,rs485-enabled-at-boot-time; 204*5f62a964SEmmanuel Vadot pinctrl-0 = <&pinctrl_uart3 &pinctrl_dhcom_p &pinctrl_dhcom_q>; 205*5f62a964SEmmanuel Vadot pinctrl-names = "default"; 206*5f62a964SEmmanuel Vadot rts-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; /* GPIO P */ 207*5f62a964SEmmanuel Vadot}; 208*5f62a964SEmmanuel Vadot 209*5f62a964SEmmanuel Vadot/* No WiFi/BT chipset on this SoM variant. */ 210*5f62a964SEmmanuel Vadot&uart2 { 211*5f62a964SEmmanuel Vadot bluetooth { 212*5f62a964SEmmanuel Vadot status = "disabled"; 213*5f62a964SEmmanuel Vadot }; 214*5f62a964SEmmanuel Vadot}; 215*5f62a964SEmmanuel Vadot 216*5f62a964SEmmanuel Vadot/* USB_OTG port is not routed out on DRC02. */ 217*5f62a964SEmmanuel Vadot&usb3_0 { 218*5f62a964SEmmanuel Vadot status = "disabled"; 219*5f62a964SEmmanuel Vadot}; 220*5f62a964SEmmanuel Vadot 221*5f62a964SEmmanuel Vadot&usb_dwc3_0 { 222*5f62a964SEmmanuel Vadot status = "disabled"; 223*5f62a964SEmmanuel Vadot}; 224*5f62a964SEmmanuel Vadot 225*5f62a964SEmmanuel Vadot/* USB_HOST port has USB Hub connected to it, PWR/OC pins are unused */ 226*5f62a964SEmmanuel Vadot&usb3_1 { 227*5f62a964SEmmanuel Vadot fsl,disable-port-power-control; 228*5f62a964SEmmanuel Vadot fsl,permanently-attached; 229*5f62a964SEmmanuel Vadot}; 230*5f62a964SEmmanuel Vadot 231*5f62a964SEmmanuel Vadot&usb_dwc3_1 { 232*5f62a964SEmmanuel Vadot dr_mode = "host"; 233*5f62a964SEmmanuel Vadot maximum-speed = "high-speed"; 234*5f62a964SEmmanuel Vadot}; 235*5f62a964SEmmanuel Vadot 236*5f62a964SEmmanuel Vadot/* No WiFi/BT chipset on this SoM variant. */ 237*5f62a964SEmmanuel Vadot&usdhc1 { 238*5f62a964SEmmanuel Vadot status = "disabled"; 239*5f62a964SEmmanuel Vadot}; 240*5f62a964SEmmanuel Vadot 241*5f62a964SEmmanuel Vadot&iomuxc { 242*5f62a964SEmmanuel Vadot /* 243*5f62a964SEmmanuel Vadot * GPIO I is connected to UART1_RTS 244*5f62a964SEmmanuel Vadot * GPIO M is connected to UART1_CTS 245*5f62a964SEmmanuel Vadot * GPIO P is connected to RS485_TX_En 246*5f62a964SEmmanuel Vadot * GPIO Q is connected to RS485_RX_En 247*5f62a964SEmmanuel Vadot */ 248*5f62a964SEmmanuel Vadot pinctrl-0 = <&pinctrl_hog_base 249*5f62a964SEmmanuel Vadot &pinctrl_dhcom_a &pinctrl_dhcom_b &pinctrl_dhcom_c 250*5f62a964SEmmanuel Vadot &pinctrl_dhcom_d &pinctrl_dhcom_e &pinctrl_dhcom_f 251*5f62a964SEmmanuel Vadot &pinctrl_dhcom_g &pinctrl_dhcom_h &pinctrl_dhcom_j 252*5f62a964SEmmanuel Vadot &pinctrl_dhcom_k &pinctrl_dhcom_l &pinctrl_dhcom_n 253*5f62a964SEmmanuel Vadot &pinctrl_dhcom_o &pinctrl_dhcom_r &pinctrl_dhcom_s 254*5f62a964SEmmanuel Vadot &pinctrl_dhcom_int>; 255*5f62a964SEmmanuel Vadot}; 256