summaryrefslogtreecommitdiffstats
path: root/dts/src/arm/imx6dl-b1x5pv2.dtsi
blob: 337db29b0010a9598dd0a45f3c270b32b5c4920d (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
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B1x5Pv2
// patient monitor series
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

#include <dt-bindings/input/input.h>
#include "imx6dl-qmx6.dtsi"

/ {
	chosen {
		stdout-path = &uart3;
	};

	/* Do not allow frequencies above 800MHz */
	cpus {
		cpu@0 {
			operating-points = <
				/* kHz    uV */
				792000  1175000
				396000  1150000
			>;
			fsl,soc-operating-points = <
				/* ARM kHz	SOC-PU uV */
				792000	1175000
				396000	1175000
			>;
		};

		cpu@1 {
			operating-points = <
				/* kHz    uV */
				792000  1175000
				396000  1150000
			>;
			fsl,soc-operating-points = <
				/* ARM kHz	SOC-PU uV */
				792000	1175000
				396000	1175000
			>;
		};
	};

	reg_syspwr: regulator-12v {
		compatible = "regulator-fixed";
		regulator-name = "SYS_PWR";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
	};

	reg_5v_pmc: regulator-5v-pmc {
		compatible = "regulator-fixed";
		regulator-name = "5V PMC";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_syspwr>;
	};

	reg_5v: regulator-5v {
		compatible = "regulator-fixed";
		regulator-name = "5V";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_syspwr>;
	};

	reg_3v3: regulator-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "3V3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_syspwr>;
	};

	reg_5v0_audio: regulator-5v0-audio {
		compatible = "regulator-fixed";
		regulator-name = "5V0_AUDIO";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_5v>;
		gpio = <&tca6424a 16 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		/*
		 * This must be always-on for da7212, which has some not
		 * properly documented dependencies for it's speaker supply
		 * pin. The issue manifests as speaker volume being very low.
		 */
		regulator-always-on;
	};


	reg_3v3_audio: regulator-3v3-audio {
		compatible = "regulator-fixed";
		regulator-name = "3V3_AUDIO";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_3v3>;
		pinctrl-0 = <&pinctrl_q7_hda_reset>;
		pinctrl-names = "default";
		gpio = <&gpio6 8 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	reg_2v5_audio: regulator-2v5-audio {
		compatible = "regulator-fixed";
		regulator-name = "2V5_AUDIO";
		regulator-min-microvolt = <2500000>;
		regulator-max-microvolt = <2500000>;
		regulator-always-on;
		vin-supply = <&reg_3v3_audio>;

	};

	reg_wlan: regulator-wlan {
		compatible = "regulator-fixed";
		regulator-name = "WLAN";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_3v3>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_sdio_power>;
		gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		startup-delay-us = <70000>;
	};

	reg_bl: regulator-backlight {
		compatible = "regulator-fixed";
		regulator-name = "LED_VCC";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		vin-supply = <&reg_syspwr>;
		pinctrl-0 = <&pinctrl_q7_lcd_power>;
		pinctrl-names = "default";
		gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	reg_lcd: regulator-lcd {
		compatible = "regulator-fixed";
		regulator-name = "LCD_5V";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_5v>;
	};

	usb_power: regulator-usb-power {
		compatible = "regulator-fixed";
		regulator-name = "USB POWER";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_5v>;
	};

	charger: battery-charger {
		compatible = "gpio-charger"; /* ti,bq24172 */
		charger-type = "mains";
		gpios = <&tca6424a 3 GPIO_ACTIVE_LOW>;
		charge-current-limit-gpios = <&tca6424a 11 GPIO_ACTIVE_HIGH>,
					     <&tca6424a 12 GPIO_ACTIVE_HIGH>;
		charge-current-limit-mapping = <1300000 0x0>,
					       <700000 0x1>,
					       <0 0x2>;
		charge-status-gpios = <&tca6424a 6 GPIO_ACTIVE_HIGH>;
	};

	poweroff {
		compatible = "gpio-poweroff";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_spi_cs1>;
		gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
	};

	power-button-key {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_sleep_button>;

		power-button {
			label = "power button";
			gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_POWER>;
		};
	};

	rotary-encoder-key {
		compatible = "gpio-keys";

		rotary-encoder-event {
			label = "rotary-encoder press";
			gpios = <&tca6424a 0 GPIO_ACTIVE_HIGH>;
			linux,code = <KEY_ENTER>;
			linux,can-disable;
		};
	};

	rotary-encoder {
		compatible = "rotary-encoder";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio2 &pinctrl_q7_gpio4>;
		gpios = <&gpio4 26 GPIO_ACTIVE_LOW>, <&gpio1 0 GPIO_ACTIVE_LOW>;
		rotary-encoder,relative-axis;
		rotary-encoder,steps-per-period = <2>;
		wakeup-source;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio1 &pinctrl_q7_gpio3 &pinctrl_q7_gpio5>;

		alarm1 {
			label = "alarm:red";
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		};

		alarm2 {
			label = "alarm:yellow";
			gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>;
		};

		alarm3 {
			label = "alarm:blue";
			gpios = <&gpio4 15 GPIO_ACTIVE_HIGH>;
		};
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_backlight_enable>;
		power-supply = <&reg_bl>;
		pwms = <&pwm4 0 5000000 0>;
		brightness-levels = <0 255>;
		num-interpolated-steps = <255>;
		default-brightness-level = <179>;
		enable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
	};

	panel {
		backlight = <&backlight>;
		power-supply = <&reg_lcd>;

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

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "audio-card";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&dailink_master>;
		simple-audio-card,frame-master = <&dailink_master>;
		simple-audio-card,widgets = "Speaker", "Ext Spk";
		simple-audio-card,audio-routing = "Ext Spk", "LINE";

		simple-audio-card,cpu {
			sound-dai = <&ssi1>;
		};

		dailink_master: simple-audio-card,codec {
			sound-dai = <&codec>;
		};
	};

	clk_ext_audio_codec: clock-codec {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <12288000>;
	};
};

&audmux {
	status = "okay";
};

&fec {
	status = "okay";
};

&hdmi {
	status = "okay";
};

&i2c1 {
	battery: battery@b {
		compatible = "ti,bq20z65", "sbs,sbs-battery";
		reg = <0x0b>;
		sbs,battery-detect-gpios = <&tca6424a 5 GPIO_ACTIVE_LOW>;
		sbs,i2c-retry-count = <5>;
		power-supplies = <&charger>;
	};

	codec: audio-codec@1a {
		compatible = "dlg,da7212";
		reg = <0x1a>;
		#sound-dai-cells = <0>;
		VDDA-supply = <&reg_2v5_audio>;
		VDDSP-supply = <&reg_5v0_audio>;
		VDDMIC-supply = <&reg_3v3_audio>;
		VDDIO-supply = <&reg_3v3_audio>;
		clocks = <&clk_ext_audio_codec>;
		clock-names = "mclk";
	};
};

&i2c5 {
	tca6424a: gpio-controller@22 {
		compatible = "ti,tca6424";
		reg = <0x22>;
		gpio-controller;
		#gpio-cells = <2>;
		vcc-supply = <&reg_3v3>;
		interrupt-parent = <&gpio7>;
		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio6>;
		interrupt-controller;
		#interrupt-cells = <2>;
		gpio-line-names = "GPIO_ROTOR#", "ACM_IO_INT", "TMP_SENSOR_IRQ", "AC_IN",
				  "TF_S", "BATT_T", "LED_INC_CHAR", "ACM1_OCF",
				  "ACM2_OCF", "ACM_IO_RST", "USB1_POWER_EN", "EGPIO_CC_CTL0",
				  "EGPIO_CC_CTL1", "12V_OEMNBP_EN", "CP2105_RST", "",
				  "SPEAKER_PA_EN", "ARM7_UPI_RESET", "ARM7_PWR_RST", "NURSE_CALL",
				  "MARKER_EN", "EGPIO_TOUCH_RST", "PRESSURE_INT1", "PRESSURE_INT2";

	};

	tmp75: temperature-sensor@48 {
		compatible = "ti,tmp75";
		reg = <0x48>;
		vs-supply = <&reg_3v3>;
		interrupt-parent = <&tca6424a>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
	};
};

&ldb {
	status = "okay";

	lvds0: lvds-channel@0 {
		status = "okay";
		fsl,data-mapping = "spwg";
		fsl,data-width = <24>;

		port@4 {
			reg = <4>;

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

&pwm4 {
	status = "okay";
};

&ssi1 {
	fsl,mode = "i2s-slave";
	status = "okay";
};

&usbotg {
	vbus-supply = <&usb_power>;
	disable-over-current;
	dr_mode = "host";
	status = "okay";

	/*
	 * TPS2051BDGN fault-gpio is connected to Q7[86] USB_0_1_OC_N.
	 * On QMX6 this is not connceted to the i.MX6, but to the USB Hub
	 * from &usbh1. This means, that we cannot easily detect and handle
	 * over-current events. Fortunately the regulator limits the current
	 * automatically, so the hardware is still protected.
	 */
};

&usdhc4 {
	/* WiFi module */
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc4>;
	bus-width = <4>;
	no-1-8-v;
	non-removable;
	wakeup-source;
	keep-power-in-suspend;
	cap-power-off-card;
	max-frequency = <25000000>;
	vmmc-supply = <&reg_wlan>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	wlcore: wlcore@2 {
		compatible = "ti,wl1837";
		reg = <2>;

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio7>;

		interrupt-parent = <&gpio4>;
		interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;

		tcxo-clock-frequency = <26000000>;
	};
};