Add macro similar to existing UTIL_LISTIFY but with option
to provide separator which is used between evaluation of each
iteration. Separator is not added after the last iteration.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
the icm42605 defaults to a global thread for trigger processing,
the CONFIG_ICM42605_TRIGGER_OWN_THREAD is deprecated.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
by default, a global trigger thread was enabled in kconfig but
the thread priority and stack size depended on a local thread
being enabled.
the local thread option was never used anywhere so it is removed.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
In upstream the LV_COLOR_DEPTH_BITS option is called LV_COLOR_DEPTH, this
needs changing if we want to support v8.2.0.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Commit bdce0a5742 ("soc/intel_adsp: Add a cavs_ipc driver to manage
host IPC") added a new driver for cAVS IPC. Although patch included the
CONFIG_CAVS_IPC option, in practise this had no effect and instead
driver was enabled whenever device tree included IPC hardware. This
caused IPC errors in SOF application builds where two drivers, one out
of tree in SOF and one in Zephyr, initialize the same hardware.
Fix the issue by enabling the driver only when CONFIG_CAVS_IPC is
enabled.
BugLink: https://github.com/thesofproject/sof/issues/5477
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add documentation warning user that entering low power modes can cause
debugger to fail to connect.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Indirect ISR automatically calls power management functions, which GPT
timer direct ISR was not calling. Calling these functions means that the
kernel will recognize that it is exiting low power mode when the GPT
timer interrupt fires that wakes the SOC up, and will call
pm_power_state_exit_post_ops, which can in turn raise the clock
frequencies and voltage of the SOC as early as possible.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Enables low power clocks for mimxrt1064. This allows the soc to
transition into very low power states during idle, as most PLLs can be
disabled. Power states need to be enabled and selected at the board
level.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
System entering sleep state before uart tx is complete can result in
characters being dropped from the transmission. Add pm constraint
setting to the lpuart driver to prevent character drops
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add power management code for the RT10xx SOC. By default, the code will
simply gate the core clock and transition the SOC to WAIT mode when
sleeping, but if clocking hooks are register to reduce clock frequencies
these will be called as well, and the SOC core voltage will be lowered
for additional power savings.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add KConfig symbols to select power management HAL drivers required for low
power modes. Set ZTEST_NO_YEILD if PM is enabled, since RT series SOCs
do not connect to a debugger in WAIT mode.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Some SOCs cannot be flashed reliably in low power modes. If
CONFIG_ZTEST_NO_YIELD is selected, do not yield to the idle thread after
testsuite completes, so that the SOC will not enter low power mode.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The NXP KE1xF SoC series does not support neither slew rate nor open
drain PORT configuration registers.
Fix pinctrl compilation for the KE1xF by defining dummy register macros
for the SRE and ODE registers.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
1. Check I2C Clock and Data is high through GPIO driver instead
of the I2C bitbang registers
2. i2c_xec_poll_write() and i2c_xec_poll_read() will poll to
check I2C clock and data lines are high before initiating the
transaction. The polling will be every 25us for a cumulative
max of 2.5ms
3. wait_completion() will not call recover_from_error() to reset
the controller. Instead will poll for 10ms for the PIN bit to
clear before returning error.
4. wait_completion() will send STOP if the 9th bit is NACK
5. If any errors with current transaction:
(a) Set error_seen flag.
(b) In the next transaction do the recovery process (reset the
i2c controller) if the clk and data lines are high.
Note: error_seen flag is set for Address NACK with Repeated
Start as well.
6. If timeout error occurs in wait_completion():
(a) Set timeout_seen flag;
(b) Wait till the slave will release the clock.
(c) Once slave releases clock send STOP on the bus. If the
timeout occurred while master read, read the I2C DATA register
for the hardware to proceed.
Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
Smoke test was timing out in a WAIT_FOR macro on my up xtreme tgl board.
Enabling this sleep fixes it.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
spi_dt_spec structure initialization should not be done
in the runtime during spi bus initialization because it
causes kernel panic.
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
The commit adds guide that describes format of SMP reqests/responses
as issued by Zephyr implementation within mcumgr.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fixes: #43094
This commit introduces a function which updates Zephyr_DIR to point to
the directory of the Zephyr package being loaded.
For Zephyr 3.0 and earlier, the Zephyr_DIR might in some cases be
`Zephyr_DIR-NOTFOUND` or pointing to the Zephyr package including the
boilerplate code instead of the Zephyr package of the included
boilerplate code.
This code ensures that when a package is loaded then Zephyr_DIR will
point correctly.
This ensures that when Zephyr releases <=3.0 is loaded, then Zephyr_DIR
will point correctly, see more in #43094.
Old style Zephyr package will in some cases load boilerplate.cmake
directly so to ensure proper behavior, restrict boilerplate uses of
`find_package(Zephyr)` to not use default search path, but allow only
the current Zephyr.
Of the same reason, only print warning if Zephyr_DIR is not defined as
this indicates old style inclusion.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
CMake find_package() is expected to set the cached variable Zephyr_DIR
with the value of the package included.
Zephyr_DIR in the CMakeCache is used by CMake re-runs for
`find_package(Zephyr)` to directly lookup the package to use.
The Zephyr_DIR is set correctly when a single Zephyr workspace is used
but may in some other cases be set to `Zephyr_DIR=Zephyr_DIR-NOTFOUND`.
This causes CMake to rerun the Zephyr package search mechanism and loop
through potential candidates before loading the correct Zephyr
installation.
After a second run, Zephyr_DIR is n some cases set to
`Zephyr_DIR=<path-to-including-Zephyr>` which might be different from
the Zephyr in use.
The Zephyr_DIR should be pointing to the package defined by ZEPHYR_BASE.
This commit ensures that when ZephyrConfig.cmake package is loaded, then
Zephyr_DIR is set correctly.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The RTC user channel count is increased contitionally to 2 when
nrf_802154 radio driver is enabled.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
The response of a KTCPSND has two phases. According to documentation by
wireless the timeout is 60 seconds. The fix respects the timeout on the
second phase, too (waiting for OK or errors from modem). Previously only
the first phase used 60 seconds and the second phase used 5 seconds.
Without this fix the hl7800 will lock the tcp stack for the current
socket indefinitely if another socket operation is performed before the
response from the modem is received.
Additionally all timeouts are adjusted to be at least one second longer
as the documented timeout from wireless. This avoids races between the
hl7800 and the driver.
Signed-off-by: Rene Bredlau <git@unrelated.de>
Shims for nrfx drivers should only connect the related IRQ handlers,
they should not enable the IRQs, as this could lead to a situation
where the interrupt handler is called before the driver had a chance
to properly initialize the peripheral and install the provided event
handler. nrfx drivers will enable the interrupts appropriately on
their own by calling the NRFX_IRQ_ENABLE macro which is implemented
in nrfx_glue.h as a call to irq_enable().
This commit fixes the above issue spotted in the following shims:
- dmic_nrfx_pdm
- clock_control_nrf
- i2s_nrfx
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Adds an official behavior in response to null response from HTTP
endpoint.
Fixes#42988
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Test the rejection (LL_UNKNOWN_RSP) of unsupported remotely initiated
procedures in both the central and peripheral role.
Unsupported opcodes are handled by Kconfig manipulation and removal of
source files.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Test the rejection (LL_UNKNOWN_RSP) of invalid remotely initiated
procedures in both the central and peripheral role.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Add ztest_test_skip() support to non-kernel tests by implementing
long jump buffer and TC_SKIP result collection.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Instead of reading registers query the info on sysclock configuration
from existing configuration symbols.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Rework clock start up functions in order to allow configuration
and enabling of individual clocks.
This way, each clock defined with a "okay" status will be enabled
even if not part of the sysclock clock tree.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add STM32_FOO_ENABLED and STM32_FOO_FREQ to STM32 fixed clocks:
HSI, HSE, MSI(S), CSI, LSI, LSE..
Replace STM32_LSE_CLOCK by STM32_LSE_FREQ and when possible
replace by new STM32_LSE_ENABLED when making sense.
Fix STM32_PLL3_FOO_ENABLE to STM32_PLL3_FOO_ENABLED
Additionally, add STM32_PLL_FOO_ENABLED definitions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
PLL3 setting should also be protected CFG_HW_RCC_SEMID.
Move semaphore unlock after we're done with PLL3.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Tweak some macros definitions so that they can be used in
IS_ENABLED utility macro.
Finality is to rework STM32 clock_control driver to a more
readable format.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Remove conditions around some definitions since these symbols
and the node itself are mandatory.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Since we are moving to pinctrl, removing pinmux.c
from mec172x board folder and removing pinmux from dts
Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>