xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sm6125-xiaomi-ginkgo.dts (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1*ae5de77eSEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause
2*ae5de77eSEmmanuel Vadot/*
3*ae5de77eSEmmanuel Vadot * Copyright (c) 2025, Gabriel Gonzales <semfault@disroot.org>
4*ae5de77eSEmmanuel Vadot */
5*ae5de77eSEmmanuel Vadot
6*ae5de77eSEmmanuel Vadot/dts-v1/;
7*ae5de77eSEmmanuel Vadot
8*ae5de77eSEmmanuel Vadot#include <dt-bindings/arm/qcom,ids.h>
9*ae5de77eSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10*ae5de77eSEmmanuel Vadot#include <dt-bindings/input/input.h>
11*ae5de77eSEmmanuel Vadot#include <dt-bindings/input/gpio-keys.h>
12*ae5de77eSEmmanuel Vadot#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
13*ae5de77eSEmmanuel Vadot#include "sm6125.dtsi"
14*ae5de77eSEmmanuel Vadot#include "pm6125.dtsi"
15*ae5de77eSEmmanuel Vadot
16*ae5de77eSEmmanuel Vadot/ {
17*ae5de77eSEmmanuel Vadot	model = "Xiaomi Redmi Note 8";
18*ae5de77eSEmmanuel Vadot	compatible = "xiaomi,ginkgo", "qcom,sm6125";
19*ae5de77eSEmmanuel Vadot	chassis-type = "handset";
20*ae5de77eSEmmanuel Vadot
21*ae5de77eSEmmanuel Vadot	/* required for bootloader to select correct board */
22*ae5de77eSEmmanuel Vadot	qcom,msm-id = <QCOM_ID_SM6125>;
23*ae5de77eSEmmanuel Vadot	qcom,board-id = <22 0>;
24*ae5de77eSEmmanuel Vadot
25*ae5de77eSEmmanuel Vadot	chosen {
26*ae5de77eSEmmanuel Vadot		#address-cells = <2>;
27*ae5de77eSEmmanuel Vadot		#size-cells = <2>;
28*ae5de77eSEmmanuel Vadot		ranges;
29*ae5de77eSEmmanuel Vadot
30*ae5de77eSEmmanuel Vadot		framebuffer0: framebuffer@5c000000 {
31*ae5de77eSEmmanuel Vadot			compatible = "simple-framebuffer";
32*ae5de77eSEmmanuel Vadot			reg = <0 0x5c000000 0 (2340 * 1080 * 4)>;
33*ae5de77eSEmmanuel Vadot			width = <1080>;
34*ae5de77eSEmmanuel Vadot			height = <2340>;
35*ae5de77eSEmmanuel Vadot			stride = <(1080 * 4)>;
36*ae5de77eSEmmanuel Vadot			format = "a8r8g8b8";
37*ae5de77eSEmmanuel Vadot		};
38*ae5de77eSEmmanuel Vadot	};
39*ae5de77eSEmmanuel Vadot
40*ae5de77eSEmmanuel Vadot	reserved-memory {
41*ae5de77eSEmmanuel Vadot		debug_mem: debug@ffb00000 {
42*ae5de77eSEmmanuel Vadot			reg = <0x0 0xffb00000 0x0 0xc0000>;
43*ae5de77eSEmmanuel Vadot			no-map;
44*ae5de77eSEmmanuel Vadot		};
45*ae5de77eSEmmanuel Vadot
46*ae5de77eSEmmanuel Vadot		last_log_mem: lastlog@ffbc0000 {
47*ae5de77eSEmmanuel Vadot			reg = <0x0 0xffbc0000 0x0 0x80000>;
48*ae5de77eSEmmanuel Vadot			no-map;
49*ae5de77eSEmmanuel Vadot		};
50*ae5de77eSEmmanuel Vadot
51*ae5de77eSEmmanuel Vadot		pstore_mem: ramoops@ffc00000 {
52*ae5de77eSEmmanuel Vadot			compatible = "ramoops";
53*ae5de77eSEmmanuel Vadot			reg = <0x0 0xffc40000 0x0 0xc0000>;
54*ae5de77eSEmmanuel Vadot			record-size = <0x1000>;
55*ae5de77eSEmmanuel Vadot			console-size = <0x40000>;
56*ae5de77eSEmmanuel Vadot			pmsg-size = <0x20000>;
57*ae5de77eSEmmanuel Vadot		};
58*ae5de77eSEmmanuel Vadot
59*ae5de77eSEmmanuel Vadot		cmdline_mem: memory@ffd00000 {
60*ae5de77eSEmmanuel Vadot			reg = <0x0 0xffd40000 0x0 0x1000>;
61*ae5de77eSEmmanuel Vadot			no-map;
62*ae5de77eSEmmanuel Vadot		};
63*ae5de77eSEmmanuel Vadot	};
64*ae5de77eSEmmanuel Vadot
65*ae5de77eSEmmanuel Vadot	extcon_usb: extcon-usb {
66*ae5de77eSEmmanuel Vadot		compatible = "linux,extcon-usb-gpio";
67*ae5de77eSEmmanuel Vadot		id-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
68*ae5de77eSEmmanuel Vadot	};
69*ae5de77eSEmmanuel Vadot
70*ae5de77eSEmmanuel Vadot	gpio-keys {
71*ae5de77eSEmmanuel Vadot		compatible = "gpio-keys";
72*ae5de77eSEmmanuel Vadot
73*ae5de77eSEmmanuel Vadot		pinctrl-0 = <&vol_up_n>;
74*ae5de77eSEmmanuel Vadot		pinctrl-names = "default";
75*ae5de77eSEmmanuel Vadot
76*ae5de77eSEmmanuel Vadot		key-volume-up {
77*ae5de77eSEmmanuel Vadot			label = "Volume Up";
78*ae5de77eSEmmanuel Vadot			gpios = <&pm6125_gpios 6 GPIO_ACTIVE_LOW>;
79*ae5de77eSEmmanuel Vadot			linux,code = <KEY_VOLUMEUP>;
80*ae5de77eSEmmanuel Vadot			debounce-interval = <15>;
81*ae5de77eSEmmanuel Vadot			linux,can-disable;
82*ae5de77eSEmmanuel Vadot			wakeup-source;
83*ae5de77eSEmmanuel Vadot		};
84*ae5de77eSEmmanuel Vadot	};
85*ae5de77eSEmmanuel Vadot};
86*ae5de77eSEmmanuel Vadot
87*ae5de77eSEmmanuel Vadot&pm6125_gpios {
88*ae5de77eSEmmanuel Vadot	vol_up_n: vol-up-n-state {
89*ae5de77eSEmmanuel Vadot		pins = "gpio6";
90*ae5de77eSEmmanuel Vadot		function = "normal";
91*ae5de77eSEmmanuel Vadot		power-source = <1>;
92*ae5de77eSEmmanuel Vadot		bias-pull-up;
93*ae5de77eSEmmanuel Vadot		input-enable;
94*ae5de77eSEmmanuel Vadot	};
95*ae5de77eSEmmanuel Vadot};
96*ae5de77eSEmmanuel Vadot
97*ae5de77eSEmmanuel Vadot&hsusb_phy1 {
98*ae5de77eSEmmanuel Vadot	vdd-supply = <&vreg_l7a>;
99*ae5de77eSEmmanuel Vadot	vdda-pll-supply = <&vreg_l10a>;
100*ae5de77eSEmmanuel Vadot	vdda-phy-dpdm-supply = <&vreg_l15a>;
101*ae5de77eSEmmanuel Vadot	status = "okay";
102*ae5de77eSEmmanuel Vadot};
103*ae5de77eSEmmanuel Vadot
104*ae5de77eSEmmanuel Vadot&pon_pwrkey {
105*ae5de77eSEmmanuel Vadot	status = "okay";
106*ae5de77eSEmmanuel Vadot};
107*ae5de77eSEmmanuel Vadot
108*ae5de77eSEmmanuel Vadot&pon_resin {
109*ae5de77eSEmmanuel Vadot	linux,code = <KEY_VOLUMEDOWN>;
110*ae5de77eSEmmanuel Vadot	status = "okay";
111*ae5de77eSEmmanuel Vadot};
112*ae5de77eSEmmanuel Vadot
113*ae5de77eSEmmanuel Vadot&rpm_requests {
114*ae5de77eSEmmanuel Vadot	regulators-0 {
115*ae5de77eSEmmanuel Vadot		compatible = "qcom,rpm-pm6125-regulators";
116*ae5de77eSEmmanuel Vadot
117*ae5de77eSEmmanuel Vadot		vreg_s6a: s6 {
118*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <936000>;
119*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1422000>;
120*ae5de77eSEmmanuel Vadot		};
121*ae5de77eSEmmanuel Vadot
122*ae5de77eSEmmanuel Vadot		vreg_l1a: l1 {
123*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1200000>;
124*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1256000>;
125*ae5de77eSEmmanuel Vadot		};
126*ae5de77eSEmmanuel Vadot
127*ae5de77eSEmmanuel Vadot		vreg_l2a: l2 {
128*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1000000>;
129*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1056000>;
130*ae5de77eSEmmanuel Vadot		};
131*ae5de77eSEmmanuel Vadot
132*ae5de77eSEmmanuel Vadot		vreg_l3a: l3 {
133*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1000000>;
134*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1064000>;
135*ae5de77eSEmmanuel Vadot		};
136*ae5de77eSEmmanuel Vadot
137*ae5de77eSEmmanuel Vadot		vreg_l4a: l4 {
138*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <872000>;
139*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <976000>;
140*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
141*ae5de77eSEmmanuel Vadot		};
142*ae5de77eSEmmanuel Vadot
143*ae5de77eSEmmanuel Vadot		vreg_l5a: l5 {
144*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1648000>;
145*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <2950000>;
146*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
147*ae5de77eSEmmanuel Vadot		};
148*ae5de77eSEmmanuel Vadot
149*ae5de77eSEmmanuel Vadot		vreg_l6a: l6 {
150*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <576000>;
151*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <656000>;
152*ae5de77eSEmmanuel Vadot		};
153*ae5de77eSEmmanuel Vadot
154*ae5de77eSEmmanuel Vadot		vreg_l7a: l7 {
155*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <872000>;
156*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <976000>;
157*ae5de77eSEmmanuel Vadot		};
158*ae5de77eSEmmanuel Vadot
159*ae5de77eSEmmanuel Vadot		vreg_l8a: l8 {
160*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <400000>;
161*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <728000>;
162*ae5de77eSEmmanuel Vadot		};
163*ae5de77eSEmmanuel Vadot
164*ae5de77eSEmmanuel Vadot		vreg_l9a: l9 {
165*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
166*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1896000>;
167*ae5de77eSEmmanuel Vadot		};
168*ae5de77eSEmmanuel Vadot
169*ae5de77eSEmmanuel Vadot		vreg_l10a: l10 {
170*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
171*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1896000>;
172*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
173*ae5de77eSEmmanuel Vadot		};
174*ae5de77eSEmmanuel Vadot
175*ae5de77eSEmmanuel Vadot		vreg_l11a: l11 {
176*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
177*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1952000>;
178*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
179*ae5de77eSEmmanuel Vadot		};
180*ae5de77eSEmmanuel Vadot
181*ae5de77eSEmmanuel Vadot		vreg_l12a: l12 {
182*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
183*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1996000>;
184*ae5de77eSEmmanuel Vadot		};
185*ae5de77eSEmmanuel Vadot
186*ae5de77eSEmmanuel Vadot		vreg_l13a: l13 {
187*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
188*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1832000>;
189*ae5de77eSEmmanuel Vadot		};
190*ae5de77eSEmmanuel Vadot
191*ae5de77eSEmmanuel Vadot		vreg_l14a: l14 {
192*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
193*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1904000>;
194*ae5de77eSEmmanuel Vadot		};
195*ae5de77eSEmmanuel Vadot
196*ae5de77eSEmmanuel Vadot		vreg_l15a: l15 {
197*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <3104000>;
198*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <3232000>;
199*ae5de77eSEmmanuel Vadot		};
200*ae5de77eSEmmanuel Vadot
201*ae5de77eSEmmanuel Vadot		vreg_l16a: l16 {
202*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1800000>;
203*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1904000>;
204*ae5de77eSEmmanuel Vadot		};
205*ae5de77eSEmmanuel Vadot
206*ae5de77eSEmmanuel Vadot		vreg_l17a: l17 {
207*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1248000>;
208*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1304000>;
209*ae5de77eSEmmanuel Vadot		};
210*ae5de77eSEmmanuel Vadot
211*ae5de77eSEmmanuel Vadot		vreg_l18a: l18 {
212*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1200000>;
213*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <1264000>;
214*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
215*ae5de77eSEmmanuel Vadot		};
216*ae5de77eSEmmanuel Vadot
217*ae5de77eSEmmanuel Vadot		vreg_l19a: l19 {
218*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1648000>;
219*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <2952000>;
220*ae5de77eSEmmanuel Vadot		};
221*ae5de77eSEmmanuel Vadot
222*ae5de77eSEmmanuel Vadot		vreg_l20a: l20 {
223*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <1648000>;
224*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <2952000>;
225*ae5de77eSEmmanuel Vadot		};
226*ae5de77eSEmmanuel Vadot
227*ae5de77eSEmmanuel Vadot		vreg_l21a: l21 {
228*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <2600000>;
229*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <2856000>;
230*ae5de77eSEmmanuel Vadot		};
231*ae5de77eSEmmanuel Vadot
232*ae5de77eSEmmanuel Vadot		vreg_l22a: l22 {
233*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <2944000>;
234*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <2950000>;
235*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
236*ae5de77eSEmmanuel Vadot		};
237*ae5de77eSEmmanuel Vadot
238*ae5de77eSEmmanuel Vadot		vreg_l23a: l23 {
239*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <3000000>;
240*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <3400000>;
241*ae5de77eSEmmanuel Vadot		};
242*ae5de77eSEmmanuel Vadot
243*ae5de77eSEmmanuel Vadot		vreg_l24a: l24 {
244*ae5de77eSEmmanuel Vadot			regulator-min-microvolt = <2944000>;
245*ae5de77eSEmmanuel Vadot			regulator-max-microvolt = <2950000>;
246*ae5de77eSEmmanuel Vadot			regulator-allow-set-load;
247*ae5de77eSEmmanuel Vadot		};
248*ae5de77eSEmmanuel Vadot
249*ae5de77eSEmmanuel Vadot	};
250*ae5de77eSEmmanuel Vadot};
251*ae5de77eSEmmanuel Vadot
252*ae5de77eSEmmanuel Vadot&sdc2_off_state {
253*ae5de77eSEmmanuel Vadot	sd-cd-pins {
254*ae5de77eSEmmanuel Vadot		pins = "gpio98";
255*ae5de77eSEmmanuel Vadot		function = "gpio";
256*ae5de77eSEmmanuel Vadot		drive-strength = <2>;
257*ae5de77eSEmmanuel Vadot		bias-disable;
258*ae5de77eSEmmanuel Vadot	};
259*ae5de77eSEmmanuel Vadot};
260*ae5de77eSEmmanuel Vadot
261*ae5de77eSEmmanuel Vadot&sdc2_on_state {
262*ae5de77eSEmmanuel Vadot	sd-cd-pins {
263*ae5de77eSEmmanuel Vadot		pins = "gpio98";
264*ae5de77eSEmmanuel Vadot		function = "gpio";
265*ae5de77eSEmmanuel Vadot		drive-strength = <2>;
266*ae5de77eSEmmanuel Vadot		bias-pull-up;
267*ae5de77eSEmmanuel Vadot	};
268*ae5de77eSEmmanuel Vadot};
269*ae5de77eSEmmanuel Vadot
270*ae5de77eSEmmanuel Vadot&sdhc_1 {
271*ae5de77eSEmmanuel Vadot	vmmc-supply = <&vreg_l24a>;
272*ae5de77eSEmmanuel Vadot	vqmmc-supply = <&vreg_l11a>;
273*ae5de77eSEmmanuel Vadot	status = "okay";
274*ae5de77eSEmmanuel Vadot};
275*ae5de77eSEmmanuel Vadot
276*ae5de77eSEmmanuel Vadot&sdhc_2 {
277*ae5de77eSEmmanuel Vadot	cd-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;
278*ae5de77eSEmmanuel Vadot	vmmc-supply = <&vreg_l22a>;
279*ae5de77eSEmmanuel Vadot	vqmmc-supply = <&vreg_l5a>;
280*ae5de77eSEmmanuel Vadot	no-sdio;
281*ae5de77eSEmmanuel Vadot	no-mmc;
282*ae5de77eSEmmanuel Vadot	status = "okay";
283*ae5de77eSEmmanuel Vadot};
284*ae5de77eSEmmanuel Vadot
285*ae5de77eSEmmanuel Vadot&tlmm {
286*ae5de77eSEmmanuel Vadot	gpio-reserved-ranges = <22 2>, <28 6>;
287*ae5de77eSEmmanuel Vadot};
288*ae5de77eSEmmanuel Vadot
289*ae5de77eSEmmanuel Vadot&usb3 {
290*ae5de77eSEmmanuel Vadot	status = "okay";
291*ae5de77eSEmmanuel Vadot};
292*ae5de77eSEmmanuel Vadot
293*ae5de77eSEmmanuel Vadot&usb3_dwc3 {
294*ae5de77eSEmmanuel Vadot	extcon = <&extcon_usb>;
295*ae5de77eSEmmanuel Vadot};
296