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		button-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&sdhc_1 {
103	status = "okay";
104
105	pinctrl-names = "default", "sleep";
106	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
107	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
108};
109
110&sdhc_2 {
111	status = "okay";
112
113	pinctrl-names = "default", "sleep";
114	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
115	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
116
117	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
118};
119
120&usb {
121	status = "okay";
122	extcon = <&usb_id>, <&usb_id>;
123};
124
125&usb_hs_phy {
126	extcon = <&usb_id>;
127};
128
129&wcnss {
130	status = "okay";
131};
132
133&wcnss_iris {
134	compatible = "qcom,wcn3620";
135};
136
137&smd_rpm_regulators {
138	vdd_l1_l2_l3-supply = <&pm8916_s3>;
139	vdd_l4_l5_l6-supply = <&pm8916_s4>;
140	vdd_l7-supply = <&pm8916_s4>;
141
142	s3 {
143		regulator-min-microvolt = <1200000>;
144		regulator-max-microvolt = <1300000>;
145	};
146
147	s4 {
148		regulator-min-microvolt = <1800000>;
149		regulator-max-microvolt = <2100000>;
150	};
151
152	l1 {
153		regulator-min-microvolt = <1225000>;
154		regulator-max-microvolt = <1225000>;
155	};
156
157	l2 {
158		regulator-min-microvolt = <1200000>;
159		regulator-max-microvolt = <1200000>;
160	};
161
162	l4 {
163		regulator-min-microvolt = <2050000>;
164		regulator-max-microvolt = <2050000>;
165	};
166
167	l5 {
168		regulator-min-microvolt = <1800000>;
169		regulator-max-microvolt = <1800000>;
170	};
171
172	l6 {
173		regulator-min-microvolt = <1800000>;
174		regulator-max-microvolt = <1800000>;
175	};
176
177	l7 {
178		regulator-min-microvolt = <1800000>;
179		regulator-max-microvolt = <1800000>;
180	};
181
182	l8 {
183		regulator-min-microvolt = <2850000>;
184		regulator-max-microvolt = <2900000>;
185	};
186
187	l9 {
188		regulator-min-microvolt = <3300000>;
189		regulator-max-microvolt = <3300000>;
190	};
191
192	l10 {
193		regulator-min-microvolt = <2700000>;
194		regulator-max-microvolt = <2800000>;
195	};
196
197	l11 {
198		regulator-min-microvolt = <1800000>;
199		regulator-max-microvolt = <2950000>;
200		regulator-allow-set-load;
201		regulator-system-load = <200000>;
202	};
203
204	l12 {
205		regulator-min-microvolt = <1800000>;
206		regulator-max-microvolt = <2950000>;
207	};
208
209	l13 {
210		regulator-min-microvolt = <3075000>;
211		regulator-max-microvolt = <3075000>;
212	};
213
214	l14 {
215		regulator-min-microvolt = <1800000>;
216		regulator-max-microvolt = <3300000>;
217	};
218
219	l15 {
220		regulator-min-microvolt = <1800000>;
221		regulator-max-microvolt = <3300000>;
222	};
223
224	l16 {
225		regulator-min-microvolt = <1800000>;
226		regulator-max-microvolt = <3300000>;
227	};
228
229	l17 {
230		regulator-min-microvolt = <2850000>;
231		regulator-max-microvolt = <2850000>;
232	};
233
234	l18 {
235		regulator-min-microvolt = <2700000>;
236		regulator-max-microvolt = <2700000>;
237	};
238};
239
240&msmgpio {
241	button_backlight_default: button-backlight-default-state {
242		pins = "gpio17";
243		function = "gpio";
244
245		drive-strength = <2>;
246		bias-disable;
247	};
248
249	gpio_keys_default: gpio-keys-default-state {
250		pins = "gpio107";
251		function = "gpio";
252
253		drive-strength = <2>;
254		bias-pull-up;
255	};
256
257	mag_reset_default: mag-reset-default-state {
258		pins = "gpio111";
259		function = "gpio";
260
261		drive-strength = <2>;
262		bias-disable;
263	};
264
265	usb_id_default: usb-id-default-state {
266		pins = "gpio110";
267		function = "gpio";
268
269		drive-strength = <8>;
270		bias-pull-up;
271	};
272};
273