Commit Graph

38 Commits

Author SHA1 Message Date
Konrad Dybcio
e03d95e8c9 sm6350: Hook up MCCC 2023-02-14 23:17:20 -06:00
Konrad Dybcio
445f058be6 sm6375: Hook up MCCC
Hook MCCC up on SM6375 where it was validated and intentionally overreserve
the MCCC memory, as mmap expects we reserve at least one ALIGNED page
(which means we're aligned to 4K (0x1000) or whatever our pagesize is AND
that we have to reserve too much and stray from user error when adding
offsets to not try and read memory outside the actual MCCC region).

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2023-02-14 23:17:20 -06:00
Konrad Dybcio
5fe497e2b4 Add SM6375 / blair 2023-02-14 23:17:20 -06:00
Konrad Dybcio
5341f2d08e Add SM6350 / lagoon 2023-02-14 23:17:20 -06:00
Konrad Dybcio
6a32f8a8bd Add SM6125 / trinket 2023-02-14 23:17:20 -06:00
Konrad Dybcio
e449b70045 Add MSM8994 / plutonium
NOTE: this should 99% work on 8992 too, untested though!
2023-02-14 23:17:20 -06:00
Konrad Dybcio
80f81a693b Add SM6115 / bengal
SM6115 and its other bengal friends have 5 debug muxes, one of which
(memory controller) is out of scope here, as it's not defined in dt.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2023-02-14 23:17:20 -06:00
Marijn Suijten
7abf9d5f7b sm8150: Document debug mux values on GCC 2023-02-14 10:02:12 -06:00
Marijn Suijten
7365bca626 Implement MCCC measurements for SM8150 and SM8250 2023-02-14 10:02:12 -06:00
Dmitry Baryshkov
a9e76e4f1b debugcc: skip registers with no masks defined
Provide a way to skip programming enable/mux registers (as we do for
div_reg) if the corresponding mask is zero.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-02-14 09:42:21 -06:00
Dmitry Baryshkov
360769b5fc debugcc: allow leaf muxes to override measurement function
MCCC (memory clock controller) uses non-standard measuring process (just
read the rate and return). Provide a way to override default
measurement proces with the leaf cc hook.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-02-14 09:42:21 -06:00
Dmitry Baryshkov
bdb901f2ae debugcc: split measurement function
Split measurement function into clock rate calculation
(measure_default()) and the wrapper that prepares muxes and then
disables them. This fixes the issue that muxes will not be disabled for
the clocks that are not turned off (because measure function will return
early for disabled clocks).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-02-14 09:42:21 -06:00
Marijn Suijten
23583b8546 Add SM8250 support 2023-02-14 09:40:27 -06:00
Bjorn Andersson
e60a2d1693 Merge branch 'sm8150' of https://github.com/MarijnS95/debugcc 2023-01-17 20:50:27 -08:00
Dmitry Baryshkov
3ecf48627d msm8996: add block names
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-17 22:31:07 -06:00
Neil Armstrong
97771010c6 Add DEBUGCC entries for SM8550
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-17 22:30:46 -06:00
Marijn Suijten
d7dcae1718 Add SM8150 support 2023-01-18 01:55:12 +01:00
Dmitry Baryshkov
d7efd367f9 msm8996: add support for CPU clocks
Measure CPU clusters and CBF clocks.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
783b4ffdd2 debugcc: allow customizing the measurement process
MSM8996 requires additional setup to measure CPU clocks. Add hooks to
customize the mux enable/disable and measurement process.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
7c544f0c40 msm8996: add support for MSM8996 platform
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
34fb8ccda7 debugcc: preserve xo_div4 contents
Preserve the contents of the xo_div4 register. Downstream kernel
preserves the contents of the register. Writing just 1 makes the msm8996
report the value divided by 4 rather than the actual clock frequency.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
6de6d216d7 debugcc: add block names to all platforms
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:54:17 -06:00
Dmitry Baryshkov
ac35e7a205 debugcc: add support for printing clocks from a single CC
Add a way to print clocks related to a particular CC. Add -b option,
which takes 'block' name: cam, disp, cpu, gpu, video. Pass "-b core" to
limit debugcc to "core" (gcc) clocks.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:54:17 -06:00
Bjorn Andersson
79d8caba44 Add sc8280xp gcc, dispcc0 and dispcc1
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2022-05-24 18:06:32 -07:00
Dmitry Baryshkov
0acd29c82a sm8450: enable all clocks in the config tables
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2022-05-24 17:45:37 -05:00