Commit graph

68210 commits

Author SHA1 Message Date
Erwan Gouriou
3c6648e7ab doc: release-notes-3.2: Log STM32 LPTIM Kconfig as deprecated
Log deprecation of Kconfig based LPTIM domain clock configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Erwan Gouriou
a35279488a boards: stm32: Remove lptim node when not used in tree
These boards enable lptim node, but don't propose 'power-states'
description, making it useless and not testable regarding configuration
of existing, in tree, PM tests.

Clean up this definition.

They will be put back along with 'power-states', when possible to test.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Erwan Gouriou
b5bb0575ad boards: stm32l562e_dk: Factorize lp related nodes
Low power related nodes don't depend on Trust Zone activation.
Factorize into -common.dtsi when possible.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Erwan Gouriou
ddd6207ce5 boards: stm32: Define lptim domain clock using device tree
Convert lptim configuration from Kconfig to device tree.
Note that some boards were using Kconfig default value (LSI),
which now has to be made explicit using device tree.

If not done already, enable the required clock node (lse/lsi).

Clean up related Kconfig bits when required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Erwan Gouriou
bbac316be7 drivers: timer: stm32: Use dt to configure LPTIM domain clock
Instead of relying on Kconfig, use dt inputs to configure LPTIM domain
clck (LSI/lSE).
Clock control dedicated APIs are used for configuration and get the
frequency of domain clock in use.
Constants macros used previously to store frequency and time base are
converted to static global variables.

Some code was set up specifically to keep compatibility with targets
that still use Kconfig to configure domain clock. This will be removed
after a deprecation period.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Erwan Gouriou
7f6d3e5336 drivers: timer: stm32: Use dt instance for LPTIM bus clock
Continue conversion of LPTIM driver to device tree based configuration.
Get clock configuration from device tree and use clock_control API for
bus clock configuration

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Erwan Gouriou
f8b1a18271 drivers: timer: stm32: Use dt instance for LPTIM base address /IRQ
Start converting LPTIM driver to device tree based configuration and
support of other instances.
First: get base address and IRQ using dt instance

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:50:29 +01:00
Fabio Baltieri
0226e53e23 Restore "cmake: remove device_extern.h logic"
This reverts commit 87c6789355, restoring
commit 3b341085a2.

Restore the original change now that the underlying issue has been fixed
in 6cfb18686e.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-12 07:45:01 +01:00
Fabio Baltieri
87e148e0aa Restore "device.h: rework the device_extern.h mechanism"
This reverts commit 5b2ba9aaeb, restoring
commit 0224f2c508.

Restore the original change now that the underlying issue has been fixed
in 6cfb18686e.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-12 07:45:01 +01:00
Andy Ross
6cfb18686e app_smem: Correct missing dependency for linker script generation
The app_smem linker script files were being generated by a python
script based on the contents of the cmake-generated
compile_commands.json file.  But it forgot to include a dependency on
the input.  It also has the misfeature of being generated at cmake
interpretation time with a real but empty stub.

This worked for quite a while, because the dependency on "kernel"
(it's not clear to me why this was there but I'm not brave enough to
remove it) forced the file to rebuild any time any of the C code in
the system changed, which was almost always guaranteed.

