summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/nxp/imx/imx6dl-victgo.dts
blob: 4875afadb63005d101c4501b70f64761d732b86f (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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (c) 2016 Protonic Holland
 * Copyright (c) 2020 Oleksij Rempel <kernel@pengutronix.de>, Pengutronix
 */

/dts-v1/;
#include "imx6dl.dtsi"
#include "imx6qdl-vicut1.dtsi"

/ {
	model = "Kverneland TGO";
	compatible = "kvg,victgo", "fsl,imx6dl";

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpiokeys>;
		autorepeat;

		key-power {
			label = "Power Button";
			gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_POWER>;
			wakeup-source;
		};

		key-enter {
			label = "Rotary Key";
			gpios = <&gpio2 05 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_ENTER>;
			wakeup-source;
		};
	};

	iio-hwmon {
		compatible = "iio-hwmon";
		io-channels = <&vdiv_vaccu>, <&vdiv_hitch_pos>;
	};

	panel {
		compatible = "lg,lb070wv8";
		backlight = <&backlight_lcd>;
		power-supply = <&reg_3v3>;

		port {
			panel_in: endpoint {
				remote-endpoint = <&lvds0_out>;
			};
		};
	};

	clk50m_phy: phy-clock {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <50000000>;
		clock-output-names = "enet_ref_pad";
	};

	rotary-encoder {
		compatible = "rotary-encoder";
		pinctrl-0 = <&pinctrl_rotary_ch>;
		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>,
			<&gpio2 4 GPIO_ACTIVE_HIGH>;
		linux,axis = <REL_WHEEL>;
		rotary-encoder,steps-per-period = <4>;
		rotary-encoder,relative-axis;
		rotary-encoder,rollover;
		wakeup-source;
	};

	thermal-zones {
		chassis-thermal {
			polling-delay = <20000>;
			polling-delay-passive = <0>;
			thermal-sensors = <&tsens0>;

			trips {
				alert {
					temperature = <105000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "passive";
				};
			};
		};

		touch-thermal0 {
			polling-delay = <20000>;
			polling-delay-passive = <0>;
			thermal-sensors = <&touch_temp0>;

			trips {
				alert {
					temperature = <105000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "passive";
				};
			};
		};

		touch-thermal1 {
			polling-delay = <20000>;
			polling-delay-passive = <0>;
			thermal-sensors = <&touch_temp1>;

			trips {
				alert {
					temperature = <105000>; /* millicelsius */
					hysteresis = <2000>; /* millicelsius */
					type = "passive";
				};
			};
		};
	};

	touchscreen {
		compatible = "resistive-adc-touch";
		io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>,
                              <&adc_ts 5>;
		io-channel-names = "y", "z1", "z2", "x";
		touchscreen-min-pressure = <64687>;
		touchscreen-inverted-y;
		touchscreen-x-plate-ohms = <300>;
		touchscreen-y-plate-ohms = <800>;
	};

	touch_temp0: touch-temperature-sensor0 {
		compatible = "generic-adc-thermal";
		#thermal-sensor-cells = <0>;
		io-channels = <&adc_ts 0>;
		io-channel-names = "sensor-channel";
		temperature-lookup-table = <    (-40000) 736
						85000 474>;
	};

	touch_temp1: touch-temperature-sensor1 {
		compatible = "generic-adc-thermal";
		#thermal-sensor-cells = <0>;
		io-channels = <&adc_ts 7>;
		io-channel-names = "sensor-channel";
		temperature-lookup-table = <    (-40000) 826
						85000 609>;
	};

	vdiv_vaccu: voltage-divider-vaccu {
		compatible = "voltage-divider";
		io-channels = <&adc_ts 2>;
		output-ohms = <2500>;
		full-ohms = <64000>;
		#io-channel-cells = <0>;
	};

	vdiv_hitch_pos: voltage-divider-hitch-pos {
		compatible = "voltage-divider";
		io-channels = <&adc_ts 6>;
		output-ohms = <3300>;
		full-ohms = <13300>;
		#io-channel-cells = <0>;
	};
};

&clks {
	clocks = <&clk50m_phy>;
	clock-names = "enet_ref_pad";
	assigned-clocks = <&clks IMX6QDL_CLK_ENET_REF_SEL>;
	assigned-clock-parents = <&clk50m_phy>;
};

&ecspi2 {
	cs-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi2>;
	status = "okay";

	adc_ts: adc@0 {
		compatible = "ti,tsc2046e-adc";
		reg = <0>;
		pinctrl-0 = <&pinctrl_touchscreen>;
		pinctrl-names = "default";
		spi-max-frequency = <1000000>;
		interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
		#io-channel-cells = <1>;

		#address-cells = <1>;
		#size-cells = <0>;

		channel@1 {
			reg = <1>;
			settling-time-us = <700>;
			oversampling-ratio = <5>;
		};

		channel@3 {
			reg = <3>;
			settling-time-us = <700>;
			oversampling-ratio = <5>;
		};

		channel@4 {
			reg = <4>;
			settling-time-us = <700>;
			oversampling-ratio = <5>;
		};

		channel@5 {
			reg = <5>;
			settling-time-us = <700>;
			oversampling-ratio = <5>;
		};
	};
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rmii";
	phy-handle = <&rmii_phy>;
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		/* Microchip KSZ8081RNA PHY */
		rmii_phy: ethernet-phy@0 {
			reg = <0>;
			interrupts-extended = <&gpio4 30 IRQ_TYPE_LEVEL_LOW>;
			reset-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
			reset-assert-us = <10000>;
			reset-deassert-us = <300>;
		};
	};
};

