Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: opp: Describe H616 OPPs and opp-supported-hw

Compared to the existing Allwinner H6 OPP scheme, the H616 uses a
similar NVMEM based mechanism to determine the silicon revision, which
is required to select the right frequency / voltage pair for the OPPs.
However it limits the maximum frequency for some speed bins, also seems
to not support all frequencies in all speed bins, which requires us to
introduce the opp-supported-hw property.

Add this property to the list of allowed properties, also drop the
requirement for the revision specific opp-microvolt properties, since
they might not be needed if using opp-supported-hw.

Also use to opportunity to adjust some wording, and drop a sentence
referring to the Linux driver and the OPP subsystem.

Shorten the existing example and add another example, showcasing the
opp-supported-hw property.

Signed-off-by: Martin Botka <martin.botka@somainline.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Martin Botka and committed by
Viresh Kumar
83d4e044 6ae07744

+46 -47
+46 -47
Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
··· 13 13 description: | 14 14 For some SoCs, the CPU frequency subset and voltage value of each 15 15 OPP varies based on the silicon variant in use. Allwinner Process 16 - Voltage Scaling Tables defines the voltage and frequency value based 17 - on the speedbin blown in the efuse combination. The 18 - sun50i-cpufreq-nvmem driver reads the efuse value from the SoC to 19 - provide the OPP framework with required information. 16 + Voltage Scaling Tables define the voltage and frequency values based 17 + on the speedbin blown in the efuse combination. 20 18 21 19 allOf: 22 20 - $ref: opp-v2-base.yaml# 23 21 24 22 properties: 25 23 compatible: 26 - const: allwinner,sun50i-h6-operating-points 24 + enum: 25 + - allwinner,sun50i-h6-operating-points 26 + - allwinner,sun50i-h616-operating-points 27 27 28 28 nvmem-cells: 29 29 description: | 30 30 A phandle pointing to a nvmem-cells node representing the efuse 31 - registers that has information about the speedbin that is used 31 + register that has information about the speedbin that is used 32 32 to select the right frequency/voltage value pair. Please refer 33 - the for nvmem-cells bindings 34 - Documentation/devicetree/bindings/nvmem/nvmem.txt and also 33 + to the nvmem-cells bindings in 34 + Documentation/devicetree/bindings/nvmem/nvmem.yaml and also the 35 35 examples below. 36 36 37 37 opp-shared: true ··· 47 47 properties: 48 48 opp-hz: true 49 49 clock-latency-ns: true 50 + opp-microvolt: true 51 + opp-supported-hw: 52 + maxItems: 1 53 + description: 54 + A single 32 bit bitmap value, representing compatible HW, one 55 + bit per speed bin index. 50 56 51 57 patternProperties: 52 58 "^opp-microvolt-speed[0-9]$": true 53 59 54 60 required: 55 61 - opp-hz 56 - - opp-microvolt-speed0 57 - - opp-microvolt-speed1 58 - - opp-microvolt-speed2 59 62 60 63 unevaluatedProperties: false 61 64 ··· 80 77 opp-microvolt-speed2 = <800000>; 81 78 }; 82 79 83 - opp-720000000 { 84 - clock-latency-ns = <244144>; /* 8 32k periods */ 85 - opp-hz = /bits/ 64 <720000000>; 86 - 87 - opp-microvolt-speed0 = <880000>; 88 - opp-microvolt-speed1 = <820000>; 89 - opp-microvolt-speed2 = <800000>; 90 - }; 91 - 92 - opp-816000000 { 93 - clock-latency-ns = <244144>; /* 8 32k periods */ 94 - opp-hz = /bits/ 64 <816000000>; 95 - 96 - opp-microvolt-speed0 = <880000>; 97 - opp-microvolt-speed1 = <820000>; 98 - opp-microvolt-speed2 = <800000>; 99 - }; 100 - 101 - opp-888000000 { 102 - clock-latency-ns = <244144>; /* 8 32k periods */ 103 - opp-hz = /bits/ 64 <888000000>; 104 - 105 - opp-microvolt-speed0 = <940000>; 106 - opp-microvolt-speed1 = <820000>; 107 - opp-microvolt-speed2 = <800000>; 108 - }; 109 - 110 80 opp-1080000000 { 111 81 clock-latency-ns = <244144>; /* 8 32k periods */ 112 82 opp-hz = /bits/ 64 <1080000000>; ··· 89 113 opp-microvolt-speed2 = <840000>; 90 114 }; 91 115 92 - opp-1320000000 { 93 - clock-latency-ns = <244144>; /* 8 32k periods */ 94 - opp-hz = /bits/ 64 <1320000000>; 95 - 96 - opp-microvolt-speed0 = <1160000>; 97 - opp-microvolt-speed1 = <940000>; 98 - opp-microvolt-speed2 = <900000>; 99 - }; 100 - 101 116 opp-1488000000 { 102 117 clock-latency-ns = <244144>; /* 8 32k periods */ 103 118 opp-hz = /bits/ 64 <1488000000>; ··· 96 129 opp-microvolt-speed0 = <1160000>; 97 130 opp-microvolt-speed1 = <1000000>; 98 131 opp-microvolt-speed2 = <960000>; 132 + }; 133 + }; 134 + 135 + - | 136 + opp-table { 137 + compatible = "allwinner,sun50i-h616-operating-points"; 138 + nvmem-cells = <&speedbin_efuse>; 139 + opp-shared; 140 + 141 + opp-480000000 { 142 + clock-latency-ns = <244144>; /* 8 32k periods */ 143 + opp-hz = /bits/ 64 <480000000>; 144 + 145 + opp-microvolt = <900000>; 146 + opp-supported-hw = <0x1f>; 147 + }; 148 + 149 + opp-792000000 { 150 + clock-latency-ns = <244144>; /* 8 32k periods */ 151 + opp-hz = /bits/ 64 <792000000>; 152 + 153 + opp-microvolt-speed1 = <900000>; 154 + opp-microvolt-speed4 = <940000>; 155 + opp-supported-hw = <0x12>; 156 + }; 157 + 158 + opp-1512000000 { 159 + clock-latency-ns = <244144>; /* 8 32k periods */ 160 + opp-hz = /bits/ 64 <1512000000>; 161 + 162 + opp-microvolt = <1100000>; 163 + opp-supported-hw = <0x0a>; 99 164 }; 100 165 }; 101 166