Commit graph

91 commits

Author SHA1 Message Date
Francois RAMU
acd8cb1342 tests: drivers: clock: stm32 common device for sdmmc
Add a testcase for the stm32F412 or stm32F413
configuring the SDIO clock at 48MHz from the PLLI2S
Tested on the stm32f413h disco kit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-13 20:05:11 +01:00
Gerard Marull-Paretas
d4a67e321b samples, tests: remove usage of space-separated lists
Convert them to native YAML lists. Support for space-separated
lists was deprecated in Twister a long time ago.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-04 14:14:53 -05:00
Francois Ramu
1680887051 tests: drivers: clock control stm32 adc device clock setting
Tests the ADC clock domain on the stm32g0 serie
Possible ADC clock sources are SYStem clock (default) or PLL_P.
No clock source HSI for the ADC tested here.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-29 14:50:29 +01:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Nathan Olff
eb3f718b2c tests: drivers: add fracn test for stm32h7 clock configuration tests
add overlay to use fracn with HSI in clock configuration tests for
stm32h7

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Francois Ramu
e7b267d727 tests: drivers: clock control of stm32wba serie
Add the nucleo_wba55 target for running the test clock
configuration. HSI must not be disabled

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-15 10:20:11 +01:00
Francois Ramu
f3c70b4ab8 tests: drivers: clock control testing on the stm32h7 serie
Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-09 19:03:10 +02:00
Kevin ORourke
fbfd36e81e drivers: clock_control: stm32: Add HSE CSS support
Add support for enabling the clock security system, which can detect
failures of the HSE clock.

Includes tests for nucleo_h743zi and nucleo_g474re.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2023-12-13 13:56:43 +01:00
Anas Nashif
d94bdafda6 tests: clock_control: cleanup test tags and unify them
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif
345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif
d5bac8c9a2 tests: clock: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Jatty Andriean
3eea17c5de tests: drivers: clock_control: Add PLL fracn test
Added a test case that generates a 160 MHz system clock
using a 16777216 Hz HSE clock and also using a 16 MHz HSI

Signed-off-by: Jatty Andriean <jandriea@outlook.com>
2023-09-26 15:06:56 +02:00
Erwan Gouriou
30061ecd7f tests/drivers/clock_control: Add tests for stm32wba_core
Add tests to validate implementation of stm32wba clock_control driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-20 16:25:02 +02:00
Francois Ramu
a0725f039c tests: drivers: clock_control of the stm32h5 core
Adapt the clock scheme for testing the clock on the stm32h573i_dk.
By default the HSI is 32MHz (div-by-2).
Only scheme for pll sourced by HSI is useful at max freq of 240MHz.
Configure the usart1-console clock to be csi  to always get
a valid clock source in any usecase.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-15 13:09:46 +02:00
Gerard Marull-Paretas
93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Thomas Stranger
8178807b31 tests: drivers: clock_control: stm32 common: also test get_status
Add clock_control_get_status checks to the stm32_common_devices adc
and i2c tests, to verify that checking the status of gating clocks and
domain clock sources works.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2023-04-17 11:33:15 +02:00
Guillaume Gautier
3a0b00272b tests: drivers: clock_control: stm32_devices: split test
Split STM32 device clock configuration file so that each driver has its
own tests in its own file

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-03-30 13:47:55 +02:00
Guillaume Gautier
6f525f33a4 tests: drivers: clock_control: stm32_common_devices: add i2s test
Add a test for testing STM32 I2S domain clock on STM32F401 board.
Add an ifdef on I2C test as F4 does not have a domain clock for I2C.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-03-30 13:47:55 +02:00
Armin Brauns
1de52f501c tests: drivers: clock_control: stm32: clock selection with dirty registers
This makes sure clock selection works even if the registers aren't in their
default (reset) state.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-29 15:53:08 +00:00
Francois Ramu
c3e9879d95 tests: drivers: clock control for the stm32H5 serie core
Adds the configurations for testing the clock controller driver
of the stm32H5 serie coreon stm32h573i disco kit

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Erwan Gouriou
888607d550 tests: clock_control: stm32h7: pll2: Fix test configuration
In test spi1_pll2p_1, pll2 should be enabled instead of pll3.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-04 16:51:57 +01:00
Fabio Baltieri
f5b4acac57 yamllint: indentation: fix files in tests/
Fix the YAML files indentation for files in tests/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Fabio Baltieri
7db1d17ee3 yamllint: fix all yamllint line-length errors
Fix all line-length errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(line-length)'

Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Francois Ramu
5b2d80ca18 tests: drivers: stm32g0 clock control with APB1_2 RCC register
Change the name of the STM32_CLOCK_BUS_APB2 RCC resgister
of the stm32g0 to STM32_CLOCK_BUS_APB1_2
in the testcase for the stm32g0 device.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 10:21:18 -06:00
Anas Nashif
ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01:00
Georgij Cernysiov
7f06af6b82 tests: drivers: clock_control: stm32: test H7 PLL2_P SPI1
Tests PLL2_P clock source for the SPI1 (SPI123SEL).

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-11-29 11:54:52 +01:00
Georgij Cernysiov
376399ecb8 tests: drivers: clock_control: stm32: fix H7 zassert output
Fixes mixed up expected and actual values in zassert
output.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-11-28 12:11:18 +01:00
Erwan Gouriou
9b7d3657c9 tests: clock_control: stm32h7_devices: Test perck domain config
Add a test dedicated to verify the perck domain clock configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-11-10 09:30:09 +01:00
Erwan Gouriou
cf84395f7b tests: clock_control: stm32h7_devices: Test perck configuration
When it needs to access perck clock speed, clock_control driver is using
LL API to read RCC registers and compute frequency.
We're using the exact same method to test the frequency and as a result
we were not able to detect that there was an issue when configuring this
clock.

