blob: 8f4eff37c4039fdba6189c16c59a89a7d4fa61cb [file] [log] [blame]
Marek Vasut4d573d52022-05-21 16:56:26 +02001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2022 Marek Vasut <marex@denx.de>
Marek Vasutd1aebfa2022-08-12 22:41:50 +02004 *
5 * DHCOM iMX8MP variant:
6 * DHCM-iMX8ML8-C160-R409-F1638-SPI16-GE-CAN2-SD-RTC-WBTA-ADC-T-RGB-CSI2-HS-I-01D2
7 * DHCOM PCB number: 660-100 or newer
8 * PDK2 PCB number: 516-400 or newer
Marek Vasut4d573d52022-05-21 16:56:26 +02009 */
10
11/dts-v1/;
12
13#include <dt-bindings/leds/common.h>
Marek Vasut4d573d52022-05-21 16:56:26 +020014#include <dt-bindings/phy/phy-imx8-pcie.h>
15#include "imx8mp-dhcom-som.dtsi"
16
17/ {
18 model = "DH electronics i.MX8M Plus DHCOM Premium Developer Kit (2)";
Marek Vasuta5f29e72022-08-12 22:41:52 +020019 compatible = "dh,imx8mp-dhcom-pdk2", "dh,imx8mp-dhcom-som",
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +010020 "fsl,imx8mp";
Marek Vasut4d573d52022-05-21 16:56:26 +020021
22 chosen {
23 stdout-path = &uart1;
24 };
25
26 gpio-keys {
Marek Vasut4d573d52022-05-21 16:56:26 +020027 compatible = "gpio-keys";
28
29 button-0 {
30 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */
31 label = "TA1-GPIO-A";
32 linux,code = <KEY_A>;
33 pinctrl-0 = <&pinctrl_dhcom_a>;
34 pinctrl-names = "default";
35 wakeup-source;
36 };
37
38 button-1 {
39 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */
40 label = "TA2-GPIO-B";
41 linux,code = <KEY_B>;
42 pinctrl-0 = <&pinctrl_dhcom_b>;
43 pinctrl-names = "default";
44 wakeup-source;
45 };
46
47 button-2 {
48 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */
49 label = "TA3-GPIO-C";
50 linux,code = <KEY_C>;
51 pinctrl-0 = <&pinctrl_dhcom_c>;
52 pinctrl-names = "default";
53 wakeup-source;
54 };
55
56 button-3 {
57 gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */
58 label = "TA4-GPIO-D";
59 linux,code = <KEY_D>;
60 pinctrl-0 = <&pinctrl_dhcom_d>;
61 pinctrl-names = "default";
62 wakeup-source;
63 };
64 };
65
66 led {
67 compatible = "gpio-leds";
68
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +010069 led-0 {
Marek Vasut4d573d52022-05-21 16:56:26 +020070 color = <LED_COLOR_ID_GREEN>;
71 default-state = "off";
72 function = LED_FUNCTION_INDICATOR;
73 gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */
74 pinctrl-0 = <&pinctrl_dhcom_e>;
75 pinctrl-names = "default";
76 };
77
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +010078 led-1 {
Marek Vasut4d573d52022-05-21 16:56:26 +020079 color = <LED_COLOR_ID_GREEN>;
80 default-state = "off";
81 function = LED_FUNCTION_INDICATOR;
82 gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */
83 pinctrl-0 = <&pinctrl_dhcom_f>;
84 pinctrl-names = "default";
85 };
86
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +010087 led-2 {
Marek Vasut4d573d52022-05-21 16:56:26 +020088 color = <LED_COLOR_ID_GREEN>;
89 default-state = "off";
90 function = LED_FUNCTION_INDICATOR;
91 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */
92 pinctrl-0 = <&pinctrl_dhcom_h>;
93 pinctrl-names = "default";
94 };
95
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +010096 led-3 {
Marek Vasut4d573d52022-05-21 16:56:26 +020097 color = <LED_COLOR_ID_GREEN>;
98 default-state = "off";
99 function = LED_FUNCTION_INDICATOR;
100 gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */
101 pinctrl-0 = <&pinctrl_dhcom_i>;
102 pinctrl-names = "default";
103 };
104 };
105};
106
Marek Vasut4d573d52022-05-21 16:56:26 +0200107&fec { /* Second ethernet */
Marek Vasut40071032023-02-11 23:38:00 +0100108 pinctrl-0 = <&pinctrl_fec_rgmii>;
Marek Vasut4d573d52022-05-21 16:56:26 +0200109 phy-handle = <&ethphypdk>;
Marek Vasut40071032023-02-11 23:38:00 +0100110 phy-mode = "rgmii";
Marek Vasut4d573d52022-05-21 16:56:26 +0200111
112 mdio {
113 ethphypdk: ethernet-phy@7 { /* KSZ 9021 */
114 compatible = "ethernet-phy-ieee802.3-c22";
Marek Vasut4d573d52022-05-21 16:56:26 +0200115 pinctrl-0 = <&pinctrl_ethphy1>;
116 pinctrl-names = "default";
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +0100117 interrupt-parent = <&gpio4>;
118 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
119 max-speed = <100>;
Marek Vasut4d573d52022-05-21 16:56:26 +0200120 reg = <7>;
121 reset-assert-us = <1000>;
122 reset-deassert-us = <1000>;
123 reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
124 rxc-skew-ps = <3000>;
125 rxd0-skew-ps = <0>;
126 rxd1-skew-ps = <0>;
127 rxd2-skew-ps = <0>;
128 rxd3-skew-ps = <0>;
129 rxdv-skew-ps = <0>;
130 txc-skew-ps = <3000>;
131 txd0-skew-ps = <0>;
132 txd1-skew-ps = <0>;
133 txd2-skew-ps = <0>;
134 txd3-skew-ps = <0>;
135 txen-skew-ps = <0>;
Marek Vasut4d573d52022-05-21 16:56:26 +0200136 };
137 };
138};
139
140&flexcan1 {
141 status = "okay";
142};
143
144&usb3_1 {
145 fsl,over-current-active-low;
146};
Marcel Ziswiler0b42fdc2022-11-07 22:22:39 +0100147
148&iomuxc {
149 /*
150 * GPIO_A,B,C,D are connected to buttons.
151 * GPIO_E,F,H,I are connected to LEDs.
152 * GPIO_M is connected to CLKOUT2.
153 */
154 pinctrl-0 = <&pinctrl_hog_base
155 &pinctrl_dhcom_g &pinctrl_dhcom_j
156 &pinctrl_dhcom_k &pinctrl_dhcom_l
157 &pinctrl_dhcom_int>;
158};