xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5-common.dtsi (revision 734e82fe33aa764367791a7d603b383996c6b40b)
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_hall_sensor: gpio-hall-sensor {
26		compatible = "gpio-keys";
27
28		pinctrl-names = "default";
29		pinctrl-0 = <&gpio_hall_sensor_default>;
30
31		label = "GPIO Hall Effect Sensor";
32
33		event-hall-sensor {
34			label = "Hall Effect Sensor";
35			gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
36			linux,input-type = <EV_SW>;
37			linux,code = <SW_LID>;
38			linux,can-disable;
39		};
40	};
41
42	gpio-keys {
43		compatible = "gpio-keys";
44
45		pinctrl-names = "default";
46		pinctrl-0 = <&gpio_keys_default>;
47
48		label = "GPIO Buttons";
49
50		button-volume-up {
51			label = "Volume Up";
52			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
53			linux,code = <KEY_VOLUMEUP>;
54		};
55
56		button-home {
57			label = "Home Key";
58			gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>;
59			linux,code = <KEY_HOMEPAGE>;
60		};
61	};
62
63	i2c_muic: i2c-muic {
64		compatible = "i2c-gpio";
65		sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
66		scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
67
68		pinctrl-names = "default";
69		pinctrl-0 = <&muic_i2c_default>;
70
71		#address-cells = <1>;
72		#size-cells = <0>;
73
74		muic: extcon@25 {
75			compatible = "siliconmitus,sm5703-muic";
76			reg = <0x25>;
77
78			interrupt-parent = <&msmgpio>;
79			interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
80
81			pinctrl-names = "default";
82			pinctrl-0 = <&muic_int_default>;
83		};
84	};
85};
86
87&blsp1_uart2 {
88	status = "okay";
89};
90
91&pm8916_resin {
92	status = "okay";
93	linux,code = <KEY_VOLUMEDOWN>;
94};
95
96&sdhc_1 {
97	status = "okay";
98
99	pinctrl-names = "default", "sleep";
100	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
101	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
102};
103
104&sdhc_2 {
105	status = "okay";
106
107	pinctrl-names = "default", "sleep";
108	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
109	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
110
111	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
112};
113
114&usb {
115	extcon = <&muic>, <&muic>;
116	status = "okay";
117};
118
119&usb_hs_phy {
120	extcon = <&muic>;
121};
122
123&wcnss {
124	status = "okay";
125};
126
127&wcnss_iris {
128	compatible = "qcom,wcn3620";
129};
130
131&smd_rpm_regulators {
132	vdd_l1_l2_l3-supply = <&pm8916_s3>;
133	vdd_l4_l5_l6-supply = <&pm8916_s4>;
134	vdd_l7-supply = <&pm8916_s4>;
135
136	s3 {
137		regulator-min-microvolt = <1200000>;
138		regulator-max-microvolt = <1300000>;
139	};
140
141	s4 {
142		regulator-min-microvolt = <1800000>;
143		regulator-max-microvolt = <2100000>;
144	};
145
146	l1 {
147		regulator-min-microvolt = <1225000>;
148		regulator-max-microvolt = <1225000>;
149	};
150
151	l2 {
152		regulator-min-microvolt = <1200000>;
153		regulator-max-microvolt = <1200000>;
154	};
155
156	l4 {
157		regulator-min-microvolt = <2050000>;
158		regulator-max-microvolt = <2050000>;
159	};
160
161	l5 {
162		regulator-min-microvolt = <1800000>;
163		regulator-max-microvolt = <1800000>;
164	};
165
166	l6 {
167		regulator-min-microvolt = <1800000>;
168		regulator-max-microvolt = <1800000>;
169	};
170
171	l7 {
172		regulator-min-microvolt = <1800000>;
173		regulator-max-microvolt = <1800000>;
174	};
175
176	l8 {
177		regulator-min-microvolt = <2850000>;
178		regulator-max-microvolt = <2900000>;
179	};
180
181	l9 {
182		regulator-min-microvolt = <3300000>;
183		regulator-max-microvolt = <3300000>;
184	};
185
186	l10 {
187		regulator-min-microvolt = <2700000>;
188		regulator-max-microvolt = <2800000>;
189	};
190
191	l11 {
192		regulator-min-microvolt = <1800000>;
193		regulator-max-microvolt = <2950000>;
194		regulator-allow-set-load;
195		regulator-system-load = <200000>;
196	};
197
198	l12 {
199		regulator-min-microvolt = <1800000>;
200		regulator-max-microvolt = <2950000>;
201	};
202
203	l13 {
204		regulator-min-microvolt = <3075000>;
205		regulator-max-microvolt = <3075000>;
206	};
207
208	l14 {
209		regulator-min-microvolt = <1800000>;
210		regulator-max-microvolt = <3300000>;
211	};
212
213	l15 {
214		regulator-min-microvolt = <1800000>;
215		regulator-max-microvolt = <3300000>;
216	};
217
218	l16 {
219		regulator-min-microvolt = <1800000>;
220		regulator-max-microvolt = <3300000>;
221	};
222
223	l17 {
224		regulator-min-microvolt = <3000000>;
225		regulator-max-microvolt = <3000000>;
226	};
227
228	l18 {
229		regulator-min-microvolt = <2700000>;
230		regulator-max-microvolt = <2700000>;
231	};
232};
233
234&msmgpio {
235	gpio_hall_sensor_default: gpio-hall-sensor-default-state {
236		pins = "gpio52";
237		function = "gpio";
238
239		drive-strength = <2>;
240		bias-disable;
241	};
242
243	gpio_keys_default: gpio-keys-default-state {
244		pins = "gpio107", "gpio109";
245		function = "gpio";
246
247		drive-strength = <2>;
248		bias-pull-up;
249	};
250
251	muic_i2c_default: muic-i2c-default-state {
252		pins = "gpio105", "gpio106";
253		function = "gpio";
254
255		drive-strength = <2>;
256		bias-disable;
257	};
258
259	muic_int_default: muic-int-default-state {
260		pins = "gpio12";
261		function = "gpio";
262
263		drive-strength = <2>;
264		bias-disable;
265	};
266};
267