aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/imx6ull-dhcom-pdk2.dts
blob: b29713831a74489e8cc0e651c18a40d85f9f9113 (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
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
/*
 * Copyright (C) 2023 DH electronics GmbH
 *
 * DHCOM iMX6ULL variant:
 * DHCM-iMX6ULL-C080-R051-F0409-SPI-E2-CAN2-RTC-WBT-ADC-I-01D2
 * DHCOR PCB number: 578-200 or newer
 * DHCOM PCB number: 579-200 or newer
 * PDK2 PCB number: 516-400 or newer
 */
/dts-v1/;

#include "imx6ull-dhcom-som.dtsi"

/ {
	model = "DH electronics i.MX6ULL DHCOM on Premium Developer Kit (2)";
	compatible = "dh,imx6ull-dhcom-pdk2", "dh,imx6ull-dhcom-som",
		     "dh,imx6ull-dhcor-som", "fsl,imx6ull";

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

	display_bl: display-bl {
		compatible = "pwm-backlight";
		brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>;
		default-brightness-level = <8>;
		enable-gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>; /* GPIO G */
		power-supply = <&reg_panel_3v3>;
		pwms = <&pwm1 0 50000 PWM_POLARITY_INVERTED>;
	};

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

		button-0 {
			gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; /* GPIO A */
			label = "TA1-GPIO-A";
			linux,code = <KEY_A>;
			wakeup-source;
		};

		button-1 {
			gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; /* GPIO B */
			label = "TA2-GPIO-B";
			linux,code = <KEY_B>;
			wakeup-source;
		};

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

		button-3 {
			gpios = <&gpio5 3 GPIO_ACTIVE_LOW>; /* GPIO D */
			label = "TA4-GPIO-D";
			linux,code = <KEY_D>;
			wakeup-source;
		};
	};

	led: led {
		compatible = "gpio-leds";

		/*
		 * Disable PDK2 LED5, because GPIO E is
		 * already used as touch interrupt.
		 */
		led-0 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			function-enumerator = <5>; /* PDK2 LED5 */
			gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; /* GPIO E */
			status = "disabled";
		};

		led-1 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			function-enumerator = <6>; /* PDK2 LED6 */
			gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>; /* GPIO F */
		};

		/*
		 * Disable PDK2 LED7, because GPIO H is
		 * already used for WiFi pin WL_REG_ON.
		 */
		led-2 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			function-enumerator = <7>; /* PDK2 LED7 */
			gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>; /* GPIO H */
			status = "disabled";
		};

		/*
		 * Disable PDK2 LED8, because GPIO I is
		 * already used for BT pin BT_REG_ON.
		 */
		led-3 {
			color = <LED_COLOR_ID_GREEN>;
			default-state = "off";
			function = LED_FUNCTION_INDICATOR;
			function-enumerator = <8>; /* PDK2 LED8 */
			gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; /* GPIO I */
			status = "disabled";
		};
	};

	panel {
		compatible = "edt,etm0700g0edh6";
		backlight = <&display_bl>;
		power-supply = <&reg_panel_3v3>;

		port {
			lcd_panel_in: endpoint {
				remote-endpoint = <&lcd_display_out>;
			};
		};
	};

	/* Filtered supply voltage */
	reg_pdk2_24v: regulator-pdk2-24v {
		compatible = "regulator-fixed";
		regulator-always-on;
		regulator-max-microvolt = <24000000>;
		regulator-min-microvolt = <24000000>;
		regulator-name = "24V_PDK2";
	};

	/* PDK2 U35 */
	reg_pdk2_3v3: regulator-pdk2-3v3 {
		compatible = "regulator-fixed";
		regulator-always-on;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-name = "3V3_PDK2";
		vin-supply = <&reg_pdk2_24v>;
	};

	/* 560-200 U1 */
	reg_panel_3v3: regulator-panel-3v3 {
		compatible = "regulator-fixed";
		regulator-always-on;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-name = "3V3_PANEL";
		vin-supply = <&reg_pdk2_24v>;
	};

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,bitclock-master = <&dailink_master>;
		simple-audio-card,format = "i2s";
		simple-audio-card,frame-master = <&dailink_master>;
		simple-audio-card,name = "sgtl5000";
		simple-audio-card,routing =
			"MIC_IN", "Mic Jack",
			"Mic Jack", "Mic Bias",
			"LINE_IN", "Line In Jack",
			"Headphone Jack", "HP_OUT";
		simple-audio-card,widgets =
			"Microphone", "Mic Jack",
			"Line", "Line In Jack",
			"Headphone", "Headphone Jack";

		simple-audio-card,cpu {
			sound-dai = <&sai2>;
		};

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

/* DHCOM I2C1 */
&i2c2 {
	sgtl5000: audio-codec@a {
		compatible = "fsl,sgtl5000";
		reg = <0x0a>;
		#sound-dai-cells = <0>;
		clocks = <&clk_ext_audio_codec>;
		VDDA-supply = <&reg_pdk2_3v3>;
		VDDIO-supply = <&reg_pdk2_3v3>;
	};

	touchscreen@38 {
		compatible = "edt,edt-ft5406";
		reg = <0x38>;
		interrupt-parent = <&gpio5>;
		interrupts = <4 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
		power-supply = <&reg_panel_3v3>;
	};
};

&lcdif {
	status = "okay";

	port {
		lcd_display_out: endpoint {
			remote-endpoint = <&lcd_panel_in>;
		};
	};
};

&pwm1 {
	status = "okay";
};

&sai2 {
	status = "okay";
};