xref: /linux/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2023 Andreas Kemnade
4 */
5/dts-v1/;
6
7#include <dt-bindings/leds/common.h>
8#include <dt-bindings/input/input.h>
9#include "omap4460.dtsi"
10
11/ {
12	model = "Epson Moverio BT-200";
13	compatible = "epson,embt2ws", "ti,omap4460", "ti,omap4";
14
15	memory@80000000 {
16		device_type = "memory";
17		reg = <0x80000000 0x40000000>; /* 1024M */
18	};
19
20	backlight-left {
21		compatible = "pwm-backlight";
22		pwms = <&twl_pwm 1 7812500>;
23		power-supply = <&unknown_supply>;
24	};
25
26	backlight-right {
27		compatible = "pwm-backlight";
28		pwms = <&twl_pwm 0 7812500>;
29		power-supply = <&unknown_supply>;
30	};
31
32	chosen {
33		stdout-path = &uart3;
34	};
35
36	gpio-keys {
37		compatible = "gpio-keys";
38		pinctrl-names = "default";
39		pinctrl-0 = <&gpio_keys_pins>;
40
41		key-lock {
42			label = "Lock";
43			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
44			linux,code = <SW_ROTATE_LOCK>; /* SW_TOUCHPAD_LOCK */
45			linux,input-type = <EV_SW>;
46		};
47	};
48
49	unknown_supply: unknown-supply {
50		compatible = "regulator-fixed";
51		regulator-name = "unknown";
52	};
53
54	wl12xx_pwrseq: wl12xx-pwrseq {
55		compatible = "mmc-pwrseq-simple";
56		clocks = <&twl 1>;
57		clock-names = "ext_clock";
58	};
59
60       /* regulator for wl12xx on sdio2 */
61	wl12xx_vmmc: wl12xx-vmmc {
62		pinctrl-names = "default";
63		pinctrl-0 = <&wl12xx_gpio>;
64		compatible = "regulator-fixed";
65		regulator-name = "vwl1271";
66		regulator-min-microvolt = <1800000>;
67		regulator-max-microvolt = <1800000>;
68		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
69		startup-delay-us = <70000>;
70		enable-active-high;
71	};
72};
73
74&i2c1 {
75	pinctrl-names = "default";
76	pinctrl-0 = <&i2c1_pins>;
77
78	clock-frequency = <400000>;
79
80	twl: pmic@48 {
81		compatible = "ti,twl6032";
82		reg = <0x48>;
83		#clock-cells = <1>;
84		/* IRQ# = 7 */
85		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
86		interrupt-controller;
87		#interrupt-cells = <1>;
88		system-power-controller;
89
90		rtc {
91			compatible = "ti,twl4030-rtc";
92			interrupts = <11>;
93		};
94
95		ldo2: regulator-ldo2 {
96			compatible = "ti,twl6032-ldo2";
97			regulator-min-microvolt = <1000000>;
98			regulator-max-microvolt = <3000000>;
99		};
100
101		ldo4: regulator-ldo4 {
102			compatible = "ti,twl6032-ldo4";
103			regulator-min-microvolt = <1200000>;
104			regulator-max-microvolt = <2800000>;
105		};
106
107		ldo3: regulator-ldo3 {
108			compatible = "ti,twl6032-ldo3";
109			regulator-min-microvolt = <1000000>;
110			regulator-max-microvolt = <3000000>;
111		};
112
113		ldo5: regulator-ldo5 {
114			compatible = "ti,twl6032-ldo5";
115			regulator-min-microvolt = <1200000>;
116			regulator-max-microvolt = <3000000>;
117			ti,retain-on-reset;
118		};
119
120		ldo1: regulator-ldo1 {
121			compatible = "ti,twl6032-ldo1";
122			regulator-min-microvolt = <1800000>;
123			regulator-max-microvolt = <2500000>;
124		};
125
126		ldo7: regulator-ldo7 {
127			compatible = "ti,twl6032-ldo7";
128			regulator-min-microvolt = <1200000>;
129			regulator-max-microvolt = <2900000>;
130		};
131
132		ldoln: regulator-ldoln {
133			compatible = "ti,twl6032-ldoln";
134			regulator-always-on;
135		};
136
137		ldo6: regulator-ldo6 {
138			compatible = "ti,twl6032-ldo6";
139			regulator-always-on;
140		};
141
142		ldousb: regulator-ldousb {
143			compatible = "ti,twl6032-ldousb";
144			regulator-always-on;
145		};
146
147		vio: regulator-vio {
148			compatible = "ti,twl6032-vio";
149			regulator-always-on;
150		};
151
152		twl_usb_comparator: usb-comparator {
153			compatible = "ti,twl6030-usb";
154			interrupts = <4>, <10>;
155		};
156
157		twl_pwm: pwm {
158			/* provides two PWMs (id 0, 1 for PWM1 and PWM2) */
159			compatible = "ti,twl6030-pwm";
160			#pwm-cells = <2>;
161		};
162
163		twl_pwmled: pwmled {
164			/* provides one PWM (id 0 for Charging indicator LED) */
165			compatible = "ti,twl6030-pwmled";
166			#pwm-cells = <2>;
167		};
168
169		gpadc {
170			compatible = "ti,twl6032-gpadc";
171			interrupts = <3>;
172			#io-channel-cells = <1>;
173		};
174
175	};
176};
177
178#include "twl6030_omap4.dtsi"
179
180&twl_usb_comparator {
181	usb-supply = <&ldousb>;
182};
183
184
185&i2c2 {
186	pinctrl-names = "default";
187	pinctrl-0 = <&i2c2_pins>;
188
189	clock-frequency = <200000>;
190
191	/* at head/glasses */
192	mpu9150h: imu@68 {
193		compatible = "invensense,mpu9150";
194		reg = <0x68>;
195
196		pinctrl-names = "default";
197		pinctrl-0 = <&mpu9150h_pins>;
198		interrupt-parent = <&gpio2>;
199		interrupt = <19 IRQ_TYPE_LEVEL_HIGH>;
200	};
201};
202
203&i2c3 {
204	pinctrl-names = "default";
205	pinctrl-0 = <&i2c3_pins>;
206
207	clock-frequency = <100000>;
208
209	led-controller@66 {
210		compatible = "rohm,bd2606mvv";
211		reg = <0x66>;
212
213		#address-cells = <1>;
214		#size-cells = <0>;
215
216		led@0 {
217			reg = <0>;
218			color = <LED_COLOR_ID_GREEN>;
219			function = LED_FUNCTION_STATUS;
220		};
221
222		led@2 {
223			reg = <2>;
224			color = <LED_COLOR_ID_BLUE>;
225			function = LED_FUNCTION_STATUS;
226		};
227
228		led@4 {
229			reg = <4>;
230			color = <LED_COLOR_ID_RED>;
231			function = LED_FUNCTION_STATUS;
232		};
233	};
234};
235
236&i2c4 {
237	pinctrl-names = "default";
238	pinctrl-0 = <&i2c4_pins>;
239
240	clock-frequency = <360000>;
241
242	/* TODO: KXTI9 at 0xf */
243
244	tlv320aic3x: codec@18 {
245		compatible = "ti,tlv320aic3x";
246		reg = <0x18>;
247		pinctrl-names = "default";
248		pinctrl-0 = <&tlv320aic3x_pins>;
249		#sound-dai-cells = <0>;
250
251		reset-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
252	};
253
254	mpu9150: imu@68 {
255		compatible = "invensense,mpu9150";
256		reg = <0x68>;
257
258		pinctrl-names = "default";
259		pinctrl-0 = <&mpu9150_pins>;
260		interrupt-parent = <&gpio2>;
261		interrupt = <7 IRQ_TYPE_LEVEL_HIGH>;
262		invensense,level-shifter;
263	};
264};
265
266&keypad {
267	pinctrl-names = "default";
268	pinctrl-0 = <&keypad_pins>;
269	keypad,num-rows = <2>;
270	keypad,num-columns = <3>;
271	linux,keymap = <MATRIX_KEY(0, 0, KEY_MENU)
272			MATRIX_KEY(0, 1, KEY_HOME)
273			MATRIX_KEY(0, 2, KEY_BACK)
274			MATRIX_KEY(1, 0, KEY_ESC)
275			MATRIX_KEY(1, 1, KEY_VOLUMEDOWN)
276			MATRIX_KEY(1, 2, KEY_VOLUMEUP)>;
277	linux,input-no-autorepeat;
278};
279
280&mcbsp2 {
281	#sound-dai-cells = <0>;
282	pinctrl-names = "default";
283	pinctrl-0 = <&mcbsp2_pins>;
284	status = "okay";
285};
286
287
288&mmc1 {
289	/* sdcard */
290	vmmc-supply = <&ldo5>;
291	broken-cd;
292	bus-width = <4>;
293};
294
295&mmc2 {
296	/* emmc */
297	vmmc-supply = <&ldo2>;
298	bus-width = <8>;
299};
300
301&mmc3 {
302	pinctrl-names = "default";
303	pinctrl-0 = <&wl12xx_pins>;
304	vmmc-supply = <&wl12xx_vmmc>;
305	mmc-pwrseq = <&wl12xx_pwrseq>;
306	interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
307			       &omap4_pmx_core 0x12e>;
308	non-removable;
309	bus-width = <4>;
310	cap-power-off-card;
311
312	#address-cells = <1>;
313	#size-cells = <0>;
314	wlcore: wlcore@2 {
315		compatible = "ti,wl1283";
316		reg = <2>;
317		interrupts-extended = <&gpio1 23 IRQ_TYPE_LEVEL_HIGH>;
318		interrupt-names = "irq";
319		ref-clock-frequency = <26000000>;
320		tcxo-clock-frequency = <26000000>;
321	};
322};
323
324&mmc4 {
325	status = "disabled";
326};
327
328&mmc5 {
329	status = "disabled";
330};
331
332&omap4_pmx_core {
333	bt_pins: pinmux-bt-pins {
334		pinctrl-single,pins = <
335			OMAP4_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE3) /* gpio25 */
336		>;
337	};
338
339	gpio_keys_pins: pinmux-gpio-key-pins {
340		pinctrl-single,pins = <
341			OMAP4_IOPAD(0x56, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio35 */
342		>;
343	};
344
345	i2c1_pins: pinmux-i2c1-pins {
346		pinctrl-single,pins = <
347			   OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c1_scl */
348			   OMAP4_IOPAD(0x124, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c1_sda */
349		>;
350	};
351
352	i2c2_pins: pinmux-i2c2-pins {
353		pinctrl-single,pins = <
354			OMAP4_IOPAD(0x126, PIN_INPUT | MUX_MODE0)	/* i2c2_scl */
355			OMAP4_IOPAD(0x128, PIN_INPUT | MUX_MODE0)	/* i2c2_sda */
356		>;
357	};
358
359	i2c3_pins: pinmux-i2c3-pins {
360		pinctrl-single,pins = <
361			OMAP4_IOPAD(0x12a, PIN_INPUT | MUX_MODE0)	/* i2c3_scl */
362			OMAP4_IOPAD(0x12c, PIN_INPUT | MUX_MODE0)	/* i2c3_sda */
363		>;
364	};
365
366	i2c4_pins: pinmux-i2c4-pins {
367		pinctrl-single,pins = <
368			OMAP4_IOPAD(0x12e, PIN_INPUT | MUX_MODE0)	/* i2c4_scl */
369			OMAP4_IOPAD(0x130, PIN_INPUT | MUX_MODE0)	/* i2c4_sda */
370		>;
371	};
372
373	keypad_pins: pinmux-keypad-pins {
374		pinctrl-single,pins = <
375			/* kpd_row0 */
376			OMAP4_IOPAD(0x0050, PIN_INPUT_PULLUP | MUX_MODE1)
377			/* kpd_row1 */
378			OMAP4_IOPAD(0x0052, PIN_INPUT_PULLUP | MUX_MODE1)
379			/* kpd_row2 */
380			OMAP4_IOPAD(0x0054, PIN_INPUT_PULLUP | MUX_MODE1)
381			/* kpd_col0 */
382			OMAP4_IOPAD(0x0058, PIN_OUTPUT | MUX_MODE1)
383			/* kpd_col1 */
384			OMAP4_IOPAD(0x005a, PIN_OUTPUT | MUX_MODE1)
385			/* kpd_col2 */
386			OMAP4_IOPAD(0x005c, PIN_OUTPUT | MUX_MODE1)
387		>;
388	};
389
390	mcbsp2_pins: pinmux-mcbsp2-pins {
391		pinctrl-single,pins = <
392			OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_clkx */
393			OMAP4_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_dr */
394			OMAP4_IOPAD(0x0fa, PIN_OUTPUT | MUX_MODE0)      /* abe_mcbsp2_dx */
395			OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_fsx */
396		>;
397	};
398
399	mpu9150_pins: pinmux-mpu9150-pins {
400		pinctrl-single,pins = <
401			OMAP4_IOPAD(0x5e, PIN_INPUT_PULLUP | MUX_MODE3)
402		>;
403	};
404
405	mpu9150h_pins: pinmux-mpu9150h-pins {
406		pinctrl-single,pins = <
407			OMAP4_IOPAD(0x76, PIN_INPUT_PULLUP | MUX_MODE3)
408		>;
409	};
410
411	tlv320aic3x_pins: pinmux-tlv320aic3x-pins {
412		pinctrl-single,pins = <
413			OMAP4_IOPAD(0x7e, PIN_OUTPUT | MUX_MODE3)
414		>;
415	};
416
417	uart2_pins: pinmux-uart2-pins {
418		pinctrl-single,pins = <
419			OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */
420			OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0)	 /* uart2_rts.uart2_rts */
421			OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_rx.uart2_rx */
422			OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0)	 /* uart2_tx.uart2_tx */
423		>;
424	};
425
426	uart3_pins: pinmux-uart3-pins {
427		pinctrl-single,pins = <
428			OMAP4_IOPAD(0x144, PIN_INPUT | MUX_MODE0)  /* uart3_rx_irrx */
429			OMAP4_IOPAD(0x146, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx */
430		>;
431	};
432
433	usb_otg_hs_pins: pinmux-usb-otg-hs-pins {
434		 pinctrl-single,pins = <
435			 OMAP4_IOPAD(0x194, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usba0_otg_ce */
436			 OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)	     /* usba0_otg_dp */
437			 OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)	     /* usba0_otg_dm */
438		 >;
439	};
440
441	wl12xx_pins: pinmux-wl12xx-pins {
442		pinctrl-single,pins = <
443			OMAP4_IOPAD(0x1c6, PIN_INPUT | MUX_MODE3) /* gpio_23 / IRQ */
444			OMAP4_IOPAD(0x16c, PIN_INPUT_PULLUP | MUX_MODE2) /* sdmmc3_dat2 */
445			OMAP4_IOPAD(0x16e, PIN_INPUT_PULLUP | MUX_MODE2) /* sdmmc3_dat1 */
446			OMAP4_IOPAD(0x170, PIN_INPUT_PULLUP | MUX_MODE2) /* sdmmc3_dat0 */
447			OMAP4_IOPAD(0x172, PIN_INPUT_PULLUP | MUX_MODE2) /* sdmmc3_dat3 */
448			OMAP4_IOPAD(0x174, PIN_INPUT_PULLUP | MUX_MODE2) /* sdmmc3_cmd */
449			OMAP4_IOPAD(0x176, PIN_INPUT_PULLUP | MUX_MODE2) /* sdmmc3_clk */
450		>;
451	};
452
453	wl12xx_gpio: pinmux-wl12xx-gpio-pins {
454		pinctrl-single,pins = <
455			OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE3)  /* gpio_24 / WLAN_EN */
456		>;
457	};
458};
459
460&uart2 {
461	pinctrl-names = "default";
462	pinctrl-0 = <&uart2_pins &bt_pins>;
463	interrupts-extended = <&wakeupgen GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
464			       &omap4_pmx_core OMAP4_UART2_RX>;
465
466	bluetooth-gnss {
467		compatible = "ti,wl1283-st";
468		enable-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;	/* GPIO_25 */
469		clocks = <&twl 1>;
470		clock-names = "ext_clock";
471	};
472};
473
474&uart3 {
475	pinctrl-names = "default";
476	pinctrl-0 = <&uart3_pins>;
477	interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
478			       &omap4_pmx_core OMAP4_UART3_RX>;
479};
480
481&usb_otg_hs {
482	pinctrl-names = "default";
483	pinctrl-0 = <&usb_otg_hs_pins>;
484
485	interface-type = <1>;
486	mode = <3>;
487	power = <50>;
488};
489
490&usbhshost {
491	status = "disabled";
492};
493