aboutsummaryrefslogtreecommitdiff
path: root/dts/upstream/src/arm64/freescale/imx8mp-dhcom-pdk2.dts
blob: 3b1c940860e02bc09d84c565da25fdc2b5da273b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2022 Marek Vasut <marex@denx.de>
 *
 * DHCOM iMX8MP variant:
 * DHCM-iMX8ML8-C160-R409-F1638-SPI16-GE-CAN2-SD-RTC-WBTA-ADC-T-RGB-CSI2-HS-I-01D2
 * DHCOM PCB number: 660-100 or newer
 * PDK2 PCB number: 516-400 or newer
 */

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include <dt-bindings/phy/phy-imx8-pcie.h>
#include "imx8mp-dhcom-som.dtsi"

/ {
	model = "DH electronics i.MX8M Plus DHCOM Premium Developer Kit (2)";
	compatible = "dh,imx8mp-dhcom-pdk2", "dh,imx8mp-dhcom-som",
		     "fsl,imx8mp";

	chosen {
		stdout-path = &uart1;
	};

	clk_ext_audio_codec: clock-codec {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <24000000>;
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-0 {
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */
			label = "TA1-GPIO-A";
			linux,code = <KEY_A>;
			pinctrl-0 = <&pinctrl_dhcom_a>;
			pinctrl-names = "default";
			wakeup-source;
		};

		button-1 {
			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */
			label = "TA2-GPIO-B";
			linux,code = <KEY_B>;
			pinctrl-0 = <&pinctrl_dhcom_b>;
			pinctrl-names = "default";
			wakeup-source;
		};

		button-2 {
			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */
			label = "TA3-GPIO-C";
			linux,code = <KEY_C>;
			pinctrl-0 = <&pinctrl_dhcom_c>;
			pinctrl-names = "default";
			wakeup-source;
		};

		button-3 {
			gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */
			label = "TA4-GPIO-D";
			linux,code = <KEY_D>;
			pinctrl-0 = <&pinctrl_dhcom_d>;
			pinctrl-names = "default";
			wakeup-source;
		};
	};

	led {
		compatible = "gpio-leds";

		led-0 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */
			pinctrl-0 = <&pinctrl_dhcom_e>;
			pinctrl-names = "default";
		};

		led-1 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */
			pinctrl-0 = <&pinctrl_dhcom_f>;
			pinctrl-names = "default";
		};

		led-2 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */
			pinctrl-0 = <&pinctrl_dhcom_h>;
			pinctrl-names = "default";
		};

		led-3 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */
			pinctrl-0 = <&pinctrl_dhcom_i>;
			pinctrl-names = "default";
		};
	};

	reg_3p3vdd: regulator-3p3vdd {	/* 3.3VDD */
		compatible = "regulator-fixed";
		regulator-always-on;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-name = "3P3VDD";
	};

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "SGTL5000-Card";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&codec_dai>;
		simple-audio-card,frame-master = <&codec_dai>;
		simple-audio-card,widgets = "Headphone", "Headphone Jack";
		simple-audio-card,routing = "Headphone Jack", "HP_OUT";

		cpu_dai: simple-audio-card,cpu {
			sound-dai = <&sai3>;
		};

		codec_dai: simple-audio-card,codec {
			sound-dai = <&sgtl5000>;
		};
	};
};

&i2c5 {
	sgtl5000: codec@a {
		compatible = "fsl,sgtl5000";
		reg = <0x0a>;
		#sound-dai-cells = <0>;
		clocks = <&clk_ext_audio_codec>;
		VDDA-supply = <&reg_3p3vdd>;
		VDDIO-supply = <&reg_vdd_3p3v_awo>;
	};
};

&fec {	/* Second ethernet */
	pinctrl-0 = <&pinctrl_fec_rgmii>;
	phy-handle = <&ethphypdk>;
	phy-mode = "rgmii";

	mdio {
		ethphypdk: ethernet-phy@7 { /* KSZ 9021 */
			compatible = "ethernet-phy-ieee802.3-c22";
			pinctrl-0 = <&pinctrl_ethphy1>;
			pinctrl-names = "default";
			interrupt-parent = <&gpio4>;
			interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
			max-speed = <100>;
			reg = <7>;
			reset-assert-us = <1000>;
			reset-deassert-us = <1000>;
			reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
			rxc-skew-ps = <3000>;
			rxd0-skew-ps = <0>;
			rxd1-skew-ps = <0>;
			rxd2-skew-ps = <0>;
			rxd3-skew-ps = <0>;
			rxdv-skew-ps = <0>;
			txc-skew-ps = <3000>;
			txd0-skew-ps = <0>;
			txd1-skew-ps = <0>;
			txd2-skew-ps = <0>;
			txd3-skew-ps = <0>;
			txen-skew-ps = <0>;
		};
	};
};

&flexcan1 {
	status = "okay";
};

&pcie_phy {
	clock-names = "ref";
	clocks = <&hsio_blk_ctrl>;
	fsl,clkreq-unsupported;
	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>;
	status = "okay";
};

&pcie {
	fsl,max-link-speed = <1>;
	reset-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>;	/* GPIO J */
	status = "okay";
};

&sai3 {
	#sound-dai-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sai3>;
	assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
	assigned-clock-rates = <12288000>;
	fsl,sai-mclk-direction-output;
	status = "okay";
};

&usb3_1 {
	fsl,over-current-active-low;
};

&iomuxc {
	/*
	 * GPIO_A,B,C,D are connected to buttons.
	 * GPIO_E,F,H,I are connected to LEDs.
	 * GPIO_M is connected to CLKOUT1.
	 */
	pinctrl-0 = <&pinctrl_hog_base
		     &pinctrl_dhcom_g &pinctrl_dhcom_j
		     &pinctrl_dhcom_k &pinctrl_dhcom_l
		     &pinctrl_dhcom_int>;
};