This commit refactors the NPCX SoC hierarchy to improve maintainability and
enable future support for upcoming chips.
Key changes include:
1. Introduced a new `npcxn` subdirectory under `common/` to consolidate
shared components across the npcxn series.
2. Renamed and reorganized register access files for improved consistency.
3. Updated relevant Kconfig files, header files, and CMakeLists
for the new structure.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Due to a change in linker script cortex_a_r/scripts/linker.ld
, the _image_ram_start has been changed so the Zephyr image
cannot be copied from flash to ram as expected
and cannot run properly.
It is replaced by CONFIG_SRAM_BASE_ADDRESS, the _image_ram_size is also
replaced by _flash_used as a preventive measure.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Use uv compile to generate requirements.txt from requirements.in
This works better to capture dependencies that work for multiple python
versions, not just the one that was used to generate the
requirements.txt file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use esp_restart call to guarantee and registered
shutdown handlers will be triggered before rebooting.
This guarantees that subsystems like Wi-Fi and BLE
will deinit correctly.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Dependabot will have an auto-generated body and is likely to fail the max
line length check.
The bot also does not use a full name for the signed-of-by line.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
When compiling in C++, the designated-initializer error:
Either all initializer clauses should be designated
or none of them should be
Will occur due to an extra pair of braces in the Z_JSON_DESCR_OBJ() macro.
Remove the extra pare of braces which allows the code to compile and
function in both C and C++.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The address of the last i2c device in the build all test has a wrong
address. This fixes that typo.
Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
When CONFIG_ZTEST_FAIL_ON_ASSUME is set, a failed assumption will
cause the suite to fail, but the individual test will be marked as
SKIPPED. We should fail the test so it's clear what's going on.
Fixes#86611
Signed-off-by: Yuval Peress <peress@google.com>
- Added macros `STM32_ETH_PHY_MODE`
to determine the PHY mode (RGMII, GMII, RMII, and MII)
from the `phy_connection_type` property in the device tree.
- Removed previous definitions for ETH_MEDIA_INTERFACE_MII
and ETH_MEDIA_INTERFACE_RMII.
- Updated STM32_ETH_PHY_MODE macro to use ETH_MII_MODE
and ETH_RMII_MODE.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add the Ethernet MAC and MDIO nodes in the device tree.
Add Kconfig for Ethernet Support.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Make `k_work_queue_config cfg` as `static const` to enable
compile-time instantiation instead of runtime allocation.
This modification saves substantial flash memory but has system-wide
effects that should be considered.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
A long time ago, Zephyr had two macros that could be used for build-time
assertions: BUILD_ASSERT() and BUILD_ASSERT_MSG(). The latter has been
dropped in v2.7 and removed from the documentation; however, the intro
paragraph of the "Build Assertions" section has never been updated to
reflect this, and still confusingly claims that "Zephyr provides two
macros for performing build-time assertions" when only BUILD_ASSERT()
remains.
Update the introductory paragraph of "Build Assertions" section such that
it makes sense now that only one build-time assertion macro exists.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Adds tests to better gauge IPI performance on SMP. In each case, one
CPU is used as the source of IPIs while the remaining CPUs are busy
doing "work". Every 30 seconds the benchmark reports on the amount
of "work" done by the busy CPUs and the amount of work done by the
CPU generating the IPIs.
This can be used to ...
1. Show how enabling IPI optimization affects system performance
2. Show the cost of spinlock contention as the number of CPUs increase
3. Measure the relative performance of scheduler changes on SMP.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
gcc 11.4.0, seems to believe this variable may be used uninitialized,
and warns about it (causing a test build failure due to warnings
being treated as errors).
Let's just initialize the variable to 0 to avoid the issue, as the
cost is trivial.
subsys/bluetooth/host/classic/hfp_ag.c: In function
‘bt_hfp_ag_vts_handler’:
1095
subsys/bluetooth/host/classic/hfp_ag.c:3091:17: error: ‘code’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
1096
3091 | bt_ag->transmit_dtmf_code(ag, code);
1097
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1098
The issue can be reproduced for ex. with:
$ mkdir build ; cd build
$ cmake -GNinja -DBOARD=native_sim/native/64 ../tests/bluetooth/shell \
-DCONF_FILE="prj_br.conf"
$ ninja
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fixes failed test_lfs_basic for medium partition > 960KB
and for large partition > 3MB.
Flashes with large erase size require larger test partition sizes
(e.g. s26ks512s0 has 256KB erase size).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Since #83575 bma4xx driver relies on RTIO to work. This means that
CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the
Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at
build time.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The default thread priority for the CoAP client thread is set to
NUM_PREEMPT_PRIORITIES which is not a valid thread priority, as the
lowest application thread priority is actually
NUM_PREEMPT_PRIORITIES - 1. Because of this, CoAP client library gave an
assert on boot if assertions were enabled.
Kconfig does not allow for arithmetics when setting integer defaults,
therefore handle this at the preprocessor stage by limiting the actual
priority assigned to the CoAP client thread to a valid range.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Since these drivers mainly do not use MCUX except for the configure
function (which will soon also be changed), change namespace prefix to
lpspi_ instead of spi_mcux_ to avoid confusion.
Also improve descriptions of kconfigs to clarify what they are for.
Not changing the kconfig names for now since they are user-facing.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove SDK types and defines from header file.
And since now the common file is the only consumer of SDK header, move
that include there.
Also rename the tristate boolean to be more clean about what it does
rather than trying to be similar to the SDK config name.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
We should not release context until transfer ends. The code previously
would return from wait_for_completion and then release the context. This
is only supposed to be done in the dma callback except for the case of
error in the transceive call. For async transfer this was most likely
always happening wrong and probably broken for multi threads trying to
access the bus due to this premature release of the context.
Also we should not enable CS and leave enabled in case of error, move CS
enable to after the error check.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Stop the transfer with error if at any point there is some
execution reached where transfer is being set up for 0 length, this can
cause problems where for example eDMA set up with this nonsense 0 length
channels can get an infinite error interrupt.
And this is probably an erroneously crafted transfer request anyways.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
If there are HAL definitions available, do these two things:
Ungate the clock for the device from the zephyr driver. Eventually it
would be better to have a clocks property in the LPSPI DT node and get
the resources from there rather than the HAL.
Some platforms require the peripheral to be reset at system level, add
code to do this. Eventually it would be more ideal to have Zephyr
reset drivers for all of the NXP platforms and use DT to describe the
reset resources, but for now we can just do this to get the LPSPI
supported.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add support for an optional "idle disconnect" feature in the TCA954x
I2C multiplexer. When enabled via the `i2c-mux-idle-disconnect` device
tree property, the driver will disconnect all channels after each
transfer. This helps avoid address conflicts when multiple multiplexers
are present on the same I2C bus.
Even if the I2C transfer fails, the driver will still attempt to
disconnect the channels to ensure the bus is left in a consistent state.
If the disconnect operation itself fails, its error code will be returned
unless the transfer already failed with a different error.
This implementation is inspired by the Linux kernel driver for PCA954x
I2C multiplexers. Special thanks to Ofir Shemesh for valuable suggestion.
Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
Clamp the returned humidity to a non-negative value. This ensure that
the return value is always within the expected range, even if the
calibration parameters are read out incorrectly or corrupted.
This check is applied in the example Bosch driver for the float
conversion case, so there are situations that warrant it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The WDOG and IADC clock node definitions were missing for xg22,
and interrupt numbers were wrong for WDOG on xg27.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add CONFIG_NET_CONN_PACKET_CLONE_TIMEOUT to allow for longer
timeouts. This can be used to prevent dropping packets when
transmitting large amounts of data (with PPP).
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
When sending the close command as a server, the data is incorrectly
masked which violates RFC6455 section 5.1.
Use the is_client flag to avoid masking if the close is for a websocket
server.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
On Linux, the function `power_on()` of Bumble will fail when executing
even-numbered test cases.
From the `btmon` log, the controller will not reply the `HCI Command:
Reset` when the issue occurs.
Add a try-except to catch the exception of the function `power_on()`,
and retry to call the function `power_on()` until issue no longer
occurs. Or, the test will fail due to the timeout.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Kconfig settings of string type is passed to CMake with quotes to ensure
they are properly handled, for example when specified in testcase.yml as
> extra_args:
> - CONFIG_FOO="bar"
Support sysbuild Kconfig settings `SB_CONFIG` by performing the same
quoting for settings starting with `SB_CONFIG_`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
We would like to take maintainership of TDK drivers as discussed:
https://github.com/zephyrproject-rtos/zephyr/pull/85963
teburd and MaureenHelm moves to collaborators
Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
While linking with the IAR linker using generated linker scripts,
and with errors if unhandled sections are encountered, many of the
bluetooth tests failed because CONFIG_SETTINGS was not set.
The section that was not handled was
'._settings_handler_static.static.settings_handler_bt_ccc_'
Now it's only set if CONFIG_SETTINGS is set.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Add indirect CSR access to access CLIC register to satisfy the current
CLIC spec (Version v0.9, 2024-06-28: Draf).
Add CONFIG_LEGACY_CLIC_MEMORYMAP_ACCESS for legacy CLIC implementation
with memory-mapped CLIC register.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Add support for CLIC hardware parameters based on the hardware
implementation.
1. CLIC_PARAMETER_INTCTLBITS
Specifies the number of modifiable bit in interrupt control register.
2. CLIC_PARAMETER_MNLBITS
Specifies the number of bits are assigned to interrupt level in the
interrupt control bits.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Add support for CLIC SMCLICCONFIG extension, allowing user to configure
the number of available interrupt level bits at runtime.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Temporarily disabled PMP stack guard to allow access to CLIC M-mode
register, because U-mode load/store (mstatus.MPRV=0x1,MPP=0x0) is
restricted.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>