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