Linux Audio

Check our new training course

Loading...
v5.14.15
  1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2/*
  3 * Copyright (c) 2018 MundoReader S.L.
  4 * Author:  Heiko Stuebner <heiko.stuebner@bq.com>
  5 */
  6
  7/dts-v1/;
  8#include <dt-bindings/i2c/i2c.h>
  9#include <dt-bindings/input/input.h>
 10#include "rk3188.dtsi"
 11
 12/ {
 13	model = "BQ Edison2 Quad-Core";
 14	compatible = "mundoreader,bq-edison2qc", "rockchip,rk3188";
 15
 16	aliases {
 17		mmc0 = &mmc0;
 18		mmc1 = &mmc1;
 19		mmc2 = &emmc;
 20	};
 21
 22	memory@60000000 {
 23		device_type = "memory";
 24		reg = <0x60000000 0x80000000>;
 25	};
 26
 27	backlight: backlight {
 28		compatible = "pwm-backlight";
 29		power-supply = <&vsys>;
 30		pwms = <&pwm1 0 25000>;
 31	};
 32
 33	gpio-keys {
 34		compatible = "gpio-keys";
 35		autorepeat;
 36		pinctrl-names = "default";
 37		pinctrl-0 = <&pwr_key &usb_int>;
 38
 39		power {
 40			gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
 41			linux,code = <KEY_POWER>;
 42			label = "GPIO Key Power";
 43			linux,input-type = <1>;
 44			debounce-interval = <100>;
 45			wakeup-source;
 46		};
 47
 48		wake_on_usb: wake-on-usb {
 49			label = "Wake-on-USB";
 50			gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
 51			linux,code = <KEY_WAKEUP>;
 52			wakeup-source;
 53		};
 54	};
 55
 56	gpio-poweroff {
 57		compatible = "gpio-poweroff";
 58		gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
 59		pinctrl-names = "default";
 60		pinctrl-0 = <&pwr_hold>;
 61		/* only drive the pin low until device is off */
 62		active-delay-ms = <3000>;
 63	};
 64
 65	lvds-encoder {
 66		compatible = "ti,sn75lvds83", "lvds-encoder";
 
 
 67
 68		ports {
 69			#address-cells = <1>;
 70			#size-cells = <0>;
 71
 72			port@0 {
 73				reg = <0>;
 74
 75				lvds_in_vop0: endpoint {
 76					remote-endpoint = <&vop0_out_lvds>;
 77				};
 78			};
 
 79
 80			port@1 {
 81				reg = <1>;
 82
 83				lvds_out_panel: endpoint {
 84					remote-endpoint = <&panel_in_lvds>;
 85				};
 86			};
 87		};
 88	};
 89
 90	panel {
 91		compatible = "innolux,ee101ia-01d", "panel-lvds";
 92		backlight = <&backlight>;
 93
 94		/* pin LCD_CS, Nshtdn input of lvds-encoder */
 95		enable-gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
 96		pinctrl-names = "default";
 97		pinctrl-0 = <&lcd_cs>;
 98		power-supply = <&vcc_lcd>;
 99
100		data-mapping = "vesa-24";
101		height-mm = <163>;
102		width-mm = <261>;
103
104		panel-timing {
105			clock-frequency = <72000000>;
106			hactive = <1280>;
107			vactive = <800>;
108			hback-porch = <160>;
109			hfront-porch = <16>;
110			hsync-len = <10>;
111			vback-porch = <23>;
112			vfront-porch = <12>;
113			vsync-len = <3>;
114		};
115
116		port {
117			panel_in_lvds: endpoint {
118				remote-endpoint = <&lvds_out_panel>;
119			};
120		};
121	};
122
123	sdio_pwrseq: sdio-pwrseq {
124		compatible = "mmc-pwrseq-simple";
125		clocks = <&hym8563>;
126		clock-names = "ext_clock";
127		pinctrl-names = "default";
128		pinctrl-0 = <&wifi_reg_on>;
129		reset-gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
130	};
131
132	avdd_cif: cif-avdd-regulator {
133		compatible = "regulator-fixed";
134		regulator-name = "avdd-cif";
135		regulator-min-microvolt = <2800000>;
136		regulator-max-microvolt = <2800000>;
137		gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
138		pinctrl-names = "default";
139		pinctrl-0 = <&cif_avdd_en>;
140		startup-delay-us = <100000>;
141		vin-supply = <&vcc28_cif>;
142	};
143
144	vcc_5v: vcc-5v-regulator {
145		compatible = "regulator-fixed";
146		regulator-name = "vcc-5v";
147		regulator-min-microvolt = <5000000>;
148		regulator-max-microvolt = <5000000>;
149		enable-active-high;
150		gpio = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
151		pinctrl-names = "default";
152		pinctrl-0 = <&v5_drv>;
153		vin-supply = <&vsys>;
154	};
155
156	vcc_lcd: lcd-regulator {
157		compatible = "regulator-fixed";
158		regulator-name = "vcc-lcd";
159		gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>;
160		pinctrl-names = "default";
161		pinctrl-0 = <&lcd_en>;
162		startup-delay-us = <50000>;
163		vin-supply = <&vcc_io>;
164	};
165
166	vcc_otg: usb-otg-regulator {
167		compatible = "regulator-fixed";
168		regulator-name = "vcc-otg";
169		regulator-min-microvolt = <5000000>;
170		regulator-max-microvolt = <5000000>;
171		enable-active-high;
172		gpio = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
173		pinctrl-names = "default";
174		pinctrl-0 = <&otg_drv>;
175		startup-delay-us = <100000>;
176		vin-supply = <&vcc_5v>;
177	};
178
179	vcc_sd: sdmmc-regulator {
180		compatible = "regulator-fixed";
181		regulator-name = "vcc-sd";
182		regulator-min-microvolt = <3300000>;
183		regulator-max-microvolt = <3300000>;
184		gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
185		pinctrl-names = "default";
186		pinctrl-0 = <&sdmmc_pwr>;
187		startup-delay-us = <100000>;
188		vin-supply = <&vcc_io>;
189	};
190
191	vccq_emmc: emmc-vccq-regulator {
192		compatible = "regulator-fixed";
193		regulator-name = "vccq-emmc";
194		regulator-min-microvolt = <2800000>;
195		regulator-max-microvolt = <2800000>;
196		vin-supply = <&vcc_io>;
197	};
198
199	/* supplied from the bq24196 */
200	vsys: vsys-regulator {
201		compatible = "regulator-fixed";
202		regulator-name = "vsys";
203		regulator-min-microvolt = <5000000>;
204		regulator-max-microvolt = <5000000>;
205		regulator-boot-on;
206	};
207};
208
209&cpu0 {
210	cpu-supply = <&vdd_arm>;
211};
212
213&cpu1 {
214	cpu-supply = <&vdd_arm>;
215};
216
217&cpu2 {
218	cpu-supply = <&vdd_arm>;
219};
220
221&cpu3 {
222	cpu-supply = <&vdd_arm>;
223};
224
225&cru {
226	assigned-clocks = <&cru PLL_GPLL>, <&cru PLL_CPLL>,
227			  <&cru ACLK_CPU>,
228			  <&cru HCLK_CPU>, <&cru PCLK_CPU>,
229			  <&cru ACLK_PERI>, <&cru HCLK_PERI>,
230			  <&cru PCLK_PERI>;
231	assigned-clock-rates = <594000000>, <504000000>,
232			       <300000000>,
233			       <150000000>, <75000000>,
234			       <300000000>, <150000000>,
235			       <75000000>;
236};
237
238&emmc {
239	bus-width = <8>;
240	cap-mmc-highspeed;
241	non-removable;
242	pinctrl-names = "default";
243	pinctrl-0 = <&emmc_clk &emmc_cmd>;
244	vmmc-supply = <&vcc_io>;
245	vqmmc-supply = <&vccq_emmc>;
246	status = "okay";
247};
248
249&gpu {
250	status = "okay";
251};
252
253&i2c0 {
254	clock-frequency = <400000>;
255	status = "okay";
256
257	lis3de: accelerometer@29 {
258		compatible = "st,lis3de";
259		reg = <0x29>;
260		interrupt-parent = <&gpio0>;
261		interrupts = <RK_PB7 IRQ_TYPE_EDGE_RISING>;
262		pinctrl-names = "default";
263		pinctrl-0 = <&gsensor_int>;
264		rotation-matrix = "1", "0", "0",
265				  "0", "-1", "0",
266				  "0", "0", "1";
267		vdd-supply = <&vcc_io>;
268	};
269};
270
271&i2c1 {
272	clock-frequency = <400000>;
273	status = "okay";
274
275	tmp108@48 {
276		compatible = "ti,tmp108";
277		reg = <0x48>;
278		interrupt-parent = <&gpio1>;
279		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
280		pinctrl-names = "default";
281		pinctrl-0 = <&tmp_alrt>;
282		#thermal-sensor-cells = <0>;
283	};
284
285	hym8563: rtc@51 {
286		compatible = "haoyu,hym8563";
287		reg = <0x51>;
288		interrupt-parent = <&gpio0>;
289		interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
290		pinctrl-names = "default";
291		pinctrl-0 = <&rtc_int>;
292		#clock-cells = <0>;
293		clock-output-names = "xin32k";
294	};
295
296	bat: battery@55 {
297		compatible = "ti,bq27541";
298		reg = <0x55>;
299		power-supplies = <&bq24196>;
300	};
301
302	act8846: pmic@5a {
303		compatible = "active-semi,act8846";
304		reg = <0x5a>;
305		pinctrl-names = "default";
306		pinctrl-0 = <&dvs0_ctl &pmic_int>;
307
308		vp1-supply = <&vsys>;
309		vp2-supply = <&vsys>;
310		vp3-supply = <&vsys>;
311		vp4-supply = <&vsys>;
312		inl1-supply = <&vcc_io>;
313		inl2-supply = <&vsys>;
314		inl3-supply = <&vsys>;
315
316		regulators {
317			vcc_ddr: REG1 {
318				regulator-name = "VCC_DDR";
319				regulator-min-microvolt = <1200000>;
320				regulator-max-microvolt = <1200000>;
321				regulator-always-on;
322			};
323
324			vdd_log: REG2 {
325				regulator-name = "VDD_LOG";
326				regulator-min-microvolt = <1000000>;
327				regulator-max-microvolt = <1200000>;
328				regulator-always-on;
329			};
330
331			vdd_arm: REG3 {
332				regulator-name = "VDD_ARM";
333				regulator-min-microvolt = <875000>;
334				regulator-max-microvolt = <1350000>;
335				regulator-always-on;
336			};
337
338			vcc_io: vcc_hdmi: REG4 {
339				regulator-name = "VCC_IO";
340				regulator-min-microvolt = <3000000>;
341				regulator-max-microvolt = <3000000>;
342				regulator-always-on;
343			};
344
345			vdd_10: REG5 {
346				regulator-name = "VDD_10";
347				regulator-min-microvolt = <1000000>;
348				regulator-max-microvolt = <1000000>;
349				regulator-always-on;
350			};
351
352			vdd_12: REG6 {
353				regulator-name = "VDD_12";
354				regulator-min-microvolt = <1200000>;
355				regulator-max-microvolt = <1200000>;
356				regulator-always-on;
357			};
358
359			vcc18_cif: REG7 {
360				regulator-name = "VCC18_CIF";
361				regulator-min-microvolt = <1800000>;
362				regulator-max-microvolt = <1800000>;
363				regulator-always-on;
364			};
365
366			vcca_33: REG8 {
367				regulator-name = "VCCA_33";
368				regulator-min-microvolt = <3300000>;
369				regulator-max-microvolt = <3300000>;
370				regulator-always-on;
371			};
372
373			vcc_tp: REG9 {
374				regulator-name = "VCC_TP";
375				regulator-min-microvolt = <3300000>;
376				regulator-max-microvolt = <3300000>;
377				regulator-always-on;
378			};
379
380			vccio_wl: REG10 {
381				regulator-name = "VCCIO_WL";
382				regulator-min-microvolt = <2800000>;
383				regulator-max-microvolt = <2800000>;
384				regulator-always-on;
385			};
386
387			vcc_18: REG11 {
388				regulator-name = "VCC_18";
389				regulator-min-microvolt = <1800000>;
390				regulator-max-microvolt = <1800000>;
391				regulator-always-on;
392			};
393
394			vcc28_cif: REG12 {
395				regulator-name = "VCC28_CIF";
396				regulator-min-microvolt = <2800000>;
397				regulator-max-microvolt = <2800000>;
398				regulator-always-on;
399			};
400		};
401	};
402
403	bq24196: charger@6b {
404		compatible = "ti,bq24196";
405		reg = <0x6b>;
406		interrupt-parent = <&gpio0>;
407		interrupts = <RK_PD7 IRQ_TYPE_EDGE_FALLING>;
408		pinctrl-names = "default";
409		pinctrl-0 = <&charger_int &chg_ctl &otg_en>;
410		ti,system-minimum-microvolt = <3200000>;
411		monitored-battery = <&bat>;
412		omit-battery-class;
413
414		usb_otg_vbus: usb-otg-vbus { };
415	};
416};
417
418&i2c2 {
419	clock-frequency = <400000>;
420	status = "okay";
421
422	ft5606: touchscreen@3e {
423		compatible = "edt,edt-ft5506";
424		reg = <0x3e>;
425		interrupt-parent = <&gpio1>;
426		interrupts = <RK_PB7 IRQ_TYPE_EDGE_FALLING>;
427		pinctrl-names = "default";
428		pinctrl-0 = <&tp_int &tp_rst>;
429		reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
430		touchscreen-inverted-y;
431		/* hw ts resolution does not match display */
432		touchscreen-size-y = <1024>;
433		touchscreen-size-x = <768>;
434		touchscreen-swapped-x-y;
435	};
436};
437
438&i2c3 {
439	clock-frequency = <400000>;
440	status = "okay";
441};
442
443&i2c4 {
444	clock-frequency = <400000>;
445	status = "okay";
446
447	rt5616: codec@1b {
448		compatible = "realtek,rt5616";
449		reg = <0x1b>;
450		clocks = <&cru SCLK_I2S0>;
451		clock-names = "mclk";
452		#sound-dai-cells = <0>;
453	};
454};
455
456&i2s0 {
457	status = "okay";
458};
459
460&mmc0 {
461	bus-width = <4>;
462	cap-mmc-highspeed;
463	cap-sd-highspeed;
464	disable-wp;
465	pinctrl-names = "default";
466	pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
467	vmmc-supply = <&vcc_sd>;
468	status = "okay";
469};
470
471&mmc1 {
472	bus-width = <4>;
473	cap-sd-highspeed;
474	keep-power-in-suspend;
475	mmc-pwrseq = <&sdio_pwrseq>;
476	non-removable;
477	pinctrl-names = "default";
478	pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_bus4>;
479	vqmmc-supply = <&vccio_wl>;
480	#address-cells = <1>;
481	#size-cells = <0>;
482	status = "okay";
483
484	brcmf: wifi@1 {
485		reg = <1>;
486		compatible = "brcm,bcm4329-fmac";
487		interrupt-parent = <&gpio3>;
488		interrupts = <RK_PD2 GPIO_ACTIVE_HIGH>;
489		interrupt-names = "host-wake";
490		brcm,drive-strength = <5>;
491		pinctrl-names = "default";
492		pinctrl-0 = <&wifi_host_wake>;
493	};
494};
495
496&pwm1 {
497	status = "okay";
498};
499
500&pinctrl {
501	pcfg_output_high: pcfg-output-high {
502		output-high;
503	};
504
505	pcfg_output_low: pcfg-output-low {
506		output-low;
507	};
508
509	act8846 {
510		dvs0_ctl: dvs0-ctl {
511			rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_output_low>;
512		};
513
514		pmic_int: pmic-int {
515			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
516		};
517	};
518
519	bq24196 {
520		charger_int: charger-int {
521			rockchip,pins = <0 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>;
522		};
523
524		/* pin hog to make it select usb profile */
525		chg_ctl: chg-ctl {
526			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>;
527		};
528
529		/* low: charging, high: complete, fault: blinking */
530		chg_det: chg-det {
531			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
532		};
533
534		/* charging enabled when pin low and register set */
535		chg_en: chg-en {
536			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_low>;
537		};
538
539		/* bq29196 powergood (when low) signal */
540		dc_det: dc-det {
541			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
542		};
543
544		/* wire bq24196 otg pin to high, to enable 500mA charging */
545		otg_en: otg-en {
546			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>;
547		};
548	};
549
550	camera {
551		cif0_pdn: cif0-pdn {
552			rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
553		};
554
555		cif1_pdn: cif1-pdn {
556			rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
557		};
558
559		cif_avdd_en: cif-avdd-en {
560			rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
561		};
562	};
563
564	display {
565		lcd_cs: lcd-cs {
566			rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
567		};
568
569		lcd_en: lcd-en {
570			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
571		};
572	};
573
574	ft5606 {
575		tp_int: tp-int {
576			rockchip,pins = <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
577		};
578
579		tp_rst: tp-rst {
580			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
581		};
582	};
583
584	hdmi {
585		hdmi_int: hdmi-int {
586			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
587		};
588
589		hdmi_rst: hdmi-rst {
590			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
591		};
592	};
593
594	hym8563 {
595		rtc_int: rtc-int {
596			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
597		};
598	};
599
600	keys {
601		pwr_hold: pwr-hold {
602			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
603		};
604
605		pwr_key: pwr-key {
606			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
607		};
608	};
609
610	lis3de {
611		gsensor_int: gsensor-int {
612			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
613		};
614	};
615
616	mmc {
617		sdmmc_pwr: sdmmc-pwr {
618			rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
619		};
620	};
621
622	tmp108 {
623		tmp_alrt: tmp-alrt {
624			rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
625		};
626	};
627
628	usb {
629		v5_drv: v5-drv {
630			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
631		};
632
633		otg_drv: otg-drv {
634			rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
635		};
636
637		usb_int: usb-int {
638			rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
639		};
640	};
641
642	rk903 {
643		bt_host_wake: bt-host-wake {
644			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
645		};
646
647		bt_reg_on: bt-reg-on {
648			rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
649		};
650
651		/* pin hog to pull the reset high */
652		bt_rst: bt-rst {
653			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_output_high>;
654		};
655
656		bt_wake: bt-wake {
657			rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
658		};
659
660		wifi_host_wake: wifi-host-wake {
661			rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
662		};
663
664		wifi_reg_on: wifi-reg-on {
665			rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
666		};
667	};
668};
669
670&saradc {
671	vref-supply = <&vcc_18>;
672	status = "okay";
673};
674
675&spdif {
676	status = "okay";
677};
678
679&uart0 {
680	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
681	status = "okay";
682
683	bluetooth {
684		compatible = "brcm,bcm43438-bt";
685		max-speed = <2000000>;
686		device-wakeup-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
687		host-wakeup-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
688		shutdown-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_HIGH>;
689		pinctrl-names = "default";
690		pinctrl-0 = <&bt_host_wake &bt_reg_on &bt_rst &bt_wake>;
691	};
692};
693
694&uart1 {
695	status = "okay";
696};
697
698&uart2 {
699	status = "okay";
700};
701
702&uart3 {
703	pinctrl-0 = <&uart3_xfer &uart3_cts &uart3_rts>;
704	status = "okay";
705};
706
707&usbphy {
708	status = "okay";
709};
710
711&usb_host {
712	status = "okay";
713};
714
715&usb_otg {
716	status = "okay";
717};
718
719&vop0 {
720	status = "okay";
721};
722
723&vop0_out {
724	vop0_out_lvds: endpoint {
725		remote-endpoint = <&lvds_in_vop0>;
726	};
727};
728
729&vop1 {
730	pinctrl-names = "default";
731	pinctrl-0 = <&lcdc1_dclk &lcdc1_den &lcdc1_hsync
732		     &lcdc1_vsync &lcdc1_rgb24>;
733	status = "okay";
734};
735
736&wdt {
737	status = "okay";
738};
v5.4
  1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2/*
  3 * Copyright (c) 2018 MundoReader S.L.
  4 * Author:  Heiko Stuebner <heiko.stuebner@bq.com>
  5 */
  6
  7/dts-v1/;
  8#include <dt-bindings/i2c/i2c.h>
  9#include <dt-bindings/input/input.h>
 10#include "rk3188.dtsi"
 11
 12/ {
 13	model = "BQ Edison2 Quad-Core";
 14	compatible = "mundoreader,bq-edison2qc", "rockchip,rk3188";
 15
 
 
 
 
 
 
 16	memory@60000000 {
 17		device_type = "memory";
 18		reg = <0x60000000 0x80000000>;
 19	};
 20
 21	backlight: backlight {
 22		compatible = "pwm-backlight";
 23		power-supply = <&vsys>;
 24		pwms = <&pwm1 0 25000>;
 25	};
 26
 27	gpio-keys {
 28		compatible = "gpio-keys";
 29		autorepeat;
 30		pinctrl-names = "default";
 31		pinctrl-0 = <&pwr_key &usb_int>;
 32
 33		power {
 34			gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
 35			linux,code = <KEY_POWER>;
 36			label = "GPIO Key Power";
 37			linux,input-type = <1>;
 38			debounce-interval = <100>;
 39			wakeup-source;
 40		};
 41
 42		wake_on_usb: wake-on-usb {
 43			label = "Wake-on-USB";
 44			gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
 45			linux,code = <KEY_WAKEUP>;
 46			wakeup-source;
 47		};
 48	};
 49
 50	gpio-poweroff {
 51		compatible = "gpio-poweroff";
 52		gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
 53		pinctrl-names = "default";
 54		pinctrl-0 = <&pwr_hold>;
 55		/* only drive the pin low until device is off */
 56		active-delay-ms = <3000>;
 57	};
 58
 59	lvds-encoder {
 60		compatible = "ti,sn75lvds83", "lvds-encoder";
 61		#address-cells = <1>;
 62		#size-cells = <0>;
 63
 64		port@0 {
 65			reg = <0>;
 66			lvds_in_vop0: endpoint {
 67				remote-endpoint = <&vop0_out_lvds>;
 
 
 
 
 
 
 68			};
 69		};
 70
 71		port@1 {
 72			reg = <1>;
 73			lvds_out_panel: endpoint {
 74				remote-endpoint = <&panel_in_lvds>;
 
 
 75			};
 76		};
 77	};
 78
 79	panel {
 80		compatible = "innolux,ee101ia-01d", "panel-lvds";
 81		backlight = <&backlight>;
 82
 83		/* pin LCD_CS, Nshtdn input of lvds-encoder */
 84		enable-gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
 85		pinctrl-names = "default";
 86		pinctrl-0 = <&lcd_cs>;
 87		power-supply = <&vcc_lcd>;
 88
 89		data-mapping = "vesa-24";
 90		height-mm = <163>;
 91		width-mm = <261>;
 92
 93		panel-timing {
 94			clock-frequency = <72000000>;
 95			hactive = <1280>;
 96			vactive = <800>;
 97			hback-porch = <160>;
 98			hfront-porch = <16>;
 99			hsync-len = <10>;
100			vback-porch = <23>;
101			vfront-porch = <12>;
102			vsync-len = <3>;
103		};
104
105		port {
106			panel_in_lvds: endpoint {
107				remote-endpoint = <&lvds_out_panel>;
108			};
109		};
110	};
111
112	sdio_pwrseq: sdio-pwrseq {
113		compatible = "mmc-pwrseq-simple";
114		clocks = <&hym8563>;
115		clock-names = "ext_clock";
116		pinctrl-names = "default";
117		pinctrl-0 = <&wifi_reg_on>;
118		reset-gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
119	};
120
121	avdd_cif: cif-avdd-regulator {
122		compatible = "regulator-fixed";
123		regulator-name = "avdd-cif";
124		regulator-min-microvolt = <2800000>;
125		regulator-max-microvolt = <2800000>;
126		gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
127		pinctrl-names = "default";
128		pinctrl-0 = <&cif_avdd_en>;
129		startup-delay-us = <100000>;
130		vin-supply = <&vcc28_cif>;
131	};
132
133	vcc_5v: vcc-5v-regulator {
134		compatible = "regulator-fixed";
135		regulator-name = "vcc-5v";
136		regulator-min-microvolt = <5000000>;
137		regulator-max-microvolt = <5000000>;
138		enable-active-high;
139		gpio = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
140		pinctrl-names = "default";
141		pinctrl-0 = <&v5_drv>;
142		vin-supply = <&vsys>;
143	};
144
145	vcc_lcd: lcd-regulator {
146		compatible = "regulator-fixed";
147		regulator-name = "vcc-lcd";
148		gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>;
149		pinctrl-names = "default";
150		pinctrl-0 = <&lcd_en>;
151		startup-delay-us = <50000>;
152		vin-supply = <&vcc_io>;
153	};
154
155	vcc_otg: usb-otg-regulator {
156		compatible = "regulator-fixed";
157		regulator-name = "vcc-otg";
158		regulator-min-microvolt = <5000000>;
159		regulator-max-microvolt = <5000000>;
160		enable-active-high;
161		gpio = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
162		pinctrl-names = "default";
163		pinctrl-0 = <&otg_drv>;
164		startup-delay-us = <100000>;
165		vin-supply = <&vcc_5v>;
166	};
167
168	vcc_sd: sdmmc-regulator {
169		compatible = "regulator-fixed";
170		regulator-name = "vcc-sd";
171		regulator-min-microvolt = <3300000>;
172		regulator-max-microvolt = <3300000>;
173		gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
174		pinctrl-names = "default";
175		pinctrl-0 = <&sdmmc_pwr>;
176		startup-delay-us = <100000>;
177		vin-supply = <&vcc_io>;
178	};
179
180	vccq_emmc: emmc-vccq-regulator {
181		compatible = "regulator-fixed";
182		regulator-name = "vccq-emmc";
183		regulator-min-microvolt = <2800000>;
184		regulator-max-microvolt = <2800000>;
185		vin-supply = <&vcc_io>;
186	};
187
188	/* supplied from the bq24196 */
189	vsys: vsys-regulator {
190		compatible = "regulator-fixed";
191		regulator-name = "vsys";
192		regulator-min-microvolt = <5000000>;
193		regulator-max-microvolt = <5000000>;
194		regulator-boot-on;
195	};
196};
197
198&cpu0 {
199	cpu-supply = <&vdd_arm>;
200};
201
202&cpu1 {
203	cpu-supply = <&vdd_arm>;
204};
205
206&cpu2 {
207	cpu-supply = <&vdd_arm>;
208};
209
210&cpu3 {
211	cpu-supply = <&vdd_arm>;
212};
213
214&cru {
215	assigned-clocks = <&cru PLL_GPLL>, <&cru PLL_CPLL>,
216			  <&cru ACLK_CPU>,
217			  <&cru HCLK_CPU>, <&cru PCLK_CPU>,
218			  <&cru ACLK_PERI>, <&cru HCLK_PERI>,
219			  <&cru PCLK_PERI>;
220	assigned-clock-rates = <594000000>, <504000000>,
221			       <300000000>,
222			       <150000000>, <75000000>,
223			       <300000000>, <150000000>,
224			       <75000000>;
225};
226
227&emmc {
228	bus-width = <8>;
229	cap-mmc-highspeed;
230	non-removable;
231	pinctrl-names = "default";
232	pinctrl-0 = <&emmc_clk &emmc_cmd>;
233	vmmc-supply = <&vcc_io>;
234	vqmmc-supply = <&vccq_emmc>;
235	status = "okay";
236};
237
238&gpu {
239	status = "okay";
240};
241
242&i2c0 {
243	clock-frequency = <400000>;
244	status = "okay";
245
246	lis3de: accelerometer@29 {
247		compatible = "st,lis3de";
248		reg = <0x29>;
249		interrupt-parent = <&gpio0>;
250		interrupts = <RK_PB7 IRQ_TYPE_EDGE_RISING>;
251		pinctrl-names = "default";
252		pinctrl-0 = <&gsensor_int>;
253		rotation-matrix = "1", "0", "0",
254				  "0", "-1", "0",
255				  "0", "0", "1";
256		vdd-supply = <&vcc_io>;
257	};
258};
259
260&i2c1 {
261	clock-frequency = <400000>;
262	status = "okay";
263
264	tmp108@48 {
265		compatible = "ti,tmp108";
266		reg = <0x48>;
267		interrupt-parent = <&gpio1>;
268		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
269		pinctrl-names = "default";
270		pinctrl-0 = <&tmp_alrt>;
271		#thermal-sensor-cells = <0>;
272	};
273
274	hym8563: rtc@51 {
275		compatible = "haoyu,hym8563";
276		reg = <0x51>;
277		interrupt-parent = <&gpio0>;
278		interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
279		pinctrl-names = "default";
280		pinctrl-0 = <&rtc_int>;
281		#clock-cells = <0>;
282		clock-output-names = "xin32k";
283	};
284
285	bat: battery@55 {
286		compatible = "ti,bq27541";
287		reg = <0x55>;
288		power-supplies = <&bq24196>;
289	};
290
291	act8846: pmic@5a {
292		compatible = "active-semi,act8846";
293		reg = <0x5a>;
294		pinctrl-names = "default";
295		pinctrl-0 = <&dvs0_ctl &pmic_int>;
296
297		vp1-supply = <&vsys>;
298		vp2-supply = <&vsys>;
299		vp3-supply = <&vsys>;
300		vp4-supply = <&vsys>;
301		inl1-supply = <&vcc_io>;
302		inl2-supply = <&vsys>;
303		inl3-supply = <&vsys>;
304
305		regulators {
306			vcc_ddr: REG1 {
307				regulator-name = "VCC_DDR";
308				regulator-min-microvolt = <1200000>;
309				regulator-max-microvolt = <1200000>;
310				regulator-always-on;
311			};
312
313			vdd_log: REG2 {
314				regulator-name = "VDD_LOG";
315				regulator-min-microvolt = <1000000>;
316				regulator-max-microvolt = <1200000>;
317				regulator-always-on;
318			};
319
320			vdd_arm: REG3 {
321				regulator-name = "VDD_ARM";
322				regulator-min-microvolt = <875000>;
323				regulator-max-microvolt = <1350000>;
324				regulator-always-on;
325			};
326
327			vcc_io: vcc_hdmi: REG4 {
328				regulator-name = "VCC_IO";
329				regulator-min-microvolt = <3000000>;
330				regulator-max-microvolt = <3000000>;
331				regulator-always-on;
332			};
333
334			vdd_10: REG5 {
335				regulator-name = "VDD_10";
336				regulator-min-microvolt = <1000000>;
337				regulator-max-microvolt = <1000000>;
338				regulator-always-on;
339			};
340
341			vdd_12: REG6 {
342				regulator-name = "VDD_12";
343				regulator-min-microvolt = <1200000>;
344				regulator-max-microvolt = <1200000>;
345				regulator-always-on;
346			};
347
348			vcc18_cif: REG7 {
349				regulator-name = "VCC18_CIF";
350				regulator-min-microvolt = <1800000>;
351				regulator-max-microvolt = <1800000>;
352				regulator-always-on;
353			};
354
355			vcca_33: REG8 {
356				regulator-name = "VCCA_33";
357				regulator-min-microvolt = <3300000>;
358				regulator-max-microvolt = <3300000>;
359				regulator-always-on;
360			};
361
362			vcc_tp: REG9 {
363				regulator-name = "VCC_TP";
364				regulator-min-microvolt = <3300000>;
365				regulator-max-microvolt = <3300000>;
366				regulator-always-on;
367			};
368
369			vccio_wl: REG10 {
370				regulator-name = "VCCIO_WL";
371				regulator-min-microvolt = <2800000>;
372				regulator-max-microvolt = <2800000>;
373				regulator-always-on;
374			};
375
376			vcc_18: REG11 {
377				regulator-name = "VCC_18";
378				regulator-min-microvolt = <1800000>;
379				regulator-max-microvolt = <1800000>;
380				regulator-always-on;
381			};
382
383			vcc28_cif: REG12 {
384				regulator-name = "VCC28_CIF";
385				regulator-min-microvolt = <2800000>;
386				regulator-max-microvolt = <2800000>;
387				regulator-always-on;
388			};
389		};
390	};
391
392	bq24196: charger@6b {
393		compatible = "ti,bq24196";
394		reg = <0x6b>;
395		interrupt-parent = <&gpio0>;
396		interrupts = <RK_PD7 IRQ_TYPE_EDGE_FALLING>;
397		pinctrl-names = "default";
398		pinctrl-0 = <&charger_int &chg_ctl &otg_en>;
399		ti,system-minimum-microvolt = <3200000>;
400		monitored-battery = <&bat>;
401		omit-battery-class;
402
403		usb_otg_vbus: usb-otg-vbus { };
404	};
405};
406
407&i2c2 {
408	clock-frequency = <400000>;
409	status = "okay";
410
411	ft5606: touchscreen@3e {
412		compatible = "edt,edt-ft5506";
413		reg = <0x3e>;
414		interrupt-parent = <&gpio1>;
415		interrupts = <RK_PB7 IRQ_TYPE_EDGE_FALLING>;
416		pinctrl-names = "default";
417		pinctrl-0 = <&tp_int &tp_rst>;
418		reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
419		touchscreen-inverted-y;
420		/* hw ts resolution does not match display */
421		touchscreen-size-y = <1024>;
422		touchscreen-size-x = <768>;
423		touchscreen-swapped-x-y;
424	};
425};
426
427&i2c3 {
428	clock-frequency = <400000>;
429	status = "okay";
430};
431
432&i2c4 {
433	clock-frequency = <400000>;
434	status = "okay";
435
436	rt5616: codec@1b {
437		compatible = "realtek,rt5616";
438		reg = <0x1b>;
439		clocks = <&cru SCLK_I2S0>;
440		clock-names = "mclk";
441		#sound-dai-cells = <0>;
442	};
443};
444
445&i2s0 {
446	status = "okay";
447};
448
449&mmc0 {
450	bus-width = <4>;
451	cap-mmc-highspeed;
452	cap-sd-highspeed;
453	disable-wp;
454	pinctrl-names = "default";
455	pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
456	vmmc-supply = <&vcc_sd>;
457	status = "okay";
458};
459
460&mmc1 {
461	bus-width = <4>;
462	cap-sd-highspeed;
463	keep-power-in-suspend;
464	mmc-pwrseq = <&sdio_pwrseq>;
465	non-removable;
466	pinctrl-names = "default";
467	pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_bus4>;
468	vmmcq-supply = <&vccio_wl>;
 
 
469	status = "okay";
470
471	brcmf: wifi@1 {
 
472		compatible = "brcm,bcm4329-fmac";
473		interrupt-parent = <&gpio3>;
474		interrupts = <RK_PD2 GPIO_ACTIVE_HIGH>;
475		interrupt-names = "host-wake";
476		brcm,drive-strength = <5>;
477		pinctrl-names = "default";
478		pinctrl-0 = <&wifi_host_wake>;
479	};
480};
481
482&pwm1 {
483	status = "okay";
484};
485
486&pinctrl {
487	pcfg_output_high: pcfg-output-high {
488		output-high;
489	};
490
491	pcfg_output_low: pcfg-output-low {
492		output-low;
493	};
494
495	act8846 {
496		dvs0_ctl: dvs0-ctl {
497			rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_output_low>;
498		};
499
500		pmic_int: pmic-int {
501			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
502		};
503	};
504
505	bq24196 {
506		charger_int: charger-int {
507			rockchip,pins = <0 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>;
508		};
509
510		/* pin hog to make it select usb profile */
511		chg_ctl: chg-ctl {
512			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>;
513		};
514
515		/* low: charging, high: complete, fault: blinking */
516		chg_det: chg-det {
517			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
518		};
519
520		/* charging enabled when pin low and register set */
521		chg_en: chg-en {
522			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_low>;
523		};
524
525		/* bq29196 powergood (when low) signal */
526		dc_det: dc-det {
527			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
528		};
529
530		/* wire bq24196 otg pin to high, to enable 500mA charging */
531		otg_en: otg-en {
532			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>;
533		};
534	};
535
536	camera {
537		cif0_pdn: cif0-pdn {
538			rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
539		};
540
541		cif1_pdn: cif1-pdn {
542			rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
543		};
544
545		cif_avdd_en: cif-avdd-en {
546			rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
547		};
548	};
549
550	display {
551		lcd_cs: lcd-cs {
552			rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
553		};
554
555		lcd_en: lcd-en {
556			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
557		};
558	};
559
560	ft5606 {
561		tp_int: tp-int {
562			rockchip,pins = <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
563		};
564
565		tp_rst: tp-rst {
566			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
567		};
568	};
569
570	hdmi {
571		hdmi_int: hdmi-int {
572			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
573		};
574
575		hdmi_rst: hdmi-rst {
576			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
577		};
578	};
579
580	hym8563 {
581		rtc_int: rtc-int {
582			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
583		};
584	};
585
586	keys {
587		pwr_hold: pwr-hold {
588			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
589		};
590
591		pwr_key: pwr-key {
592			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
593		};
594	};
595
596	lis3de {
597		gsensor_int: gsensor-int {
598			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
599		};
600	};
601
602	mmc {
603		sdmmc_pwr: sdmmc-pwr {
604			rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
605		};
606	};
607
608	tmp108 {
609		tmp_alrt: tmp-alrt {
610			rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
611		};
612	};
613
614	usb {
615		v5_drv: v5-drv {
616			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
617		};
618
619		otg_drv: otg-drv {
620			rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
621		};
622
623		usb_int: usb-int {
624			rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
625		};
626	};
627
628	rk903 {
629		bt_host_wake: bt-host-wake {
630			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
631		};
632
633		bt_reg_on: bt-reg-on {
634			rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
635		};
636
637		/* pin hog to pull the reset high */
638		bt_rst: bt-rst {
639			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_output_high>;
640		};
641
642		bt_wake: bt-wake {
643			rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
644		};
645
646		wifi_host_wake: wifi-host-wake {
647			rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
648		};
649
650		wifi_reg_on: wifi-reg-on {
651			rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
652		};
653	};
654};
655
656&saradc {
657	vref-supply = <&vcc_18>;
658	status = "okay";
659};
660
661&spdif {
662	status = "okay";
663};
664
665&uart0 {
666	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
667	status = "okay";
668
669	bluetooth {
670		compatible = "brcm,bcm43438-bt";
671		max-speed = <2000000>;
672		device-wakeup-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
673		host-wakeup-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
674		shutdown-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_HIGH>;
675		pinctrl-names = "default";
676		pinctrl-0 = <&bt_host_wake &bt_reg_on &bt_rst &bt_wake>;
677	};
678};
679
680&uart1 {
681	status = "okay";
682};
683
684&uart2 {
685	status = "okay";
686};
687
688&uart3 {
689	pinctrl-0 = <&uart3_xfer &uart3_cts &uart3_rts>;
690	status = "okay";
691};
692
693&usbphy {
694	status = "okay";
695};
696
697&usb_host {
698	status = "okay";
699};
700
701&usb_otg {
702	status = "okay";
703};
704
705&vop0 {
706	status = "okay";
707};
708
709&vop0_out {
710	vop0_out_lvds: endpoint {
711		remote-endpoint = <&lvds_in_vop0>;
712	};
713};
714
715&vop1 {
716	pinctrl-names = "default";
717	pinctrl-0 = <&lcdc1_dclk &lcdc1_den &lcdc1_hsync
718		     &lcdc1_vsync &lcdc1_rgb24>;
719	status = "okay";
720};
721
722&wdt {
723	status = "okay";
724};