&gpio1 {
	gpio-line-names =
		"CAN1_TERM", "SD1_CD", "ITU656_RESET", "CAM1_MIRROR",
			"CAM2_MIRROR", "", "", "SMBALERT",
		"DEBUG_0", "DEBUG_1", "", "", "", "", "", "",
		"SD1_DATA0", "SD1_DATA1", "SD1_CMD", "SD1_DATA2", "SD1_CLK",
			"SD1_DATA3", "ETH_MDIO", "",
		"", "", "", "", "", "", "", "ETH_MDC";
};

&gpio4 {
	gpio-line-names =
		"", "", "", "", "", "", "UART4_TXD", "UART4_RXD",
		"UART5_TXD", "UART5_RXD", "CAN1_TX", "CAN1_RX", "CAN1_SR",
			"CAN2_SR", "CAN2_TX", "CAN2_RX",
		"", "", "DIP1_FB", "", "VCAM_EN", "ON1_CTRL", "ON2_CTRL",
			"HITCH_IN_OUT",
		"LIGHT_ON", "", "ETH_RESET", "CONTACT_IN", "BL_EN",
			"BL_PWM", "ETH_INT", "ISB_LED";
};

&gpio5 {
	gpio-line-names =
		"", "", "", "", "", "", "", "",
		"TSC_PENIRQ", "TSC_BUSY", "ECSPI2_MOSI", "ECSPI2_MISO",
			"ECSPI2_SS0", "ECSPI2_SCLK", "", "",
		"", "", "ITU656_CLK", "I2S_MCLK", "ITU656_PDN", "AUDIO_RESET",
			"I2S_BITCLK", "I2S_DOUT",
		"I2S_LRCLK", "I2S_DIN", "I2C1_SDA", "I2C1_SCL", "YACO_AUX_RX",
			"YACO_AUX_TX", "ITU656_D0", "ITU656_D1";
};

&gpio6 {
	gpio-line-names =
		"ITU656_D2", "ITU656_D3", "ITU656_D4", "ITU656_D5",
			"ITU656_D6", "ITU656_D7", "", "",
		"", "", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "";
};

&i2c1 {
	keypad@70 {
		compatible = "holtek,ht16k33";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_keypad>;
		reg = <0x70>;
		refresh-rate-hz = <20>;
		debounce-delay-ms = <50>;
		interrupts-extended = <&gpio4 5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
		keypad,num-rows = <12>;
		keypad,num-columns = <3>;
		linux,keymap = <
			MATRIX_KEY(2, 0, KEY_F6)
			MATRIX_KEY(3, 0, KEY_F8)
			MATRIX_KEY(4, 0, KEY_F10)
			MATRIX_KEY(5, 0, KEY_F4)
			MATRIX_KEY(6, 0, KEY_F2)
			MATRIX_KEY(2, 1, KEY_F5)
			MATRIX_KEY(3, 1, KEY_F7)
			MATRIX_KEY(4, 1, KEY_F9)
			MATRIX_KEY(5, 1, KEY_F3)
			MATRIX_KEY(6, 1, KEY_F1)
		      >;
	};
};

&iomuxc {
	pinctrl_ecspi2: ecspi2grp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT16__ECSPI2_MOSI		0x100b1
			MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO		0x100b1
			MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12		0x100b1
			MX6QDL_PAD_DISP0_DAT19__ECSPI2_SCLK		0x100b1
		>;
	};

	pinctrl_enet: enetgrp {
		fsl,pins = <
			/* MX6QDL_ENET_PINGRP4 */
			MX6QDL_PAD_ENET_MDC__ENET_MDC			0x1b0b0
			MX6QDL_PAD_ENET_MDIO__ENET_MDIO			0x1b0b0
			MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0		0x1b0b0
			MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1		0x1b0b0
			MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER		0x1b0b0
			MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN		0x1b0b0
			MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0		0x1b0b0
			MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1		0x1b0b0
			MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN		0x1b0b0
			MX6QDL_PAD_GPIO_16__ENET_REF_CLK		0x1b0b0
			/* Phy reset */
			MX6QDL_PAD_DISP0_DAT5__GPIO4_IO26		0x1b0b0
			/* nINTRP */
			MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30		0x1b0b0
		>;
	};

	pinctrl_gpiokeys: gpiokeygrp {
		fsl,pins = <
			/* ROTARY_BTN */
			MX6QDL_PAD_NANDF_D5__GPIO2_IO05			0x1b0b0
			/* nON_SWITCH */
			MX6QDL_PAD_EIM_CS0__GPIO2_IO23			0x1b0b0
		>;
	};

	pinctrl_keypad: keypadgrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_19__GPIO4_IO05			0x1b0b0
		>;
	};

	pinctrl_rotary_ch: rotarychgrp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D3__GPIO2_IO03			0x1b0b0
			MX6QDL_PAD_NANDF_D4__GPIO2_IO04			0x1b0b0
		>;
	};

	pinctrl_touchscreen: touchscreengrp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT14__GPIO5_IO08		0x1b0b0
			MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09		0x1b0b0
		>;
	};
};