blob: d7c2b30aecfd1f572504bb7e48e69a8e2e1efc33 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2015-2021 DH electronics GmbH
4 * Copyright (C) 2018 Marek Vasut <marex@denx.de>
5 */
6
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/leds/common.h>
10#include <dt-bindings/pwm/pwm.h>
11
12/ {
13 chosen {
14 stdout-path = "serial0:115200n8";
15 };
16
17 clk_ext_audio_codec: clock-codec {
18 #clock-cells = <0>;
19 clock-frequency = <24000000>;
20 compatible = "fixed-clock";
21 };
22
23 display_bl: display-bl {
24 brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>;
25 compatible = "pwm-backlight";
26 default-brightness-level = <8>;
27 enable-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>; /* GPIO G */
28 pwms = <&pwm1 0 50000 PWM_POLARITY_INVERTED>;
29 status = "okay";
30 };
31
32 lcd_display: disp0 {
33 #address-cells = <1>;
34 #size-cells = <0>;
35 compatible = "fsl,imx-parallel-display";
36 interface-pix-fmt = "rgb24";
37 pinctrl-0 = <&pinctrl_ipu1_lcdif &pinctrl_dhcom_g>;
38 pinctrl-names = "default";
39 status = "okay";
40
41 port@0 {
42 reg = <0>;
43
44 lcd_display_in: endpoint {
45 remote-endpoint = <&ipu1_di0_disp0>;
46 };
47 };
48
49 port@1 {
50 reg = <1>;
51
52 lcd_display_out: endpoint {
53 remote-endpoint = <&lcd_panel_in>;
54 };
55 };
56 };
57
58 gpio-keys {
Tom Rini53633a82024-02-29 12:33:36 -050059 compatible = "gpio-keys";
60
61 button-0 {
62 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; /* GPIO A */
63 label = "TA1-GPIO-A";
64 linux,code = <KEY_A>;
65 pinctrl-0 = <&pinctrl_dhcom_a>;
66 pinctrl-names = "default";
67 wakeup-source;
68 };
69
70 button-1 {
71 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* GPIO B */
72 label = "TA2-GPIO-B";
73 linux,code = <KEY_B>;
74 pinctrl-0 = <&pinctrl_dhcom_b>;
75 pinctrl-names = "default";
76 wakeup-source;
77 };
78
79 button-2 {
80 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; /* GPIO C */
81 label = "TA3-GPIO-C";
82 linux,code = <KEY_C>;
83 pinctrl-0 = <&pinctrl_dhcom_c>;
84 pinctrl-names = "default";
85 wakeup-source;
86 };
87
88 button-3 {
89 gpios = <&gpio6 3 GPIO_ACTIVE_LOW>; /* GPIO D */
90 label = "TA4-GPIO-D";
91 linux,code = <KEY_D>;
92 pinctrl-0 = <&pinctrl_dhcom_d>;
93 pinctrl-names = "default";
94 wakeup-source;
95 };
96 };
97
98 led {
99 compatible = "gpio-leds";
100
101 /*
102 * Disable led-5, because GPIO E is
103 * already used as touch interrupt.
104 */
105 led-5 {
106 color = <LED_COLOR_ID_GREEN>;
107 default-state = "off";
108 function = LED_FUNCTION_INDICATOR;
109 gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* GPIO E */
110 pinctrl-0 = <&pinctrl_dhcom_e>;
111 pinctrl-names = "default";
112 status = "disabled";
113 };
114
115 led-6 {
116 color = <LED_COLOR_ID_GREEN>;
117 default-state = "off";
118 function = LED_FUNCTION_INDICATOR;
119 gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>; /* GPIO F */
120 pinctrl-0 = <&pinctrl_dhcom_f>;
121 pinctrl-names = "default";
122 };
123
124 led-7 {
125 color = <LED_COLOR_ID_GREEN>;
126 default-state = "off";
127 function = LED_FUNCTION_INDICATOR;
128 gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>; /* GPIO H */
129 pinctrl-0 = <&pinctrl_dhcom_h>;
130 pinctrl-names = "default";
131 };
132
133 led-8 {
134 color = <LED_COLOR_ID_GREEN>;
135 default-state = "off";
136 function = LED_FUNCTION_INDICATOR;
137 gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO I */
138 pinctrl-0 = <&pinctrl_dhcom_i>;
139 pinctrl-names = "default";
140 };
141 };
142
143 panel {
144 backlight = <&display_bl>;
145 compatible = "edt,etm0700g0edh6";
Tom Rini844493d2025-01-26 16:17:47 -0600146 power-supply = <&reg_panel_3v3>;
Tom Rini53633a82024-02-29 12:33:36 -0500147
148 port {
149 lcd_panel_in: endpoint {
150 remote-endpoint = <&lcd_display_out>;
151 };
152 };
153 };
154
Tom Rini844493d2025-01-26 16:17:47 -0600155 /* Filtered supply voltage */
156 reg_pdk2_24v: regulator-pdk2-24v {
157 compatible = "regulator-fixed";
158 regulator-always-on;
159 regulator-max-microvolt = <24000000>;
160 regulator-min-microvolt = <24000000>;
161 regulator-name = "24V_PDK2";
162 };
163
164 /* 560-200 U1 */
165 reg_panel_3v3: regulator-panel-3v3 {
166 compatible = "regulator-fixed";
167 regulator-always-on;
168 regulator-min-microvolt = <3300000>;
169 regulator-max-microvolt = <3300000>;
170 regulator-name = "3V3_PANEL";
171 vin-supply = <&reg_pdk2_24v>;
172 };
173
Tom Rini53633a82024-02-29 12:33:36 -0500174 sound {
175 audio-codec = <&sgtl5000>;
176 audio-routing =
177 "MIC_IN", "Mic Jack",
178 "Mic Jack", "Mic Bias",
179 "LINE_IN", "Line In Jack",
180 "Headphone Jack", "HP_OUT";
181 compatible = "fsl,imx-audio-sgtl5000";
182 model = "imx-sgtl5000";
183 mux-ext-port = <3>;
184 mux-int-port = <1>;
185 ssi-controller = <&ssi1>;
186 };
187};
188
189&audmux {
190 pinctrl-0 = <&pinctrl_audmux_ext>;
191 pinctrl-names = "default";
192 status = "okay";
193};
194
195&can1 {
196 status = "okay";
197};
198
199&can2 {
200 status = "disabled";
201};
202
203/* 1G ethernet */
204/delete-node/ &ethphy0;
205&fec {
206 phy-mode = "rgmii";
207 phy-handle = <&ethphy7>;
208 pinctrl-0 = <&pinctrl_enet_1G>;
209 pinctrl-names = "default";
210 status = "okay";
211
212 mdio {
213 #address-cells = <1>;
214 #size-cells = <0>;
215
216 ethphy7: ethernet-phy@7 { /* KSZ 9021 */
217 compatible = "ethernet-phy-ieee802.3-c22";
218 interrupt-parent = <&gpio1>;
219 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
220 pinctrl-0 = <&pinctrl_ethphy7>;
221 pinctrl-names = "default";
222 reg = <7>;
223 reset-assert-us = <1000>;
224 reset-deassert-us = <1000>;
225 reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
226 rxc-skew-ps = <3000>;
227 rxd0-skew-ps = <0>;
228 rxd1-skew-ps = <0>;
229 rxd2-skew-ps = <0>;
230 rxd3-skew-ps = <0>;
231 rxdv-skew-ps = <0>;
232 txc-skew-ps = <3000>;
233 txd0-skew-ps = <0>;
234 txd1-skew-ps = <0>;
235 txd2-skew-ps = <0>;
236 txd3-skew-ps = <0>;
237 txen-skew-ps = <0>;
238 };
239 };
240};
241
242&hdmi {
243 ddc-i2c-bus = <&i2c2>;
244 status = "okay";
245};
246
247&i2c2 {
248 sgtl5000: codec@a {
249 #sound-dai-cells = <0>;
250 clocks = <&clk_ext_audio_codec>;
251 compatible = "fsl,sgtl5000";
252 reg = <0x0a>;
253 VDDA-supply = <&reg_3p3v>;
254 VDDIO-supply = <&sw2_reg>;
255 };
256
257 touchscreen@38 {
258 compatible = "edt,edt-ft5406";
259 interrupt-parent = <&gpio4>;
260 interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
261 pinctrl-0 = <&pinctrl_dhcom_e>;
262 pinctrl-names = "default";
263 reg = <0x38>;
264 };
265};
266
267&ipu1_di0_disp0 {
268 remote-endpoint = <&lcd_display_in>;
269};
270
271&pcie {
272 pinctrl-0 = <&pinctrl_pcie &pinctrl_dhcom_j>;
273 reset-gpio = <&gpio6 14 GPIO_ACTIVE_LOW>; /* GPIO J */
274 status = "okay";
275};
276
277&pwm1 {
278 status = "okay";
279};
280
281&ssi1 {
282 status = "okay";
283};
284
285&usbh1 {
286 disable-over-current;
287};
288
289&usdhc2 { /* SD card */
290 status = "okay";
291};
292
293&iomuxc {
294 pinctrl-0 = <
295 /*
296 * The following DHCOM GPIOs are used on this board.
297 * Therefore, they have been removed from the list below.
298 * A: key TA1
299 * B: key TA2
300 * C: key TA3
301 * D: key TA4
302 * E: touchscreen
303 * F: led6
304 * G: backlight enable
305 * H: led7
306 * I: led8
307 * J: PCIe reset
308 */
309 &pinctrl_hog_base
310 &pinctrl_dhcom_k &pinctrl_dhcom_l
311 &pinctrl_dhcom_m &pinctrl_dhcom_n &pinctrl_dhcom_o
312 &pinctrl_dhcom_p &pinctrl_dhcom_q &pinctrl_dhcom_r
313 &pinctrl_dhcom_s &pinctrl_dhcom_t &pinctrl_dhcom_u
314 &pinctrl_dhcom_v &pinctrl_dhcom_w &pinctrl_dhcom_int
315 >;
316 pinctrl-names = "default";
317
318 pinctrl_audmux_ext: audmux-ext-grp {
319 fsl,pins = <
320 MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
321 MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0
322 MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
323 MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
324 >;
325 };
326
327 pinctrl_enet_1G: enet-1G-grp {
328 fsl,pins = <
329 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x100b0
330 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x100b0
331 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x100b0
332 MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
333 MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
334 MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
335 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
336 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
337 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
338 MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x100b0
339 MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x100b0
340 MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x100b0
341 MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x100b0
342 MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x100b0
343 MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x100b0
344 >;
345 };
346
347 pinctrl_ethphy7: ethphy7-grp {
348 fsl,pins = <
349 MX6QDL_PAD_EIM_D26__GPIO3_IO26 0xb1 /* WOL */
350 MX6QDL_PAD_EIM_D29__GPIO3_IO29 0xb0 /* Reset */
351 MX6QDL_PAD_GPIO_0__GPIO1_IO00 0xb1 /* Int */
352 >;
353 };
354};