xref: /linux/arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dts (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2022 Marek Vasut <marex@denx.de>
4 *
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
9 */
10
11/dts-v1/;
12
13#include <dt-bindings/leds/common.h>
14#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)";
19	compatible = "dh,imx8mp-dhcom-pdk2", "dh,imx8mp-dhcom-som",
20		     "fsl,imx8mp";
21
22	chosen {
23		stdout-path = &uart1;
24	};
25
26	clk_ext_audio_codec: clock-codec {
27		compatible = "fixed-clock";
28		#clock-cells = <0>;
29		clock-frequency = <24000000>;
30	};
31
32	gpio-keys {
33		compatible = "gpio-keys";
34
35		button-0 {
36			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */
37			label = "TA1-GPIO-A";
38			linux,code = <KEY_A>;
39			pinctrl-0 = <&pinctrl_dhcom_a>;
40			pinctrl-names = "default";
41			wakeup-source;
42		};
43
44		button-1 {
45			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */
46			label = "TA2-GPIO-B";
47			linux,code = <KEY_B>;
48			pinctrl-0 = <&pinctrl_dhcom_b>;
49			pinctrl-names = "default";
50			wakeup-source;
51		};
52
53		button-2 {
54			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */
55			label = "TA3-GPIO-C";
56			linux,code = <KEY_C>;
57			pinctrl-0 = <&pinctrl_dhcom_c>;
58			pinctrl-names = "default";
59			wakeup-source;
60		};
61
62		button-3 {
63			gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */
64			label = "TA4-GPIO-D";
65			linux,code = <KEY_D>;
66			pinctrl-0 = <&pinctrl_dhcom_d>;
67			pinctrl-names = "default";
68			wakeup-source;
69		};
70	};
71
72	hdmi-connector {
73		compatible = "hdmi-connector";
74		label = "X38";
75		type = "a";
76
77		port {
78			hdmi_connector_in: endpoint {
79				remote-endpoint = <&hdmi_tx_out>;
80			};
81		};
82	};
83
84	led {
85		compatible = "gpio-leds";
86
87		led-0 {
88			color = <LED_COLOR_ID_GREEN>;
89			default-state = "off";
90			function = LED_FUNCTION_INDICATOR;
91			gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */
92			pinctrl-0 = <&pinctrl_dhcom_e>;
93			pinctrl-names = "default";
94		};
95
96		led-1 {
97			color = <LED_COLOR_ID_GREEN>;
98			default-state = "off";
99			function = LED_FUNCTION_INDICATOR;
100			gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */
101			pinctrl-0 = <&pinctrl_dhcom_f>;
102			pinctrl-names = "default";
103		};
104
105		led-2 {
106			color = <LED_COLOR_ID_GREEN>;
107			default-state = "off";
108			function = LED_FUNCTION_INDICATOR;
109			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */
110			pinctrl-0 = <&pinctrl_dhcom_h>;
111			pinctrl-names = "default";
112		};
113
114		led-3 {
115			color = <LED_COLOR_ID_GREEN>;
116			default-state = "off";
117			function = LED_FUNCTION_INDICATOR;
118			gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */
119			pinctrl-0 = <&pinctrl_dhcom_i>;
120			pinctrl-names = "default";
121		};
122	};
123
124	reg_3p3vdd: regulator-3p3vdd {	/* 3.3VDD */
125		compatible = "regulator-fixed";
126		regulator-always-on;
127		regulator-min-microvolt = <3300000>;
128		regulator-max-microvolt = <3300000>;
129		regulator-name = "3P3VDD";
130	};
131
132	sound {
133		compatible = "simple-audio-card";
134		simple-audio-card,name = "SGTL5000-Card";
135		simple-audio-card,format = "i2s";
136		simple-audio-card,bitclock-master = <&codec_dai>;
137		simple-audio-card,frame-master = <&codec_dai>;
138		simple-audio-card,widgets = "Headphone", "Headphone Jack";
139		simple-audio-card,routing = "Headphone Jack", "HP_OUT";
140
141		cpu_dai: simple-audio-card,cpu {
142			sound-dai = <&sai3>;
143		};
144
145		codec_dai: simple-audio-card,codec {
146			sound-dai = <&sgtl5000>;
147		};
148	};
149};
150
151&i2c5 {
152	sgtl5000: codec@a {
153		compatible = "fsl,sgtl5000";
154		reg = <0x0a>;
155		#sound-dai-cells = <0>;
156		clocks = <&clk_ext_audio_codec>;
157		VDDA-supply = <&reg_3p3vdd>;
158		VDDIO-supply = <&reg_vdd_3p3v_awo>;
159	};
160};
161
162&fec {	/* Second ethernet */
163	pinctrl-0 = <&pinctrl_fec_rgmii>;
164	phy-handle = <&ethphypdk>;
165	phy-mode = "rgmii";
166
167	mdio {
168		ethphypdk: ethernet-phy@7 { /* KSZ 9021 */
169			compatible = "ethernet-phy-ieee802.3-c22";
170			pinctrl-0 = <&pinctrl_ethphy1>;
171			pinctrl-names = "default";
172			interrupt-parent = <&gpio4>;
173			interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
174			max-speed = <100>;
175			reg = <7>;
176			reset-assert-us = <1000>;
177			reset-deassert-us = <1000>;
178			reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
179			rxc-skew-ps = <3000>;
180			rxd0-skew-ps = <0>;
181			rxd1-skew-ps = <0>;
182			rxd2-skew-ps = <0>;
183			rxd3-skew-ps = <0>;
184			rxdv-skew-ps = <0>;
185			txc-skew-ps = <3000>;
186			txd0-skew-ps = <0>;
187			txd1-skew-ps = <0>;
188			txd2-skew-ps = <0>;
189			txd3-skew-ps = <0>;
190			txen-skew-ps = <0>;
191		};
192	};
193};
194
195&flexcan1 {
196	status = "okay";
197};
198
199&hdmi_pvi {
200	status = "okay";
201};
202
203&hdmi_tx {
204	ddc-i2c-bus = <&i2c5>;
205	pinctrl-names = "default";
206	pinctrl-0 = <&pinctrl_hdmi>;
207	status = "okay";
208
209	ports {
210		port@1 {
211			hdmi_tx_out: endpoint {
212				remote-endpoint = <&hdmi_connector_in>;
213			};
214		};
215	};
216};
217
218&hdmi_tx_phy {
219	status = "okay";
220};
221
222&lcdif3 {
223	status = "okay";
224};
225
226&pcie_phy {
227	clock-names = "ref";
228	clocks = <&hsio_blk_ctrl>;
229	fsl,clkreq-unsupported;
230	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>;
231	status = "okay";
232};
233
234&pcie {
235	fsl,max-link-speed = <1>;
236	reset-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>;	/* GPIO J */
237	status = "okay";
238};
239
240&sai3 {
241	#sound-dai-cells = <0>;
242	pinctrl-names = "default";
243	pinctrl-0 = <&pinctrl_sai3>;
244	assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
245	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
246	assigned-clock-rates = <12288000>;
247	fsl,sai-mclk-direction-output;
248	status = "okay";
249};
250
251&usb3_1 {
252	fsl,over-current-active-low;
253};
254
255&iomuxc {
256	/*
257	 * GPIO_A,B,C,D are connected to buttons.
258	 * GPIO_E,F,H,I are connected to LEDs.
259	 * GPIO_M is connected to CLKOUT1.
260	 */
261	pinctrl-0 = <&pinctrl_hog_base
262		     &pinctrl_dhcom_g &pinctrl_dhcom_j
263		     &pinctrl_dhcom_k &pinctrl_dhcom_l
264		     &pinctrl_dhcom_int>;
265};
266