summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/imx6sl-tolino-vision.dts
blob: 2694fe18a91b12718c756c015ba99589073bbf07 (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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
// SPDX-License-Identifier: GPL-2.0
/*
 * Device tree for the Tolino Vison ebook reader
 *
 * Name on mainboard is: 37NB-E60Q30+4A3
 * Serials start with: 6032
 *
 * Copyright 2023 Andreas Kemnade
 */

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include "imx6sl.dtsi"

/ {
	model = "Tolino Vision";
	compatible = "kobo,tolino-vision", "fsl,imx6sl";

	aliases {
		mmc0 = &usdhc4;
		mmc1 = &usdhc2;
	};

	backlight {
		compatible = "pwm-backlight";
		pwms = <&ec 0 50000>;
		power-supply = <&backlight_regulator>;
	};

	backlight_regulator: regulator-backlight {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_backlight_power>;
		regulator-name = "backlight";
		gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	chosen {
		stdout-path = &uart1;
	};

	gpio_keys: gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_keys>;

		key-cover {
			/* magnetic sensor in the corner next to the uSD slot */
			label = "Cover";
			gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
			linux,code = <SW_LID>;
			linux,input-type = <EV_SW>;
			wakeup-source;
		};

		key-fl {
			label = "Frontlight";
			gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_BRIGHTNESS_CYCLE>;
		};

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

	leds: leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_leds>;

		led-0 {
			/* LED on home button */
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_STATUS;
			gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
		};

		led-1 {
			/* LED on power button */
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_POWER;
			gpios = <&gpio5 7 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "timer";
		};
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x80000000 0x20000000>;
	};

	reg_wifi: regulator-wifi {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_wifi_power>;
		regulator-name = "SD3_SPWR";
		regulator-min-microvolt = <3000000>;
		regulator-max-microvolt = <3000000>;
		gpio = <&gpio4 29 GPIO_ACTIVE_LOW>;
	};


	wifi_pwrseq: wifi_pwrseq {
		compatible = "mmc-pwrseq-simple";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_wifi_reset>;
		post-power-on-delay-ms = <20>;
		reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
	};
};

&i2c1 {
	pinctrl-names = "default","sleep";
	pinctrl-0 = <&pinctrl_i2c1>;
	pinctrl-1 = <&pinctrl_i2c1_sleep>;
	status = "okay";

	touchscreen@15 {
		compatible = "elan,ektf2132";
		reg = <0x15>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ts>;
		power-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>;
		interrupts-extended = <&gpio5 6 IRQ_TYPE_EDGE_FALLING>;
	};

	accelerometer@1d {
		compatible = "fsl,mma8652";
		reg = <0x1d>;
	};
};

&i2c2 {
	pinctrl-names = "default","sleep";
	pinctrl-0 = <&pinctrl_i2c2>;
	pinctrl-1 = <&pinctrl_i2c2_sleep>;
	clock-frequency = <100000>;
	status = "okay";
};

&i2c3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c3>;
	clock-frequency = <100000>;
	status = "okay";

	ec: embedded-controller@43 {
		compatible = "netronix,ntxec";
		reg = <0x43>;
		#pwm-cells = <2>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ec>;
		interrupts-extended = <&gpio5 11 IRQ_TYPE_EDGE_FALLING>;
		system-power-controller;
	};
};

&snvs_rtc {
	/*
	 * We are using the RTC in the PMIC, but this one is not disabled
	 * in imx6sl.dtsi.
	 */
	status = "disabled";
};

&uart1 {
	/* J4 */
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	status = "okay";
};

&uart4 {
	/* J9 */
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart4>;
	status = "okay";
};

&usdhc2 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
	pinctrl-0 = <&pinctrl_usdhc2>;
	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
	pinctrl-3 = <&pinctrl_usdhc2_sleep>;
	cd-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
	status = "okay";

	/* removable uSD card */
};

&usdhc3 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
	pinctrl-0 = <&pinctrl_usdhc3>;
	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
	pinctrl-3 = <&pinctrl_usdhc3_sleep>;
	vmmc-supply = <&reg_wifi>;
	mmc-pwrseq = <&wifi_pwrseq>;
	cap-power-off-card;
	non-removable;
	status = "okay";

	/* CyberTan WC121 (BCM43362) SDIO WiFi */
};

