xref: /linux/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-clara2e-common.dtsi (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1// SPDX-License-Identifier: (GPL-2.0)
2/*
3 * Common part for Kobo Clara 2e device tree
4 * Copyright 2024 Andreas Kemnade
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/leds/common.h>
12#include "imx6sll.dtsi"
13
14/ {
15	aliases {
16		mmc0 = &usdhc2;
17		mmc1 = &usdhc3;
18	};
19
20	chosen {
21		stdout-path = &uart1;
22	};
23
24	gpio-keys {
25		compatible = "gpio-keys";
26		pinctrl-names = "default";
27		pinctrl-0 = <&pinctrl_gpio_keys>;
28
29		key-cover {
30			label = "Cover";
31			gpios = <&gpio4 23 GPIO_ACTIVE_LOW>;
32			linux,code = <SW_LID>;
33			linux,input-type = <EV_SW>;
34			wakeup-source;
35		};
36	};
37
38	leds {
39		compatible = "gpio-leds";
40		pinctrl-names = "default";
41		pinctrl-0 = <&pinctrl_led>;
42
43		led {
44			color = <LED_COLOR_ID_WHITE>;
45			function = LED_FUNCTION_POWER;
46			gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
47			linux,default-trigger = "timer";
48		};
49	};
50
51	memory@80000000 {
52		device_type = "memory";
53		reg = <0x80000000 0x20000000>;
54	};
55
56	reg_wifi: regulator-wifi {
57		compatible = "regulator-fixed";
58		regulator-name = "SD3_SPWR";
59		regulator-min-microvolt = <3000000>;
60		regulator-max-microvolt = <3000000>;
61		gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
62		enable-active-high;
63	};
64};
65
66&clks {
67	assigned-clocks = <&clks IMX6SLL_CLK_PLL4_AUDIO_DIV>;
68	assigned-clock-rates = <393216000>;
69};
70
71&cpu0 {
72	arm-supply = <&buck1>;
73	soc-supply = <&buck2>;
74};
75
76&i2c1 {
77	pinctrl-names = "default","sleep";
78	pinctrl-0 = <&pinctrl_i2c1>;
79	pinctrl-1 = <&pinctrl_i2c1_sleep>;
80	clock-frequency = <100000>;
81	status = "okay";
82
83	/* backlight aw99703 at 0x36 */
84};
85
86&i2c2 {
87	pinctrl-names = "default","sleep";
88	pinctrl-0 = <&pinctrl_i2c2>;
89	pinctrl-1 = <&pinctrl_i2c2_sleep>;
90	clock-frequency = <100000>;
91	status = "okay";
92
93	/* backlight aw99703 at 0x36 */
94
95	touchscreen@38 {
96		compatible = "focaltech,ft5426";
97		reg = <0x38>;
98		pinctrl-names = "default", "suspend";
99		pinctrl-0 = <&pinctrl_touch_gpio>;
100		pinctrl-1 = <&pinctrl_touch_gpio_sleep>;
101		interrupt-parent = <&gpio4>;
102		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
103		reset-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>;
104		touchscreen-size-x = <1072>;
105		touchscreen-size-y = <1448>;
106		touchscreen-swapped-x-y;
107	};
108};
109
110&i2c3 {
111	/* Bus seems to be in bad state after boot, allow full recovery */
112	pinctrl-names = "default", "gpio";
113	pinctrl-0 = <&pinctrl_i2c3>;
114	pinctrl-1 = <&pinctrl_i2c3_gpio>;
115	sda-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
116	scl-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
117	clock-frequency = <100000>;
118	status = "okay";
119
120	pmic@4b {
121		compatible = "rohm,bd71879", "rohm,bd71828";
122		reg = <0x4b>;
123		pinctrl-names = "default";
124		pinctrl-0 = <&pinctrl_bd71828>;
125		interrupt-parent = <&gpio4>;
126		interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
127		system-power-controller;
128		clocks = <&clks 0>;
129		#clock-cells = <0>;
130		clock-output-names = "bd71828-32k-out";
131		gpio-controller;
132		#gpio-cells = <2>;
133		gpio-reserved-ranges = <0 1>, <2 1>;
134
135		/* charge sense resistor is 30 milli-ohm */
136
137		regulators {
138			LDO1 {
139				name = "LDO1";
140				regulator-name = "ldo1";
141				regulator-min-microvolt = <800000>;
142				regulator-max-microvolt = <3300000>;
143			};
144
145			LDO2 {
146				name = "LDO2";
147				regulator-name = "ldo2";
148				regulator-min-microvolt = <800000>;
149				regulator-max-microvolt = <3300000>;
150			};
151
152			LDO3 {
153				name = "LDO3";
154				regulator-name = "ldo3";
155				regulator-min-microvolt = <800000>;
156				regulator-max-microvolt = <3300000>;
157			};
158
159			ldo4: LDO4 {
160				name = "LDO4";
161				regulator-name = "ldo4";
162				regulator-always-on;
163				regulator-min-microvolt = <1100000>;
164				regulator-max-microvolt = <1100000>;
165			};
166
167			LDO5 {
168				name = "LDO5";
169				regulator-name = "ldo5";
170				regulator-always-on;
171				regulator-min-microvolt = <800000>;
172				regulator-max-microvolt = <3300000>;
173			};
174
175			LDO6 {
176				name = "LDO6";
177				regulator-name = "ldo6";
178				regulator-min-microvolt = <1800000>;
179				regulator-max-microvolt = <1800000>;
180			};
181
182			LDO7 {
183				name = "LDO7";
184				regulator-name = "ldo7";
185				regulator-always-on;
186				regulator-min-microvolt = <800000>;
187				regulator-max-microvolt = <3300000>;
188				regulator-boot-on;
189			};
190
191			buck1: BUCK1 {
192				name = "BUCK1";
193				regulator-name = "buck1";
194				regulator-always-on;
195				regulator-min-microvolt = <500000>;
196				regulator-max-microvolt = <1400000>;
197				regulator-boot-on;
198			};
199
200			buck2: BUCK2 {
201				name = "BUCK2";
202				regulator-name = "buck2";
203				regulator-always-on;
204				regulator-min-microvolt = <500000>;
205				regulator-max-microvolt = <2000000>;
206				regulator-boot-on;
207			};
208
209			BUCK3 {
210				name = "BUCK3";
211				regulator-name = "buck3";
212				regulator-always-on;
213				regulator-min-microvolt = <1200000>;
214				regulator-max-microvolt = <1800000>;
215				regulator-boot-on;
216			};
217
218			BUCK4 {
219				name = "BUCK4";
220				regulator-name = "buck4";
221				regulator-always-on;
222				regulator-min-microvolt = <1000000>;
223				regulator-max-microvolt = <1200000>;
224				regulator-boot-on;
225			};
226
227			BUCK5 {
228				name = "BUCK5";
229				regulator-name = "buck5";
230				regulator-always-on;
231				regulator-min-microvolt = <2500000>;
232				regulator-max-microvolt = <3300000>;
233				regulator-boot-on;
234			};
235
236			BUCK6 {
237				name = "BUCK6";
238				regulator-name = "buck6";
239				regulator-min-microvolt = <500000>;
240				regulator-max-microvolt = <2000000>;
241			};
242
243			BUCK7 {
244				name = "BUCK7";
245				regulator-name = "buck7";
246				regulator-min-microvolt = <500000>;
247				regulator-max-microvolt = <2000000>;
248			};
249		};
250	};
251};
252
253&iomuxc {
254	pinctrl_bd71828: bd71828-gpiogrp {
255		fsl,pins = <
256			MX6SLL_PAD_KEY_COL0__GPIO3_IO24		0x1b8b1
257			MX6SLL_PAD_GPIO4_IO19__GPIO4_IO19	0x1b8b1
258		>;
259	};
260
261	pinctrl_gpio_keys: gpio-keysgrp {
262		fsl,pins = <
263			MX6SLL_PAD_GPIO4_IO25__GPIO4_IO25	0x17059	/* PWR_SW */
264			MX6SLL_PAD_GPIO4_IO23__GPIO4_IO23	0x17059	/* HALL_EN */
265		>;
266	};
267
268	pinctrl_i2c1: i2c1grp {
269		fsl,pins = <
270			MX6SLL_PAD_I2C1_SCL__I2C1_SCL	0x4001f8b1
271			MX6SLL_PAD_I2C1_SDA__I2C1_SDA	0x4001f8b1
272		>;
273	};
274
275	pinctrl_i2c1_sleep: i2c1-sleepgrp {
276		fsl,pins = <
277			MX6SLL_PAD_I2C1_SCL__I2C1_SCL	0x400108b1
278			MX6SLL_PAD_I2C1_SDA__I2C1_SDA	0x400108b1
279		>;
280	};
281
282	pinctrl_i2c2: i2c2grp {
283		fsl,pins = <
284			MX6SLL_PAD_I2C2_SCL__I2C2_SCL	0x4001f8b1
285			MX6SLL_PAD_I2C2_SDA__I2C2_SDA	0x4001f8b1
286		>;
287	};
288
289	pinctrl_i2c2_sleep: i2c2-sleepgrp {
290		fsl,pins = <
291			MX6SLL_PAD_I2C2_SCL__I2C2_SCL	0x400108b1
292			MX6SLL_PAD_I2C2_SDA__I2C2_SDA	0x400108b1
293		>;
294	};
295
296	pinctrl_i2c3: i2c3grp {
297		fsl,pins = <
298			MX6SLL_PAD_REF_CLK_24M__I2C3_SCL 0x4001f8b1
299			MX6SLL_PAD_REF_CLK_32K__I2C3_SDA 0x4001f8b1
300		>;
301	};
302
303	pinctrl_i2c3_gpio: i2c3-gpiogrp {
304		fsl,pins = <
305			MX6SLL_PAD_REF_CLK_24M__GPIO3_IO21 0x4001f8b1
306			MX6SLL_PAD_REF_CLK_32K__GPIO3_IO22 0x4001f8b1
307		>;
308	};
309
310	pinctrl_led: ledgrp {
311		fsl,pins = <
312			MX6SLL_PAD_GPIO4_IO17__GPIO4_IO17 0x10059
313		>;
314	};
315
316	pinctrl_touch_gpio: touch-gpiogrp {
317		fsl,pins = <
318			MX6SLL_PAD_GPIO4_IO24__GPIO4_IO24	0x17059 /* TP_INT */
319			MX6SLL_PAD_GPIO4_IO18__GPIO4_IO18	0x10059 /* TP_RST */
320		>;
321	};
322
323	pinctrl_touch_gpio_sleep: touch-gpio-sleepgrp {
324		fsl,pins = <
325			MX6SLL_PAD_GPIO4_IO24__GPIO4_IO24	0x10059 /* TP_INT */
326			MX6SLL_PAD_GPIO4_IO18__GPIO4_IO18	0x10059 /* TP_RST */
327		>;
328	};
329
330	pinctrl_uart1: uart1grp {
331		fsl,pins = <
332			MX6SLL_PAD_UART1_TXD__UART1_DCE_TX 0x1b0b1
333			MX6SLL_PAD_UART1_RXD__UART1_DCE_RX 0x1b0b1
334		>;
335	};
336
337	pinctrl_uart2: uart2grp {
338		fsl,pins = <
339			MX6SLL_PAD_LCD_ENABLE__UART2_DCE_RX	0x41b0b1
340			MX6SLL_PAD_LCD_HSYNC__UART2_DCE_TX	0x41b0b1
341			MX6SLL_PAD_LCD_VSYNC__UART2_DCE_RTS	0x41b0b1
342			MX6SLL_PAD_LCD_RESET__UART2_DCE_CTS	0x41b0b1
343		>;
344	};
345
346	pinctrl_uart2_sleep: uart2-sleepgrp {
347		fsl,pins = <
348			MX6SLL_PAD_LCD_ENABLE__GPIO2_IO16	0x10059
349			MX6SLL_PAD_LCD_HSYNC__GPIO2_IO17	0x10059
350			MX6SLL_PAD_LCD_VSYNC__GPIO2_IO18	0x10059
351			MX6SLL_PAD_LCD_RESET__GPIO2_IO19	0x10059
352		>;
353	};
354
355	pinctrl_usbotg1: usbotg1grp {
356		fsl,pins = <
357			MX6SLL_PAD_EPDC_PWR_COM__USB_OTG1_ID 0x17059
358		>;
359	};
360
361	pinctrl_usdhc2: usdhc2grp {
362		fsl,pins = <
363			MX6SLL_PAD_SD2_CMD__SD2_CMD		0x17059
364			MX6SLL_PAD_SD2_CLK__SD2_CLK		0x13059
365			MX6SLL_PAD_SD2_DATA0__SD2_DATA0		0x17059
366			MX6SLL_PAD_SD2_DATA1__SD2_DATA1		0x17059
367			MX6SLL_PAD_SD2_DATA2__SD2_DATA2		0x17059
368			MX6SLL_PAD_SD2_DATA3__SD2_DATA3		0x17059
369		>;
370	};
371
372	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
373		fsl,pins = <
374			MX6SLL_PAD_SD2_CMD__SD2_CMD		0x170b9
375			MX6SLL_PAD_SD2_CLK__SD2_CLK		0x130b9
376			MX6SLL_PAD_SD2_DATA0__SD2_DATA0		0x170b9
377			MX6SLL_PAD_SD2_DATA1__SD2_DATA1		0x170b9
378			MX6SLL_PAD_SD2_DATA2__SD2_DATA2		0x170b9
379			MX6SLL_PAD_SD2_DATA3__SD2_DATA3		0x170b9
380		>;
381	};
382
383	pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
384		fsl,pins = <
385			MX6SLL_PAD_SD2_CMD__SD2_CMD		0x170f9
386			MX6SLL_PAD_SD2_CLK__SD2_CLK		0x130f9
387			MX6SLL_PAD_SD2_DATA0__SD2_DATA0		0x170f9
388			MX6SLL_PAD_SD2_DATA1__SD2_DATA1		0x170f9
389			MX6SLL_PAD_SD2_DATA2__SD2_DATA2		0x170f9
390			MX6SLL_PAD_SD2_DATA3__SD2_DATA3		0x170f9
391		>;
392	};
393
394	pinctrl_usdhc2_sleep: usdhc2-sleepgrp {
395		fsl,pins = <
396			MX6SLL_PAD_SD2_CMD__GPIO5_IO04		0x100f9
397			MX6SLL_PAD_SD2_CLK__GPIO5_IO05		0x100f9
398			MX6SLL_PAD_SD2_DATA0__GPIO5_IO01	0x100f9
399			MX6SLL_PAD_SD2_DATA1__GPIO4_IO30	0x100f9
400			MX6SLL_PAD_SD2_DATA2__GPIO5_IO03	0x100f9
401			MX6SLL_PAD_SD2_DATA3__GPIO4_IO28	0x100f9
402		>;
403	};
404
405	pinctrl_usdhc3: usdhc3grp {
406		fsl,pins = <
407			MX6SLL_PAD_SD3_CMD__SD3_CMD	0x11059
408			MX6SLL_PAD_SD3_CLK__SD3_CLK	0x11059
409			MX6SLL_PAD_SD3_DATA0__SD3_DATA0	0x11059
410			MX6SLL_PAD_SD3_DATA1__SD3_DATA1	0x11059
411			MX6SLL_PAD_SD3_DATA2__SD3_DATA2	0x11059
412			MX6SLL_PAD_SD3_DATA3__SD3_DATA3	0x11059
413		>;
414	};
415
416	pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
417		fsl,pins = <
418			MX6SLL_PAD_SD3_CMD__SD3_CMD	0x170b9
419			MX6SLL_PAD_SD3_CLK__SD3_CLK	0x170b9
420			MX6SLL_PAD_SD3_DATA0__SD3_DATA0	0x170b9
421			MX6SLL_PAD_SD3_DATA1__SD3_DATA1	0x170b9
422			MX6SLL_PAD_SD3_DATA2__SD3_DATA2	0x170b9
423			MX6SLL_PAD_SD3_DATA3__SD3_DATA3	0x170b9
424		>;
425	};
426
427	pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
428		fsl,pins = <
429			MX6SLL_PAD_SD3_CMD__SD3_CMD	0x170f9
430			MX6SLL_PAD_SD3_CLK__SD3_CLK	0x170f9
431			MX6SLL_PAD_SD3_DATA0__SD3_DATA0	0x170f9
432			MX6SLL_PAD_SD3_DATA1__SD3_DATA1	0x170f9
433			MX6SLL_PAD_SD3_DATA2__SD3_DATA2	0x170f9
434			MX6SLL_PAD_SD3_DATA3__SD3_DATA3	0x170f9
435		>;
436	};
437
438	pinctrl_usdhc3_sleep: usdhc3-sleepgrp {
439		fsl,pins = <
440			MX6SLL_PAD_SD3_CMD__GPIO5_IO21	0x100c1
441			MX6SLL_PAD_SD3_CLK__GPIO5_IO18	0x100c1
442			MX6SLL_PAD_SD3_DATA0__GPIO5_IO19	0x100c1
443			MX6SLL_PAD_SD3_DATA1__GPIO5_IO20	0x100c1
444			MX6SLL_PAD_SD3_DATA2__GPIO5_IO16	0x100c1
445			MX6SLL_PAD_SD3_DATA3__GPIO5_IO17	0x100c1
446		>;
447	};
448
449	pinctrl_wifi_power: wifi-powergrp {
450		fsl,pins = <
451			MX6SLL_PAD_SD2_DATA6__GPIO4_IO29	0x10059
452		>;
453	};
454};
455
456&snvs_rtc {
457	/* we are using the rtc in the pmic, not disabled in imx6sll.dtsi */
458	status = "disabled";
459};
460
461&uart1 {
462	pinctrl-names = "default";
463	pinctrl-0 = <&pinctrl_uart1>;
464	status = "okay";
465};
466
467&uart2 {
468	pinctrl-names = "default", "sleep";
469	pinctrl-0 = <&pinctrl_uart2>;
470	pinctrl-1 = <&pinctrl_uart2_sleep>;
471	status = "okay";
472
473	/* requires LDO4 + power enable gpio */
474	bluetooth {
475		compatible = "nxp,88w8987-bt";
476		fw-init-baudrate = <1500000>;
477	};
478};
479
480&usbotg1 {
481	pinctrl-names = "default";
482	pinctrl-0 = <&pinctrl_usbotg1>;
483	disable-over-current;
484	srp-disable;
485	hnp-disable;
486	adp-disable;
487	status = "okay";
488};
489
490&usdhc2 {
491	pinctrl-names = "default", "state_100mhz", "state_200mhz","sleep";
492	pinctrl-0 = <&pinctrl_usdhc2>;
493	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
494	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
495	pinctrl-3 = <&pinctrl_usdhc2_sleep>;
496	non-removable;
497	status = "okay";
498};
499
500&usdhc3 {
501	pinctrl-names = "default", "state_100mhz", "state_200mhz","sleep";
502	pinctrl-0 = <&pinctrl_usdhc3>;
503	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
504	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
505	pinctrl-3 = <&pinctrl_usdhc3_sleep>;
506	/* card requires also ldo4 */
507	vmmc-supply = <&reg_wifi>;
508	cap-power-off-card;
509	non-removable;
510	status = "okay";
511};
512