Loading Documentation/devicetree/bindings/arm/msm/qcom,osm.txt +33 −2 Original line number Diff line number Diff line Loading @@ -233,8 +233,6 @@ Properties: configuration registers for the Performance cluster. The array must contain exactly three elements. corresponding CPRh device. - qcom,perfcl-apcs-mem-acc-threshold-voltage Usage: optional Value type: <u32> Loading @@ -245,6 +243,27 @@ Properties: the MEM ACC threshold voltage specified for the corresponding CPRh device. - qcom,l3-memacc-level-vc-binX Usage: required Value type: <prop-encoded-array> Definition: Array which defines the NOM and TURBO VCs for the L3 clock on that BIN part. The array must contain exactly two elements. - qcom,pwrcl-memacc-level-vc-binX Usage: required Value type: <prop-encoded-array> Definition: Array which defines the NOM and TURBO VCs for the Power cluster clock on that BIN part. The array must contain exactly two elements. - qcom,perfcl-memacc-level-vc-binX Usage: required Value type: <prop-encoded-array> Definition: Array which defines the NOM and TURBO VCs for the Performance cluster clock on that BIN part. The array must contain exactly two elements. - qcom,apcs-cbc-addr Usage: required Value type: <prop-encoded-array> Loading Loading @@ -483,6 +502,18 @@ Example: < 1881600000 0x404c1462 0x00004e4e 0x2 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >; qcom,l3-memacc-level-vc-bin0 = <7 63>; qcom,l3-memacc-level-vc-bin1 = <7 9>; qcom,l3-memacc-level-vc-bin2 = <7 9>; qcom,pwrcl-memacc-level-vc-bin0 = <12 63>; qcom,pwrcl-memacc-level-vc-bin1 = <12 17>; qcom,pwrcl-memacc-level-vc-bin2 = <12 17>; qcom,perfcl-memacc-level-vc-bin0 = <12 18>; qcom,perfcl-memacc-level-vc-bin1 = <12 18>; qcom,perfcl-memacc-level-vc-bin2 = <12 18>; qcom,up-timer = <1000 1000 1000>; qcom,down-timer = Loading arch/arm64/boot/dts/qcom/sdm845-v2.dtsi +108 −0 Original line number Diff line number Diff line Loading @@ -434,8 +434,116 @@ }; &clock_cpucc { compatible = "qcom,clk-cpu-osm-v2"; vdd-l3-supply = <&apc0_l3_vreg>; vdd-pwrcl-supply = <&apc0_pwrcl_vreg>; vdd-perfcl-supply = <&apc1_perfcl_vreg>; qcom,l3-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 844800000 0x4024062c 0x00002323 0x2 7 >, < 940800000 0x40240731 0x00002727 0x2 8 >, < 1036800000 0x40240836 0x00002b2b 0x2 9 >, < 1132800000 0x402c093b 0x00002f2f 0x2 10 >, < 1209600000 0x402c0a3f 0x00003232 0x2 11 >, < 1305600000 0x40340b44 0x00003636 0x2 12 >, < 1401600000 0x40340c49 0x00003a3a 0x2 13 >, < 1478400000 0x403c0d4d 0x00003e3e 0x2 14 >; qcom,pwrcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 825600000 0x401c062b 0x00002222 0x1 7 >, < 902400000 0x4024072f 0x00002626 0x1 8 >, < 979200000 0x40240833 0x00002929 0x1 9 >, < 1056000000 0x402c0937 0x00002c2c 0x2 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x2 11 >, < 1228800000 0x402c0b40 0x00003333 0x2 12 >, < 1324800000 0x40340c45 0x00003737 0x2 13 >, < 1420800000 0x40340d4a 0x00003b3b 0x2 14 >, < 1516800000 0x403c0e4f 0x00003f3f 0x2 15 >, < 1612800000 0x403c0f54 0x00004343 0x2 16 >, < 1689600000 0x40441058 0x00004646 0x2 17 >, < 1766400000 0x4044115c 0x00004a4a 0x2 18 >; qcom,perfcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 825600000 0x401c062b 0x00002222 0x1 7 >, < 902400000 0x4024072f 0x00002626 0x1 8 >, < 979200000 0x40240833 0x00002929 0x1 9 >, < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x2 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1459200000 0x403c0e4c 0x00003d3d 0x2 15 >, < 1536000000 0x403c0f50 0x00004040 0x2 16 >, < 1612800000 0x403c1054 0x00004343 0x2 17 >, < 1689600000 0x40441158 0x00004646 0x2 18 >, < 1766400000 0x4044125c 0x00004a4a 0x2 19 >, < 1843200000 0x40441360 0x00004d4d 0x2 20 >, < 1920000000 0x404c1464 0x00005050 0x2 21 >, < 1996800000 0x404c1568 0x00005353 0x2 22 >, < 2092800000 0x4054166d 0x00005757 0x2 23 >, < 2169600000 0x40541771 0x00005a5a 0x2 24 >, < 2246400000 0x40541875 0x00005e5e 0x2 25 >, < 2323200000 0x40541979 0x00006161 0x2 26 >, < 2400000000 0x40541a7d 0x00006464 0x2 27 >; qcom,perfcl-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 825600000 0x401c062b 0x00002222 0x1 7 >, < 902400000 0x4024072f 0x00002626 0x1 8 >, < 979200000 0x40240833 0x00002929 0x1 9 >, < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x2 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1459200000 0x403c0e4c 0x00003d3d 0x2 15 >, < 1536000000 0x403c0f50 0x00004040 0x2 16 >, < 1612800000 0x403c1054 0x00004343 0x2 17 >, < 1689600000 0x40441158 0x00004646 0x2 18 >, < 1766400000 0x4044125c 0x00004a4a 0x2 19 >, < 1843200000 0x40441360 0x00004d4d 0x2 20 >, < 1920000000 0x404c1464 0x00005050 0x2 21 >, < 1996800000 0x404c1568 0x00005353 0x2 22 >, < 2092800000 0x4054166d 0x00005757 0x2 23 >, < 2169600000 0x40541771 0x00005a5a 0x2 24 >, < 2246400000 0x40541875 0x00005e5e 0x2 25 >, < 2323200000 0x40541979 0x00006161 0x2 26 >, < 2400000000 0x40541a7d 0x00006464 0x2 27 >, < 2476800000 0x40541b81 0x00006767 0x2 28 >, < 2553600000 0x40541c85 0x00006a6a 0x2 29 >, < 2630400000 0x40541d89 0x00006e6e 0x2 30 >, < 2707200000 0x40541e8d 0x00007171 0x2 31 >; qcom,l3-memacc-level-vc-bin0 = <8 13>; qcom,pwrcl-memacc-level-vc-bin0 = <12 16>; qcom,perfcl-memacc-level-vc-bin0 = <14 22>; qcom,perfcl-memacc-level-vc-bin1 = <14 22>; }; &clock_gcc { Loading arch/arm64/boot/dts/qcom/sdm845.dtsi +78 −66 Original line number Diff line number Diff line Loading @@ -1152,8 +1152,8 @@ < 652800000 0x401c0422 0x00002020 0x1 5 >, < 729600000 0x401c0526 0x00002020 0x1 6 >, < 806400000 0x401c062a 0x00002222 0x1 7 >, < 883200000 0x4024072e 0x00002525 0x2 8 >, < 960000000 0x40240832 0x00002828 0x2 9 >; < 883200000 0x4024072e 0x00002525 0x1 8 >, < 960000000 0x40240832 0x00002828 0x1 9 >; qcom,l3-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1163,10 +1163,10 @@ < 652800000 0x401c0422 0x00002020 0x1 5 >, < 729600000 0x401c0526 0x00002020 0x1 6 >, < 806400000 0x401c062a 0x00002222 0x1 7 >, < 883200000 0x4024072e 0x00002525 0x2 8 >, < 960000000 0x40240832 0x00002828 0x2 9 >, < 1036800000 0x40240936 0x00002b2b 0x3 10 >, < 1094400000 0x402c0a39 0x00002e2e 0x3 11 >; < 883200000 0x4024072e 0x00002525 0x1 8 >, < 960000000 0x40240832 0x00002828 0x1 9 >, < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1094400000 0x402c0a39 0x00002e2e 0x1 11 >; qcom,l3-speedbin2-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1176,12 +1176,12 @@ < 652800000 0x401c0422 0x00002020 0x1 5 >, < 729600000 0x401c0526 0x00002020 0x1 6 >, < 806400000 0x401c062a 0x00002222 0x1 7 >, < 883200000 0x4024072e 0x00002525 0x2 8 >, < 960000000 0x40240832 0x00002828 0x2 9 >, < 1036800000 0x40240936 0x00002b2b 0x3 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x3 11 >, < 1209600000 0x402c0b3f 0x00003232 0x3 12 >, < 1305600000 0x40340c44 0x00003636 0x3 13 >; < 883200000 0x4024072e 0x00002525 0x1 8 >, < 960000000 0x40240832 0x00002828 0x1 9 >, < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1305600000 0x40340c44 0x00003636 0x1 13 >; qcom,pwrcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1196,11 +1196,11 @@ < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x2 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x2 16 >, < 1593600000 0x403c1053 0x00004242 0x2 17 >; < 1286400000 0x40340c43 0x00003636 0x1 13 >, < 1363200000 0x40340d47 0x00003939 0x1 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x1 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x1 16 >, < 1593600000 0x403c1053 0x00004242 0x1 17 >; qcom,pwrcl-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1215,13 +1215,13 @@ < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x2 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x2 16 >, < 1593600000 0x403c1053 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x3 18 >, < 1708800000 0x40441259 0x00004747 0x3 19 >; < 1286400000 0x40340c43 0x00003636 0x1 13 >, < 1363200000 0x40340d47 0x00003939 0x1 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x1 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x1 16 >, < 1593600000 0x403c1053 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1708800000 0x40441259 0x00004747 0x1 19 >; qcom,pwrcl-speedbin2-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1236,13 +1236,13 @@ < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x2 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x2 16 >, < 1593600000 0x403c1053 0x00004242 0x2 17 >, < 1670400000 0x40441157 0x00004646 0x3 18 >, < 1747200000 0x4044125b 0x00004949 0x3 19 >; < 1286400000 0x40340c43 0x00003636 0x1 13 >, < 1363200000 0x40340d47 0x00003939 0x1 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x1 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x1 16 >, < 1593600000 0x403c1053 0x00004242 0x1 17 >, < 1670400000 0x40441157 0x00004646 0x1 18 >, < 1747200000 0x4044125b 0x00004949 0x1 19 >; qcom,perfcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1257,16 +1257,16 @@ < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1190400000 0x402c0b3e 0x00003232 0x1 12 >, < 1267200000 0x40340c42 0x00003535 0x2 13 >, < 1344000000 0x40340d46 0x00003838 0x2 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x2 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x2 16 >, < 1574400000 0x403c1052 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x2 18 >, < 1728000000 0x4044125a 0x00004848 0x3 19 >, < 1804800000 0x4044135e 0x00004b4b 0x3 20 >, < 1881600000 0x404c1462 0x00004e4e 0x3 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >; < 1267200000 0x40340c42 0x00003535 0x1 13 >, < 1344000000 0x40340d46 0x00003838 0x1 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x1 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x1 16 >, < 1574400000 0x403c1052 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1728000000 0x4044125a 0x00004848 0x1 19 >, < 1804800000 0x4044135e 0x00004b4b 0x1 20 >, < 1881600000 0x404c1462 0x00004e4e 0x1 21 >, < 1958400000 0x404c1566 0x00005252 0x1 22 >; qcom,perfcl-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1281,18 +1281,18 @@ < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1190400000 0x402c0b3e 0x00003232 0x1 12 >, < 1267200000 0x40340c42 0x00003535 0x2 13 >, < 1344000000 0x40340d46 0x00003838 0x2 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x2 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x2 16 >, < 1574400000 0x403c1052 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x2 18 >, < 1728000000 0x4044125a 0x00004848 0x3 19 >, < 1804800000 0x4044135e 0x00004b4b 0x3 20 >, < 1881600000 0x404c1462 0x00004e4e 0x3 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >, < 2035200000 0x404c166a 0x00005555 0x3 23 >, < 2092800000 0x4054176d 0x00005757 0x3 24 >; < 1267200000 0x40340c42 0x00003535 0x1 13 >, < 1344000000 0x40340d46 0x00003838 0x1 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x1 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x1 16 >, < 1574400000 0x403c1052 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1728000000 0x4044125a 0x00004848 0x1 19 >, < 1804800000 0x4044135e 0x00004b4b 0x1 20 >, < 1881600000 0x404c1462 0x00004e4e 0x1 21 >, < 1958400000 0x404c1566 0x00005252 0x1 22 >, < 2035200000 0x404c166a 0x00005555 0x1 23 >, < 2092800000 0x4054176d 0x00005757 0x1 24 >; qcom,perfcl-speedbin2-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1307,19 +1307,31 @@ < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1190400000 0x402c0b3e 0x00003232 0x1 12 >, < 1267200000 0x40340c42 0x00003535 0x2 13 >, < 1344000000 0x40340d46 0x00003838 0x2 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x2 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x2 16 >, < 1574400000 0x403c1052 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x2 18 >, < 1728000000 0x4044125a 0x00004848 0x3 19 >, < 1804800000 0x4044135e 0x00004b4b 0x3 20 >, < 1881600000 0x404c1462 0x00004e4e 0x3 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >, < 2035200000 0x404c166a 0x00005555 0x3 23 >, < 2112000000 0x4054176e 0x00005858 0x3 24 >, < 2208000000 0x40541873 0x00005c5c 0x3 25 >; < 1267200000 0x40340c42 0x00003535 0x1 13 >, < 1344000000 0x40340d46 0x00003838 0x1 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x1 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x1 16 >, < 1574400000 0x403c1052 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1728000000 0x4044125a 0x00004848 0x1 19 >, < 1804800000 0x4044135e 0x00004b4b 0x1 20 >, < 1881600000 0x404c1462 0x00004e4e 0x1 21 >, < 1958400000 0x404c1566 0x00005252 0x1 22 >, < 2035200000 0x404c166a 0x00005555 0x1 23 >, < 2112000000 0x4054176e 0x00005858 0x1 24 >, < 2208000000 0x40541873 0x00005c5c 0x1 25 >; qcom,l3-memacc-level-vc-bin0 = <7 63>; qcom,l3-memacc-level-vc-bin1 = <7 9>; qcom,l3-memacc-level-vc-bin2 = <7 9>; qcom,pwrcl-memacc-level-vc-bin0 = <12 63>; qcom,pwrcl-memacc-level-vc-bin1 = <12 17>; qcom,pwrcl-memacc-level-vc-bin2 = <12 17>; qcom,perfcl-memacc-level-vc-bin0 = <12 18>; qcom,perfcl-memacc-level-vc-bin1 = <12 18>; qcom,perfcl-memacc-level-vc-bin2 = <12 18>; qcom,up-timer = <1000 1000 1000>; Loading drivers/clk/qcom/clk-cpu-osm.c +40 −30 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ #define MIN_VCO_VAL 0x2b #define MAX_VC 63 #define MEM_ACC_LEVELS_LUT 2 #define MAX_MEM_ACC_LEVELS 3 #define MAX_MEM_ACC_VAL_PER_LEVEL 3 #define MAX_MEM_ACC_VALUES (MAX_MEM_ACC_LEVELS * \ Loading Loading @@ -266,6 +267,7 @@ struct clk_osm { u32 speedbin; u32 mem_acc_crossover_vc_addr; u32 mem_acc_addr[MEM_ACC_ADDRS]; u32 mem_acc_level_vc[MEM_ACC_LEVELS_LUT]; u32 ramp_ctl_addr; u32 apm_mode_ctl; u32 apm_status_ctl; Loading Loading @@ -1045,21 +1047,6 @@ static inline int clk_osm_count_ns(struct clk_osm *c, u64 nsec) static void clk_osm_program_mem_acc_regs(struct clk_osm *c) { int curr_level, i, j = 0; int mem_acc_level_map[MAX_MEM_ACC_LEVELS] = {MAX_VC, MAX_VC, MAX_VC}; curr_level = c->osm_table[0].mem_acc_level; for (i = 0; i < c->num_entries; i++) { if (curr_level == MAX_MEM_ACC_LEVELS) break; if (c->osm_table[i].mem_acc_level != curr_level) { mem_acc_level_map[j++] = c->osm_table[i].virtual_corner; curr_level = c->osm_table[i].mem_acc_level; } } if (c->secure_init) { clk_osm_write_seq_reg(c, c->pbases[OSM_BASE] + MEMACC_CROSSOVER_VC, Loading @@ -1069,13 +1056,8 @@ static void clk_osm_program_mem_acc_regs(struct clk_osm *c) clk_osm_write_seq_reg(c, c->mem_acc_addr[2], DATA_MEM(50)); clk_osm_write_seq_reg(c, c->mem_acc_crossover_vc, DATA_MEM(78)); clk_osm_write_seq_reg(c, mem_acc_level_map[0], DATA_MEM(79)); if (c == &perfcl_clk) clk_osm_write_seq_reg(c, c->mem_acc_threshold_vc, DATA_MEM(80)); else clk_osm_write_seq_reg(c, mem_acc_level_map[1], DATA_MEM(80)); clk_osm_write_seq_reg(c, c->mem_acc_level_vc[0], DATA_MEM(79)); clk_osm_write_seq_reg(c, c->mem_acc_level_vc[1], DATA_MEM(80)); /* * Note that DATA_MEM[81] -> DATA_MEM[89] values will be * confirmed post-si. Use a value of 1 for DATA_MEM[89] and Loading @@ -1086,13 +1068,9 @@ static void clk_osm_program_mem_acc_regs(struct clk_osm *c) scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(78), c->mem_acc_crossover_vc); scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(79), mem_acc_level_map[0]); if (c == &perfcl_clk) c->mem_acc_level_vc[0]); scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(80), c->mem_acc_threshold_vc); else scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(80), mem_acc_level_map[1]); c->mem_acc_level_vc[1]); } } Loading Loading @@ -1669,7 +1647,8 @@ static void clk_osm_misc_programming(struct clk_osm *c) /* Program LVAL corresponding to first turbo VC */ for (i = 0; i < c->num_entries; i++) { if (c->osm_table[i].mem_acc_level == MAX_MEM_ACC_LEVELS) { if (c->osm_table[i].virtual_corner == c->mem_acc_level_vc[1]) { lval = c->osm_table[i].freq_data & GENMASK(7, 0); break; } Loading Loading @@ -2288,6 +2267,7 @@ static int clk_osm_parse_dt_configs(struct platform_device *pdev) { struct device_node *of = pdev->dev.of_node; u32 *array; char memacc_str[40]; int rc = 0; struct resource *res; Loading Loading @@ -2507,6 +2487,36 @@ static int clk_osm_parse_dt_configs(struct platform_device *pdev) return -ENOMEM; } snprintf(memacc_str, ARRAY_SIZE(memacc_str), "qcom,l3-memacc-level-vc-bin%d", l3_clk.speedbin); rc = of_property_read_u32_array(of, memacc_str, l3_clk.mem_acc_level_vc, MEM_ACC_LEVELS_LUT); if (rc) { dev_err(&pdev->dev, "unable to find %s property, rc=%d\n", memacc_str, rc); return rc; } snprintf(memacc_str, ARRAY_SIZE(memacc_str), "qcom,pwrcl-memacc-level-vc-bin%d", pwrcl_clk.speedbin); rc = of_property_read_u32_array(of, memacc_str, pwrcl_clk.mem_acc_level_vc, MEM_ACC_LEVELS_LUT); if (rc) { dev_err(&pdev->dev, "unable to find %s property, rc=%d\n", memacc_str, rc); return rc; } snprintf(memacc_str, ARRAY_SIZE(memacc_str), "qcom,perfcl-memacc-level-vc-bin%d", pwrcl_clk.speedbin); rc = of_property_read_u32_array(of, memacc_str, perfcl_clk.mem_acc_level_vc, MEM_ACC_LEVELS_LUT); if (rc) { dev_err(&pdev->dev, "unable to find %s property, rc=%d\n", memacc_str, rc); return rc; } l3_clk.secure_init = perfcl_clk.secure_init = pwrcl_clk.secure_init = of_property_read_bool(pdev->dev.of_node, "qcom,osm-no-tz"); Loading Loading
Documentation/devicetree/bindings/arm/msm/qcom,osm.txt +33 −2 Original line number Diff line number Diff line Loading @@ -233,8 +233,6 @@ Properties: configuration registers for the Performance cluster. The array must contain exactly three elements. corresponding CPRh device. - qcom,perfcl-apcs-mem-acc-threshold-voltage Usage: optional Value type: <u32> Loading @@ -245,6 +243,27 @@ Properties: the MEM ACC threshold voltage specified for the corresponding CPRh device. - qcom,l3-memacc-level-vc-binX Usage: required Value type: <prop-encoded-array> Definition: Array which defines the NOM and TURBO VCs for the L3 clock on that BIN part. The array must contain exactly two elements. - qcom,pwrcl-memacc-level-vc-binX Usage: required Value type: <prop-encoded-array> Definition: Array which defines the NOM and TURBO VCs for the Power cluster clock on that BIN part. The array must contain exactly two elements. - qcom,perfcl-memacc-level-vc-binX Usage: required Value type: <prop-encoded-array> Definition: Array which defines the NOM and TURBO VCs for the Performance cluster clock on that BIN part. The array must contain exactly two elements. - qcom,apcs-cbc-addr Usage: required Value type: <prop-encoded-array> Loading Loading @@ -483,6 +502,18 @@ Example: < 1881600000 0x404c1462 0x00004e4e 0x2 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >; qcom,l3-memacc-level-vc-bin0 = <7 63>; qcom,l3-memacc-level-vc-bin1 = <7 9>; qcom,l3-memacc-level-vc-bin2 = <7 9>; qcom,pwrcl-memacc-level-vc-bin0 = <12 63>; qcom,pwrcl-memacc-level-vc-bin1 = <12 17>; qcom,pwrcl-memacc-level-vc-bin2 = <12 17>; qcom,perfcl-memacc-level-vc-bin0 = <12 18>; qcom,perfcl-memacc-level-vc-bin1 = <12 18>; qcom,perfcl-memacc-level-vc-bin2 = <12 18>; qcom,up-timer = <1000 1000 1000>; qcom,down-timer = Loading
arch/arm64/boot/dts/qcom/sdm845-v2.dtsi +108 −0 Original line number Diff line number Diff line Loading @@ -434,8 +434,116 @@ }; &clock_cpucc { compatible = "qcom,clk-cpu-osm-v2"; vdd-l3-supply = <&apc0_l3_vreg>; vdd-pwrcl-supply = <&apc0_pwrcl_vreg>; vdd-perfcl-supply = <&apc1_perfcl_vreg>; qcom,l3-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 844800000 0x4024062c 0x00002323 0x2 7 >, < 940800000 0x40240731 0x00002727 0x2 8 >, < 1036800000 0x40240836 0x00002b2b 0x2 9 >, < 1132800000 0x402c093b 0x00002f2f 0x2 10 >, < 1209600000 0x402c0a3f 0x00003232 0x2 11 >, < 1305600000 0x40340b44 0x00003636 0x2 12 >, < 1401600000 0x40340c49 0x00003a3a 0x2 13 >, < 1478400000 0x403c0d4d 0x00003e3e 0x2 14 >; qcom,pwrcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 825600000 0x401c062b 0x00002222 0x1 7 >, < 902400000 0x4024072f 0x00002626 0x1 8 >, < 979200000 0x40240833 0x00002929 0x1 9 >, < 1056000000 0x402c0937 0x00002c2c 0x2 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x2 11 >, < 1228800000 0x402c0b40 0x00003333 0x2 12 >, < 1324800000 0x40340c45 0x00003737 0x2 13 >, < 1420800000 0x40340d4a 0x00003b3b 0x2 14 >, < 1516800000 0x403c0e4f 0x00003f3f 0x2 15 >, < 1612800000 0x403c0f54 0x00004343 0x2 16 >, < 1689600000 0x40441058 0x00004646 0x2 17 >, < 1766400000 0x4044115c 0x00004a4a 0x2 18 >; qcom,perfcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 825600000 0x401c062b 0x00002222 0x1 7 >, < 902400000 0x4024072f 0x00002626 0x1 8 >, < 979200000 0x40240833 0x00002929 0x1 9 >, < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x2 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1459200000 0x403c0e4c 0x00003d3d 0x2 15 >, < 1536000000 0x403c0f50 0x00004040 0x2 16 >, < 1612800000 0x403c1054 0x00004343 0x2 17 >, < 1689600000 0x40441158 0x00004646 0x2 18 >, < 1766400000 0x4044125c 0x00004a4a 0x2 19 >, < 1843200000 0x40441360 0x00004d4d 0x2 20 >, < 1920000000 0x404c1464 0x00005050 0x2 21 >, < 1996800000 0x404c1568 0x00005353 0x2 22 >, < 2092800000 0x4054166d 0x00005757 0x2 23 >, < 2169600000 0x40541771 0x00005a5a 0x2 24 >, < 2246400000 0x40541875 0x00005e5e 0x2 25 >, < 2323200000 0x40541979 0x00006161 0x2 26 >, < 2400000000 0x40541a7d 0x00006464 0x2 27 >; qcom,perfcl-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, < 403200000 0x500c0115 0x00002020 0x1 2 >, < 480000000 0x50140219 0x00002020 0x1 3 >, < 576000000 0x5014031e 0x00002020 0x1 4 >, < 652800000 0x401c0422 0x00002020 0x1 5 >, < 748800000 0x401c0527 0x00002020 0x1 6 >, < 825600000 0x401c062b 0x00002222 0x1 7 >, < 902400000 0x4024072f 0x00002626 0x1 8 >, < 979200000 0x40240833 0x00002929 0x1 9 >, < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x2 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1459200000 0x403c0e4c 0x00003d3d 0x2 15 >, < 1536000000 0x403c0f50 0x00004040 0x2 16 >, < 1612800000 0x403c1054 0x00004343 0x2 17 >, < 1689600000 0x40441158 0x00004646 0x2 18 >, < 1766400000 0x4044125c 0x00004a4a 0x2 19 >, < 1843200000 0x40441360 0x00004d4d 0x2 20 >, < 1920000000 0x404c1464 0x00005050 0x2 21 >, < 1996800000 0x404c1568 0x00005353 0x2 22 >, < 2092800000 0x4054166d 0x00005757 0x2 23 >, < 2169600000 0x40541771 0x00005a5a 0x2 24 >, < 2246400000 0x40541875 0x00005e5e 0x2 25 >, < 2323200000 0x40541979 0x00006161 0x2 26 >, < 2400000000 0x40541a7d 0x00006464 0x2 27 >, < 2476800000 0x40541b81 0x00006767 0x2 28 >, < 2553600000 0x40541c85 0x00006a6a 0x2 29 >, < 2630400000 0x40541d89 0x00006e6e 0x2 30 >, < 2707200000 0x40541e8d 0x00007171 0x2 31 >; qcom,l3-memacc-level-vc-bin0 = <8 13>; qcom,pwrcl-memacc-level-vc-bin0 = <12 16>; qcom,perfcl-memacc-level-vc-bin0 = <14 22>; qcom,perfcl-memacc-level-vc-bin1 = <14 22>; }; &clock_gcc { Loading
arch/arm64/boot/dts/qcom/sdm845.dtsi +78 −66 Original line number Diff line number Diff line Loading @@ -1152,8 +1152,8 @@ < 652800000 0x401c0422 0x00002020 0x1 5 >, < 729600000 0x401c0526 0x00002020 0x1 6 >, < 806400000 0x401c062a 0x00002222 0x1 7 >, < 883200000 0x4024072e 0x00002525 0x2 8 >, < 960000000 0x40240832 0x00002828 0x2 9 >; < 883200000 0x4024072e 0x00002525 0x1 8 >, < 960000000 0x40240832 0x00002828 0x1 9 >; qcom,l3-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1163,10 +1163,10 @@ < 652800000 0x401c0422 0x00002020 0x1 5 >, < 729600000 0x401c0526 0x00002020 0x1 6 >, < 806400000 0x401c062a 0x00002222 0x1 7 >, < 883200000 0x4024072e 0x00002525 0x2 8 >, < 960000000 0x40240832 0x00002828 0x2 9 >, < 1036800000 0x40240936 0x00002b2b 0x3 10 >, < 1094400000 0x402c0a39 0x00002e2e 0x3 11 >; < 883200000 0x4024072e 0x00002525 0x1 8 >, < 960000000 0x40240832 0x00002828 0x1 9 >, < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1094400000 0x402c0a39 0x00002e2e 0x1 11 >; qcom,l3-speedbin2-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1176,12 +1176,12 @@ < 652800000 0x401c0422 0x00002020 0x1 5 >, < 729600000 0x401c0526 0x00002020 0x1 6 >, < 806400000 0x401c062a 0x00002222 0x1 7 >, < 883200000 0x4024072e 0x00002525 0x2 8 >, < 960000000 0x40240832 0x00002828 0x2 9 >, < 1036800000 0x40240936 0x00002b2b 0x3 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x3 11 >, < 1209600000 0x402c0b3f 0x00003232 0x3 12 >, < 1305600000 0x40340c44 0x00003636 0x3 13 >; < 883200000 0x4024072e 0x00002525 0x1 8 >, < 960000000 0x40240832 0x00002828 0x1 9 >, < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1305600000 0x40340c44 0x00003636 0x1 13 >; qcom,pwrcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1196,11 +1196,11 @@ < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x2 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x2 16 >, < 1593600000 0x403c1053 0x00004242 0x2 17 >; < 1286400000 0x40340c43 0x00003636 0x1 13 >, < 1363200000 0x40340d47 0x00003939 0x1 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x1 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x1 16 >, < 1593600000 0x403c1053 0x00004242 0x1 17 >; qcom,pwrcl-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1215,13 +1215,13 @@ < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x2 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x2 16 >, < 1593600000 0x403c1053 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x3 18 >, < 1708800000 0x40441259 0x00004747 0x3 19 >; < 1286400000 0x40340c43 0x00003636 0x1 13 >, < 1363200000 0x40340d47 0x00003939 0x1 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x1 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x1 16 >, < 1593600000 0x403c1053 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1708800000 0x40441259 0x00004747 0x1 19 >; qcom,pwrcl-speedbin2-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1236,13 +1236,13 @@ < 1056000000 0x402c0937 0x00002c2c 0x1 10 >, < 1132800000 0x402c0a3b 0x00002f2f 0x1 11 >, < 1209600000 0x402c0b3f 0x00003232 0x1 12 >, < 1286400000 0x40340c43 0x00003636 0x2 13 >, < 1363200000 0x40340d47 0x00003939 0x2 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x2 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x2 16 >, < 1593600000 0x403c1053 0x00004242 0x2 17 >, < 1670400000 0x40441157 0x00004646 0x3 18 >, < 1747200000 0x4044125b 0x00004949 0x3 19 >; < 1286400000 0x40340c43 0x00003636 0x1 13 >, < 1363200000 0x40340d47 0x00003939 0x1 14 >, < 1440000000 0x40340e4b 0x00003c3c 0x1 15 >, < 1516800000 0x403c0f4f 0x00003f3f 0x1 16 >, < 1593600000 0x403c1053 0x00004242 0x1 17 >, < 1670400000 0x40441157 0x00004646 0x1 18 >, < 1747200000 0x4044125b 0x00004949 0x1 19 >; qcom,perfcl-speedbin0-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1257,16 +1257,16 @@ < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1190400000 0x402c0b3e 0x00003232 0x1 12 >, < 1267200000 0x40340c42 0x00003535 0x2 13 >, < 1344000000 0x40340d46 0x00003838 0x2 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x2 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x2 16 >, < 1574400000 0x403c1052 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x2 18 >, < 1728000000 0x4044125a 0x00004848 0x3 19 >, < 1804800000 0x4044135e 0x00004b4b 0x3 20 >, < 1881600000 0x404c1462 0x00004e4e 0x3 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >; < 1267200000 0x40340c42 0x00003535 0x1 13 >, < 1344000000 0x40340d46 0x00003838 0x1 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x1 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x1 16 >, < 1574400000 0x403c1052 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1728000000 0x4044125a 0x00004848 0x1 19 >, < 1804800000 0x4044135e 0x00004b4b 0x1 20 >, < 1881600000 0x404c1462 0x00004e4e 0x1 21 >, < 1958400000 0x404c1566 0x00005252 0x1 22 >; qcom,perfcl-speedbin1-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1281,18 +1281,18 @@ < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1190400000 0x402c0b3e 0x00003232 0x1 12 >, < 1267200000 0x40340c42 0x00003535 0x2 13 >, < 1344000000 0x40340d46 0x00003838 0x2 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x2 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x2 16 >, < 1574400000 0x403c1052 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x2 18 >, < 1728000000 0x4044125a 0x00004848 0x3 19 >, < 1804800000 0x4044135e 0x00004b4b 0x3 20 >, < 1881600000 0x404c1462 0x00004e4e 0x3 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >, < 2035200000 0x404c166a 0x00005555 0x3 23 >, < 2092800000 0x4054176d 0x00005757 0x3 24 >; < 1267200000 0x40340c42 0x00003535 0x1 13 >, < 1344000000 0x40340d46 0x00003838 0x1 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x1 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x1 16 >, < 1574400000 0x403c1052 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1728000000 0x4044125a 0x00004848 0x1 19 >, < 1804800000 0x4044135e 0x00004b4b 0x1 20 >, < 1881600000 0x404c1462 0x00004e4e 0x1 21 >, < 1958400000 0x404c1566 0x00005252 0x1 22 >, < 2035200000 0x404c166a 0x00005555 0x1 23 >, < 2092800000 0x4054176d 0x00005757 0x1 24 >; qcom,perfcl-speedbin2-v0 = < 300000000 0x000c000f 0x00002020 0x1 1 >, Loading @@ -1307,19 +1307,31 @@ < 1036800000 0x40240936 0x00002b2b 0x1 10 >, < 1113600000 0x402c0a3a 0x00002e2e 0x1 11 >, < 1190400000 0x402c0b3e 0x00003232 0x1 12 >, < 1267200000 0x40340c42 0x00003535 0x2 13 >, < 1344000000 0x40340d46 0x00003838 0x2 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x2 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x2 16 >, < 1574400000 0x403c1052 0x00004242 0x2 17 >, < 1651200000 0x403c1156 0x00004545 0x2 18 >, < 1728000000 0x4044125a 0x00004848 0x3 19 >, < 1804800000 0x4044135e 0x00004b4b 0x3 20 >, < 1881600000 0x404c1462 0x00004e4e 0x3 21 >, < 1958400000 0x404c1566 0x00005252 0x3 22 >, < 2035200000 0x404c166a 0x00005555 0x3 23 >, < 2112000000 0x4054176e 0x00005858 0x3 24 >, < 2208000000 0x40541873 0x00005c5c 0x3 25 >; < 1267200000 0x40340c42 0x00003535 0x1 13 >, < 1344000000 0x40340d46 0x00003838 0x1 14 >, < 1420800000 0x40340e4a 0x00003b3b 0x1 15 >, < 1497600000 0x403c0f4e 0x00003e3e 0x1 16 >, < 1574400000 0x403c1052 0x00004242 0x1 17 >, < 1651200000 0x403c1156 0x00004545 0x1 18 >, < 1728000000 0x4044125a 0x00004848 0x1 19 >, < 1804800000 0x4044135e 0x00004b4b 0x1 20 >, < 1881600000 0x404c1462 0x00004e4e 0x1 21 >, < 1958400000 0x404c1566 0x00005252 0x1 22 >, < 2035200000 0x404c166a 0x00005555 0x1 23 >, < 2112000000 0x4054176e 0x00005858 0x1 24 >, < 2208000000 0x40541873 0x00005c5c 0x1 25 >; qcom,l3-memacc-level-vc-bin0 = <7 63>; qcom,l3-memacc-level-vc-bin1 = <7 9>; qcom,l3-memacc-level-vc-bin2 = <7 9>; qcom,pwrcl-memacc-level-vc-bin0 = <12 63>; qcom,pwrcl-memacc-level-vc-bin1 = <12 17>; qcom,pwrcl-memacc-level-vc-bin2 = <12 17>; qcom,perfcl-memacc-level-vc-bin0 = <12 18>; qcom,perfcl-memacc-level-vc-bin1 = <12 18>; qcom,perfcl-memacc-level-vc-bin2 = <12 18>; qcom,up-timer = <1000 1000 1000>; Loading
drivers/clk/qcom/clk-cpu-osm.c +40 −30 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ #define MIN_VCO_VAL 0x2b #define MAX_VC 63 #define MEM_ACC_LEVELS_LUT 2 #define MAX_MEM_ACC_LEVELS 3 #define MAX_MEM_ACC_VAL_PER_LEVEL 3 #define MAX_MEM_ACC_VALUES (MAX_MEM_ACC_LEVELS * \ Loading Loading @@ -266,6 +267,7 @@ struct clk_osm { u32 speedbin; u32 mem_acc_crossover_vc_addr; u32 mem_acc_addr[MEM_ACC_ADDRS]; u32 mem_acc_level_vc[MEM_ACC_LEVELS_LUT]; u32 ramp_ctl_addr; u32 apm_mode_ctl; u32 apm_status_ctl; Loading Loading @@ -1045,21 +1047,6 @@ static inline int clk_osm_count_ns(struct clk_osm *c, u64 nsec) static void clk_osm_program_mem_acc_regs(struct clk_osm *c) { int curr_level, i, j = 0; int mem_acc_level_map[MAX_MEM_ACC_LEVELS] = {MAX_VC, MAX_VC, MAX_VC}; curr_level = c->osm_table[0].mem_acc_level; for (i = 0; i < c->num_entries; i++) { if (curr_level == MAX_MEM_ACC_LEVELS) break; if (c->osm_table[i].mem_acc_level != curr_level) { mem_acc_level_map[j++] = c->osm_table[i].virtual_corner; curr_level = c->osm_table[i].mem_acc_level; } } if (c->secure_init) { clk_osm_write_seq_reg(c, c->pbases[OSM_BASE] + MEMACC_CROSSOVER_VC, Loading @@ -1069,13 +1056,8 @@ static void clk_osm_program_mem_acc_regs(struct clk_osm *c) clk_osm_write_seq_reg(c, c->mem_acc_addr[2], DATA_MEM(50)); clk_osm_write_seq_reg(c, c->mem_acc_crossover_vc, DATA_MEM(78)); clk_osm_write_seq_reg(c, mem_acc_level_map[0], DATA_MEM(79)); if (c == &perfcl_clk) clk_osm_write_seq_reg(c, c->mem_acc_threshold_vc, DATA_MEM(80)); else clk_osm_write_seq_reg(c, mem_acc_level_map[1], DATA_MEM(80)); clk_osm_write_seq_reg(c, c->mem_acc_level_vc[0], DATA_MEM(79)); clk_osm_write_seq_reg(c, c->mem_acc_level_vc[1], DATA_MEM(80)); /* * Note that DATA_MEM[81] -> DATA_MEM[89] values will be * confirmed post-si. Use a value of 1 for DATA_MEM[89] and Loading @@ -1086,13 +1068,9 @@ static void clk_osm_program_mem_acc_regs(struct clk_osm *c) scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(78), c->mem_acc_crossover_vc); scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(79), mem_acc_level_map[0]); if (c == &perfcl_clk) c->mem_acc_level_vc[0]); scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(80), c->mem_acc_threshold_vc); else scm_io_write(c->pbases[SEQ_BASE] + DATA_MEM(80), mem_acc_level_map[1]); c->mem_acc_level_vc[1]); } } Loading Loading @@ -1669,7 +1647,8 @@ static void clk_osm_misc_programming(struct clk_osm *c) /* Program LVAL corresponding to first turbo VC */ for (i = 0; i < c->num_entries; i++) { if (c->osm_table[i].mem_acc_level == MAX_MEM_ACC_LEVELS) { if (c->osm_table[i].virtual_corner == c->mem_acc_level_vc[1]) { lval = c->osm_table[i].freq_data & GENMASK(7, 0); break; } Loading Loading @@ -2288,6 +2267,7 @@ static int clk_osm_parse_dt_configs(struct platform_device *pdev) { struct device_node *of = pdev->dev.of_node; u32 *array; char memacc_str[40]; int rc = 0; struct resource *res; Loading Loading @@ -2507,6 +2487,36 @@ static int clk_osm_parse_dt_configs(struct platform_device *pdev) return -ENOMEM; } snprintf(memacc_str, ARRAY_SIZE(memacc_str), "qcom,l3-memacc-level-vc-bin%d", l3_clk.speedbin); rc = of_property_read_u32_array(of, memacc_str, l3_clk.mem_acc_level_vc, MEM_ACC_LEVELS_LUT); if (rc) { dev_err(&pdev->dev, "unable to find %s property, rc=%d\n", memacc_str, rc); return rc; } snprintf(memacc_str, ARRAY_SIZE(memacc_str), "qcom,pwrcl-memacc-level-vc-bin%d", pwrcl_clk.speedbin); rc = of_property_read_u32_array(of, memacc_str, pwrcl_clk.mem_acc_level_vc, MEM_ACC_LEVELS_LUT); if (rc) { dev_err(&pdev->dev, "unable to find %s property, rc=%d\n", memacc_str, rc); return rc; } snprintf(memacc_str, ARRAY_SIZE(memacc_str), "qcom,perfcl-memacc-level-vc-bin%d", pwrcl_clk.speedbin); rc = of_property_read_u32_array(of, memacc_str, perfcl_clk.mem_acc_level_vc, MEM_ACC_LEVELS_LUT); if (rc) { dev_err(&pdev->dev, "unable to find %s property, rc=%d\n", memacc_str, rc); return rc; } l3_clk.secure_init = perfcl_clk.secure_init = pwrcl_clk.secure_init = of_property_read_bool(pdev->dev.of_node, "qcom,osm-no-tz"); Loading