xref: /src/sys/contrib/device-tree/Bindings/power/avs/qcom,cpr.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1937eaf8bSEmmanuel VadotQCOM CPR (Core Power Reduction)
2937eaf8bSEmmanuel Vadot
3937eaf8bSEmmanuel VadotCPR (Core Power Reduction) is a technology to reduce core power on a CPU
4937eaf8bSEmmanuel Vadotor other device. Each OPP of a device corresponds to a "corner" that has
5937eaf8bSEmmanuel Vadota range of valid voltages for a particular frequency. While the device is
6937eaf8bSEmmanuel Vadotrunning at a particular frequency, CPR monitors dynamic factors such as
7937eaf8bSEmmanuel Vadottemperature, etc. and suggests adjustments to the voltage to save power
8937eaf8bSEmmanuel Vadotand meet silicon characteristic requirements.
9937eaf8bSEmmanuel Vadot
10937eaf8bSEmmanuel Vadot- compatible:
11937eaf8bSEmmanuel Vadot	Usage: required
12937eaf8bSEmmanuel Vadot	Value type: <string>
13937eaf8bSEmmanuel Vadot	Definition: should be "qcom,qcs404-cpr", "qcom,cpr" for qcs404
14937eaf8bSEmmanuel Vadot
15937eaf8bSEmmanuel Vadot- reg:
16937eaf8bSEmmanuel Vadot	Usage: required
17937eaf8bSEmmanuel Vadot	Value type: <prop-encoded-array>
18937eaf8bSEmmanuel Vadot	Definition: base address and size of the rbcpr register region
19937eaf8bSEmmanuel Vadot
20937eaf8bSEmmanuel Vadot- interrupts:
21937eaf8bSEmmanuel Vadot	Usage: required
22937eaf8bSEmmanuel Vadot	Value type: <prop-encoded-array>
23937eaf8bSEmmanuel Vadot	Definition: should specify the CPR interrupt
24937eaf8bSEmmanuel Vadot
25937eaf8bSEmmanuel Vadot- clocks:
26937eaf8bSEmmanuel Vadot	Usage: required
27937eaf8bSEmmanuel Vadot	Value type: <prop-encoded-array>
28937eaf8bSEmmanuel Vadot	Definition: phandle to the reference clock
29937eaf8bSEmmanuel Vadot
30937eaf8bSEmmanuel Vadot- clock-names:
31937eaf8bSEmmanuel Vadot	Usage: required
32937eaf8bSEmmanuel Vadot	Value type: <stringlist>
33937eaf8bSEmmanuel Vadot	Definition: must be "ref"
34937eaf8bSEmmanuel Vadot
35937eaf8bSEmmanuel Vadot- vdd-apc-supply:
36937eaf8bSEmmanuel Vadot	Usage: required
37937eaf8bSEmmanuel Vadot	Value type: <phandle>
38937eaf8bSEmmanuel Vadot	Definition: phandle to the vdd-apc-supply regulator
39937eaf8bSEmmanuel Vadot
40937eaf8bSEmmanuel Vadot- #power-domain-cells:
41937eaf8bSEmmanuel Vadot	Usage: required
42937eaf8bSEmmanuel Vadot	Value type: <u32>
43937eaf8bSEmmanuel Vadot	Definition: should be 0
44937eaf8bSEmmanuel Vadot
45937eaf8bSEmmanuel Vadot- operating-points-v2:
46937eaf8bSEmmanuel Vadot	Usage: required
47937eaf8bSEmmanuel Vadot	Value type: <phandle>
48937eaf8bSEmmanuel Vadot	Definition: A phandle to the OPP table containing the
49937eaf8bSEmmanuel Vadot		    performance states supported by the CPR
50937eaf8bSEmmanuel Vadot		    power domain
51937eaf8bSEmmanuel Vadot
52937eaf8bSEmmanuel Vadot- acc-syscon:
53937eaf8bSEmmanuel Vadot	Usage: optional
54937eaf8bSEmmanuel Vadot	Value type: <phandle>
55937eaf8bSEmmanuel Vadot	Definition: phandle to syscon for writing ACC settings
56937eaf8bSEmmanuel Vadot
57937eaf8bSEmmanuel Vadot- nvmem-cells:
58937eaf8bSEmmanuel Vadot	Usage: required
59937eaf8bSEmmanuel Vadot	Value type: <phandle>
60937eaf8bSEmmanuel Vadot	Definition: phandle to nvmem cells containing the data
61937eaf8bSEmmanuel Vadot		    that makes up a fuse corner, for each fuse corner.
62937eaf8bSEmmanuel Vadot		    As well as the CPR fuse revision.
63937eaf8bSEmmanuel Vadot
64937eaf8bSEmmanuel Vadot- nvmem-cell-names:
65937eaf8bSEmmanuel Vadot	Usage: required
66937eaf8bSEmmanuel Vadot	Value type: <stringlist>
67937eaf8bSEmmanuel Vadot	Definition: should be "cpr_quotient_offset1", "cpr_quotient_offset2",
68937eaf8bSEmmanuel Vadot		    "cpr_quotient_offset3", "cpr_init_voltage1",
69937eaf8bSEmmanuel Vadot		    "cpr_init_voltage2", "cpr_init_voltage3", "cpr_quotient1",
70937eaf8bSEmmanuel Vadot		    "cpr_quotient2", "cpr_quotient3", "cpr_ring_osc1",
71937eaf8bSEmmanuel Vadot		    "cpr_ring_osc2", "cpr_ring_osc3", "cpr_fuse_revision"
72937eaf8bSEmmanuel Vadot		    for qcs404.
73937eaf8bSEmmanuel Vadot
74937eaf8bSEmmanuel VadotExample:
75937eaf8bSEmmanuel Vadot
76937eaf8bSEmmanuel Vadot	cpr_opp_table: cpr-opp-table {
77937eaf8bSEmmanuel Vadot		compatible = "operating-points-v2-qcom-level";
78937eaf8bSEmmanuel Vadot
79937eaf8bSEmmanuel Vadot		cpr_opp1: opp1 {
80937eaf8bSEmmanuel Vadot			opp-level = <1>;
81937eaf8bSEmmanuel Vadot			qcom,opp-fuse-level = <1>;
82937eaf8bSEmmanuel Vadot		};
83937eaf8bSEmmanuel Vadot		cpr_opp2: opp2 {
84937eaf8bSEmmanuel Vadot			opp-level = <2>;
85937eaf8bSEmmanuel Vadot			qcom,opp-fuse-level = <2>;
86937eaf8bSEmmanuel Vadot		};
87937eaf8bSEmmanuel Vadot		cpr_opp3: opp3 {
88937eaf8bSEmmanuel Vadot			opp-level = <3>;
89937eaf8bSEmmanuel Vadot			qcom,opp-fuse-level = <3>;
90937eaf8bSEmmanuel Vadot		};
91937eaf8bSEmmanuel Vadot	};
92937eaf8bSEmmanuel Vadot
93937eaf8bSEmmanuel Vadot	power-controller@b018000 {
94937eaf8bSEmmanuel Vadot		compatible = "qcom,qcs404-cpr", "qcom,cpr";
95937eaf8bSEmmanuel Vadot		reg = <0x0b018000 0x1000>;
96937eaf8bSEmmanuel Vadot		interrupts = <0 15 IRQ_TYPE_EDGE_RISING>;
97937eaf8bSEmmanuel Vadot		clocks = <&xo_board>;
98937eaf8bSEmmanuel Vadot		clock-names = "ref";
99937eaf8bSEmmanuel Vadot		vdd-apc-supply = <&pms405_s3>;
100937eaf8bSEmmanuel Vadot		#power-domain-cells = <0>;
101937eaf8bSEmmanuel Vadot		operating-points-v2 = <&cpr_opp_table>;
102937eaf8bSEmmanuel Vadot		acc-syscon = <&tcsr>;
103937eaf8bSEmmanuel Vadot
104937eaf8bSEmmanuel Vadot		nvmem-cells = <&cpr_efuse_quot_offset1>,
105937eaf8bSEmmanuel Vadot			<&cpr_efuse_quot_offset2>,
106937eaf8bSEmmanuel Vadot			<&cpr_efuse_quot_offset3>,
107937eaf8bSEmmanuel Vadot			<&cpr_efuse_init_voltage1>,
108937eaf8bSEmmanuel Vadot			<&cpr_efuse_init_voltage2>,
109937eaf8bSEmmanuel Vadot			<&cpr_efuse_init_voltage3>,
110937eaf8bSEmmanuel Vadot			<&cpr_efuse_quot1>,
111937eaf8bSEmmanuel Vadot			<&cpr_efuse_quot2>,
112937eaf8bSEmmanuel Vadot			<&cpr_efuse_quot3>,
113937eaf8bSEmmanuel Vadot			<&cpr_efuse_ring1>,
114937eaf8bSEmmanuel Vadot			<&cpr_efuse_ring2>,
115937eaf8bSEmmanuel Vadot			<&cpr_efuse_ring3>,
116937eaf8bSEmmanuel Vadot			<&cpr_efuse_revision>;
117937eaf8bSEmmanuel Vadot		nvmem-cell-names = "cpr_quotient_offset1",
118937eaf8bSEmmanuel Vadot			"cpr_quotient_offset2",
119937eaf8bSEmmanuel Vadot			"cpr_quotient_offset3",
120937eaf8bSEmmanuel Vadot			"cpr_init_voltage1",
121937eaf8bSEmmanuel Vadot			"cpr_init_voltage2",
122937eaf8bSEmmanuel Vadot			"cpr_init_voltage3",
123937eaf8bSEmmanuel Vadot			"cpr_quotient1",
124937eaf8bSEmmanuel Vadot			"cpr_quotient2",
125937eaf8bSEmmanuel Vadot			"cpr_quotient3",
126937eaf8bSEmmanuel Vadot			"cpr_ring_osc1",
127937eaf8bSEmmanuel Vadot			"cpr_ring_osc2",
128937eaf8bSEmmanuel Vadot			"cpr_ring_osc3",
129937eaf8bSEmmanuel Vadot			"cpr_fuse_revision";
130937eaf8bSEmmanuel Vadot	};
131