Add a specific case to this test in order to verify perck domain clock if
perck is used in SPI clk configuration.

We're now able to detect issues (and test is failing).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-11-10 09:30:09 +01:00
Erwan Gouriou
efd6fdb381 tests: clock_control: stm32: Enhance tests log messages
Perform some rework in messages displayed in case of failure to ease
readability:
- remove redundant information
- add missing information
- convert registers values to hex

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-11-10 09:30:09 +01:00
Erwan Gouriou
447c3df873 tests: clock_control: stm32h7_devices: Fix clock source check
Test was using "clock-names" property to query domain clock configuration.
This is not working since clock-names was removed in the last step of the
feature implementation and whole macro was always reporting DT_NO_CLOCK.

This issue went undetected because of an additional issue in the exception
case which was testing "zassert_true(1, .." instead of "zassert_true(0, .".

Fix both issues to make the test efficient again.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-11-10 09:30:09 +01:00
Meng xianglin
9882ae8ace tests: stm32u5_devices: move to new ztest API
test cases in
tests/drivers/clock_control/stm32_clock_configuration/stm32u5_devices
are move to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-05 10:13:27 +00:00
Meng xianglin
f8f667e91c tests: stm32u5_core: move to new ztest API
test cases in
tests/drivers/clock_control/stm32_clock_configuration/stm32u5_core
are moved to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-05 10:13:27 +00:00
Meng xianglin
0ef8aae92b tests: stm32h7_devices: move to new ztest API
test cases in
tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices
are moved to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-05 10:13:27 +00:00
Meng xianglin
45c5c7ba91 tests: stm32h7_core: move to new ztest API
test cases in
tests/drivers/clock_control/stm32_clock_configuration/stm32h7_core
are moved to new zest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-05 10:13:27 +00:00
Meng xianglin
4e2da2e58f tests: stm32_common_devices: move to new ztest API
test cases in
tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices
are moved to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-05 10:13:27 +00:00
Meng xianglin
bfd5118f53 tests: stm32_common_core: move to new ztest API
test cases in
tests/dirvers/clock_control/stm32_clock_configuration/stm32_common_core
are moved to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-05 10:13:27 +00:00
Erwan Gouriou
7b8baf3c56 tests: clock_control: stm32_common: Add a comment when enabling adc node
On some tests adc node is enabled w/o setting any domain clock.
This is made on purpose but deserves a comment to avoid surprises
for the reader.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 16:35:41 +01:00
Erwan Gouriou
110ac02da1 tests: clock_control: stm32f3: Fix test overlay
A second, faulty, configuration was provided for rcc node, which made
the test failing.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 16:35:41 +01:00
Francois Ramu
8401644416 tests: drivers: clock_control rename stm32 ahb test configuration
rename to pll_msis_ahb_2_40

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-10 14:32:14 +02:00
Erwan Gouriou
1ef9e9eb9b include: drivers: stm32 clock_control: Replace OPT by DOMAIN
In the continuation of the previous commit, replace _OPT_ by _DOMAIN_
in macros relating to this feature.
hen, adapt drivers and tests to this new wording.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-08 14:17:07 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Erwan Gouriou
97d75a6f59 tests: clock_control: stm32u5: Add tests to check HSE and HSI as sysclk src
This allows to complete test coverage on this driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-07-30 08:23:35 -05:00
Erwan Gouriou
5fe7b47e52 tests: clock_control: stm32u5 device: Fix clk_msik configuration
In tests/drivers/clock_control/stm32_clock_configuration/stm32u5_devices
test suite, core_init.overlay configure msis to use pll-mode.
Since pll-mode is not configured for msik in spi1_msik variant the test
fails since both clocks should support the same configuration regarding
pll mode (an assert in raised in the driver).

