1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Copyright (C) 2023 DH electronics GmbH 4*f126890aSEmmanuel Vadot * 5*f126890aSEmmanuel Vadot * DHCOM iMX6ULL variant: 6*f126890aSEmmanuel Vadot * DHCM-iMX6ULL-C080-R051-F0409-SPI-E2-CAN2-SD-RTC-ADC-I-01D2 7*f126890aSEmmanuel Vadot * DHCOR PCB number: 578-200 or newer 8*f126890aSEmmanuel Vadot * DHCOM PCB number: 579-200 or newer 9*f126890aSEmmanuel Vadot * DRC02 PCB number: 568-100 or newer (2nd ethernet by SoM) 10*f126890aSEmmanuel Vadot */ 11*f126890aSEmmanuel Vadot/dts-v1/; 12*f126890aSEmmanuel Vadot 13*f126890aSEmmanuel Vadot#include "imx6ull-dhcom-som.dtsi" 14*f126890aSEmmanuel Vadot#include "imx6ull-dhcom-som-cfg-sdcard.dtsi" 15*f126890aSEmmanuel Vadot 16*f126890aSEmmanuel Vadot/ { 17*f126890aSEmmanuel Vadot model = "DH electronics i.MX6ULL DHCOM on DRC02"; 18*f126890aSEmmanuel Vadot compatible = "dh,imx6ull-dhcom-drc02", "dh,imx6ull-dhcom-som", 19*f126890aSEmmanuel Vadot "dh,imx6ull-dhcor-som", "fsl,imx6ull"; 20*f126890aSEmmanuel Vadot}; 21*f126890aSEmmanuel Vadot 22*f126890aSEmmanuel Vadot/* 23*f126890aSEmmanuel Vadot * The signals for CAN2 TX and RX are routed to the DHCOM UART1 RTS/CTS pins. 24*f126890aSEmmanuel Vadot * Therefore the UART RTS/CTS must be output on other DHCOM pins, see uart1 25*f126890aSEmmanuel Vadot * node below. 26*f126890aSEmmanuel Vadot */ 27*f126890aSEmmanuel Vadot&can2 { 28*f126890aSEmmanuel Vadot status = "okay"; 29*f126890aSEmmanuel Vadot}; 30*f126890aSEmmanuel Vadot 31*f126890aSEmmanuel Vadot&gpio1 { 32*f126890aSEmmanuel Vadot gpio-line-names = 33*f126890aSEmmanuel Vadot "", "", "", "", 34*f126890aSEmmanuel Vadot "", "", "", "", 35*f126890aSEmmanuel Vadot "", "", "", "DRC02-In2", 36*f126890aSEmmanuel Vadot "", "", "", "", 37*f126890aSEmmanuel Vadot "", "", "DHCOM-I", "", 38*f126890aSEmmanuel Vadot "", "", "", "", 39*f126890aSEmmanuel Vadot "", "", "", "", 40*f126890aSEmmanuel Vadot "", "", "", ""; 41*f126890aSEmmanuel Vadot}; 42*f126890aSEmmanuel Vadot 43*f126890aSEmmanuel Vadot&gpio4 { 44*f126890aSEmmanuel Vadot gpio-line-names = 45*f126890aSEmmanuel Vadot "", "", "", "", 46*f126890aSEmmanuel Vadot "", "", "", "", 47*f126890aSEmmanuel Vadot "", "", "", "", 48*f126890aSEmmanuel Vadot "", "", "", "", 49*f126890aSEmmanuel Vadot "", "DRC02-HW0", "DRC02-HW1", "DHCOM-M", 50*f126890aSEmmanuel Vadot "DRC02-HW2", "DHCOM-U", "DHCOM-T", "DHCOM-S", 51*f126890aSEmmanuel Vadot "DHCOM-R", "DHCOM-Q", "DHCOM-P", "DHCOM-O", 52*f126890aSEmmanuel Vadot "DHCOM-N", "", "", ""; 53*f126890aSEmmanuel Vadot /* 54*f126890aSEmmanuel Vadot * NOTE: On DRC02, the RS485_RX_En is controlled by a separate 55*f126890aSEmmanuel Vadot * GPIO line, however the i.MX6ULL UART driver assumes RX happens 56*f126890aSEmmanuel Vadot * during TX anyway and that it only controls drive enable DE 57*f126890aSEmmanuel Vadot * line. Hence, the RX is always enabled here. 58*f126890aSEmmanuel Vadot */ 59*f126890aSEmmanuel Vadot rs485-rx-en-hog { 60*f126890aSEmmanuel Vadot gpio-hog; 61*f126890aSEmmanuel Vadot gpios = <25 0>; /* GPIO Q */ 62*f126890aSEmmanuel Vadot line-name = "rs485-rx-en"; 63*f126890aSEmmanuel Vadot output-low; 64*f126890aSEmmanuel Vadot }; 65*f126890aSEmmanuel Vadot}; 66*f126890aSEmmanuel Vadot 67*f126890aSEmmanuel Vadot&gpio5 { 68*f126890aSEmmanuel Vadot gpio-line-names = 69*f126890aSEmmanuel Vadot "DHCOM-A", "DHCOM-B", "DHCOM-C", "DRC02-Out2", 70*f126890aSEmmanuel Vadot "DHCOM-E", "", "", "DRC02-Out1", 71*f126890aSEmmanuel Vadot "DRC02-In1", "DHCOM-H", "", "", 72*f126890aSEmmanuel Vadot "", "", "", "", 73*f126890aSEmmanuel Vadot "", "", "", "", 74*f126890aSEmmanuel Vadot "", "", "", "", 75*f126890aSEmmanuel Vadot "", "", "", "", 76*f126890aSEmmanuel Vadot "", "", "", ""; 77*f126890aSEmmanuel Vadot}; 78*f126890aSEmmanuel Vadot 79*f126890aSEmmanuel Vadot/* DHCOM I2C2 */ 80*f126890aSEmmanuel Vadot&i2c1 { 81*f126890aSEmmanuel Vadot eeprom@56 { 82*f126890aSEmmanuel Vadot compatible = "atmel,24c04"; 83*f126890aSEmmanuel Vadot reg = <0x56>; 84*f126890aSEmmanuel Vadot pagesize = <16>; 85*f126890aSEmmanuel Vadot }; 86*f126890aSEmmanuel Vadot}; 87*f126890aSEmmanuel Vadot 88*f126890aSEmmanuel Vadot&uart1 { 89*f126890aSEmmanuel Vadot /delete-property/ uart-has-rtscts; 90*f126890aSEmmanuel Vadot rts-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; /* GPIO I */ 91*f126890aSEmmanuel Vadot cts-gpios = <&gpio4 19 GPIO_ACTIVE_HIGH>; /* GPIO M */ 92*f126890aSEmmanuel Vadot}; 93*f126890aSEmmanuel Vadot 94*f126890aSEmmanuel Vadot/* Use UART as RS485 */ 95*f126890aSEmmanuel Vadot&uart2 { 96*f126890aSEmmanuel Vadot /delete-property/ uart-has-rtscts; 97*f126890aSEmmanuel Vadot linux,rs485-enabled-at-boot-time; 98*f126890aSEmmanuel Vadot rts-gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* GPIO P */ 99*f126890aSEmmanuel Vadot}; 100