Commit Graph

27 Commits

Author SHA1 Message Date
Christian Marangi
776a4f281e debugcc: add convenient macro GENMASK to calculate mask from bits
Add convenient macro GENMASK to calculate masks from bits similar to how
it's implemented in kernel linux tools.

This is useful to better describe some specific define instead of using
comments and raw HEX values.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-08 12:28:08 +01:00
Christian Marangi
93f5ccd037 debugcc: supports custom xo rate
Some device have a different rate for the xo debug oscillator. Add
support for defining custom xo rate in the primary debug mux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-07 23:08:20 +01:00
Christian Marangi
bde23d9858 debugcc: support setting xo_div4 custom value
Some xo require special value to set it to /4 divisor. Introduce
xo_div4_val to handle this special implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-07 22:49:11 +01:00
Dmitry Baryshkov
cf5664f7c4 debugcc: Rework clock muxes into a chain structure
Enforcing a primary+leaf configuration does not walk for all the cases.
Some clocks (msm8996 CPU) have more muxes to be powered on. Other (MCCC)
do not require GCC at all. Make clock measurement more versatile by
reworking GCC + optional leaf into a chain of muxes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 14:24:13 +02:00
Dmitry Baryshkov
9db71d48e8 debugcc: switch to meson
Switch to meson as a build system. Define a list of supported platforms
and use it to generate platforms list and the symlink targets.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:01:36 +02:00
Konrad Dybcio
1f2d56984e Add msm8998 / cobalt
NOTE: cpu debug mux support is not included, I can not get it to
cooperate..
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
7365bca626 Implement MCCC measurements for SM8150 and SM8250 2023-02-14 10:02:12 -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
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
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
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
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
Bryan O'Donoghue
d91475ee54 Add MSM8936 platform
Add in msm8936 downstream clock-mapping definitions. This also covers
msm8939, at the level of the fundamental clock layout, there is no
difference between msm8936 and msm8939.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
2022-04-15 20:47:25 -05:00
Dmitry Baryshkov
c74b999277 Add SM8450 support
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2022-02-08 09:08:07 -08:00
Dmitry Baryshkov
de23d9a42e debugcc: move post_div_val into struct debug_mux
It looks like post_div_val is a property of debug_mux rather than the
clock itself. It is equal for all the clocks being set. So, set it on a
mux-by-mux bases.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2021-11-30 19:47:41 -06:00
Robert Foss
33f035076a Add SM8350 platform
Add SM8350 measure clocks from downstream kernel.
2021-10-15 06:54:21 -07:00