Fix this in spi1_msik test variant.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-07-30 08:23:35 -05:00
Thomas Stranger
33eba217de tests/drivers/clock_control: stm32_common_devices: add adc alt. clk. src
This commit adds a test case that configures an alternative clock source
for an ADC peripheral.

In case no alt clock is available, only the gating clock is enabled
and disabled.
Unlike the i2c and lptim test, the actual gating clock frequency is
not checked, because for the adc there seems to be no uniform way
to retrieve the frequency via the hal.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger
a6f4d604b6 tests/drivers/clock_control: stm32 add adc-pll_p overlays(g0,g4,wl)
For the STM32G0, STM32G4, and STM32WL enable the adc node in one
configuration, and select the PLL_P output as its clock source.
PLL_P divider is chosen to be 20 to make sure it's a unique frequency.
- g0, and g4 have pll as sysclk
- wl has hse as sysclock

The test configurations and the overlay-files are renamed accordingly.
All overlays that don't specify an alternative clock source still
make sure that the adc node is "okay" to be able to perform basic test.
The basic test only turns on and off the gate clock without checking the
frequency.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger
1feaea34aa tests/drivers/clock_control: stm32_common_devices: lptim check disabled
The test checks if the peripheral gating clock was correctly disabled
after the test, but accidentally the I2C_CLK was checked instead of the
LPTIM_CLK.

This commit fixes this by using __HAL_RCC_LPTIM1_IS_CLK_ENABLED instead.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger
fd49f4df1b tests: drivers: clock_control: stm32_wl fix external clock dts
The nucleo_wl55jc according to the datasheet does have a
NT2016SF-32M-END5875A 32MHz TCXO as HSE, therefore needs
enable the "hse-tcxo;" property to work, this was not the case
for the clock_configuration/stm32_common_devices test cases.

Additionally, remove the comment about about ST-Link clock,
because the source is the tcxo and not the ST-Link.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
TLIG Dhaou
933bd0e55a tests: drivers: clock_control: stm32_clock_configuartion add testcases
Add testcases when hsi used with the hsi div as system clock source.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-07-04 15:20:06 +02:00
Erwan Gouriou
bced529f78 include: stm32: clock_control: Ease usage of STM32_DT_CLOCKS macro
STM32_DT_CLOCKS was designed to take a device tree node label name as
argument: STM32_DT_CLOCKS(uart1)
Change its implementation to take a node identifier instead:
STM32_DT_CLOCKS(DT_NODELABEL(uart1)).

This make its usage more flexible since the argument can now be extracted
from other DT macros such as DT_PARENT. Then, the following can be done:
STM32_DT_CLOCKS(DT_PARENT(child_node_label)).

Since it is now possible implement STM32_DT_INST_CLOCKS using
STM32_DT_CLOCKS.

Finally, update existing STM32_DT_CLOCKS users and convert
STM32_INST_CLOCK_INFO users to STM32_CLOCK_INFO.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-28 11:07:29 +02:00