This CL renames 'Nuvoton Platform' as 'Nuvoton_NPCX Platform' and
modifies the relevant files used by this platform. It also changes
status from 'orphaned' to 'maintained' since we do maintain npcx drivers
continuously.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This allows board to re-configure ROM_BASE address while building
firmware image.
For example, a board need to build two firmware images. And the images
are put into one flash and required to work independent:
config FLASH_LOAD_OFFSET
default 0 if FIRST_IMAGE
default 0x80000 if SECOND_IMAGE
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Increase default stacks sizes for 64bit platforms where it is
required.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
ARCv3 has ARConnect implementation similar to ARCv2, so
use existing ARConnect header for ARCv3 as well.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Rewrite ARC SMP code with ASM-compat macros so it can be
used for ARCv3 64 bit.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Current location options for linker source files includes init and
noinit ram data, but only a noinit ram section. This makes it impossible
for application code to define an initialized RAM output section,
such as with the Z_ITERABLE_SECTION_RAM() helpers.
Adding a DATA_SECTIONS linker source option for this use case.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fixes issue 34879
This PR updates previous PR's 37138 and 37139.
Refer to issue 34879 for information from MCHP HW
designers. A delay after enabling interrupts is a
more appropriate work-around than depending upon
behavior of ARM DMB instruction.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
The main motivation is to avoid polluting the all-caps "DT_"
namespace, which within zephyr belongs to devicetree.h.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Socket CAN does not require interface link address to be
assigned, check is not applicable for socket CAN
interfaces. As this address is NULL for socket CAN interface
it results in assertion.
Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com>
Use the internal function z_device_get_all_static helper function
instead of using __device_start and __device_end directly. Some other
minor adjustments have been done (e.g. reduce *dev scope to the for
loop). An issue on the range of the for loop in _pm_devices has also
been fixed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The shared _pm_devices function used should_suspend check function to
see if a device had to be suspended or not. Some of the logic inside
that function was redundant since the pm_device_state_set function
already performs similar checks, e.g. if the device is already at the
given state or the state transition is not supported it will return
error codes appropriately.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
A device that is turned off should not be suspended. A device that has
been turned off can only be resumed. This action is currently forbidden
by the "should_suspend" function in the device PM code.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
esp32c3 SoC is an rv32imc, so it does not support the atomic builtin.
Since it relies in atomic instructions.
Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
Some boards, e.g. atsamd20_xpro, enable non-minimal peripherals by
default like SPI. This goes against board porting guidelines, as it
enables a peripheral that is not necessarily used by all samples,
as discussed at #30694. This removes SPI as a default peripheral
for all sam/sam0 boards.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
RT platforms that support TRNG IP (rt10xx and rt6xx) need to set
RNG and CSRNG to Xoroshiro and CTR_DRBG respectively instead of
using TRNG as random source.
Fixes: #37307
Signed-off-by: David Leach <david.leach@nxp.com>
Using the NOP instructions to do timing control on some physical board
such as ehl_crb, up_squared and intel adsp board, that doesn't work.
It seems like it can only be used for instruction alignment purposes.
We skip this test on this board because it's not meaningful.
Fixes#35971
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
k_timeout_t was converted to ticks using a nonsense function
causing poll timeout corruption for offloaded sockets; this
commit uses ticks directly from the struct instead.
Fixes#37472
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
According to MbedTLS API documentation, its session must be
reset if mbedtls_ssl_handshake returns timeout error. This
commit resets the session for said return value, and that
allows us to call send() multiple times even if handshake
times out for previous calls.
Fixes#35711
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
This is a follow-up to commit 3656ba5ae9.
Enable pull-up resistors on UART pins RXD and CTS in Nordic DK boards
where it is possible that these pins are not connected to anything on
the board and could generate problems if left floating (on some DKs
also the Interface MCU can be disconnected with the switch "nRF only",
hence pull-ups enabled also on uart0 for them).
Those pull-ups can still be disabled (by deleting the added properties)
if necessary to use a given board in some specific hardware setup.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow-up to commit 3656ba5ae9.
Do not enforce pull-up resistors to be enabled on RXD and CTS pins
in nRF UART drivers, as in certain hardware designs this may be
undesirable or may even make certain hardware not working.
Instead, provide devicetree properties that allow enabling of those
resistors when it is actually needed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Document the new DT_FOREACH_OKAY_INST_<compat> and
DT_FOREACH_OKAY_INST_VARGS_<compat> macros that are generated by
gen_defines.py and explain how they are used in devicetree.h.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add two new for-each macros:
- DT_FOREACH_STATUS_OKAY(compat, fn)
- DT_FOREACH_STATUS_OKAY_VARGS(compat, fn, ...)
These can be used to expand "fn" once for every status "okay" node in
the devicetree which has a given compatible. The intended use case is
to allow doing something in C once for each node of a compatible,
but outside of a device driver.
E.g. an application might want to collect an array of structures for a
compatible, where each structure is initialized from a node.
In such cases we don't want people to be forced into using
DT_DRV_COMPAT and instance numbers, because that's in general a hint
that you're doing something driver-like.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add some helper macros that work similarly to the
'DT_FOREACH_OKAY_INST_<compat>(fn)' macros, except they give 'fn'
node identifiers in their expansion instead of instance numbers.
This makes it possible to add for-each APIs to devicetree.h that work
on an arbitrary compatible, not just DT_DRV_COMPAT.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Split the generic tests for DT_INST_FOREACH_STATUS_OKAY() out of the
function which tests it as applied to device instantiation.
This is just moving code around as prep work for expanding on the set
of macros which are in for-each-node style.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The commit
6fe9e408ab (tests/cbprintf_fp: Filter on CONSOLE_HAS_DRIVER)
added filtering on Kconfig symbol incorrectly - it checked
CONSOLE_HAS_DRIVER instead CONFIG_CONSOLE_HAS_DRIVER so
this test was filtered out (and therefore skipped) on all
platforms.
Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The 32KHz crystal used is a tuning fork crystal which can have a larger
clock drift over temperature than an AT cut crystal, therefore the LFXO
clock source error rate needs updating to account for this possible
drift over temperature.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
The 32KHz crystal used is a tuning fork crystal which can have a larger
clock drift over temperature than an AT cut crystal, therefore the LFXO
clock source error rate needs updating to account for this possible
drift over temperature.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
The 32KHz crystal used is a tuning fork crystal which can have a larger
clock drift over temperature than an AT cut crystal, therefore the LFXO
clock source error rate needs updating to account for this possible
drift over temperature.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
The 32KHz crystal used is a tuning fork crystal which can have a larger
clock drift over temperature than an AT cut crystal, therefore the LFXO
clock source error rate needs updating to account for this possible
drift over temperature.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
The 32KHz crystal used is a tuning fork crystal which can have a larger
clock drift over temperature than an AT cut crystal, therefore the LFXO
clock source error rate needs updating to account for this possible
drift over temperature.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
We had added a break in a switch statement that stopped
ISO channels from setting the BT_CONN_CLEANUP flag
which in turn stopped them from disconnecting (in the
eyes of the upper layers) properly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of just writing "err" we make it clear that it is
the ISO server that failed to accept.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
GATT/SR/GAD/BV-03-C will read attr value, but we parse NULL
from `attr->read` which point to `attr_read` function.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Driver's RX thread can wait some time before a free buffer is available.
When resources are limited we can easily run out of them.
Fixes#36891.
Signed-off-by: Jan Pohanka <xhpohanka@gmail.com>
Modified test to handle case when counter handlers are called in
ZLI interrupt context where kernel primitives cannot be used. In
that case volatile counters are used to track number of handlers
calls.
Added configuration for nrf52840dk board where zli feature is enabled
for all counters.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extended driver configuration in device tree to enable ZLI interrupt.
When zli is set in the device tree then event handlers for alarm and
top is called in ZLI interrupt context. It means that kernel primitives
cannot be used there.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extended driver configuration in device tree to enable ZLI interrupt.
When zli is set in the device tree then event handlers for alarm and
top is called in ZLI interrupt context. It means that kernel primitives
cannot be used there.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add missing otPlatTimeGet implementation which is needed for proper
calculation the time offset in host-RCP communication.
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
The filter_py() function is handed a bunch of file names and is
expected to give back just the python files.
Its input is the output from a 'git diff' command which normally when
used in the vanilla zephyr repository just prints regular files.
In situations where we're checking compliance on a repository with
submodules, however, filter_py() can be given directories in the
'fnames' list from the git output.
In the interests of being defensive and sharing infrastructure, just
handle this case in filter_py().
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Fixup the doxygen comments for return values on `_dt` functions.
@retval should only be used when specifying actual return values,
@return is more general and can refer to other functions.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
With the last changes in USB device stack it was unfortunately
not considered that an interface can have no endpoints.
This caused the USB DFU class to stop working in DFU mode.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>