xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/msm8916-lg-m216.dts (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8916-pm8916.dtsi"
6#include "msm8916-modem-qdsp6.dtsi"
7
8#include <dt-bindings/gpio/gpio.h>
9
10/ {
11	model = "LG K10 (K420n)";
12	compatible = "lg,m216", "qcom,msm8916";
13	chassis-type = "handset";
14
15	aliases {
16		mmc0 = &sdhc_1; /* eMMC */
17		mmc1 = &sdhc_2; /* SD card */
18		serial0 = &blsp_uart2;
19	};
20
21	chosen {
22		stdout-path = "serial0";
23	};
24
25	battery: battery {
26		compatible = "simple-battery";
27		voltage-min-design-microvolt = <3300000>;
28		voltage-max-design-microvolt = <4350000>;
29		energy-full-design-microwatt-hours = <8800000>;
30		charge-full-design-microamp-hours = <2300000>;
31
32		ocv-capacity-celsius = <25>;
33		ocv-capacity-table-0 = <4342000 100>, <4266000 95>, <4206000 90>,
34			<4148000 85>, <4094000 80>, <4046000 75>, <3994000 70>,
35			<3956000 65>, <3916000 60>, <3866000 55>, <3831000 50>,
36			<3808000 45>, <3789000 40>, <3776000 35>, <3769000 30>,
37			<3760000 25>, <3740000 20>, <3712000 16>, <3684000 13>,
38			<3676000 11>, <3674000 10>, <3672000 9>, <3669000 8>,
39			<3665000 7>, <3660000 6>, <3643000 5>, <3602000 4>,
40			<3542000 3>, <3458000 2>, <3326000 1>, <3000000 0>;
41	};
42
43	gpio-keys {
44		compatible = "gpio-keys";
45
46		pinctrl-0 = <&gpio_keys_default>;
47		pinctrl-names = "default";
48
49		label = "GPIO Buttons";
50
51		volume-up-button {
52			label = "Volume Up";
53			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
54			linux,code = <KEY_VOLUMEUP>;
55		};
56
57		volume-down-button {
58			label = "Volume Down";
59			gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
60			linux,code = <KEY_VOLUMEDOWN>;
61		};
62	};
63};
64
65&blsp_i2c2 {
66	status = "okay";
67
68	accelerometer@11 {
69		compatible = "bosch,bmc150_accel";
70		reg = <0x11>;
71
72		interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_RISING>;
73
74		mount-matrix =	 "0", "1", "0",
75				"-1", "0", "0",
76				 "0", "0", "1";
77
78		vdd-supply = <&pm8916_l17>;
79		vddio-supply = <&pm8916_l6>;
80
81		pinctrl-0 = <&accel_int_default>;
82		pinctrl-names = "default";
83	};
84
85	magnetometer@13 {
86		compatible = "bosch,bmc150_magn";
87		reg = <0x13>;
88
89		interrupts-extended = <&tlmm 69 IRQ_TYPE_EDGE_RISING>;
90
91		vdd-supply = <&pm8916_l17>;
92		vddio-supply = <&pm8916_l6>;
93
94		pinctrl-0 = <&magn_int_default>;
95		pinctrl-names = "default";
96	};
97};
98
99&blsp_i2c5 {
100	status = "okay";
101
102	touchscreen@34 {
103		compatible = "melfas,mip4_ts";
104		reg = <0x34>;
105
106		interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>;
107		ce-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
108
109		pinctrl-0 = <&touchscreen_default>;
110		pinctrl-names = "default";
111	};
112};
113
114&blsp_uart2 {
115	pinctrl-0 = <&blsp_uart2_console_default>;
116	pinctrl-1 = <&blsp_uart2_console_sleep>;
117	pinctrl-names = "default", "sleep";
118	status = "okay";
119};
120
121&mpss_mem {
122	reg = <0x0 0x86800000 0x0 0x4a00000>;
123};
124
125&pm8916_bms {
126	monitored-battery = <&battery>;
127	power-supplies = <&pm8916_charger>;
128
129	status = "okay";
130};
131
132&pm8916_charger {
133	qcom,fast-charge-safe-current = <700000>;
134	qcom,fast-charge-safe-voltage = <4300000>;
135
136	monitored-battery = <&battery>;
137	status = "okay";
138};
139
140&pm8916_codec {
141	qcom,micbias1-ext-cap;
142	qcom,micbias-lvl = <2800>;
143	qcom,mbhc-vthreshold-low = <75 100 120 180 500>;
144	qcom,mbhc-vthreshold-high = <75 100 120 180 500>;
145	qcom,hphl-jack-type-normally-open;
146};
147
148&pm8916_rpm_regulators {
149	pm8916_l17: l17 {
150		regulator-min-microvolt = <2850000>;
151		regulator-max-microvolt = <2850000>;
152	};
153};
154
155&pm8916_vib {
156	status = "okay";
157};
158
159&sdhc_1 {
160	status = "okay";
161};
162
163&sdhc_2 {
164	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
165	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
166	pinctrl-names = "default", "sleep";
167
168	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
169
170	status = "okay";
171};
172
173&sound {
174	audio-routing =
175		"AMIC1", "MIC BIAS External1",
176		"AMIC2", "MIC BIAS Internal2",
177		"AMIC3", "MIC BIAS External1";
178};
179
180&usb {
181	dr_mode = "peripheral";
182	extcon = <&pm8916_charger>;
183	status = "okay";
184};
185
186&usb_hs_phy {
187	extcon = <&pm8916_charger>;
188};
189
190&venus {
191	status = "okay";
192};
193
194&venus_mem {
195	status = "okay";
196};
197
198&wcnss {
199	status = "okay";
200};
201
202&wcnss_iris {
203	compatible = "qcom,wcn3620";
204};
205
206&wcnss_mem {
207	status = "okay";
208};
209
210&tlmm {
211	accel_int_default: accel-int-default-state {
212		pins = "gpio115";
213		function = "gpio";
214		drive-strength = <2>;
215		bias-disable;
216	};
217
218	gpio_keys_default: gpio-keys-default-state {
219		pins = "gpio107", "gpio108";
220		function = "gpio";
221		drive-strength = <2>;
222		bias-pull-up;
223	};
224
225	magn_int_default: magn-int-default-state {
226		pins = "gpio69";
227		function = "gpio";
228		drive-strength = <2>;
229		bias-disable;
230	};
231
232	sdc2_cd_default: sdc2-cd-default-state {
233		pins = "gpio38";
234		function = "gpio";
235		drive-strength = <2>;
236		bias-disable;
237	};
238
239	touchscreen_default: touchscreen-default-state {
240		touchscreen-pins {
241			pins = "gpio13";
242			function = "gpio";
243			drive-strength = <2>;
244			bias-pull-up;
245		};
246
247		ce-pins {
248			pins = "gpio12";
249			function = "gpio";
250			drive-strength = <2>;
251			bias-disable;
252		};
253	};
254};
255