1*4882a593SmuzhiyunBinding for Rockchip's CPUFreq driver 2*4882a593Smuzhiyun=============================== 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunRockchip's CPUFreq driver attempts to read leakage value from eFuse 5*4882a593Smuzhiyunand get frequency count from pvtm, then supplies the OPP framework 6*4882a593Smuzhiyunwith 'prop' information which is used to determine opp-microvolt-<name> 7*4882a593Smuzhiyunproperty of OPPS when it is parsed by the OPP framework. This is based 8*4882a593Smuzhiyunon operating-points-v2, but the driver can also create the "cpufreq-dt" 9*4882a593Smuzhiyunplatform_device to compatibility with operating-points. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunFor more information about the expected DT format [See: ../opp/opp.txt]. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunOptional properties: 14*4882a593SmuzhiyunIn 'operating-points-v2' table: 15*4882a593Smuzhiyun- rockchip,leakage-voltage-sel: The property is an array of 3-tuples items, and 16*4882a593Smuzhiyun each item consists of leakage and voltage selector like 17*4882a593Smuzhiyun <min-leakage max-leakage volt-selector>. 18*4882a593Smuzhiyun min-leakage: minimum leakage in mA, ranges from 1 to 254. 19*4882a593Smuzhiyun max-leakage: maximum leakage in mA, ranges from 1 to 254. 20*4882a593Smuzhiyun voltage-selector: a sequence number which is used to math 21*4882a593Smuzhiyun opp-microvolt-L<number> roperty in OPP node. 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun- rockchip,pvtm-voltage-sel: The property is an array of 3-tuples items, and 24*4882a593Smuzhiyun each item consists of pvtm and voltage selector like 25*4882a593Smuzhiyun <min-pvtm max-pvtm volt-selector>. 26*4882a593Smuzhiyun min-pvtm: minimum frequency count in KHz. 27*4882a593Smuzhiyun max-pvtm: maximum frequency count in KHz. 28*4882a593Smuzhiyun voltage-selector: a sequence number which is used to math 29*4882a593Smuzhiyun opp-microvolt-L<number> roperty in OPP node. 30*4882a593Smuzhiyun- rockchip,pvtm-freq: Clock frequency in KHz, which is used to set the cpu clock 31*4882a593Smuzhiyun frequency before get frequency count of pvtm. 32*4882a593Smuzhiyun- rockchip,pvtm-volt: Voltage in uV, which is used to set the cpu voltage before 33*4882a593Smuzhiyun get frequency count of pvtm. 34*4882a593Smuzhiyun- rockchip,pvtm-ch: An array of two integers containing pvtm channel and clock 35*4882a593Smuzhiyun oscillation ring. 36*4882a593Smuzhiyun- rockchip,pvtm-sample-time: The number of milliseconds to wait for pvtm to 37*4882a593Smuzhiyun finish counting. 38*4882a593Smuzhiyun- rockchip,pvtm-number: An integer indicating the number of sampling points. 39*4882a593Smuzhiyun- rockchip,pvtm-error: An integer indicating the error between the sample 40*4882a593Smuzhiyun results. 41*4882a593Smuzhiyun- rockchip,pvtm-ref-temp: The SoC internal temperature in degree centigrade, the 42*4882a593Smuzhiyun min-pvtm and max-pvtm in 'leakage-voltage-sel' are 43*4882a593Smuzhiyun measured at reference temperature. 44*4882a593Smuzhiyun- rockchip,pvtm-temp-prop: An array of two integers containing proportional 45*4882a593Smuzhiyun constants which is used to convert the value at current 46*4882a593Smuzhiyun temperature to reference temperature. The first one is 47*4882a593Smuzhiyun used when current temperature is below reference 48*4882a593Smuzhiyun temperature. Conversely, The second one is used when 49*4882a593Smuzhiyun current temperature is above reference temperature. 50*4882a593Smuzhiyun- rockchip,pvtm-thermal-zone: A thermal zone node containing thermal sensor, 51*4882a593Smuzhiyun it's used to get the current temperature. 52*4882a593Smuzhiyun- rockchip,thermal-zone: A thermal zone node containing thermal sensor, 53*4882a593Smuzhiyun it's used to get the current temperature. 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun- nvmem-cells: A phandle to cpu_leakage data provided by a nvmem device. 56*4882a593Smuzhiyun- nvmem-cell-names: Should be "cpu_leakage" 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun- rockchip,threshold-freq: Clock frequency in KHz, it's used to reduce power 59*4882a593Smuzhiyun for SoCs with two clusters. 60*4882a593Smuzhiyun- rockchip,freq-limit: Only one cluster can contain the property, and the 61*4882a593Smuzhiyun cluster's maximum frequency will be limited to its 62*4882a593Smuzhiyun threshold frequency, if the other cluster's frequency 63*4882a593Smuzhiyun is geater than or equal to its threshold frequency. 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunExamples: 66*4882a593Smuzhiyun 67*4882a593Smuzhiyuncpus { 68*4882a593Smuzhiyun cpu@0 { 69*4882a593Smuzhiyun operating-points-v2 = <&cluster0_opp>; 70*4882a593Smuzhiyun }; 71*4882a593Smuzhiyun} 72*4882a593Smuzhiyun 73*4882a593Smuzhiyuncluster0_opp: opp_table0 { 74*4882a593Smuzhiyun compatible = "operating-points-v2"; 75*4882a593Smuzhiyun opp-shared; 76*4882a593Smuzhiyun rockchip,leakage-voltage-sel = < 77*4882a593Smuzhiyun 1 24 0 78*4882a593Smuzhiyun 25 254 1 79*4882a593Smuzhiyun >; 80*4882a593Smuzhiyun nvmem-cells = <&cpu_leakage>; 81*4882a593Smuzhiyun nvmem-cell-names = "cpu_leakage"; 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun opp@216000000 { 84*4882a593Smuzhiyun opp-hz = /bits/ 64 <216000000>; 85*4882a593Smuzhiyun opp-microvolt = <950000 950000 1350000>; 86*4882a593Smuzhiyun opp-microvolt-L0 = <1050000 1050000 1350000>; 87*4882a593Smuzhiyun opp-microvolt-L1 = <950000 950000 1350000>; 88*4882a593Smuzhiyun opp-suspend; 89*4882a593Smuzhiyun } 90*4882a593Smuzhiyun}; 91