1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
6 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
9 #include "pm8150b.dtsi"
10 #include "pm8150l.dtsi"
11 #include "pm8009.dtsi"
13 /delete-node/ &adsp_mem;
14 /delete-node/ &spss_mem;
15 /delete-node/ &cdsp_secure_heap;
18 qcom,msm-id = <356 0x20001>; /* SM8250 v2.1 */
19 qcom,board-id = <0x10008 0>;
26 framebuffer: framebuffer@9c000000 {
27 compatible = "simple-framebuffer";
28 reg = <0 0x9c000000 0 0x2300000>;
31 stride = <(1644 * 4)>;
34 * That's a lot of clocks, but it's necessary due
35 * to unused clk cleanup & no panel driver yet..
37 clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
38 <&gcc GCC_DISP_HF_AXI_CLK>,
39 <&gcc GCC_DISP_SF_AXI_CLK>,
40 <&dispcc DISP_CC_MDSS_VSYNC_CLK>,
41 <&dispcc DISP_CC_MDSS_MDP_CLK>,
42 <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
43 <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
44 <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
45 <&dispcc DISP_CC_MDSS_ESC0_CLK>;
46 power-domains = <&dispcc MDSS_GDSC>;
50 gpio_keys: gpio-keys {
51 compatible = "gpio-keys";
54 * Camera focus (light press) and camera snapshot (full press)
55 * seem not to work properly.. Adding the former one stalls the CPU
56 * and the latter kills the volume down key for whatever reason. In any
57 * case, they are both on &pm8150b_gpios: camera focus(2), camera snapshot(1).
61 label = "Volume Down";
62 linux,code = <KEY_VOLUMEDOWN>;
63 gpios = <&pm8150_gpios 1 GPIO_ACTIVE_LOW>;
64 debounce-interval = <15>;
70 vph_pwr: vph-pwr-regulator {
71 compatible = "regulator-fixed";
72 regulator-name = "vph_pwr";
73 regulator-min-microvolt = <3700000>;
74 regulator-max-microvolt = <3700000>;
77 /* S6c is really ebi.lvl but it's there for supply map completeness sake. */
78 vreg_s6c_0p88: smpc6-regulator {
79 compatible = "regulator-fixed";
80 regulator-name = "vreg_s6c_0p88";
82 regulator-min-microvolt = <880000>;
83 regulator-max-microvolt = <880000>;
85 vin-supply = <&vph_pwr>;
89 adsp_mem: memory@8a100000 {
90 reg = <0x0 0x8a100000 0x0 0x2500000>;
94 spss_mem: memory@8c600000 {
95 reg = <0x0 0x8c600000 0x0 0x100000>;
99 cdsp_secure_heap: memory@8c700000 {
100 reg = <0x0 0x8c700000 0x0 0x4600000>;
104 cont_splash_mem: memory@9c000000 {
105 reg = <0x0 0x9c000000 0x0 0x2300000>;
110 compatible = "ramoops";
111 reg = <0x0 0xffc00000 0x0 0x100000>;
112 record-size = <0x1000>;
113 console-size = <0x40000>;
114 msg-size = <0x20000 0x20000>;
126 pm8150-rpmh-regulators {
127 compatible = "qcom,pm8150-rpmh-regulators";
130 vdd-s1-supply = <&vph_pwr>;
131 vdd-s2-supply = <&vph_pwr>;
132 vdd-s3-supply = <&vph_pwr>;
133 vdd-s4-supply = <&vph_pwr>;
134 vdd-s5-supply = <&vph_pwr>;
135 vdd-s6-supply = <&vph_pwr>;
136 vdd-s7-supply = <&vph_pwr>;
137 vdd-s8-supply = <&vph_pwr>;
138 vdd-s9-supply = <&vph_pwr>;
139 vdd-s10-supply = <&vph_pwr>;
140 vdd-l1-l8-l11-supply = <&vreg_s6c_0p88>;
141 vdd-l2-l10-supply = <&vreg_bob>;
142 vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p6>;
143 vdd-l6-l9-supply = <&vreg_s8c_1p2>;
144 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
145 vdd-l13-l16-l17-supply = <&vreg_bob>;
147 /* (S1+S2+S3) - cx.lvl (ARC) */
149 vreg_s4a_1p8: smps4 {
150 regulator-name = "vreg_s4a_1p8";
151 regulator-min-microvolt = <1800000>;
152 regulator-max-microvolt = <1920000>;
153 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
156 vreg_s5a_1p9: smps5 {
157 regulator-name = "vreg_s5a_1p9";
158 regulator-min-microvolt = <1824000>;
159 regulator-max-microvolt = <2040000>;
160 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
163 vreg_s6a_0p6: smps6 {
164 regulator-name = "vreg_s6a_0p6";
165 regulator-min-microvolt = <600000>;
166 regulator-max-microvolt = <1128000>;
167 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
171 regulator-name = "vreg_l2a_3p1";
172 regulator-min-microvolt = <3072000>;
173 regulator-max-microvolt = <3072000>;
174 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
178 regulator-name = "vreg_l3a_0p9";
179 regulator-min-microvolt = <928000>;
180 regulator-max-microvolt = <932000>;
181 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
184 /* L4 - lmx.lvl (ARC) */
186 vreg_l5a_0p88: ldo5 {
187 regulator-name = "vreg_l5a_0p88";
188 regulator-min-microvolt = <880000>;
189 regulator-max-microvolt = <880000>;
190 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
194 regulator-name = "vreg_l6a_1p2";
195 regulator-min-microvolt = <1200000>;
196 regulator-max-microvolt = <1200000>;
197 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
203 regulator-name = "vreg_l9a_1p2";
204 regulator-min-microvolt = <1200000>;
205 regulator-max-microvolt = <1200000>;
206 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
209 /* L10 is unused, L11 - lcx.lvl (ARC) */
211 vreg_l12a_1p8: ldo12 {
212 regulator-name = "vreg_l12a_1p8";
213 regulator-min-microvolt = <1800000>;
214 regulator-max-microvolt = <1800000>;
215 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
220 vreg_l14a_1p8: ldo14 {
221 regulator-name = "vreg_l14a_1p8";
222 regulator-min-microvolt = <1800000>;
223 regulator-max-microvolt = <1880000>;
224 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
227 /* L15 & L16 are unused. */
229 vreg_l17a_3p0: ldo17 {
230 regulator-name = "vreg_l17a_3p0";
231 regulator-min-microvolt = <2496000>;
232 regulator-max-microvolt = <3008000>;
233 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
236 vreg_l18a_0p9: ldo18 {
237 regulator-name = "vreg_l18a_0p9";
238 regulator-min-microvolt = <800000>;
239 regulator-max-microvolt = <920000>;
240 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
245 * Remaining regulators that are not yet supported:
246 * OLEDB: 4925000-8100000
247 * ab: 4600000-6100000
248 * ibb: 800000-5400000
250 pm8150l-rpmh-regulators {
251 compatible = "qcom,pm8150l-rpmh-regulators";
254 vdd-s1-supply = <&vph_pwr>;
255 vdd-s2-supply = <&vph_pwr>;
256 vdd-s3-supply = <&vph_pwr>;
257 vdd-s4-supply = <&vph_pwr>;
258 vdd-s5-supply = <&vph_pwr>;
259 vdd-s6-supply = <&vph_pwr>;
260 vdd-s7-supply = <&vph_pwr>;
261 vdd-s8-supply = <&vph_pwr>;
262 vdd-l1-l8-supply = <&vreg_s4a_1p8>;
263 vdd-l2-l3-supply = <&vreg_s8c_1p2>;
264 vdd-l4-l5-l6-supply = <&vreg_bob>;
265 vdd-l7-l11-supply = <&vreg_bob>;
266 vdd-l9-l10-supply = <&vreg_bob>;
267 vdd-bob-supply = <&vph_pwr>;
270 regulator-name = "vreg_bob";
271 regulator-min-microvolt = <3350000>;
272 regulator-max-microvolt = <3960000>;
273 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
280 * (S4+S5) - mmcx.lvl,
284 vreg_s7c_0p35: smps7 {
285 regulator-name = "vreg_s7c_0p35";
286 regulator-min-microvolt = <348000>;
287 regulator-max-microvolt = <1000000>;
288 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
291 vreg_s8c_1p2: smps8 {
292 regulator-name = "vreg_s8c_1p2";
293 regulator-min-microvolt = <1200000>;
294 regulator-max-microvolt = <1400000>;
295 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
299 regulator-name = "vreg_l1c_1p8";
300 regulator-min-microvolt = <1800000>;
301 regulator-max-microvolt = <1800000>;
302 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
305 /* L2-4 are unused. */
308 regulator-name = "vreg_l5c_1p8";
309 regulator-min-microvolt = <1800000>;
310 regulator-max-microvolt = <2800000>;
311 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
315 regulator-name = "vreg_l6c_2p9";
316 regulator-min-microvolt = <1800000>;
317 regulator-max-microvolt = <2960000>;
318 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
319 regulator-allow-set-load;
320 regulator-allowed-modes =
321 <RPMH_REGULATOR_MODE_LPM
322 RPMH_REGULATOR_MODE_HPM>;
325 vreg_l7c_2p85: ldo7 {
326 regulator-name = "vreg_l7c_2p85";
327 regulator-min-microvolt = <2856000>;
328 regulator-max-microvolt = <3104000>;
329 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
333 regulator-name = "vreg_l8c_1p8";
334 regulator-min-microvolt = <1800000>;
335 regulator-max-microvolt = <1800000>;
336 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
340 regulator-name = "vreg_l9c_2p9";
341 regulator-min-microvolt = <2704000>;
342 regulator-max-microvolt = <2960000>;
343 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
344 regulator-allow-set-load;
345 regulator-allowed-modes =
346 <RPMH_REGULATOR_MODE_LPM
347 RPMH_REGULATOR_MODE_HPM>;
350 vreg_l10c_3p3: ldo10 {
351 regulator-name = "vreg_l10c_3p3";
352 regulator-min-microvolt = <3296000>;
353 regulator-max-microvolt = <3296000>;
354 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
357 vreg_l11c_3p0: ldo11 {
358 regulator-name = "vreg_l11c_3p0";
359 regulator-min-microvolt = <3000000>;
360 regulator-max-microvolt = <3000000>;
361 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
365 pm8009-rpmh-regulators {
366 compatible = "qcom,pm8009-rpmh-regulators";
369 vdd-s1-supply = <&vph_pwr>;
370 vdd-s2-supply = <&vreg_bob>;
371 vdd-l2-supply = <&vreg_s8c_1p2>;
372 vdd-l5-l6-supply = <&vreg_bob>;
373 vdd-l7-supply = <&vreg_s4a_1p8>;
375 vreg_s1f_1p2: smps1 {
376 regulator-name = "vreg_s1f_1p2";
377 regulator-min-microvolt = <1200000>;
378 regulator-max-microvolt = <1200000>;
379 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
382 vreg_s2f_0p5: smps2 {
383 regulator-name = "vreg_s2f_0p5";
384 regulator-min-microvolt = <512000>;
385 regulator-max-microvolt = <1100000>;
386 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
392 regulator-name = "vreg_l2f_1p3";
393 regulator-min-microvolt = <1304000>;
394 regulator-max-microvolt = <1304000>;
395 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
398 /* L3 & L4 are unused. */
401 regulator-name = "vreg_l5f_2p85";
402 regulator-min-microvolt = <2800000>;
403 regulator-max-microvolt = <2800000>;
404 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
408 regulator-name = "vreg_l6f_2p8";
409 regulator-min-microvolt = <2800000>;
410 regulator-max-microvolt = <2800000>;
411 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
415 regulator-name = "vreg_l7f_1p8";
416 regulator-min-microvolt = <1800000>;
417 regulator-max-microvolt = <1800000>;
418 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
441 clock-frequency = <400000>;
443 /* NXP PN553 NFC @ 28 */
448 clock-frequency = <1000000>;
450 cs35l41_l: cs35l41@40 {
451 compatible = "cirrus,cs35l41";
453 interrupt-parent = <&tlmm>;
454 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
455 reset-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
456 cirrus,boost-peak-milliamp = <4000>;
457 cirrus,boost-ind-nanohenry = <1000>;
458 cirrus,boost-cap-microfarad = <15>;
459 cirrus,asp-sdout-hiz = <3>;
460 cirrus,gpio2-src-select = <2>;
461 cirrus,gpio2-output-enable;
462 #sound-dai-cells = <1>;
465 cs35l41_r: cs35l41@41 {
466 compatible = "cirrus,cs35l41";
468 interrupt-parent = <&tlmm>;
469 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
470 reset-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
471 cirrus,boost-peak-milliamp = <4000>;
472 cirrus,boost-ind-nanohenry = <1000>;
473 cirrus,boost-cap-microfarad = <15>;
474 cirrus,asp-sdout-hiz = <3>;
475 cirrus,gpio2-src-select = <2>;
476 cirrus,gpio2-output-enable;
477 #sound-dai-cells = <1>;
483 clock-frequency = <400000>;
485 /* Dialog SLG51000 CMIC @ 75 */
490 clock-frequency = <400000>;
492 /* AMS TCS3490 RGB+IR color sensor @ 72 */
497 clock-frequency = <400000>;
500 compatible = "samsung,s6sy761";
502 interrupt-parent = <&tlmm>;
503 interrupts = <39 0x2008>;
504 /* It's "vddio" downstream but it works anyway! */
505 vdd-supply = <&vreg_l1c_1p8>;
506 avdd-supply = <&vreg_l10c_3p3>;
508 pinctrl-names = "default";
509 pinctrl-0 = <&ts_int_default>;
515 clock-frequency = <400000>;
517 /* Qcom SMB1390 @ 10 */
518 /* Silicon Labs SI4704 FM Radio Receiver @ 11 */
519 /* Qcom SMB1390_slave @ 18 */
520 /* HALO HL6111R Qi charger @ 25 */
521 /* Richwave RTC6226 FM Radio Receiver @ 64 */
531 vdda-phy-supply = <&vreg_l5a_0p88>;
532 vdda-pll-supply = <&vreg_l9a_1p2>;
538 pinctrl-0 = <&pcie2_default_state &mdm2ap_default &ap2mdm_default>;
544 vdda-phy-supply = <&vreg_l5a_0p88>;
545 vdda-pll-supply = <&vreg_l9a_1p2>;
555 linux,code = <KEY_VOLUMEUP>;
573 cd-gpios = <&tlmm 77 GPIO_ACTIVE_HIGH>;
574 pinctrl-names = "default", "sleep";
575 pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
576 pinctrl-1 = <&sdc2_sleep_state &sdc2_card_det_n>;
577 vmmc-supply = <&vreg_l9c_2p9>;
578 vqmmc-supply = <&vreg_l6c_2p9>;
589 gpio-reserved-ranges = <40 4>, <52 4>;
591 sdc2_default_state: sdc2-default {
594 drive-strength = <16>;
600 drive-strength = <16>;
606 drive-strength = <16>;
611 mdm2ap_default: mdm2ap-default {
612 pins = "gpio1", "gpio3";
614 drive-strength = <8>;
618 ts_int_default: ts-int-default {
621 drive-strength = <2>;
626 ap2mdm_default: ap2mdm-default {
627 pins = "gpio56", "gpio57";
629 drive-strength = <16>;
633 sdc2_card_det_n: sd-card-det-n {
637 drive-strength = <2>;
645 /* BIG WARNING! DO NOT TOUCH UFS, YOUR DEVICE WILL DIE! */
646 &ufs_mem_hc { status = "disabled"; };
647 &ufs_mem_phy { status = "disabled"; };
654 dr_mode = "peripheral";
660 vdda-pll-supply = <&vreg_l5a_0p88>;
661 vdda18-supply = <&vreg_l12a_1p8>;
662 vdda33-supply = <&vreg_l2a_3p1>;
668 vdda-phy-supply = <&vreg_l9a_1p2>;
669 vdda-pll-supply = <&vreg_l18a_0p9>;