xref: /freebsd-src/sys/contrib/device-tree/src/arm/nxp/imx/e70k02.dtsi (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Copyright 2021 Andreas Kemnade
4f126890aSEmmanuel Vadot * based on works
5f126890aSEmmanuel Vadot * Copyright 2016 Freescale Semiconductor, Inc.
6f126890aSEmmanuel Vadot * and
7f126890aSEmmanuel Vadot * Copyright (C) 2014 Ricoh Electronic Devices Co., Ltd
8f126890aSEmmanuel Vadot *
9f126890aSEmmanuel Vadot * Netronix E70K02 board common.
10f126890aSEmmanuel Vadot * This board is equipped with different SoCs and
11f126890aSEmmanuel Vadot * found in ebook-readers like the Kobo Clara HD (with i.MX6SLL) and
12f126890aSEmmanuel Vadot * the Tolino Shine 3 (with i.MX6SL)
13f126890aSEmmanuel Vadot */
14f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
15f126890aSEmmanuel Vadot
16f126890aSEmmanuel Vadot/ {
17f126890aSEmmanuel Vadot	aliases {
18f126890aSEmmanuel Vadot		mmc0 = &usdhc1;
19f126890aSEmmanuel Vadot		mmc1 = &usdhc3;
20f126890aSEmmanuel Vadot	};
21f126890aSEmmanuel Vadot
22f126890aSEmmanuel Vadot	chosen {
23f126890aSEmmanuel Vadot		stdout-path = &uart1;
24f126890aSEmmanuel Vadot	};
25f126890aSEmmanuel Vadot
26f126890aSEmmanuel Vadot	gpio_keys: gpio-keys {
27f126890aSEmmanuel Vadot		compatible = "gpio-keys";
28f126890aSEmmanuel Vadot
29f126890aSEmmanuel Vadot		key-power {
30f126890aSEmmanuel Vadot			label = "Power";
31f126890aSEmmanuel Vadot			gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
32f126890aSEmmanuel Vadot			linux,code = <KEY_POWER>;
33f126890aSEmmanuel Vadot			wakeup-source;
34f126890aSEmmanuel Vadot		};
35f126890aSEmmanuel Vadot
36f126890aSEmmanuel Vadot		key-cover {
37f126890aSEmmanuel Vadot			label = "Cover";
38f126890aSEmmanuel Vadot			gpios = <&gpio4 23 GPIO_ACTIVE_LOW>;
39f126890aSEmmanuel Vadot			linux,code = <SW_LID>;
40f126890aSEmmanuel Vadot			linux,input-type = <EV_SW>;
41f126890aSEmmanuel Vadot			wakeup-source;
42f126890aSEmmanuel Vadot		};
43f126890aSEmmanuel Vadot
44f126890aSEmmanuel Vadot		key-pageup {
45f126890aSEmmanuel Vadot			label = "PageUp";
46f126890aSEmmanuel Vadot			gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;
47f126890aSEmmanuel Vadot			linux,code = <KEY_PAGEUP>;
48f126890aSEmmanuel Vadot		};
49f126890aSEmmanuel Vadot
50f126890aSEmmanuel Vadot		key-pagedown {
51f126890aSEmmanuel Vadot			label = "PageDown";
52f126890aSEmmanuel Vadot			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
53f126890aSEmmanuel Vadot			linux,code = <KEY_PAGEDOWN>;
54f126890aSEmmanuel Vadot		};
55f126890aSEmmanuel Vadot	};
56f126890aSEmmanuel Vadot
57f126890aSEmmanuel Vadot	leds: leds {
58f126890aSEmmanuel Vadot		compatible = "gpio-leds";
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot		led {
61f126890aSEmmanuel Vadot			label = "e70k02:white:on";
62f126890aSEmmanuel Vadot			gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
63f126890aSEmmanuel Vadot			linux,default-trigger = "timer";
64f126890aSEmmanuel Vadot		};
65f126890aSEmmanuel Vadot	};
66f126890aSEmmanuel Vadot
67f126890aSEmmanuel Vadot	memory@80000000 {
68f126890aSEmmanuel Vadot		device_type = "memory";
69f126890aSEmmanuel Vadot		reg = <0x80000000 0x20000000>;
70f126890aSEmmanuel Vadot	};
71f126890aSEmmanuel Vadot
72f126890aSEmmanuel Vadot	reg_wifi: regulator-wifi {
73f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
74f126890aSEmmanuel Vadot		regulator-name = "SD3_SPWR";
75f126890aSEmmanuel Vadot		regulator-min-microvolt = <3000000>;
76f126890aSEmmanuel Vadot		regulator-max-microvolt = <3000000>;
77f126890aSEmmanuel Vadot		gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
78f126890aSEmmanuel Vadot		enable-active-high;
79f126890aSEmmanuel Vadot	};
80f126890aSEmmanuel Vadot
81f126890aSEmmanuel Vadot	wifi_pwrseq: wifi-pwrseq {
82f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
83f126890aSEmmanuel Vadot		post-power-on-delay-ms = <20>;
84f126890aSEmmanuel Vadot		reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
85f126890aSEmmanuel Vadot	};
86f126890aSEmmanuel Vadot};
87f126890aSEmmanuel Vadot
88f126890aSEmmanuel Vadot&i2c1 {
89f126890aSEmmanuel Vadot	clock-frequency = <100000>;
90f126890aSEmmanuel Vadot	status = "okay";
91f126890aSEmmanuel Vadot
92f126890aSEmmanuel Vadot	lm3630a: backlight@36 {
93f126890aSEmmanuel Vadot		reg = <0x36>;
94f126890aSEmmanuel Vadot		compatible = "ti,lm3630a";
95f126890aSEmmanuel Vadot		enable-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
96f126890aSEmmanuel Vadot
97f126890aSEmmanuel Vadot		#address-cells = <1>;
98f126890aSEmmanuel Vadot		#size-cells = <0>;
99f126890aSEmmanuel Vadot
100f126890aSEmmanuel Vadot		led@0 {
101f126890aSEmmanuel Vadot			reg = <0>;
102f126890aSEmmanuel Vadot			led-sources = <0>;
103f126890aSEmmanuel Vadot			label = "backlight_warm";
104f126890aSEmmanuel Vadot			default-brightness = <0>;
105f126890aSEmmanuel Vadot			max-brightness = <255>;
106f126890aSEmmanuel Vadot		};
107f126890aSEmmanuel Vadot
108f126890aSEmmanuel Vadot		led@1 {
109f126890aSEmmanuel Vadot			reg = <1>;
110f126890aSEmmanuel Vadot			led-sources = <1>;
111f126890aSEmmanuel Vadot			label = "backlight_cold";
112f126890aSEmmanuel Vadot			default-brightness = <0>;
113f126890aSEmmanuel Vadot			max-brightness = <255>;
114f126890aSEmmanuel Vadot		};
115f126890aSEmmanuel Vadot	};
116f126890aSEmmanuel Vadot
117f126890aSEmmanuel Vadot	/* TODO: KX122 acceleration sensor a 0x1e */
118f126890aSEmmanuel Vadot
119f126890aSEmmanuel Vadot};
120f126890aSEmmanuel Vadot
121f126890aSEmmanuel Vadot&i2c2 {
122f126890aSEmmanuel Vadot	clock-frequency = <100000>;
123f126890aSEmmanuel Vadot	status = "okay";
124f126890aSEmmanuel Vadot
125f126890aSEmmanuel Vadot	touchscreen@24 {
126f126890aSEmmanuel Vadot		compatible = "cypress,tt21000";
127f126890aSEmmanuel Vadot		reg = <0x24>;
128f126890aSEmmanuel Vadot		pinctrl-names = "default";
129f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_cyttsp5_gpio>;
130f126890aSEmmanuel Vadot		interrupt-parent = <&gpio4>;
131f126890aSEmmanuel Vadot		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
132f126890aSEmmanuel Vadot		reset-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>;
133f126890aSEmmanuel Vadot		vdd-supply = <&ldo5_reg>;
134f126890aSEmmanuel Vadot	};
135f126890aSEmmanuel Vadot
136f126890aSEmmanuel Vadot	/* TODO: SY7636 PMIC for E Ink at 0x62 */
137f126890aSEmmanuel Vadot
138f126890aSEmmanuel Vadot};
139f126890aSEmmanuel Vadot
140f126890aSEmmanuel Vadot&i2c3 {
141f126890aSEmmanuel Vadot	clock-frequency = <100000>;
142f126890aSEmmanuel Vadot	status = "okay";
143f126890aSEmmanuel Vadot
144f126890aSEmmanuel Vadot	ricoh619: pmic@32 {
145f126890aSEmmanuel Vadot		compatible = "ricoh,rc5t619";
146f126890aSEmmanuel Vadot		reg = <0x32>;
147f126890aSEmmanuel Vadot		interrupt-parent = <&gpio4>;
148*7d0873ebSEmmanuel Vadot		interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
149f126890aSEmmanuel Vadot		system-power-controller;
150f126890aSEmmanuel Vadot
151f126890aSEmmanuel Vadot		regulators {
152f126890aSEmmanuel Vadot			dcdc1_reg: DCDC1 {
153f126890aSEmmanuel Vadot				regulator-name = "DCDC1";
154f126890aSEmmanuel Vadot				regulator-min-microvolt = <300000>;
155f126890aSEmmanuel Vadot				regulator-max-microvolt = <1875000>;
156f126890aSEmmanuel Vadot				regulator-always-on;
157f126890aSEmmanuel Vadot				regulator-boot-on;
158f126890aSEmmanuel Vadot
159f126890aSEmmanuel Vadot				regulator-state-mem {
160f126890aSEmmanuel Vadot					regulator-on-in-suspend;
161f126890aSEmmanuel Vadot					regulator-suspend-max-microvolt = <900000>;
162f126890aSEmmanuel Vadot					regulator-suspend-min-microvolt = <900000>;
163f126890aSEmmanuel Vadot				};
164f126890aSEmmanuel Vadot			};
165f126890aSEmmanuel Vadot
166f126890aSEmmanuel Vadot			/* Core3_3V3 */
167f126890aSEmmanuel Vadot			dcdc2_reg: DCDC2 {
168f126890aSEmmanuel Vadot				regulator-name = "DCDC2";
169f126890aSEmmanuel Vadot				regulator-always-on;
170f126890aSEmmanuel Vadot				regulator-boot-on;
171f126890aSEmmanuel Vadot
172f126890aSEmmanuel Vadot				regulator-state-mem {
173f126890aSEmmanuel Vadot					regulator-on-in-suspend;
174f126890aSEmmanuel Vadot					regulator-suspend-max-microvolt = <3300000>;
175f126890aSEmmanuel Vadot					regulator-suspend-min-microvolt = <3300000>;
176f126890aSEmmanuel Vadot				};
177f126890aSEmmanuel Vadot			};
178f126890aSEmmanuel Vadot
179f126890aSEmmanuel Vadot			dcdc3_reg: DCDC3 {
180f126890aSEmmanuel Vadot				regulator-name = "DCDC3";
181f126890aSEmmanuel Vadot				regulator-min-microvolt = <300000>;
182f126890aSEmmanuel Vadot				regulator-max-microvolt = <1875000>;
183f126890aSEmmanuel Vadot				regulator-always-on;
184f126890aSEmmanuel Vadot				regulator-boot-on;
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot				regulator-state-mem {
187f126890aSEmmanuel Vadot					regulator-on-in-suspend;
188f126890aSEmmanuel Vadot					regulator-suspend-max-microvolt = <1140000>;
189f126890aSEmmanuel Vadot					regulator-suspend-min-microvolt = <1140000>;
190f126890aSEmmanuel Vadot				};
191f126890aSEmmanuel Vadot			};
192f126890aSEmmanuel Vadot
193f126890aSEmmanuel Vadot			/* Core4_1V2 */
194f126890aSEmmanuel Vadot			dcdc4_reg: DCDC4 {
195f126890aSEmmanuel Vadot				regulator-name = "DCDC4";
196f126890aSEmmanuel Vadot				regulator-min-microvolt = <1200000>;
197f126890aSEmmanuel Vadot				regulator-max-microvolt = <1200000>;
198f126890aSEmmanuel Vadot				regulator-always-on;
199f126890aSEmmanuel Vadot				regulator-boot-on;
200f126890aSEmmanuel Vadot
201f126890aSEmmanuel Vadot				regulator-state-mem {
202f126890aSEmmanuel Vadot					regulator-on-in-suspend;
203f126890aSEmmanuel Vadot					regulator-suspend-max-microvolt = <1140000>;
204f126890aSEmmanuel Vadot					regulator-suspend-min-microvolt = <1140000>;
205f126890aSEmmanuel Vadot				};
206f126890aSEmmanuel Vadot			};
207f126890aSEmmanuel Vadot
208f126890aSEmmanuel Vadot			/* Core4_1V8 */
209f126890aSEmmanuel Vadot			dcdc5_reg: DCDC5 {
210f126890aSEmmanuel Vadot				regulator-name = "DCDC5";
211f126890aSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
212f126890aSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
213f126890aSEmmanuel Vadot				regulator-always-on;
214f126890aSEmmanuel Vadot				regulator-boot-on;
215f126890aSEmmanuel Vadot
216f126890aSEmmanuel Vadot				regulator-state-mem {
217f126890aSEmmanuel Vadot					regulator-on-in-suspend;
218f126890aSEmmanuel Vadot					regulator-suspend-max-microvolt = <1700000>;
219f126890aSEmmanuel Vadot					regulator-suspend-min-microvolt = <1700000>;
220f126890aSEmmanuel Vadot				};
221f126890aSEmmanuel Vadot			};
222f126890aSEmmanuel Vadot
223f126890aSEmmanuel Vadot			ldo1_reg: LDO1  {
224f126890aSEmmanuel Vadot				regulator-name = "LDO1";
225f126890aSEmmanuel Vadot				regulator-boot-on;
226f126890aSEmmanuel Vadot			};
227f126890aSEmmanuel Vadot
228f126890aSEmmanuel Vadot			/* Core1_3V3 */
229f126890aSEmmanuel Vadot			ldo2_reg: LDO2  {
230f126890aSEmmanuel Vadot				regulator-name = "LDO2";
231f126890aSEmmanuel Vadot				regulator-always-on;
232f126890aSEmmanuel Vadot				regulator-boot-on;
233f126890aSEmmanuel Vadot
234f126890aSEmmanuel Vadot				regulator-state-mem {
235f126890aSEmmanuel Vadot					regulator-on-in-suspend;
236f126890aSEmmanuel Vadot					regulator-suspend-max-microvolt = <3000000>;
237f126890aSEmmanuel Vadot					regulator-suspend-min-microvolt = <3000000>;
238f126890aSEmmanuel Vadot				};
239f126890aSEmmanuel Vadot			};
240f126890aSEmmanuel Vadot
241f126890aSEmmanuel Vadot			/* Core5_1V2 */
242f126890aSEmmanuel Vadot			ldo3_reg: LDO3  {
243f126890aSEmmanuel Vadot				regulator-name = "LDO3";
244f126890aSEmmanuel Vadot				regulator-always-on;
245f126890aSEmmanuel Vadot				regulator-boot-on;
246f126890aSEmmanuel Vadot			};
247f126890aSEmmanuel Vadot
248f126890aSEmmanuel Vadot			ldo4_reg: LDO4 {
249f126890aSEmmanuel Vadot				regulator-name = "LDO4";
250f126890aSEmmanuel Vadot				regulator-boot-on;
251f126890aSEmmanuel Vadot			};
252f126890aSEmmanuel Vadot
253f126890aSEmmanuel Vadot			/* SPD_3V3 */
254f126890aSEmmanuel Vadot			ldo5_reg: LDO5 {
255f126890aSEmmanuel Vadot				regulator-name = "LDO5";
256f126890aSEmmanuel Vadot				regulator-always-on;
257f126890aSEmmanuel Vadot				regulator-boot-on;
258f126890aSEmmanuel Vadot			};
259f126890aSEmmanuel Vadot
260f126890aSEmmanuel Vadot			/* DDR_0V6 */
261f126890aSEmmanuel Vadot			ldo6_reg: LDO6 {
262f126890aSEmmanuel Vadot				regulator-name = "LDO6";
263f126890aSEmmanuel Vadot				regulator-always-on;
264f126890aSEmmanuel Vadot				regulator-boot-on;
265f126890aSEmmanuel Vadot			};
266f126890aSEmmanuel Vadot
267f126890aSEmmanuel Vadot			/* VDD_PWM */
268f126890aSEmmanuel Vadot			ldo7_reg: LDO7 {
269f126890aSEmmanuel Vadot				regulator-name = "LDO7";
270f126890aSEmmanuel Vadot				regulator-boot-on;
271f126890aSEmmanuel Vadot			};
272f126890aSEmmanuel Vadot
273f126890aSEmmanuel Vadot			/* ldo_1v8 */
274f126890aSEmmanuel Vadot			ldo8_reg: LDO8 {
275f126890aSEmmanuel Vadot				regulator-name = "LDO8";
276f126890aSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
277f126890aSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
278f126890aSEmmanuel Vadot				regulator-boot-on;
279f126890aSEmmanuel Vadot			};
280f126890aSEmmanuel Vadot
281f126890aSEmmanuel Vadot			ldo9_reg: LDO9 {
282f126890aSEmmanuel Vadot				regulator-name = "LDO9";
283f126890aSEmmanuel Vadot				regulator-boot-on;
284f126890aSEmmanuel Vadot			};
285f126890aSEmmanuel Vadot
286f126890aSEmmanuel Vadot			ldo10_reg: LDO10 {
287f126890aSEmmanuel Vadot				regulator-name = "LDO10";
288f126890aSEmmanuel Vadot				regulator-boot-on;
289f126890aSEmmanuel Vadot			};
290f126890aSEmmanuel Vadot
291f126890aSEmmanuel Vadot			ldortc1_reg: LDORTC1  {
292f126890aSEmmanuel Vadot				regulator-name = "LDORTC1";
293f126890aSEmmanuel Vadot				regulator-boot-on;
294f126890aSEmmanuel Vadot			};
295f126890aSEmmanuel Vadot		};
296f126890aSEmmanuel Vadot	};
297f126890aSEmmanuel Vadot};
298f126890aSEmmanuel Vadot
299f126890aSEmmanuel Vadot&snvs_rtc {
300f126890aSEmmanuel Vadot	/* we are using the rtc in the pmic, not disabled in imx6sll.dtsi */
301f126890aSEmmanuel Vadot	status = "disabled";
302f126890aSEmmanuel Vadot};
303f126890aSEmmanuel Vadot
304f126890aSEmmanuel Vadot&uart1 {
305f126890aSEmmanuel Vadot	status = "okay";
306f126890aSEmmanuel Vadot};
307f126890aSEmmanuel Vadot
308f126890aSEmmanuel Vadot&usdhc1 {
309f126890aSEmmanuel Vadot	non-removable;
310f126890aSEmmanuel Vadot	no-1-8-v;
311f126890aSEmmanuel Vadot	status = "okay";
312f126890aSEmmanuel Vadot};
313f126890aSEmmanuel Vadot
314f126890aSEmmanuel Vadot&usdhc3 {
315f126890aSEmmanuel Vadot	vmmc-supply = <&reg_wifi>;
316f126890aSEmmanuel Vadot	mmc-pwrseq = <&wifi_pwrseq>;
317f126890aSEmmanuel Vadot	cap-power-off-card;
318f126890aSEmmanuel Vadot	non-removable;
319f126890aSEmmanuel Vadot	status = "okay";
320f126890aSEmmanuel Vadot};
321f126890aSEmmanuel Vadot
322f126890aSEmmanuel Vadot&usbotg1 {
323f126890aSEmmanuel Vadot	pinctrl-names = "default";
324f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usbotg1>;
325f126890aSEmmanuel Vadot	disable-over-current;
326f126890aSEmmanuel Vadot	srp-disable;
327f126890aSEmmanuel Vadot	hnp-disable;
328f126890aSEmmanuel Vadot	adp-disable;
329f126890aSEmmanuel Vadot	status = "okay";
330f126890aSEmmanuel Vadot};
331