xref: /freebsd/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-asus-nexus7-flo.dts (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1// SPDX-License-Identifier: GPL-2.0
2#include <dt-bindings/gpio/gpio.h>
3#include <dt-bindings/input/input.h>
4#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
5
6#include "qcom-apq8064-v2.0.dtsi"
7#include "pm8821.dtsi"
8#include "pm8921.dtsi"
9
10/ {
11	model = "Asus Nexus7(flo)";
12	compatible = "asus,nexus7-flo", "qcom,apq8064";
13	chassis-type = "tablet";
14
15	aliases {
16		serial0 = &gsbi7_serial;
17		serial1 = &gsbi6_serial;
18	};
19
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	reserved-memory {
25		#address-cells = <1>;
26		#size-cells = <1>;
27		ranges;
28
29		ramoops@88d00000 {
30			compatible = "ramoops";
31			reg = <0x88d00000 0x100000>;
32			record-size = <0x00020000>;
33			console-size = <0x00020000>;
34			ftrace-size = <0x00020000>;
35		};
36	};
37
38	ext_3p3v: regulator-ext-3p3v {
39		compatible = "regulator-fixed";
40		regulator-min-microvolt = <3300000>;
41		regulator-max-microvolt = <3300000>;
42		regulator-name = "ext_3p3v";
43		startup-delay-us = <0>;
44		gpio = <&tlmm_pinmux 77 GPIO_ACTIVE_HIGH>;
45		enable-active-high;
46		regulator-boot-on;
47	};
48
49	gpio-keys {
50		compatible = "gpio-keys";
51		key-volume-up {
52			label = "Volume Up";
53			gpios = <&pm8921_gpio 4 GPIO_ACTIVE_HIGH>;
54			linux,code = <KEY_VOLUMEUP>;
55		};
56		key-volume-down {
57			label = "Volume Down";
58			gpios = <&pm8921_gpio 38 GPIO_ACTIVE_HIGH>;
59			linux,code = <KEY_VOLUMEDOWN>;
60		};
61	};
62
63	soc {
64		sram@2a03f000 {
65			compatible = "qcom,apq8064-imem", "syscon", "simple-mfd";
66			reg = <0x2a03f000 0x1000>;
67
68			reboot-mode {
69				compatible = "syscon-reboot-mode";
70				offset = <0x65c>;
71
72				mode-normal = <0x77665501>;
73				mode-bootloader = <0x77665500>;
74				mode-recovery = <0x77665502>;
75			};
76		};
77	};
78};
79
80&dsi0 {
81	vdda-supply = <&pm8921_l2>;/*VDD_MIPI1 to 4*/
82	vdd-supply = <&pm8921_l8>;
83	vddio-supply = <&pm8921_lvs7>;
84	avdd-supply = <&pm8921_l11>;
85	status = "okay";
86
87	panel@0 {
88		reg = <0>;
89		compatible = "jdi,lt070me05000";
90
91		vddp-supply = <&pm8921_l17>;
92		iovcc-supply = <&pm8921_lvs7>;
93
94		enable-gpios = <&pm8921_gpio 36 GPIO_ACTIVE_HIGH>;
95		reset-gpios = <&tlmm_pinmux 54 GPIO_ACTIVE_LOW>;
96		dcdc-en-gpios = <&pm8921_gpio 23 GPIO_ACTIVE_HIGH>;
97
98		port {
99			panel_in: endpoint {
100				remote-endpoint = <&dsi0_out>;
101			};
102		};
103	};
104};
105
106&dsi0_in {
107	remote-endpoint = <&mdp_dsi1_out>;
108};
109
110&dsi0_out {
111	remote-endpoint = <&panel_in>;
112	data-lanes = <0 1 2 3>;
113};
114
115&dsi0_phy {
116	vddio-supply = <&pm8921_lvs7>;/*VDD_PLL2_1 to 7*/
117	status = "okay";
118};
119
120&gsbi1 {
121	qcom,mode = <GSBI_PROT_I2C>;
122	status = "okay";
123};
124
125&gsbi1_i2c {
126	status = "okay";
127	clock-frequency = <200000>;
128	pinctrl-0 = <&i2c1_pins>;
129	pinctrl-names = "default";
130
131	eeprom@52 {
132		compatible = "atmel,24c128";
133		reg = <0x52>;
134		pagesize = <32>;
135	};
136
137	bq27541@55 {
138		compatible = "ti,bq27541";
139		reg = <0x55>;
140	};
141
142};
143
144&gsbi3 {
145	qcom,mode = <GSBI_PROT_I2C>;
146	status = "okay";
147};
148
149&gsbi3_i2c {
150	clock-frequency = <200000>;
151	pinctrl-0 = <&i2c3_pins>;
152	pinctrl-names = "default";
153	status = "okay";
154
155	trackpad@10 {
156		compatible = "elan,ekth3500";
157		reg = <0x10>;
158		interrupt-parent = <&tlmm_pinmux>;
159		interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
160	};
161};
162
163&gsbi6 {
164	qcom,mode = <GSBI_PROT_I2C_UART>;
165	status = "okay";
166};
167
168&gsbi6_serial {
169	pinctrl-names = "default";
170	pinctrl-0 = <&gsbi6_uart_4pins>;
171	status = "okay";
172};
173
174&gsbi7 {
175	qcom,mode = <GSBI_PROT_I2C_UART>;
176	status = "okay";
177};
178
179&gsbi7_serial {
180	status = "okay";
181};
182
183&mdp {
184	status = "okay";
185};
186
187&mdp_dsi1_out {
188	remote-endpoint = <&dsi0_in>;
189};
190
191&pm8821 {
192	interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
193};
194
195&pm8921 {
196	interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
197};
198
199&rpm {
200	regulators {
201		compatible = "qcom,rpm-pm8921-regulators";
202
203		vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
204		vin_lvs1_3_6-supply = <&pm8921_s4>;
205		vin_lvs4_5_7-supply = <&pm8921_s4>;
206
207		vdd_l24-supply = <&pm8921_s1>;
208		vdd_l25-supply = <&pm8921_s1>;
209		vin_lvs2-supply = <&pm8921_s1>;
210
211		vdd_l26-supply = <&pm8921_s7>;
212		vdd_l27-supply = <&pm8921_s7>;
213		vdd_l28-supply = <&pm8921_s7>;
214
215		vdd_ncp-supply = <&pm8921_l6>;
216
217		/* Buck SMPS */
218		pm8921_s1: s1 {
219			regulator-always-on;
220			regulator-min-microvolt = <1225000>;
221			regulator-max-microvolt = <1225000>;
222			qcom,switch-mode-frequency = <3200000>;
223			bias-pull-down;
224		};
225
226		/* msm otg HSUSB_VDDCX */
227		pm8921_s3: s3 {
228			regulator-min-microvolt = <500000>;
229			regulator-max-microvolt = <1150000>;
230			qcom,switch-mode-frequency = <4800000>;
231		};
232
233		/*
234		 * msm_sdcc.1-sdc-vdd_io
235		 * tabla2x-slim-CDC_VDDA_RX
236		 * tabla2x-slim-CDC_VDDA_TX
237		 * tabla2x-slim-CDC_VDD_CP
238		 * tabla2x-slim-VDDIO_CDC
239		 */
240		pm8921_s4: s4 {
241			regulator-min-microvolt = <1800000>;
242			regulator-max-microvolt = <1800000>;
243			qcom,switch-mode-frequency = <3200000>;
244			regulator-always-on;
245		};
246
247		pm8921_s7: s7 {
248			regulator-min-microvolt = <1300000>;
249			regulator-max-microvolt = <1300000>;
250			qcom,switch-mode-frequency = <3200000>;
251		};
252
253		/* mipi_dsi.1-dsi1_pll_vdda */
254		pm8921_l2: l2 {
255			regulator-min-microvolt = <1200000>;
256			regulator-max-microvolt = <1200000>;
257			regulator-always-on;
258		};
259
260		/* msm_otg-HSUSB_3p3 */
261		pm8921_l3: l3 {
262			regulator-min-microvolt = <3075000>;
263			regulator-max-microvolt = <3075000>;
264			bias-pull-down;
265		};
266
267		/* msm_otg-HSUSB_1p8 */
268		pm8921_l4: l4 {
269			regulator-min-microvolt = <1800000>;
270			regulator-max-microvolt = <1800000>;
271			bias-pull-down;
272		};
273
274		/* msm_sdcc.1-sdc_vdd */
275		pm8921_l5: l5 {
276			regulator-min-microvolt = <2950000>;
277			regulator-max-microvolt = <2950000>;
278			regulator-always-on;
279			bias-pull-down;
280		};
281
282		pm8921_l6: l6 {
283			regulator-min-microvolt = <2950000>;
284			regulator-max-microvolt = <2950000>;
285		};
286
287		pm8921_l8: l8 {
288		};
289
290		/* mipi_dsi.1-dsi1_avdd */
291		pm8921_l11: l11 {
292			regulator-min-microvolt = <3000000>;
293			regulator-max-microvolt = <3000000>;
294			bias-pull-down;
295			regulator-always-on;
296		};
297
298		/* pwm_power for backlight */
299		pm8921_l17: l17 {
300			regulator-min-microvolt = <3000000>;
301			regulator-max-microvolt = <3000000>;
302			regulator-always-on;
303		};
304
305		/* camera, qdsp6 */
306		pm8921_l23: l23 {
307			regulator-min-microvolt = <1800000>;
308			regulator-max-microvolt = <1800000>;
309			bias-pull-down;
310		};
311
312		/*
313		 * tabla2x-slim-CDC_VDDA_A_1P2V
314		 * tabla2x-slim-VDDD_CDC_D
315		 */
316		pm8921_l25: l25 {
317			regulator-min-microvolt = <1250000>;
318			regulator-max-microvolt = <1250000>;
319			bias-pull-down;
320		};
321
322		pm8921_lvs1: lvs1 {
323			bias-pull-down;
324		};
325
326		pm8921_lvs4: lvs4 {
327			bias-pull-down;
328		};
329
330		pm8921_lvs5: lvs5 {
331			bias-pull-down;
332		};
333
334		pm8921_lvs6: lvs6 {
335			bias-pull-down;
336		};
337		/*
338		 * mipi_dsi.1-dsi1_vddio
339		 * pil_riva-pll_vdd
340		 */
341		pm8921_lvs7: lvs7 {
342			bias-pull-down;
343		};
344	};
345};
346
347/* eMMC */
348&sdcc1 {
349	vmmc-supply = <&pm8921_l5>;
350	vqmmc-supply = <&pm8921_s4>;
351	status = "okay";
352};
353
354&usb_hs1_phy {
355	v3p3-supply = <&pm8921_l3>;
356	v1p8-supply = <&pm8921_l4>;
357};
358
359/* OTG */
360&usb1 {
361	dr_mode = "otg";
362	status = "okay";
363};
364