xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/msm8992-lg-h815.dts (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2/*
3 * MSM8992 LG G4 (h815) device tree.
4 *
5 * Copyright (c) 2024, Alexander Reimelt <alexander.reimelt@posteo.de>
6 */
7
8/dts-v1/;
9
10#include "msm8992.dtsi"
11#include "pm8994.dtsi"
12#include "pmi8994.dtsi"
13#include <dt-bindings/leds/common.h>
14
15/* different mapping */
16/delete-node/ &cont_splash_mem;
17
18/* disabled downstream */
19/delete-node/ &dfps_data_mem;
20
21/ {
22	model = "LG G4 (H815)";
23	compatible = "lg,h815", "qcom,msm8992";
24	chassis-type = "handset";
25
26	qcom,msm-id = <0xfb 0x0>;
27	qcom,pmic-id = <0x10009 0x1000a 0x0 0x0>;
28	qcom,board-id = <0xb64 0x0>;
29
30	/* psci is broken */
31	/delete-node/ psci;
32
33	reserved-memory {
34		#address-cells = <2>;
35		#size-cells = <2>;
36		ranges;
37
38		spin-table@6000000 {
39			reg = <0x0 0x06000000 0x0 0x00001000>;
40			no-map;
41		};
42
43		ramoops@ff00000 {
44			compatible = "ramoops";
45			reg = <0x0 0x0ff00000 0x0 0x00100000>;
46			console-size = <0x20000>;
47			pmsg-size = <0x20000>;
48			record-size = <0x10000>;
49			ecc-size = <0x10>;
50		};
51
52		cont_splash_mem: fb@3400000 {
53			reg = <0x0 0x03400000 0x0 0x00c00000>;
54			no-map;
55		};
56
57		crash_fb_mem: crash-fb@4000000 {
58			reg = <0x0 0x04000000 0x0 0x00c00000>;
59			no-map;
60		};
61	};
62
63	gpio-hall-sensor {
64		compatible = "gpio-keys";
65
66		pinctrl-0 = <&hall_sensor_default>;
67		pinctrl-names = "default";
68
69		label = "Hall Effect Sensor";
70
71		event-hall-sensor {
72			gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
73			label = "hall effect sensor";
74			linux,input-type = <EV_SW>;
75			linux,code = <SW_LID>;
76			linux,can-disable;
77			wakeup-source;
78		};
79	};
80
81	gpio-keys {
82		compatible = "gpio-keys";
83
84		key-vol-up {
85			label = "volume up";
86			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
87			linux,code = <KEY_VOLUMEUP>;
88			wakeup-source;
89			debounce-interval = <15>;
90		};
91	};
92};
93
94&cpu0 {
95	enable-method = "spin-table";
96	cpu-release-addr = /bits/ 64 <0>;
97};
98
99&cpu1 {
100	enable-method = "spin-table";
101	cpu-release-addr = /bits/ 64 <0>;
102};
103
104&cpu2 {
105	enable-method = "spin-table";
106	cpu-release-addr = /bits/ 64 <0>;
107};
108
109&cpu3 {
110	enable-method = "spin-table";
111	cpu-release-addr = /bits/ 64 <0>;
112};
113
114&cpu4 {
115	enable-method = "spin-table";
116	cpu-release-addr = /bits/ 64 <0>;
117};
118
119&cpu5 {
120	enable-method = "spin-table";
121	cpu-release-addr = /bits/ 64 <0>;
122};
123
124&pm8994_resin {
125	linux,code = <KEY_VOLUMEDOWN>;
126	status = "okay";
127};
128
129&rpm_requests {
130	regulators-0 {
131		compatible = "qcom,rpm-pm8994-regulators";
132
133		vdd_s3-supply = <&vph_pwr>;
134		vdd_s4-supply = <&vph_pwr>;
135		vdd_s5-supply = <&vph_pwr>;
136		vdd_s7-supply = <&vph_pwr>;
137		vdd_l1-supply = <&pmi8994_s1>;
138		vdd_l2_26_28-supply = <&pm8994_s3>;
139		vdd_l3_11-supply = <&pm8994_s3>;
140		vdd_l4_27_31-supply = <&pm8994_s3>;
141		vdd_l5_7-supply = <&pm8994_s5>;
142		vdd_l6_12_32-supply = <&pm8994_s5>;
143		vdd_l8_16_30-supply = <&vph_pwr>;
144		vdd_l9_10_18_22-supply = <&pmi8994_bby>;
145		vdd_l13_19_23_24-supply = <&pmi8994_bby>;
146		vdd_l14_15-supply = <&pm8994_s5>;
147		vdd_l17_29-supply = <&pmi8994_bby>;
148		vdd_l20_21-supply = <&pmi8994_bby>;
149		vdd_l25-supply = <&pm8994_s5>;
150		vdd_lvs1_2-supply = <&pm8994_s4>;
151
152		pm8994_s3: s3 {
153			regulator-min-microvolt = <1300000>;
154			regulator-max-microvolt = <1300000>;
155		};
156
157		/* sdhc1 vqmmc and bcm */
158		pm8994_s4: s4 {
159			regulator-min-microvolt = <1800000>;
160			regulator-max-microvolt = <1800000>;
161			regulator-system-load = <325000>;
162			regulator-allow-set-load;
163		};
164
165		pm8994_s5: s5 {
166			regulator-min-microvolt = <2150000>;
167			regulator-max-microvolt = <2150000>;
168		};
169
170		/* sdhc2 vqmmc */
171		pm8994_l13: l13 {
172			regulator-min-microvolt = <1800000>;
173			regulator-max-microvolt = <2950000>;
174			regulator-system-load = <22000>;
175			regulator-allow-set-load;
176		};
177
178		/* sdhc1 vmmc */
179		pm8994_l20: l20 {
180			regulator-min-microvolt = <2950000>;
181			regulator-max-microvolt = <2950000>;
182			regulator-system-load = <570000>;
183			regulator-allow-set-load;
184		};
185
186		/* sdhc2 vmmc */
187		pm8994_l21: l21 {
188			regulator-min-microvolt = <2950000>;
189			regulator-max-microvolt = <2950000>;
190			regulator-system-load = <800000>;
191			regulator-allow-set-load;
192		};
193	};
194
195	regulators-1 {
196		compatible = "qcom,rpm-pmi8994-regulators";
197
198		vdd_s1-supply = <&vph_pwr>;
199		vdd_bst_byp-supply = <&vph_pwr>;
200
201		pmi8994_s1: s1 {
202			regulator-min-microvolt = <1025000>;
203			regulator-max-microvolt = <1025000>;
204		};
205
206		/* S2 & S3 - VDD_GFX */
207
208		pmi8994_bby: boost-bypass {
209			regulator-min-microvolt = <3150000>;
210			regulator-max-microvolt = <3600000>;
211		};
212	};
213};
214
215&sdhc1 {
216	mmc-hs400-1_8v;
217	vmmc-supply = <&pm8994_l20>;
218	vqmmc-supply = <&pm8994_s4>;
219	non-removable;
220	status = "okay";
221};
222
223&sdhc2 {
224	vmmc-supply = <&pm8994_l21>;
225	vqmmc-supply = <&pm8994_l13>;
226	cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
227	status = "okay";
228};
229
230&tlmm {
231	hall_sensor_default: hall-sensor-default-state {
232		pins = "gpio75";
233		function = "gpio";
234		drive-strength = <2>;
235		bias-pull-up;
236	};
237};
238