xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt5-common.dtsi (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
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/interrupt-controller/irq.h>
9
10/ {
11	aliases {
12		serial0 = &blsp1_uart2;
13	};
14
15	chosen {
16		stdout-path = "serial0";
17	};
18
19	reserved-memory {
20		/* Additional memory used by Samsung firmware modifications */
21		tz-apps@85500000 {
22			reg = <0x0 0x85500000 0x0 0xb00000>;
23			no-map;
24		};
25	};
26
27	gpio-keys {
28		compatible = "gpio-keys";
29
30		pinctrl-0 = <&gpio_keys_default>;
31		pinctrl-names = "default";
32
33		label = "GPIO Buttons";
34
35		volume-up-button {
36			label = "Volume Up";
37			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
38			linux,code = <KEY_VOLUMEUP>;
39		};
40
41		home-button {
42			label = "Home";
43			gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
44			linux,code = <KEY_HOMEPAGE>;
45		};
46	};
47
48	gpio-hall-sensor {
49		compatible = "gpio-keys";
50
51		pinctrl-0 = <&gpio_hall_sensor_default>;
52		pinctrl-names = "default";
53
54		label = "GPIO Hall Effect Sensor";
55
56		hall-sensor-switch {
57			label = "Hall Effect Sensor";
58			gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
59			linux,input-type = <EV_SW>;
60			linux,code = <SW_LID>;
61			linux,can-disable;
62		};
63	};
64};
65
66&blsp_i2c4 {
67	status = "okay";
68
69	fuelgauge@36 {
70		compatible = "maxim,max77849-battery";
71		reg = <0x36>;
72
73		maxim,rsns-microohm = <10000>;
74		maxim,over-heat-temp = <600>;
75		maxim,over-volt = <4400>;
76
77		interrupt-parent = <&msmgpio>;
78		interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
79
80		pinctrl-0 = <&fuelgauge_int_default>;
81		pinctrl-names = "default";
82	};
83};
84
85&blsp_i2c2 {
86	status = "okay";
87
88	light-sensor@10 {
89		compatible = "capella,cm3323";
90		reg = <0x10>;
91	};
92
93	accelerometer@1d {
94		compatible = "st,lis2hh12";
95		reg = <0x1d>;
96
97		vdd-supply = <&pm8916_l17>;
98		vddio-supply = <&pm8916_l5>;
99
100		interrupt-parent = <&msmgpio>;
101		interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
102		interrupt-names = "INT1";
103
104		st,drdy-int-pin = <1>;
105		mount-matrix = "0", "1", "0",
106			      "-1", "0", "0",
107			       "0", "0", "1";
108
109		pinctrl-0 = <&accel_int_default>;
110		pinctrl-names = "default";
111	};
112};
113
114&blsp1_uart2 {
115	status = "okay";
116};
117
118&pm8916_resin {
119	linux,code = <KEY_VOLUMEDOWN>;
120	status = "okay";
121};
122
123/* FIXME: Replace with MAX77849 MUIC when driver is available */
124&pm8916_usbin {
125	status = "okay";
126};
127
128&sdhc_1 {
129	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
130	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
131	pinctrl-names = "default", "sleep";
132
133	status = "okay";
134};
135
136&sdhc_2 {
137	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
138	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
139	pinctrl-names = "default", "sleep";
140
141	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
142
143	status = "okay";
144};
145
146&usb {
147	dr_mode = "peripheral";
148	extcon = <&pm8916_usbin>;
149
150	status = "okay";
151};
152
153&usb_hs_phy {
154	extcon = <&pm8916_usbin>;
155};
156
157&wcnss {
158	status = "okay";
159};
160
161&wcnss_iris {
162	compatible = "qcom,wcn3660b";
163};
164
165&smd_rpm_regulators {
166	vdd_l1_l2_l3-supply = <&pm8916_s3>;
167	vdd_l4_l5_l6-supply = <&pm8916_s4>;
168	vdd_l7-supply = <&pm8916_s4>;
169
170	s3 {
171		regulator-min-microvolt = <1200000>;
172		regulator-max-microvolt = <1300000>;
173	};
174
175	s4 {
176		regulator-min-microvolt = <1800000>;
177		regulator-max-microvolt = <2100000>;
178	};
179
180	l1 {
181		regulator-min-microvolt = <1225000>;
182		regulator-max-microvolt = <1225000>;
183	};
184
185	l2 {
186		regulator-min-microvolt = <1200000>;
187		regulator-max-microvolt = <1200000>;
188	};
189
190	l4 {
191		regulator-min-microvolt = <2050000>;
192		regulator-max-microvolt = <2050000>;
193	};
194
195	l5 {
196		regulator-min-microvolt = <1800000>;
197		regulator-max-microvolt = <1800000>;
198	};
199
200	l6 {
201		regulator-min-microvolt = <1800000>;
202		regulator-max-microvolt = <1800000>;
203	};
204
205	l7 {
206		regulator-min-microvolt = <1800000>;
207		regulator-max-microvolt = <1800000>;
208	};
209
210	l8 {
211		regulator-min-microvolt = <2850000>;
212		regulator-max-microvolt = <2900000>;
213	};
214
215	l9 {
216		regulator-min-microvolt = <3300000>;
217		regulator-max-microvolt = <3300000>;
218	};
219
220	l10 {
221		regulator-min-microvolt = <2700000>;
222		regulator-max-microvolt = <2800000>;
223	};
224
225	l11 {
226		regulator-min-microvolt = <1800000>;
227		regulator-max-microvolt = <2950000>;
228		regulator-system-load = <200000>;
229		regulator-allow-set-load;
230	};
231
232	l12 {
233		regulator-min-microvolt = <1800000>;
234		regulator-max-microvolt = <2950000>;
235	};
236
237	l13 {
238		regulator-min-microvolt = <3075000>;
239		regulator-max-microvolt = <3075000>;
240	};
241
242	l14 {
243		regulator-min-microvolt = <1800000>;
244		regulator-max-microvolt = <3300000>;
245	};
246
247	l15 {
248		regulator-min-microvolt = <1800000>;
249		regulator-max-microvolt = <3300000>;
250	};
251
252	l16 {
253		regulator-min-microvolt = <1800000>;
254		regulator-max-microvolt = <3300000>;
255	};
256
257	l17 {
258		regulator-min-microvolt = <2850000>;
259		regulator-max-microvolt = <2850000>;
260	};
261
262	l18 {
263		regulator-min-microvolt = <2700000>;
264		regulator-max-microvolt = <2700000>;
265	};
266};
267
268&msmgpio {
269	accel_int_default: accel-int-default-state {
270		pins = "gpio115";
271		function = "gpio";
272		drive-strength = <2>;
273		bias-disable;
274	};
275
276	fuelgauge_int_default: fuelgauge-int-default-state {
277		pins = "gpio121";
278		function = "gpio";
279		drive-strength = <2>;
280		bias-disable;
281	};
282
283	gpio_keys_default: gpio-keys-default-state {
284		pins = "gpio107", "gpio109";
285		function = "gpio";
286		drive-strength = <2>;
287		bias-pull-up;
288	};
289
290	gpio_hall_sensor_default: gpio-hall-sensor-default-state {
291		pins = "gpio52";
292		function = "gpio";
293		drive-strength = <2>;
294		bias-disable;
295	};
296};
297