1// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8916-pm8916.dtsi"
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/input/input.h>
8#include <dt-bindings/leds/common.h>
9
10/ {
11	model = "BQ Aquaris X5 (Longcheer L8910)";
12	compatible = "longcheer,l8910", "qcom,msm8916";
13	chassis-type = "handset";
14
15	aliases {
16		serial0 = &blsp1_uart2;
17	};
18
19	chosen {
20		stdout-path = "serial0";
21	};
22
23	gpio-keys {
24		compatible = "gpio-keys";
25
26		pinctrl-names = "default";
27		pinctrl-0 = <&gpio_keys_default>;
28
29		label = "GPIO Buttons";
30
31		volume-up {
32			label = "Volume Up";
33			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
34			linux,code = <KEY_VOLUMEUP>;
35		};
36	};
37
38	leds {
39		compatible = "gpio-leds";
40
41		led-0 {
42			gpios = <&msmgpio 17 GPIO_ACTIVE_HIGH>;
43			color = <LED_COLOR_ID_WHITE>;
44			default-state = "off";
45			function = LED_FUNCTION_KBD_BACKLIGHT;
46
47			pinctrl-names = "default";
48			pinctrl-0 = <&button_backlight_default>;
49		};
50	};
51
52	usb_id: usb-id {
53		compatible = "linux,extcon-usb-gpio";
54		id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
55		pinctrl-names = "default";
56		pinctrl-0 = <&usb_id_default>;
57	};
58};
59
60&blsp_i2c3 {
61	status = "okay";
62
63	magnetometer@d {
64		compatible = "asahi-kasei,ak09911";
65		reg = <0x0d>;
66
67		vdd-supply = <&pm8916_l17>;
68		vid-supply = <&pm8916_l6>;
69
70		reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;
71
72		pinctrl-names = "default";
73		pinctrl-0 = <&mag_reset_default>;
74	};
75
76	imu@68 {
77		compatible = "bosch,bmi160";
78		reg = <0x68>;
79
80		vdd-supply = <&pm8916_l17>;
81		vddio-supply = <&pm8916_l6>;
82
83		mount-matrix = "0", "1", "0",
84			      "-1", "0", "0",
85			       "0", "0", "1";
86	};
87};
88
89&blsp1_uart2 {
90	status = "okay";
91};
92
93&pm8916_resin {
94	status = "okay";
95	linux,code = <KEY_VOLUMEDOWN>;
96};
97
98&pm8916_vib {
99	status = "okay";
100};
101
102&pronto {
103	status = "okay";
104};
105
106&sdhc_1 {
107	status = "okay";
108
109	pinctrl-names = "default", "sleep";
110	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
111	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
112};
113
114&sdhc_2 {
115	status = "okay";
116
117	pinctrl-names = "default", "sleep";
118	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
119	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
120
121	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
122};
123
124&usb {
125	status = "okay";
126	extcon = <&usb_id>, <&usb_id>;
127};
128
129&usb_hs_phy {
130	extcon = <&usb_id>;
131};
132
133&smd_rpm_regulators {
134	vdd_l1_l2_l3-supply = <&pm8916_s3>;
135	vdd_l4_l5_l6-supply = <&pm8916_s4>;
136	vdd_l7-supply = <&pm8916_s4>;
137
138	s3 {
139		regulator-min-microvolt = <1200000>;
140		regulator-max-microvolt = <1300000>;
141	};
142
143	s4 {
144		regulator-min-microvolt = <1800000>;
145		regulator-max-microvolt = <2100000>;
146	};
147
148	l1 {
149		regulator-min-microvolt = <1225000>;
150		regulator-max-microvolt = <1225000>;
151	};
152
153	l2 {
154		regulator-min-microvolt = <1200000>;
155		regulator-max-microvolt = <1200000>;
156	};
157
158	l4 {
159		regulator-min-microvolt = <2050000>;
160		regulator-max-microvolt = <2050000>;
161	};
162
163	l5 {
164		regulator-min-microvolt = <1800000>;
165		regulator-max-microvolt = <1800000>;
166	};
167
168	l6 {
169		regulator-min-microvolt = <1800000>;
170		regulator-max-microvolt = <1800000>;
171	};
172
173	l7 {
174		regulator-min-microvolt = <1800000>;
175		regulator-max-microvolt = <1800000>;
176	};
177
178	l8 {
179		regulator-min-microvolt = <2850000>;
180		regulator-max-microvolt = <2900000>;
181	};
182
183	l9 {
184		regulator-min-microvolt = <3300000>;
185		regulator-max-microvolt = <3300000>;
186	};
187
188	l10 {
189		regulator-min-microvolt = <2700000>;
190		regulator-max-microvolt = <2800000>;
191	};
192
193	l11 {
194		regulator-min-microvolt = <1800000>;
195		regulator-max-microvolt = <2950000>;
196		regulator-allow-set-load;
197		regulator-system-load = <200000>;
198	};
199
200	l12 {
201		regulator-min-microvolt = <1800000>;
202		regulator-max-microvolt = <2950000>;
203	};
204
205	l13 {
206		regulator-min-microvolt = <3075000>;
207		regulator-max-microvolt = <3075000>;
208	};
209
210	l14 {
211		regulator-min-microvolt = <1800000>;
212		regulator-max-microvolt = <3300000>;
213	};
214
215	l15 {
216		regulator-min-microvolt = <1800000>;
217		regulator-max-microvolt = <3300000>;
218	};
219
220	l16 {
221		regulator-min-microvolt = <1800000>;
222		regulator-max-microvolt = <3300000>;
223	};
224
225	l17 {
226		regulator-min-microvolt = <2850000>;
227		regulator-max-microvolt = <2850000>;
228	};
229
230	l18 {
231		regulator-min-microvolt = <2700000>;
232		regulator-max-microvolt = <2700000>;
233	};
234};
235
236&msmgpio {
237	button_backlight_default: button-backlight-default {
238		pins = "gpio17";
239		function = "gpio";
240
241		drive-strength = <2>;
242		bias-disable;
243	};
244
245	gpio_keys_default: gpio-keys-default {
246		pins = "gpio107";
247		function = "gpio";
248
249		drive-strength = <2>;
250		bias-pull-up;
251	};
252
253	mag_reset_default: mag-reset-default {
254		pins = "gpio111";
255		function = "gpio";
256
257		drive-strength = <2>;
258		bias-disable;
259	};
260
261	usb_id_default: usb-id-default {
262		pins = "gpio110";
263		function = "gpio";
264
265		drive-strength = <8>;
266		bias-pull-up;
267	};
268};
269