1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Gabriela David
4 */
5/dts-v1/;
6
7#include "sdm632.dtsi"
8#include "pm8953.dtsi"
9#include <dt-bindings/leds/common.h>
10
11/delete-node/ &cont_splash_mem;
12/delete-node/ &qseecom_mem;
13
14/ {
15	model = "Motorola G7 Power";
16	compatible = "motorola,ocean", "qcom,sdm632";
17	chassis-type = "handset";
18	qcom,msm-id = <349 0>;
19	qcom,board-id = <0x141 0xc100>;
20	qcom,pmic-id = <0x10016 0x25 0x00 0x00>;
21
22	backlight: backlight {
23		compatible = "led-backlight";
24		leds = <&led>;
25	};
26
27	chosen {
28		#address-cells = <2>;
29		#size-cells = <2>;
30		ranges;
31
32		framebuffer@90001000 {
33			compatible = "simple-framebuffer";
34			reg = <0 0x90001000 0 (720 * 1520 * 3)>;
35
36			width = <720>;
37			height = <1520>;
38			stride = <(720 * 3)>;
39			format = "r8g8b8";
40
41			power-domains = <&gcc MDSS_GDSC>;
42
43			clocks = <&gcc GCC_MDSS_AHB_CLK>,
44				 <&gcc GCC_MDSS_AXI_CLK>,
45				 <&gcc GCC_MDSS_VSYNC_CLK>,
46				 <&gcc GCC_MDSS_MDP_CLK>,
47				 <&gcc GCC_MDSS_BYTE0_CLK>,
48				 <&gcc GCC_MDSS_PCLK0_CLK>,
49				 <&gcc GCC_MDSS_ESC0_CLK>;
50		};
51	};
52
53	gpio-keys {
54		compatible = "gpio-keys";
55
56		pinctrl-names = "default";
57		pinctrl-0 = <&gpio_key_default>;
58
59		key-volume-up {
60			label = "Volume Up";
61			gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
62			linux,code = <KEY_VOLUMEUP>;
63		};
64	};
65
66	reserved-memory {
67		qseecom_mem: qseecom@84300000 {
68			reg = <0x0 0x84300000 0x0 0x2000000>;
69			no-map;
70		};
71
72		cont_splash_mem: cont-splash@90001000 {
73			reg = <0x0 0x90001000 0x0 (720 * 1520 * 3)>;
74			no-map;
75		};
76
77		reserved@eefa1800 {
78			reg = <0x00 0xeefa1800 0x00 0x5e800>;
79			no-map;
80		};
81
82		ramoops@ef000000 {
83			compatible = "ramoops";
84			reg = <0x0 0xef000000 0x0 0xbf800>;
85			console-size = <0x40000>;
86			pmsg-size = <0x40000>;
87			record-size = <0x3f800>;
88		};
89	};
90
91	vph_pwr: vph-pwr-regulator {
92		compatible = "regulator-fixed";
93		regulator-name = "vph_pwr";
94		regulator-always-on;
95		regulator-boot-on;
96	};
97};
98
99&hsusb_phy {
100	vdd-supply = <&pm8953_l3>;
101	vdda-pll-supply = <&pm8953_l7>;
102	vdda-phy-dpdm-supply = <&pm8953_l13>;
103
104	status = "okay";
105};
106
107&i2c_3 {
108	status = "okay";
109
110	touchscreen@41 {
111		compatible = "ilitek,ili2117";
112		reg = <0x41>;
113
114		interrupt-parent = <&tlmm>;
115		interrupts = <65 IRQ_TYPE_EDGE_FALLING>;
116
117		touchscreen-inverted-x;
118	};
119};
120
121&i2c_5 {
122	status = "okay";
123
124	led-controller@36 {
125		compatible = "ti,lm3697";
126		reg = <0x36>;
127
128		#address-cells = <1>;
129		#size-cells = <0>;
130
131		led: led@1 {
132			reg = <1>;
133			default-trigger = "backlight";
134			function = LED_FUNCTION_BACKLIGHT;
135			led-sources = <0 1 2>;
136		};
137	};
138};
139
140&pm8953_resin {
141	linux,code = <KEY_VOLUMEDOWN>;
142	status = "okay";
143};
144
145&rpm_requests {
146	regulators {
147		compatible = "qcom,rpm-pm8953-regulators";
148
149		vdd_l1-supply = <&pm8953_s3>;
150		vdd_l2_l3-supply = <&pm8953_s3>;
151		vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
152		vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
153		vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
154
155		pm8953_s3: s3 {
156			regulator-min-microvolt = <984000>;
157			regulator-max-microvolt = <1240000>;
158		};
159
160		pm8953_s4: s4 {
161			regulator-min-microvolt = <1036000>;
162			regulator-max-microvolt = <2040000>;
163		};
164
165		pm8953_l1: l1 {
166			regulator-min-microvolt = <975000>;
167			regulator-max-microvolt = <1050000>;
168		};
169
170		pm8953_l2: l2 {
171			regulator-min-microvolt = <975000>;
172			regulator-max-microvolt = <1175000>;
173		};
174
175		pm8953_l3: l3 {
176			regulator-min-microvolt = <925000>;
177			regulator-max-microvolt = <925000>;
178			regulator-allow-set-load;
179		};
180
181		pm8953_l5: l5 {
182			regulator-min-microvolt = <1800000>;
183			regulator-max-microvolt = <1800000>;
184		};
185
186		pm8953_l6: l6 {
187			regulator-min-microvolt = <1800000>;
188			regulator-max-microvolt = <1800000>;
189			regulator-always-on;
190			regulator-boot-on;
191		};
192
193		pm8953_l7: l7 {
194			regulator-min-microvolt = <1800000>;
195			regulator-max-microvolt = <1900000>;
196		};
197
198		pm8953_l8: l8 {
199			regulator-min-microvolt = <2900000>;
200			regulator-max-microvolt = <2900000>;
201		};
202
203		pm8953_l9: l9 {
204			regulator-min-microvolt = <3000000>;
205			regulator-max-microvolt = <3300000>;
206		};
207
208		pm8953_l10: l10 {
209			regulator-min-microvolt = <2800000>;
210			regulator-max-microvolt = <3000000>;
211		};
212
213		pm8953_l11: l11 {
214			regulator-min-microvolt = <2950000>;
215			regulator-max-microvolt = <2950000>;
216		};
217
218		pm8953_l12: l12 {
219			regulator-min-microvolt = <1800000>;
220			regulator-max-microvolt = <2950000>;
221		};
222
223		pm8953_l13: l13 {
224			regulator-min-microvolt = <3125000>;
225			regulator-max-microvolt = <3125000>;
226		};
227
228		pm8953_l16: l16 {
229			regulator-min-microvolt = <1800000>;
230			regulator-max-microvolt = <1800000>;
231		};
232
233		pm8953_l17: l17 {
234			regulator-min-microvolt = <2850000>;
235			regulator-max-microvolt = <2850000>;
236		};
237
238		pm8953_l18: l18 {
239			regulator-min-microvolt = <1800000>;
240			regulator-max-microvolt = <2700000>;
241			regulator-always-on;
242			regulator-boot-on;
243		};
244
245		pm8953_l19: l19 {
246			regulator-min-microvolt = <1200000>;
247			regulator-max-microvolt = <1350000>;
248		};
249
250		pm8953_l22: l22 {
251			regulator-min-microvolt = <1800000>;
252			regulator-max-microvolt = <1800000>;
253			regulator-always-on;
254		};
255
256		pm8953_l23: l23 {
257			regulator-min-microvolt = <975000>;
258			regulator-max-microvolt = <1225000>;
259		};
260	};
261};
262
263&sdhc_1 {
264	vmmc-supply = <&pm8953_l8>;
265	vqmmc-supply = <&pm8953_l5>;
266
267	status = "okay";
268};
269
270&sdhc_2 {
271	vmmc-supply = <&pm8953_l11>;
272	vqmmc-supply = <&pm8953_l12>;
273
274	pinctrl-names = "default", "sleep";
275	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
276	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
277
278	status = "okay";
279};
280
281&tlmm {
282	gpio-reserved-ranges = <96 4>;
283};
284
285&usb3 {
286	status = "okay";
287};
288
289&usb3_dwc3 {
290	dr_mode = "peripheral";
291};
292