android_kernel_samsung_msm8976/Documentation/devicetree/bindings/regulator/mem-acc-regulator.txt

171 lines
9.3 KiB
Plaintext

Qualcomm Technologies Memory Accelerator
Memory accelerator configures the power-mode (corner) for the
accelerator.
Required properties:
- compatible: Must be "qcom,mem-acc-regulator"
- regulator-name: A string used to describe the regulator
- regulator-min-microvolt: Minimum corner value as min constraint, which
should be 1 for SVS corner
- regulator-max-microvolt: Maximum corner value as max constraint, which
should be 4 for SUPER_TURBO or 3 for TURBO
- qcom,corner-acc-map Array which maps the APC (application processor)
corner value to the accelerator corner.
[0] maps APC SVS corner (1) to accelerator SVS corner
[1] maps APC NOMINAL corner (2) to accelerator NOMINAL corner
[2] maps APC TURBO corner (3) to accelerator TURBO corner
Optional properties:
- reg: Register addresses for acc-sel-l1, acc-sel-l2 control, acc-en,
MEM ACC eFuse address, acc-l1-custom , acc-l2-custom,
mem-acc-type1, mem-acc-type2, mem-acc-type3, mem-acc-type4,
mem-acc-type5 and mem-acc-type6.
- reg-names: Register names. Must be "acc-sel-l1",
"acc-sel-l2", "acc-en", "efuse_addr",
"acc-l1-custom", "acc-l2-custom", "mem-acc-type1",
"mem-acc-type2", "mem-acc-type3", "mem-acc-type4",
"mem-acc-type5", "mem-acc-type6".
A given mem-acc-regulator driver must have "acc-sel-l1" or
"acc-sel-l2" or "mem-acc-type*" reg-names property and
related register address property.
- qcom,acc-en-bit-pos Array which specifies bit positions in the
'acc-en' register. Setting these bits forces the
the acclerator to use the corner value specified
in the 'acc-sel-l1' and 'acc-sel-l2' register.
- qcom,acc-sel-l1-bit-size Integer which specifies the number of bits in
the 'acc-sel-l1' register which define each L1
select parameter. If this property is not
specified, then a default value of 2 is assumed.
- qcom,acc-sel-l1-bit-pos Array which specifies bit positions in the
'acc-sel-l1' register. Each element in this array
is the LSB of an N-bit value where 'N' is
defined by the qcom,acc-sel-l1-bit-size
property. This N-bit value specifies the corner
value used by the accelerator for the L1 cache.
- qcom,acc-sel-l2-bit-size Integer which specifies the number of bits in
the 'acc-sel-l2' register which define each L2
select parameter. If this property is not
specified, then a default value of 2 is assumed.
- qcom,acc-sel-l2-bit-pos Array which specifies bit positions in the
'acc-sel-l2' register. Each element in this array
is the LSB of an N-bit value where 'N' is
defined by the qcom,acc-sel-l2-bit-size
property. This N-bit value specifies the corner
value used by the accelerator for the L2 cache.
- qcom,l1-config-skip-fuse-sel: Array of 5 elements to indicate where to read the bits, what value to
compare with in order to decide whether to
skip configuring the L1 accelerator or not while changing the APC corner
and method to read fuse row, using SCM to read or read register directly.
The 5 elements with index [0..4] are:
[0] => the fuse row number of the selector
[1] => LSB bit position of the bits
[2] => number of bits
[3] => the value to select skip L1 config logic
[4] => fuse reading method, 0 for direct reading or 1 for SCM reading
When the value of the fuse bits specified by first 3 elements equals to
the value in 4th element, L1 accelerator
configuration logic is skipped. Otherwise, the original configuration sent
from corner map should be applied. If the 5th element is 0, read the fuse row
from register directly. Otherwise, read it through SCM.
- qcom,l1-acc-custom-data: Array which maps APC corner values to L1 ACC custom data values.
The corresponding custom data is written into the custom register
while switching between APC corners. The custom register address
is specified by "acc-11-custom" reg-property. The length of the array
should be equal to number of APC corners.
- qcom,l2-acc-custom-data: Array which maps APC corner values to L2 ACC custom data values.
The corresponding custom data is written into the custom register
while switching between APC corners. The custom register address
is specified by "acc-l2-custom" reg-property. The length of the array
should be equal to number of APC corners.
- qcom,override-acc-fuse-sel: Array of 4 elements which specify the way to read the override fuse.
The override fuse value is used by the qcom,override-fuse-version-map
to identify the correct set of override properties.
The 4 elements with index [0..4] are:
[0] => the fuse row number of the selector
[1] => LSB bit position of the bits
[2] => number of bits
[3] => fuse reading method, 0 for direct reading or 1 for SCM reading
- qcom,override-fuse-version-map: Array of integers which each match to a override fuse value.
Any element in a tuple may use the value 0xffffffff as a wildcard.
The index of the first value (in the array) which matches the override fuse
is used to select the right tuples from the other override properties.
- qcom,override-corner-acc-map: Array of tuples which overrides the existing acc-corner map
(specified by qcom,corner-acc-map) with corner values selected
from this property. "qcom,override-corner-acc-map" must contain the
same number of tuples as "qcom,override-fuse-version-map". These tuples
are then mapped one-to-one in the order specified. If the
"qcom,override-fuse-version-map" property is not specified, then
"qcom,override-corner-acc-map" must contain a single tuple which is then
applied unconditionally.
- qcom,override-l1-acc-custom-data: Array of tuples of which overrides the existing l1-acc-custom data
(specified by qcom,l1-acc-custom-data), with values specified in this property.
The corresponding custom data is written into the custom register while
switching between APC corners. The custom register address is specified by
"acc-11-custom" reg-property. This property can only be specified if the
"qcom,l1-acc-custom-data" is already defined. If the
"qcom,override-fuse-version-map" property is specified, then
qcom,override-l1-acc-custom-data must contain the same number of tuples
as "qcom,override-fuse-version-map". These tuples are then mapped one-to-one
in the order specified. If the qcom,override-fuse-version-map property is
not specified, then "qcom,override-l1-acc-custom-data" must contain a single
tuple which is then applied unconditionally.
- qcom,override-l2-acc-custom-data: Array of tuples of which overrides the existing l1-acc-custom data
(specified by qcom,l2-acc-custom-data), with values specified in this property.
The corresponding custom data is written into the custom register while
switching between APC corners. The custom register address is specified by
"acc-12-custom" reg-property. This property can only be specified if the
"qcom,l2-acc-custom-data" is already defined. If the
"qcom,override-fuse-version-map" property is specified, then
"qcom,override-l2-acc-custom-data" must contain the same number of tuples
as "qcom,override-fuse-version-map". These tuples are then mapped one-to-one
in the order specified. If the qcom,override-fuse-version-map property is
not specified, then "qcom,override-l2-acc-custom-data" must contain a single
tuple which is then applied unconditionally.
- qcom,mem-acc-type1: Array which specifies the value to be written to the mem acc type1 register for each fuse
corner, from the lowest fuse corner to the highest fuse corner. The length of the array
must be equal to the number of APC fuse corners. This property must be present if reg names
specifies mem-acc-type1.
- qcom,mem-acc-type2: Same as qcom,mem-acc-type1 except for mem acc type2 register.
- qcom,mem-acc-type3: Same as qcom,mem-acc-type1 except for mem acc type3 register.
- qcom,mem-acc-type4: Same as qcom,mem-acc-type1 except for mem acc type4 register.
- qcom,mem-acc-type5: Same as qcom,mem-acc-type1 except for mem acc type5 register.
- qcom,mem-acc-type6: Same as qcom,mem-acc-type1 except for mem acc type6 register.
mem_acc_vreg_corner: regulator@fd4aa044 {
compatible = "qcom,mem-acc-regulator";
reg = <0xfd4aa048 0x1>, <0xfd4aa044 0x1>, <0xfd4af000 0x1>,
<0x58000 0x1000>, <0x01942124 0x4>, <0xf900d084 1>,
<0xf900d088 1>, <0xf900d08c 1>, <0xf900d090 1>;
reg-names = "acc-en", "acc-sel-l1" , "acc-sel-l2",
"efuse_addr", "acc-l2-custom", "mem-acc-type1",
"mem-acc-type2", "mem-acc-type3", "mem-acc-type4";
regulator-name = "mem_acc_corner";
regulator-min-microvolt = <1>;
regulator-max-microvolt = <3>;
qcom,acc-en-bit-pos = <0>;
qcom,acc-sel-l1-bit-pos = <0>;
qcom,acc-sel-l2-bit-pos = <0>;
qcom,acc-sel-l1-bit-size = <2>;
qcom,acc-sel-l2-bit-size = <2>;
qcom,corner-acc-map = <0 1 3>;
qcom,l1-config-skip-fuse-sel = <0 52 1 1 0>;
qcom,l2-acc-custom-data = <0x0 0x3000 0x3000>;
qcom,override-acc-fuse-sel = <0 52 2 0>;
qcom,override-fuse-version-map = <0>,
<2>,
<(-1)>;
qcom,override-corner-acc-map = <0 0 1>,
<0 1 2>,
<0 1 1>;
qcom,overide-l2-acc-custom-data = <0x0 0x0 0x3000>,
<0x0 0x3000 0x3000>,
<0x0 0x0 0x0>;
qcom,mem-acc-type1 = <0x02 0x02 0x00>;
qcom,mem-acc-type2 = <0x02 0x02 0x00>;
qcom,mem-acc-type3 = <0x02 0x02 0x00>;
qcom,mem-acc-type4 = <0x02 0x02 0x00>;
};