blob: 4c2fc881ffaf3363c96c736fef9ba7e2e550f0eb [file] [log] [blame]
Jingbiao Ludc9d8782018-01-31 16:35:04 +08001/*
2 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include "msm8937.dtsi"
15#include "sdm439-pm8953.dtsi"
16#include "sdm439-pmi632.dtsi"
17
18&soc {
19 mem_acc_vreg_corner: regulator@01946004 {
20 compatible = "qcom,mem-acc-regulator";
21 regulator-name = "mem_acc_corner";
22 regulator-min-microvolt = <1>;
23 regulator-max-microvolt = <3>;
24
25 qcom,acc-reg-addr-list =
26 <0x01942138 0x01942130 0x01942120
27 0x01942124 0x01946000 0x01946004>;
28
29 qcom,acc-init-reg-config = <1 0xff>, <2 0x5555>, <6 0x55>;
30
31 qcom,num-acc-corners = <3>;
32 qcom,boot-acc-corner = <2>;
33 qcom,corner1-reg-config =
34 /* SVS+ => SVS+ */
35 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>,
36 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>,
37 /* SVS+ => NOM */
38 < 3 0x1041041>, < 4 0x1041>, < 5 0x2020202>,
39 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>,
40 /* SVS+ => TURBO/NOM+ */
41 < 3 0x1041041>, < 4 0x1041>, < 5 0x2020202>,
42 < 3 0x0>, < 4 0x0>, < 5 0x0>;
43
44 qcom,corner2-reg-config =
45 /* NOM => SVS+ */
46 < 3 0x30c30c3>, < 4 0x30c3>, < 5 0x6060606>,
47 /* NOM => NOM */
48 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>,
49 /* NOM => TURBO/NOM+ */
50 < 3 0x0>, < 4 0x0>, < 5 0x0>;
51
52 qcom,corner3-reg-config =
53 /* TURBO/NOM+ => SVS+ */
54 < 3 0x1041041>, < 4 0x1041>, < 5 0x2020202>,
55 < 3 0x30c30c3>, < 4 0x30c3>, < 5 0x6060606>,
56 /* TURBO/NOM+ => NOM */
57 < 3 0x1041041>, < 4 0x1041>, < 5 0x2020202>,
58 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>,
59 /* TURBO/NOM+ => TURBO/NOM+ */
60 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>,
61 <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>;
62 };
63
64 apc_vreg_corner: regulator@b018000 {
65 compatible = "qcom,cpr-regulator";
66 reg = <0xb018000 0x1000>, <0xb011064 4>, <0xa4000 0x1000>;
67 reg-names = "rbcpr", "rbcpr_clk", "efuse_addr";
68 interrupts = <0 15 0>;
69 regulator-name = "apc_corner";
70 regulator-min-microvolt = <1>;
71 regulator-max-microvolt = <7>;
72
73 qcom,cpr-fuse-corners = <3>;
74 qcom,cpr-voltage-ceiling = <1155000 1225000 1350000>;
75 qcom,cpr-voltage-floor = <1050000 1050000 1090000>;
76 vdd-apc-supply = <&pm8953_s5>;
77
78 mem-acc-supply = <&mem_acc_vreg_corner>;
79
80 qcom,cpr-ref-clk = <19200>;
81 qcom,cpr-timer-delay = <5000>;
82 qcom,cpr-timer-cons-up = <0>;
83 qcom,cpr-timer-cons-down = <2>;
84 qcom,cpr-irq-line = <0>;
85 qcom,cpr-step-quotient = <10>;
86 qcom,cpr-up-threshold = <2>;
87 qcom,cpr-down-threshold = <4>;
88 qcom,cpr-idle-clocks = <15>;
89 qcom,cpr-gcnt-time = <1>;
90 qcom,vdd-apc-step-up-limit = <1>;
91 qcom,vdd-apc-step-down-limit = <1>;
92 qcom,cpr-apc-volt-step = <5000>;
93
94 qcom,cpr-fuse-row = <67 0>;
95 qcom,cpr-fuse-target-quot = <42 24 6>;
96 qcom,cpr-fuse-ro-sel = <60 57 54>;
97 qcom,cpr-init-voltage-ref = <1155000 1225000 1350000>;
98 qcom,cpr-fuse-init-voltage =
99 <67 36 6 0>,
100 <67 18 6 0>,
101 <67 0 6 0>;
102 qcom,cpr-fuse-quot-offset =
103 <71 26 6 0>,
104 <71 20 6 0>,
105 <70 54 7 0>;
106 qcom,cpr-fuse-quot-offset-scale = <5 5 5>;
107 qcom,cpr-init-voltage-step = <10000>;
108 qcom,cpr-corner-map = <1 2 3 3 3 3 3>;
109 qcom,cpr-corner-frequency-map =
110 <1 960000000>,
111 <2 1094400000>,
112 <3 1209600000>,
113 <4 1248000000>,
114 <5 1344000000>,
115 <6 1401000000>,
116 <7 1497600000>;
117 qcom,speed-bin-fuse-sel = <37 34 3 0>;
118 qcom,cpr-speed-bin-max-corners =
119 <0 0 1 2 6>,
120 <1 0 1 2 7>,
121 <2 0 1 2 3>;
122 qcom,cpr-fuse-revision = <69 39 3 0>;
123 qcom,cpr-quot-adjust-scaling-factor-max = <0 1400 1400>;
124 qcom,cpr-voltage-scaling-factor-max = <0 2000 2000>;
125 qcom,cpr-scaled-init-voltage-as-ceiling;
126 qcom,cpr-fuse-version-map =
127 <0 (-1) 1 (-1) (-1) (-1)>,
128 <(-1) (-1) 2 (-1) (-1) (-1)>,
129 <(-1) (-1) 3 (-1) (-1) (-1)>,
130 <(-1) (-1) (-1) (-1) (-1) (-1)>;
131 qcom,cpr-quotient-adjustment =
132 <(-20) (-40) (-20)>,
133 <0 (-40) (20)>,
134 <0 0 (20)>,
135 <0 0 0>;
136 qcom,cpr-init-voltage-adjustment =
137 <0 0 0>,
138 <(10000) (15000) (20000)>,
139 <0 0 0>,
140 <0 0 0>;
141 qcom,cpr-enable;
142 };
143};