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