&usdhc4 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
	pinctrl-0 = <&pinctrl_usdhc4>;
	pinctrl-1 = <&pinctrl_usdhc4_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc4_200mhz>;
	pinctrl-3 = <&pinctrl_usdhc4_sleep>;
	bus-width = <8>;
	no-1-8-v;
	non-removable;
	status = "okay";

	/* internal eMMC */
};

&usbotg1 {
	pinctrl-names = "default";
	disable-over-current;
	srp-disable;
	hnp-disable;
	adp-disable;
	status = "okay";
};

&iomuxc {
	pinctrl_backlight_power: backlight-powergrp {
		fsl,pins = <
			MX6SL_PAD_EPDC_PWRCTRL3__GPIO2_IO10 0x10059
		>;
	};

	pinctrl_ec: ecgrp {
		fsl,pins = <
			MX6SL_PAD_SD1_DAT0__GPIO5_IO11  0x17000
		>;
	};

	pinctrl_gpio_keys: gpio-keysgrp {
		fsl,pins = <
			MX6SL_PAD_SD1_DAT1__GPIO5_IO08  0x110B0
			MX6SL_PAD_SD1_DAT4__GPIO5_IO12  0x110B0
			MX6SL_PAD_KEY_COL1__GPIO3_IO26  0x11030
		>;
	};

	pinctrl_i2c1: i2c1grp {
		fsl,pins = <
			MX6SL_PAD_I2C1_SCL__I2C1_SCL	 0x4001f8b1
			MX6SL_PAD_I2C1_SDA__I2C1_SDA	 0x4001f8b1
		>;
	};

	pinctrl_i2c1_sleep: i2c1-sleepgrp {
		fsl,pins = <
			MX6SL_PAD_I2C1_SCL__I2C1_SCL	 0x400108b1
			MX6SL_PAD_I2C1_SDA__I2C1_SDA	 0x400108b1
		>;
	};

	pinctrl_i2c2: i2c2grp {
		fsl,pins = <
			MX6SL_PAD_I2C2_SCL__I2C2_SCL	 0x4001f8b1
			MX6SL_PAD_I2C2_SDA__I2C2_SDA	 0x4001f8b1
		>;
	};

	pinctrl_i2c2_sleep: i2c2-sleepgrp {
		fsl,pins = <
			MX6SL_PAD_I2C2_SCL__I2C2_SCL	 0x400108b1
			MX6SL_PAD_I2C2_SDA__I2C2_SDA	 0x400108b1
		>;
	};

	pinctrl_i2c3: i2c3grp {
		fsl,pins = <
			MX6SL_PAD_REF_CLK_24M__I2C3_SCL  0x4001f8b1
			MX6SL_PAD_REF_CLK_32K__I2C3_SDA  0x4001f8b1
		>;
	};

	pinctrl_leds: ledsgrp {
		fsl,pins = <
			MX6SL_PAD_SD1_DAT6__GPIO5_IO07    0x17059
			MX6SL_PAD_SD1_DAT7__GPIO5_IO10    0x17059
			MX6SL_PAD_EPDC_SDCE2__GPIO1_IO29  0x17059
		>;
	};

	pinctrl_ts: tsgrp {
		fsl,pins = <
			MX6SL_PAD_SD1_DAT2__GPIO5_IO13	0x110B0
			MX6SL_PAD_SD1_DAT3__GPIO5_IO06	0x1B0B1
		>;
	};

	pinctrl_uart1: uart1grp {
		fsl,pins = <
			MX6SL_PAD_UART1_TXD__UART1_TX_DATA 0x1b0b1
			MX6SL_PAD_UART1_RXD__UART1_RX_DATA 0x1b0b1
		>;
	};

	pinctrl_uart4: uart4grp {
		fsl,pins = <
			MX6SL_PAD_KEY_ROW6__UART4_TX_DATA 0x1b0b1
			MX6SL_PAD_KEY_COL6__UART4_RX_DATA 0x1b0b1
		>;
	};

	pinctrl_usbotg1: usbotg1grp {
		fsl,pins = <
			MX6SL_PAD_EPDC_PWRCOM__USB_OTG1_ID 0x17059
		>;
	};

	pinctrl_usdhc2: usdhc2grp {
		fsl,pins = <
			MX6SL_PAD_SD2_CMD__SD2_CMD		0x17059
			MX6SL_PAD_SD2_CLK__SD2_CLK		0x13059
			MX6SL_PAD_SD2_DAT0__SD2_DATA0		0x17059
			MX6SL_PAD_SD2_DAT1__SD2_DATA1		0x17059
			MX6SL_PAD_SD2_DAT2__SD2_DATA2		0x17059
			MX6SL_PAD_SD2_DAT3__SD2_DATA3		0x17059
			MX6SL_PAD_SD2_DAT4__GPIO5_IO02		0x1b0b1
		>;
	};

	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
		fsl,pins = <
			MX6SL_PAD_SD2_CMD__SD2_CMD		0x170b9
			MX6SL_PAD_SD2_CLK__SD2_CLK		0x130b9
			MX6SL_PAD_SD2_DAT0__SD2_DATA0		0x170b9
			MX6SL_PAD_SD2_DAT1__SD2_DATA1		0x170b9
			MX6SL_PAD_SD2_DAT2__SD2_DATA2		0x170b9
			MX6SL_PAD_SD2_DAT3__SD2_DATA3		0x170b9
		>;
	};

	pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
		fsl,pins = <
			MX6SL_PAD_SD2_CMD__SD2_CMD		0x170f9
			MX6SL_PAD_SD2_CLK__SD2_CLK		0x130f9
			MX6SL_PAD_SD2_DAT0__SD2_DATA0		0x170f9
			MX6SL_PAD_SD2_DAT1__SD2_DATA1		0x170f9
			MX6SL_PAD_SD2_DAT2__SD2_DATA2		0x170f9
			MX6SL_PAD_SD2_DAT3__SD2_DATA3		0x170f9
		>;
	};

	pinctrl_usdhc2_sleep: usdhc2-sleepgrp {
		fsl,pins = <
			MX6SL_PAD_SD2_CMD__GPIO5_IO04		0x100f9
			MX6SL_PAD_SD2_CLK__GPIO5_IO05		0x100f9
			MX6SL_PAD_SD2_DAT0__GPIO5_IO01		0x100f9
			MX6SL_PAD_SD2_DAT1__GPIO4_IO30		0x100f9
			MX6SL_PAD_SD2_DAT2__GPIO5_IO03		0x100f9
			MX6SL_PAD_SD2_DAT3__GPIO4_IO28		0x100f9
		>;
	};

	pinctrl_usdhc3: usdhc3grp {
		fsl,pins = <
			MX6SL_PAD_SD3_CMD__SD3_CMD	0x11059
			MX6SL_PAD_SD3_CLK__SD3_CLK	0x11059
			MX6SL_PAD_SD3_DAT0__SD3_DATA0	0x11059
			MX6SL_PAD_SD3_DAT1__SD3_DATA1	0x11059
			MX6SL_PAD_SD3_DAT2__SD3_DATA2	0x11059
			MX6SL_PAD_SD3_DAT3__SD3_DATA3	0x11059
		>;
	};

	pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
		fsl,pins = <
			MX6SL_PAD_SD3_CMD__SD3_CMD	0x170b9
			MX6SL_PAD_SD3_CLK__SD3_CLK	0x170b9
			MX6SL_PAD_SD3_DAT0__SD3_DATA0	0x170b9
			MX6SL_PAD_SD3_DAT1__SD3_DATA1	0x170b9
			MX6SL_PAD_SD3_DAT2__SD3_DATA2	0x170b9
			MX6SL_PAD_SD3_DAT3__SD3_DATA3	0x170b9
		>;
	};

	pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
		fsl,pins = <
			MX6SL_PAD_SD3_CMD__SD3_CMD	0x170f9
			MX6SL_PAD_SD3_CLK__SD3_CLK	0x170f9
			MX6SL_PAD_SD3_DAT0__SD3_DATA0	0x170f9
			MX6SL_PAD_SD3_DAT1__SD3_DATA1	0x170f9
			MX6SL_PAD_SD3_DAT2__SD3_DATA2	0x170f9
			MX6SL_PAD_SD3_DAT3__SD3_DATA3	0x170f9
		>;
	};

	pinctrl_usdhc3_sleep: usdhc3-sleepgrp {
		fsl,pins = <
			MX6SL_PAD_SD3_CMD__GPIO5_IO21	0x100c1
			MX6SL_PAD_SD3_CLK__GPIO5_IO18	0x100c1
			MX6SL_PAD_SD3_DAT0__GPIO5_IO19	0x100c1
			MX6SL_PAD_SD3_DAT1__GPIO5_IO20	0x100c1
			MX6SL_PAD_SD3_DAT2__GPIO5_IO16	0x100c1
			MX6SL_PAD_SD3_DAT3__GPIO5_IO17	0x100c1
		>;
	};

	pinctrl_usdhc4: usdhc4grp {
		fsl,pins = <
			MX6SL_PAD_FEC_TX_CLK__SD4_CMD		0x17059
			MX6SL_PAD_FEC_MDIO__SD4_CLK		0x13059
			MX6SL_PAD_FEC_RX_ER__SD4_DATA0		0x17059
			MX6SL_PAD_FEC_CRS_DV__SD4_DATA1		0x17059
			MX6SL_PAD_FEC_RXD1__SD4_DATA2		0x17059
			MX6SL_PAD_FEC_TXD0__SD4_DATA3		0x17059
			MX6SL_PAD_FEC_MDC__SD4_DATA4		0x17059
			MX6SL_PAD_FEC_RXD0__SD4_DATA5		0x17059
			MX6SL_PAD_FEC_TX_EN__SD4_DATA6		0x17059
			MX6SL_PAD_FEC_TXD1__SD4_DATA7		0x17059
			MX6SL_PAD_FEC_REF_CLK__SD4_RESET	0x17068
		>;
	};

	pinctrl_usdhc4_100mhz: usdhc4-100mhzgrp {
		fsl,pins = <
			MX6SL_PAD_FEC_TX_CLK__SD4_CMD		0x170b9
			MX6SL_PAD_FEC_MDIO__SD4_CLK		0x130b9
			MX6SL_PAD_FEC_RX_ER__SD4_DATA0		0x170b9
			MX6SL_PAD_FEC_CRS_DV__SD4_DATA1		0x170b9
			MX6SL_PAD_FEC_RXD1__SD4_DATA2		0x170b9
			MX6SL_PAD_FEC_TXD0__SD4_DATA3		0x170b9
			MX6SL_PAD_FEC_MDC__SD4_DATA4		0x170b9
			MX6SL_PAD_FEC_RXD0__SD4_DATA5		0x170b9
			MX6SL_PAD_FEC_TX_EN__SD4_DATA6		0x170b9
			MX6SL_PAD_FEC_TXD1__SD4_DATA7		0x170b9
		>;
	};

	pinctrl_usdhc4_200mhz: usdhc4-200mhzgrp {
		fsl,pins = <
			MX6SL_PAD_FEC_TX_CLK__SD4_CMD		0x170f9
			MX6SL_PAD_FEC_MDIO__SD4_CLK		0x130f9
			MX6SL_PAD_FEC_RX_ER__SD4_DATA0		0x170f9
			MX6SL_PAD_FEC_CRS_DV__SD4_DATA1		0x170f9
			MX6SL_PAD_FEC_RXD1__SD4_DATA2		0x170f9
			MX6SL_PAD_FEC_TXD0__SD4_DATA3		0x170f9
			MX6SL_PAD_FEC_MDC__SD4_DATA4		0x170f9
			MX6SL_PAD_FEC_RXD0__SD4_DATA5		0x170f9
			MX6SL_PAD_FEC_TX_EN__SD4_DATA6		0x170f9
			MX6SL_PAD_FEC_TXD1__SD4_DATA7		0x170f9
		>;
	};

	pinctrl_usdhc4_sleep: usdhc4-sleepgrp {
		fsl,pins = <
			MX6SL_PAD_FEC_TX_CLK__GPIO4_IO21	0x100c1
			MX6SL_PAD_FEC_MDIO__GPIO4_IO20		0x100c1
			MX6SL_PAD_FEC_RX_ER__GPIO4_IO19		0x100c1
			MX6SL_PAD_FEC_CRS_DV__GPIO4_IO25	0x100c1
			MX6SL_PAD_FEC_RXD1__GPIO4_IO18		0x100c1
			MX6SL_PAD_FEC_TXD0__GPIO4_IO24		0x100c1
			MX6SL_PAD_FEC_MDC__GPIO4_IO23		0x100c1
			MX6SL_PAD_FEC_RXD0__GPIO4_IO17		0x100c1
			MX6SL_PAD_FEC_TX_EN__GPIO4_IO22		0x100c1
			MX6SL_PAD_FEC_TXD1__GPIO4_IO16		0x100c1
		>;
	};

	pinctrl_wifi_power: wifi-powergrp {
		fsl,pins = <
			MX6SL_PAD_SD2_DAT6__GPIO4_IO29	0x10059	/* WIFI_3V3_ON */
		>;
	};

	pinctrl_wifi_reset: wifi-resetgrp {
		fsl,pins = <
			MX6SL_PAD_SD2_DAT7__GPIO5_IO00	0x10059	/* WIFI_RST */
		>;
	};
};