But then commit 0224f2c508 ("device.h:
rework the device_extern.h mechanism") came along and removed a
generated include from device.h and saved a bunch of build time.  And
it also meant that no kernel code was being compiled anymore.  So now,
a second build picked up that empty stub file and failed with linker
warnings about the orphan sections that didn't find a place in the
link.

But second builds after cmake re-invocations are an obscure edge case,
right?  Well, no.  It turns out that this is exactly what "twister -f"
does in CI, in order to get retries for test cases that fail
spuriously (mostly for unavoidable host timer-related glitches on SMP
platforms).

So the end result was that this problem showed itself as a silent
failure of the retry mechanism in twister/CI, making it look for all
the world like the timer tests had all suddenly gone flaky.

Fun times.

Signed-off-by: Andy Ross <andyross@google.com>
2022-08-12 05:33:12 +01:00
Sylvio Alves
a41f4f30b5 driver: esp32: add wifi binding
Binding yaml file was missing.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-08-11 18:59:26 -05:00
Henrik Brix Andersen
b0c4b399f9 tests: drivers: gpio: gpio_basic_api: remove rv32m1 pinmux calls
Remove the calls to configure the pinmux for GPIO for the RV32M1. These are
no longer needed after 9ba953d13a.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-08-11 18:39:17 -05:00
Fabio Baltieri
5b2ba9aaeb Revert "device.h: rework the device_extern.h mechanism"
This reverts commit 0224f2c508.

Seems to be breaking CI for few qemu platforms.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-11 17:21:46 -05:00
Fabio Baltieri
87c6789355 Revert "cmake: remove device_extern.h logic"
This reverts commit 3b341085a2.

Seems to be breaking CI for few qemu platforms.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-11 17:21:46 -05:00
Declan Snyder
520a5cf22b boards: arm: Updated docs for mimxrt11xx to indicate entropy support
Updated mimxrt11xx to indicate entropy driver support using CAAM RNG

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-11 17:14:43 -05:00
Declan Snyder
d556a0c8a6 drivers: entropy: Add entropy driver for MCUX CAAM
Added entropy shim driver for MCUX CAAM and Kconfig symbol

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-11 17:14:43 -05:00
Declan Snyder
1a8b700a81 dts: arm: nxp: Added MCUX CAAM on rt11xx.dtsi
Added nxp,imx-caam binding
Enabled CAAM in rt11xx devicetree

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-11 17:14:43 -05:00
Daniel Leung
df3093a3e7 dts: dai: correctly rename intel,dai-dmic.yaml
Fat finger mis-typed when I renamed the file last time.
So correctly name the file this time. Hopefully this is
correct and won't need anymore renaming... :(

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-11 16:14:25 -05:00
Tom Burdick
88de59043f tests: boards: frdm_k64f i2c test against fxos8700
Adds a simple test case against the FXOS8700 sensor and its
built in FIFO using i2c. Pulls data from the sensor using both
synchronous and asynchronous transfers.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-11 14:12:13 -04:00
Tom Burdick
006d9ffceb i2c: mcux transfer with callbacks
Implements i2c_transfer_cb for the mcux driver

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-11 14:12:13 -04:00
Tom Burdick
a45ece6984 i2c: Adds i2c_transfer_async API for I2C
i2c_transfer_async is the asynchronous version of i2c_transfer where
the completion of the transfer is notified to the caller using a callback.

This can be used in conjuction with the common callbacks and datatypes
in async.h for directly doing an async transfer with an IPC object
to notify a thread.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-11 14:12:13 -04:00
Johann Fischer
9a1b990006 modbus: remove label property from devicetree overlays
Remove label property from devicetree overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Johann Fischer
46a0e5347d modbus: remove the use of DT_INST_LABEL and DT_PROP(inst, label)
Although it is possible to simply use the interface number,
it has proven convenient to use the names for the interfaces
in the samples.

Migrate to DEVICE_DT_NAME().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Reto Schneider
e8510f0577 emul: Remove empty files
Those files do not contain anything of relevance since
fa90b5c243 [emul: spi: bmi160: Move to
top-level directory].

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-08-11 11:17:04 -05:00
Francois Ramu
8ec02948c5 samples: drivers: watchdog application running on stm32 boards
Adding configuration to run the watchdog sample application
on the stm32 boards through 2 common overlay files:
one for running on the IWDG one for WWDG, if compatible.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-11 17:47:05 +02:00
Kumar Gala
1679c650a7 tests: build_all: led: Enable various LED devices
Add I2C based LED devices to led/app.overlay to get those associated
drivers enabled as part of the build test.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Kumar Gala
0e1a7e0241 drivers: led: Remove unnecessary Kconfig settings
Having the LED device enabled in devicetree will now get the driver
enabled by default when CONFIG_LED=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Kumar Gala
db0a8c63fe drivers: led: Update Kconfig
* Utilize DT_HAS_<COMPAT>_ENABLED for devicetree based drivers
* Move to using select I2C' instead of 'depends on'
  (see commit df81fef944 for
   more details)

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Benjamin Bigler
b9c6ca1d43 drivers: clock_control: stm32u5: Fix frequency calculation overflow
STM32u5 pllout frequency calculation overflows. Fix by changing
order of operations

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2022-08-11 17:46:33 +02:00
Benjamin Bigler
a6a774c9f1 drivers: clock_control: stm32h7: Fix frequency calculation overflow
STM32h7 pllout frequency calculation overflows. In the
worst case pllsrc_freq can be 50Mhz and plln_mul 512 which will cause
an overflow of the intermediate result which leads to wrong frequency
returned. As no intermediate result can be bigger than 960MHz only the
order of operations is changed.

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2022-08-11 17:46:33 +02:00
Shaoan Li
e408c45546 test: subsys: logging move log_benchmark to new ztest API
Move test subsys/logging/log_benchmark to use new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-08-11 17:46:24 +02:00
Stephanos Ioannidis
4d36e8f693 cmake: compiler: arcmwdt: Add no_strict_aliasing flag
This commit adds the `no_strict_aliasing` flag, which disables
the strict aliasing rule, for the ARC MetaWare compiler.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-11 17:45:58 +02:00
Stephanos Ioannidis
1f2c1c6278 cmake: compiler: gcc: Add no_strict_aliasing flag
This commit adds the `no_strict_aliasing` flag, which disables
the strict aliasing rule, for the GCC compiler and its derivatives.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-11 17:45:58 +02:00
Stephanos Ioannidis
9672858c19 cmake: compiler: Add flag template for disabling strict aliasing rule
This commit adds a template for specifying the C/C++ compiler flag for
disabling the strict aliasing rule.

It also enables this flag globally because the Zephyr codebase does not
strictly adhere to the aliasing rules specified by the C/C++ standards
and the optimisation strategies that assume these rules may end up
generating invalid code.

For instance, GCC 11 and above tend to optimise more aggressively
assuming the strict adherence to the standard aliasing rules and may
generate invalid code, when compiling Zephyr with `-fstrict-aliasing`,
that results in various run-time failures.

Note that the footprint and performance ramifications of disabling the
strict aliasing rule are negligible.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-11 17:45:58 +02:00
Marek Pieta
f5560279f5 bluetooth: host: Increase long workqueue stack size
Change increases long workqueue stack size to prevent stack
overflows while processing GATT database hash.
CONFIG_BT_HCI_ECC_STACK_SIZE is removed, because the configured
stack was removed.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2022-08-11 17:01:08 +02:00
Marek Pieta
d79971e5b7 boards: thingy53_nrf5340: Disable BMI270 in DTS
Change disables BMI270 sensor in board DTS. The BMI270 sensor
driver in Zephyr does not support sensor connected over SPI.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2022-08-11 09:47:08 -05:00
Ming Shao
9a4b5e1d90 ztest: Add test duration to summary for new ztest
Add duration stats at both suite level and unit test
level into test summary. The duration is at second
level. Since the new ztest fx can execute a test suite
for multiple times, the worst/longest test duration is
collected.

Note that even a skipped test can have a duration greater
than 0 because the skip operation itself is not free.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-11 09:01:12 -04:00
Ming Shao
cce1ec6f42 ztest: Refine when to collect unit test duration
Previously, unit test duration is collected within the
TC_START and Z_TC_END_RESULT macros. With existing tests,
the TC_START macro can be invoked by both the ztest fx
and the tests themselves. And the TC_START macro definition
went lengths to avoid the interference when it is invoked
within a unit test. This commit decouple the time collection
and the TC_STRAT/Z_TC_END_RESULT macros to fix this issue.
Now only the (old) ztest framework is responsible for the
test duration measure. The test duration stats of new ztest
fx is different from this btw.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-11 09:01:12 -04:00
Ming Shao
77e1e39cff ztest: add test summary after all suites finish running
Add test summary after all test suites finish running.
The summary can be one-line or verbose, which is configured
with CONFIG_ZTEST_VERBOSE_SUMMARY. The one-line summary covers
overall suite stats. The verbose summary covers each test
function within the suite besides the one-line summary.

The new ztest output ultimately go through the printk. If
printk go through the logging subsystem, there may be log
messages dropped. And if log_panic is invoked, log messages
can be flushed in a mess. So several explicit log flush
are used when printing summary to ensure no content is lost
and content is in good shape.

Some macros are shared between old and new ztests. Such as
TC_START_PRINT and TC_END_PRINT. The are defined accordingly.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-11 09:01:12 -04:00
Ming Shao
bb63d87b4b ztest: Add config switch for modes of test output
Support verbose or one-line summary at test suite level.
Support verbose or no output at test function level.

Totally 4 combinations configurable:
- function verbose + suite verbose
- function verbose + suite oneline
- no function output + suite verbose
- no function output + suite oneline

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-11 09:01:12 -04:00
Gerson Fernando Budke
9562e3f794 drivers: flash: sam: Fix driver support
The current atmel sam flash driver was develop based on the cortex-m7
version of smart arm microcontroller. The driver support write
protection and cache functions which is not supported by other cortex-m
variants. This fixes current driver implementation and devicetree
entries for all sam variants.

Notes:
 * The cortex-m3 doesn't have support erase pages flash command and
   because of that the driver still not not compatible. Keep it disabled
   until a patch be send. The hwinfo driver is not affected by this
   restriction.
 * The sam4l variation requires a specific driver because uses another
   flash controller (flashcalw). Added another compatible to
   differentiate and keeped node disabled until a driver be available.

Fixes #48516

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-08-11 07:41:09 -05:00
Gerard Marull-Paretas
560fcddf3f doc: kconfig: add option to select number of results per page
When searching for a certain group of Kconfig options, e.g. CONFIG_BT*
it may be useful to view more than 10 options at the same time. This
patch adds a new combo box that allows to increase the number of results
per page (10, 25 or 50).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-11 13:23:23 +01:00
Erwan Gouriou
92b100e2df soc: stm32l5: power: Factorize some code pm_state_set
Factorize actions that do not depend on substate_id in pm_state_set.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-11 13:22:58 +01:00
Erwan Gouriou
416691d685 boards: stm32l562e_dk: Add STM32CubeProgrammer runner
This commit adds STM32CubeProgrammer runner to stm32l562e_dk.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-11 13:22:58 +01:00
Erwan Gouriou
341844979e drivers: clock_control: stm32: LSE Propagation
When supported, LSE propagation should be enabled

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-11 13:22:58 +01:00
Kumar Gala
6de4cc5293 samples: i2s: echo: exclude litex_vexriscv
The litex platform has its own sample and echo sample does not
build on litex_vexriscv so exclude it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 12:20:33 +02:00
li biao
97adecd713 tests: subsys: logging: move log_switch_format to new ztest API
Move test subsys/logging/log_switch_format to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-11 12:20:26 +02:00
Keith Packard
8865d4d7db picolibc: Don't select TLS without toolchain support
If the architecture has TLS support, but the toolchain doesn't, then
don't enable Zephyr TLS support when selecting picolibc.

Closes: #47275.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-08-11 12:20:20 +02:00
Declan Snyder
462d87c619 drivers: entropy: cleaned up mcux code
cleaned up some code in 3 mcux entropy drivers,
removing unnecessary void casts and function declarations

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-11 12:20:12 +02:00
Keith Packard
f0216a2619 libc/picolibc: Place malloc heap in noinit section if possible
When the heap is of a fixed size and there isn't a special malloc partition
in use, place the heap in uninitialized memory so that the application
doesn't spend time at startup erasing it. Picolibc malloc always clears
memory before returning it to applications, so this change will not be
visible to applications.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-08-11 12:20:05 +02:00