1// SPDX-License-Identifier: GPL-2.0-only
2
3#include "msm8916-pm8916.dtsi"
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7
8/ {
9	aliases {
10		serial0 = &blsp1_uart2;
11	};
12
13	chosen {
14		stdout-path = "serial0";
15	};
16
17	reserved-memory {
18		/* Additional memory used by Samsung firmware modifications */
19		tz-apps@85500000 {
20			reg = <0x0 0x85500000 0x0 0xb00000>;
21			no-map;
22		};
23	};
24
25	gpio-keys {
26		compatible = "gpio-keys";
27
28		pinctrl-names = "default";
29		pinctrl-0 = <&gpio_keys_default>;
30
31		label = "GPIO Buttons";
32
33		volume-up {
34			label = "Volume Up";
35			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
36			linux,code = <KEY_VOLUMEUP>;
37		};
38
39		home {
40			label = "Home";
41			gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
42			linux,code = <KEY_HOMEPAGE>;
43		};
44	};
45
46	gpio-hall-sensor {
47		compatible = "gpio-keys";
48
49		pinctrl-names = "default";
50		pinctrl-0 = <&gpio_hall_sensor_default>;
51
52		label = "GPIO Hall Effect Sensor";
53
54		hall-sensor {
55			label = "Hall Effect Sensor";
56			gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
57			linux,input-type = <EV_SW>;
58			linux,code = <SW_LID>;
59			linux,can-disable;
60		};
61	};
62
63	reg_vdd_tsp: regulator-vdd-tsp {
64		compatible = "regulator-fixed";
65		regulator-name = "vdd_tsp";
66		regulator-min-microvolt = <3300000>;
67		regulator-max-microvolt = <3300000>;
68
69		gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>;
70		enable-active-high;
71
72		pinctrl-names = "default";
73		pinctrl-0 = <&tsp_en_default>;
74	};
75
76	i2c-muic {
77		compatible = "i2c-gpio";
78		sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
79		scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
80
81		#address-cells = <1>;
82		#size-cells = <0>;
83
84		muic: extcon@25 {
85			compatible = "siliconmitus,sm5502-muic";
86
87			reg = <0x25>;
88			interrupt-parent = <&msmgpio>;
89			interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
90
91			pinctrl-names = "default";
92			pinctrl-0 = <&muic_int_default>;
93		};
94	};
95};
96
97&blsp_i2c2 {
98	status = "okay";
99
100	accelerometer: accelerometer@10 {
101		compatible = "bosch,bmc150_accel";
102		reg = <0x10>;
103		interrupt-parent = <&msmgpio>;
104		interrupts = <115 IRQ_TYPE_EDGE_RISING>;
105
106		pinctrl-names = "default";
107		pinctrl-0 = <&accel_int_default>;
108	};
109
110	magnetometer@12 {
111		compatible = "bosch,bmc150_magn";
112		reg = <0x12>;
113	};
114};
115
116&blsp1_uart2 {
117	status = "okay";
118};
119
120&dsi0 {
121	pinctrl-names = "default", "sleep";
122	pinctrl-0 = <&mdss_default>;
123	pinctrl-1 = <&mdss_sleep>;
124};
125
126&pm8916_resin {
127	status = "okay";
128	linux,code = <KEY_VOLUMEDOWN>;
129};
130
131&pronto {
132	status = "okay";
133};
134
135&sdhc_1 {
136	status = "okay";
137
138	pinctrl-names = "default", "sleep";
139	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
140	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
141};
142
143&sdhc_2 {
144	status = "okay";
145
146	pinctrl-names = "default", "sleep";
147	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
148	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
149
150	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
151};
152
153&usb {
154	status = "okay";
155	extcon = <&muic>, <&muic>;
156};
157
158&usb_hs_phy {
159	extcon = <&muic>;
160};
161
162&smd_rpm_regulators {
163	vdd_l1_l2_l3-supply = <&pm8916_s3>;
164	vdd_l4_l5_l6-supply = <&pm8916_s4>;
165	vdd_l7-supply = <&pm8916_s4>;
166
167	s1 {
168		regulator-min-microvolt = <500000>;
169		regulator-max-microvolt = <1300000>;
170	};
171
172	s3 {
173		regulator-min-microvolt = <1200000>;
174		regulator-max-microvolt = <1300000>;
175	};
176
177	s4 {
178		regulator-min-microvolt = <1800000>;
179		regulator-max-microvolt = <2100000>;
180	};
181
182	l1 {
183		regulator-min-microvolt = <1225000>;
184		regulator-max-microvolt = <1225000>;
185	};
186
187	l2 {
188		regulator-min-microvolt = <1200000>;
189		regulator-max-microvolt = <1200000>;
190	};
191
192	l3 {
193		regulator-min-microvolt = <500000>;
194		regulator-max-microvolt = <1287500>;
195	};
196
197	l4 {
198		regulator-min-microvolt = <2050000>;
199		regulator-max-microvolt = <2050000>;
200	};
201
202	l5 {
203		regulator-min-microvolt = <1800000>;
204		regulator-max-microvolt = <1800000>;
205	};
206
207	l6 {
208		regulator-min-microvolt = <1800000>;
209		regulator-max-microvolt = <1800000>;
210	};
211
212	l7 {
213		regulator-min-microvolt = <1800000>;
214		regulator-max-microvolt = <1800000>;
215	};
216
217	l8 {
218		regulator-min-microvolt = <2850000>;
219		regulator-max-microvolt = <2900000>;
220	};
221
222	l9 {
223		regulator-min-microvolt = <3300000>;
224		regulator-max-microvolt = <3300000>;
225	};
226
227	l10 {
228		regulator-min-microvolt = <2700000>;
229		regulator-max-microvolt = <2800000>;
230	};
231
232	l11 {
233		regulator-min-microvolt = <1800000>;
234		regulator-max-microvolt = <2950000>;
235		regulator-allow-set-load;
236		regulator-system-load = <200000>;
237	};
238
239	l12 {
240		regulator-min-microvolt = <1800000>;
241		regulator-max-microvolt = <2950000>;
242	};
243
244	l13 {
245		regulator-min-microvolt = <3075000>;
246		regulator-max-microvolt = <3075000>;
247	};
248
249	l14 {
250		regulator-min-microvolt = <1800000>;
251		regulator-max-microvolt = <3300000>;
252	};
253
254	l15 {
255		regulator-min-microvolt = <1800000>;
256		regulator-max-microvolt = <3300000>;
257	};
258
259	l16 {
260		regulator-min-microvolt = <1800000>;
261		regulator-max-microvolt = <3300000>;
262	};
263
264	l17 {
265		regulator-min-microvolt = <2850000>;
266		regulator-max-microvolt = <2850000>;
267	};
268
269	l18 {
270		regulator-min-microvolt = <2700000>;
271		regulator-max-microvolt = <2700000>;
272	};
273};
274
275&msmgpio {
276	accel_int_default: accel-int-default {
277		pins = "gpio115";
278		function = "gpio";
279
280		drive-strength = <2>;
281		bias-disable;
282	};
283
284	gpio_keys_default: gpio-keys-default {
285		pins = "gpio107", "gpio109";
286		function = "gpio";
287
288		drive-strength = <2>;
289		bias-pull-up;
290	};
291
292	gpio_hall_sensor_default: gpio-hall-sensor-default {
293		pins = "gpio52";
294		function = "gpio";
295
296		drive-strength = <2>;
297		bias-disable;
298	};
299
300	mdss {
301		mdss_default: mdss-default {
302			pins = "gpio25";
303			function = "gpio";
304
305			drive-strength = <8>;
306			bias-disable;
307		};
308		mdss_sleep: mdss-sleep {
309			pins = "gpio25";
310			function = "gpio";
311
312			drive-strength = <2>;
313			bias-pull-down;
314		};
315	};
316
317	muic_int_default: muic-int-default {
318		pins = "gpio12";
319		function = "gpio";
320
321		drive-strength = <2>;
322		bias-disable;
323	};
324
325	tsp_en_default: tsp-en-default {
326		pins = "gpio73";
327		function = "gpio";
328
329		drive-strength = <2>;
330		bias-disable;
331	};
332};
333