Commit Graph

70 Commits

Author SHA1 Message Date
Konrad Dybcio
5078c423d8 treewide: Add missing measure_gcc to prevent segfaults
oopsie! thanks @travmurav

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-02-15 21:58:48 +01:00
Dmitry Baryshkov
dd6e308bcb Merge pull request #19 from konradybcio/qcm
Add QCM2290 / scuba
2024-01-25 14:55:32 +02:00
Konrad Dybcio
cf2b67ae78 meson.build: bring back -static
oops!

Fixes: 9db71d48e8 ("debugcc: switch to meson")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-01-25 11:36:29 +01:00
Konrad Dybcio
b345f9af67 Add SC7180 (ATOLL)
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-01-25 11:36:27 +01:00
Konrad Dybcio
479ecb2713 sm6115: Add DDR clock
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-01-25 11:36:25 +01:00
Konrad Dybcio
9f997567b8 msm8998: Add DDRSS clk
e71cfc0305

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-01-25 11:36:23 +01:00
Konrad Dybcio
c5549ce49e Add QCM2290 / scuba
Also applies to QRB2210 / RB1

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-01-25 11:36:20 +01:00
Dmitry Baryshkov
649e6bc9ab Merge pull request #23 from 0xB0D/sc8280xp-camcc
Add sc8280xp camcc
2024-01-02 00:32:49 +02:00
Bryan O'Donoghue
e76c6168bc Add sc8280xp camcc
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
2024-01-01 22:30:48 +00:00
Dmitry Baryshkov
d15bea7c05 Merge pull request #22 from Ansuel/add-ipq8064
Add support for IPQ8064 SoC
2023-11-08 14:23:08 +02:00
Christian Marangi
a601807fae Add support for IPQ8064 SoC
Add support for IPQ8064 SoC. All the debug vector are taken from old
pre-dt linux-msm source.

To correctly setup the debug oscillator, it's required to operate on 2
different clk, the CXO oscillator and the PDM clock. Then we operate ton
the CLK_TEST reg and we setup the required vector. With the use of
define we abstract everything for the high speed and the low speed
clocks.

The CXO oscillator runs at 25Mhz and a different xo_rate is required
than the current default one.

We can also test the 2 CPU speed and the current L2 speed using the APCS
CLK_DIAG reg. To test this we need to setup a special test vector in
CLK_TEST and then operate on the APCS reg.

For these special clock a different fixed_div is needed to be set.

There is currently a bug (probably a hw bug) where the CPU clock of the
2 core is half broken, the correct clock is reported but only for one of
the core, the other core will always report a wrong clock. Operating on
the CPU mux makes the CLK_DIAG report the correct freq on one of the 2
core from the test vector.

Also the L2 clock seems to be half broken with high speed freq. (still
has to be confirmed and maybe it's the L2 HFPLL wrongly configured for
some reason and on high frequency > 1GHz reports not precise frequency)

Note that we currently use a fixed_div of 8 for these special clock.
This should be used only for ipq8064 v3 SoC but it was never found an
ipq8064 v1 SoC, where 2 should be used as fixed_div.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-08 12:29:50 +01:00
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
Christian Marangi
5dd120810b debugcc: support 32 bit systems
Unsigned long have a different size in 32 bit system and this cause the
malfunction of debugcc returning wrong frequency. Use 64bit unsigned int
to correctly support 32 bit system and provide correct frequency.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-07 22:47:41 +01:00
Dmitry Baryshkov
aff941f908 Merge pull request #21 from 0xB0D/master
Add README.md
2023-11-07 17:45:35 +02:00
Dmitry Baryshkov
e68ff01f2d Merge pull request #25 from superna9999/sm8650
Add SM8650 debugcc entries
2023-11-07 17:44:50 +02:00
Neil Armstrong
3f8e83867c Add SM8650 debugcc entries
Add debugcc tables for the SM8650 platform

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-11-07 16:02:04 +01:00
Konrad Dybcio
d744e1a891 Merge pull request #24 from lumag/mux-chain
Rework clock muxes into a chain structure
2023-11-07 12:15:06 +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
Konrad Dybcio
132a037a08 Merge pull request #30 from MarijnS95/meson-config-data
meson: Use `configuration_data()` instead of piping variables through `echo`
2023-11-06 13:20:41 +01:00
Marijn Suijten
4d332b2b43 meson: Use configuration_data() instead of piping variables through echo
Having a template file with replacement macros is a bit cleaner than
encoding the setup of the file in `meson.build` and piping that through
`echo` with caputred variables.

Unfortunately there appears to be no support for repetition, to e.g.
expand a list of platform names into the various uses (array with comma-
separation, or individual `extern struct` declarations, forcing us to
have some form of string expansion within `meson.build`).
2023-11-06 13:00:56 +01:00
Dmitry Baryshkov
1a0570550e CI: fix the if condition to make it work properly
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:26:24 +02:00
Konrad Dybcio
dd604f9d1f Merge pull request #26 from lumag/meson
Switch to meson build system and add CI
2023-11-06 12:24:08 +01:00
Dmitry Baryshkov
d82ed4d34b CI: add naive cross-compilation test
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:23:06 +02:00