Compare commits

..

783 commits

Author SHA1 Message Date
Adrien Ricciardi
19f645edd4 tests: unit: crc: Add OpenPGP CRC-24 tests
Check CRC computation in a single step and in multiple steps.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-05-29 10:51:21 -07:00
Adrien Ricciardi
863f6affef lib: crc: Add OpenPGP CRC-24
Implementation is based on the section 6.1 of the RFC 4880.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-05-29 10:51:21 -07:00
Andrej Butok
62fa3f729c tests: mcuboot: add boot_request_upgrade() return value check
- Adds boot_request_upgrade() return value check.
- Avoid repeating resets if the upgrade request fails.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-05-29 10:50:00 -07:00
Trung Hieu Le
206897658a drivers: display: elcdif: Modify interrupt enablement
The elcdif interrupt is enabled in the write function and disabled in
the IRQ handler for each new frame update. Disabling the interrupt when
no new frame needs to be sent gives the CPU the possibility to enter
low-power mode. However, when the application's frame rate
matches the LCD refresh rate, this adds additional latency.

This commit provides a config to choose between following options:
- Toggle the CUR_FRAME_DONE_IRQ_EN in the write function and in IRQ
handler for each new frame when the power mangement is a concern.
- Activate the CUR_FRAME_DONE_IRQ_EN once at the init function when
low latency is required.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2024-05-29 10:49:48 -07:00
Guennadi Liakhovetski
024bd41efb llext: xtensa: add support for the xt-clang toolchain
To build LLEXT images using the xt-clang toolchain from Cadence
linker flags have to be set similar to other toolchains. Add the
missing cmake files.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-29 10:49:40 -07:00
Wilfried Chauveau
5d5c13feae samples: tfm: Remove old 'tfm' tag & update relevant boards
The 'tfm' tag was removed from the samples in in
7c80473e0a but it remained in use in other
parts of the project.
This change brings back consistency through out the project.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-05-29 10:49:31 -07:00
Andrej Butok
16470adf83 boards: frdm_mcxn947: Fix MCUBoot support.
- Set MCUBoot "upgrade only" method,
  as the program size is 128B (>32B).
- Set slot sizes to the same value,
  required by the MCUBoot "upgrade only" method.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-05-29 10:49:15 -07:00
Bjarki Arge Andreasen
282ba58814 doc: release-notes-3.7: Document removal of old gsm modules
The GSM_PPP device driver and its direct dependencies, UART_MUX
and GSM_MUX have been removed. The net/gsm_modem sample has been
removed and the net/cloud/tagoio and net/mgmt/updatehub samples
have been updated to align with this change.

This commit documents all above.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
79640aea09 drivers: console: remove uart_mux and gsm_mux
Remove the deprecated uart_mux and gsm_mux modules and all of
their configurations/dependencies across zephyr.

Optimally uart_mux and gsm_mux would be removed in their own
respective PRs, but the two modules are directly coupled, so
to preserve bisectability, they must be removed together.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
e79428cda8 drivers: modem: remove gsm_ppp.c device driver
Remove the deprecated gsm_ppp.c device driver and associated
dts compatible.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
40a44c2118 drivers: modem: modem_cellular: Remove support for gsm_ppp
The new modem_cellular driver had support for the deprecated
generic zephyr,gsm-ppp dts compatible for backwards compatibility.

zephyr,gsm-ppp is being removed, and as such, modem_cellular.c
no longer needs to support it.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
b0a9ae266b drivers: net: ppp: Remove integration with GSM_MUX
The gsm_ppp driver is deprecated, and will be removed, along with
its dependencies UART_MUX and GSM_MUX.

This commit removes the integration with GSM_MUX from ppp.c, making
it solely dependent on the chosen node zephyr,ppp-uart.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
7e764610b1 drivers: modem: modem_iface_uart: Remove gsm_mux integration
gsm_mux and uart_mux are deprecated and will be removed.
Remove integration with gsm_mux and uart_mux from modem_shell.c

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
a36545b72b drivers: modem: modem_shell: Remove integration with gsm_mux
gsm_mux and uart_mux are deprecated and will be removed.
Remove integration with gsm_mux and uart_mux from modem_shell.c

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
06c2762124 samples: net: cloud: tagoio: Remove GSM modem overlay
The gsm modem driver is deprecated and will be removed. Remove
the build overlay and dependency on the gsm modem from the
tagoio sample.

The new cellular modem driver and subsystem use the native
networking stack and the pm subsystem, so just like ethernet,
enabling the cellular modem is up to the board configuration.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
2cb559c521 samples: mgmt: updatehub: Remove GSM modem overlay
The gsm modem driver is deprecated and will be removed. Remove
the build overlay and dependency on the gsm modem from the
updatehub sample.

The new cellular modem driver and subsystem use the native
networking stack and the pm subsystem, so just like ethernet,
enabling the cellular modem is up to the board configuration.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
18a865355a tests: build_all: modem: remove gsm_ppp from test suite
The deprecated gsm_ppp modem driver will be removed. Remove
gsm_ppp modem driver from build_all test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen
c8050e2a83 samples: net: Remove deprecated gsm_modem sample
The gsm_modem driver is deprecated, and will be removed. Remove
the gsm modem sample which depends on the deprecated driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Reto Schneider
f9dce2d87f drivers: hwinfo: Fix typo
Fixing than vs then.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-29 10:49:01 -07:00
Johan Carlsson
bc2aba157b drivers: uart_mcux_flexcomm: remove incorrect dma_slot.
a change in the dma driver exposed that the dma_slot was incorrectly
set in the uart driver. this change is needed for async uart on lpc55
to work.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-05-29 10:48:44 -07:00
Jukka Rissanen
48aaa1ff40 tests: net: ieee802154: Remove extra newlines from prints
As the logger will add newlines to printed strings, do not
add them in the tests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-29 10:48:34 -07:00
Jukka Rissanen
99693bee5f net: socket: Change the protocol field for AF_PACKET sockets
In order to be compatible with Linux AF_PACKET socket calls, the
protocol field needs to be in network byte order.
So for example, if user wants to receive all packets, then the
protocol field needs to be set as "htons(ETH_P_ALL)".
See Linux manual page at
https://www.man7.org/linux/man-pages/man7/packet.7.html
for details.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-29 10:48:34 -07:00
Nathan Olff
b58e242a52 sys: ignore ineffective bitwise and from clang-tidy
When running clang-tidy, an 'ineffective bitwise and operation' (type
misc-redundant-expression) was detected on Z_CBPRINTF_IS_PCHAR macro.

As this behavior is expected, we are adding comment to ignore this macro
for the specific misc-redundant-expression check of clang-tidy

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-05-29 10:48:27 -07:00
Nathan Olff
67c1661d65 sys: fix implicit conversion uint32 to uint8
When running clang-tidy and logging module is used through any of the
LOG_ macro, an issue was raised in Z_CBPRINTF_PACK_ARG2 macro.

A uint32_t variable was copied into a _rws_buffer array with an implicit
cast (error: implicit conversion loses integer precision: 'uint32_t'
(aka 'unsigned int') to 'uint8_t' (aka 'unsigned char')).

Here we are adding an explicit cast to get rid of the implicit
conversion error.

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-05-29 10:48:20 -07:00
Aleksander Wasaznik
c6ad4a7927 Bluetooth: samples: Switch to one-time adv
This patch removes all uses of the adv auto-resume feature in the
Bluetooth samples. The auto-resume feature is planned for deprecation.

Samples that are not intended to demonstrate a technique to do with
re-connection simply do not restart the advertiser, in interest of
simplicity. The user is expected to reboot the sample when needed.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-29 10:48:04 -07:00
Seppo Takalo
b76683e4cb net: lwm2m: Allow setting RD context without starting
When tests control the LwM2M client entirely through
shell, we should be able to set the RD client context
from the application without causing RD client to
start registration.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-29 10:47:57 -07:00
Juliane Schulze
90d8941b54 vcnl36825t: allow "force"-mode only if low-power mode is inactive
Behavior of "force"-mode as described in datasheet cannot be achieved if
low-power mode is enabled. After triggering a sampling, the sensor will
not sample again for the period specified in measurement-time.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-29 10:47:44 -07:00
Valerio Setti
979ede8889 test: net: socket: do not enable USE_PSA and all PSA features
This commit fixes #73337.

Before #72243 Mbed TLS was not using
USE_PSA and all PSA features were not enabled. After #72243
if BUILD_WITH_TFM is set:
- USE_PSA in Mbed TLS is enabled by default and
- all PSA features are enabled.

This commits reverts both changes for net.socket.register.tls
test case.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-29 10:47:37 -07:00
Kai Vehmanen
db00b813f0 soc: intel_adsp: tools: align code style in maps_regs()
Cosmetic change to align code style when initializing DSP registers. The
code in intel_is_ace() branch was moved as-is from acetool.py when the
two tools were merged to make reviewing easier. Fix the code style to be
coherent in the merged cavstool.py. No functional change.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-29 10:47:29 -07:00
Kai Vehmanen
44dd5a4da9 soc: intel_adsp: tools: fix ace20 fw load flow
Use the correct register to read ROM status on intel_adsp_ace20.

Without this this fix, firmware load is successful but
boot takes extra 2 seconds and following warning was emitted:

WARNING:cavs-fw:Load failed?  ROM_STATUS = 0x0

The log-only mode (-l) was not working at all and is fixed
by this commit.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-29 10:47:29 -07:00
Tomasz Moń
e136f02ea6 scripts: west_commands: runners: nrfutil: Only flash with J-Links
The nrfutil runner calls "nrfutil --json device list" which outputs
information about all connected serial ports. The list includes not only
actual boards but also any ttyACM instance. If the ttyACM instance does
not have serial number, then the nrfutil runner will fail on matching
serial number regexp on NoneType.

Fix the issue by limiting nrfutil runner board output to only devices
that have trait jlink set.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-29 08:31:01 -07:00
Gerard Marull-Paretas
47e14dbf82 drivers: clock_control: nrf_auxpll: add initial driver
Add a new driver for the AUXPLL peripheral found in some new Nordic
SoCs, e.g. nRF54H20. AUXPLL is used to clock some peripherals like e.g.
CAN. Note that driver is implemented natively as Nordic HAL lacks
definitions for the AUXPLL IP, this may be changed once these become
available.

Note that usage of nrf_auxpll_config_set generates unnecessary extra
assembly code compared to the proposed API in
https://github.com/zephyrproject-rtos/hal_nordic/pull/185 which
guarantees static initialization and single write access, possible in
the Zephyr context. However, current solution has been enforced until
further discussion on raw access APIs takes place.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-29 08:30:42 -07:00
Gerard Marull-Paretas
c0163e9362 manifest: update hal_nordic
So that we have access to AUXPLL HAL APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-29 08:30:42 -07:00
Gerard Marull-Paretas
8e46f3c656 dts: common: nordic: nrf54h20: add CANPLL
Define CANPLL, an AUXPLL IP instance used by the CAN IP. PLL settings
are hardcoded in SoC files, as this PLL should not be configured by the
application. It is meant to always run at 80 MHz.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-29 08:30:42 -07:00
Gerard Marull-Paretas
eaeebf12cd dts: bindings: clock: add nordic,nrf-auxpll
Add a new binding for the AUXPLL IP found in some new Nordic SoCs, e.g.
nRF54H20.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-29 08:30:42 -07:00
Gerard Marull-Paretas
b88a1f744a dts: common: nordic: nrf54h20: define hfxo
Define HFXO (High Frequency Crystal Oscillator). This clock is managed
by system controller, from an application point of view it is a fixed
clock.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-29 08:30:42 -07:00
Ajay Parida
91054be051 net: wifi: shell: Correction to connect command default case
For default case it should print the option character provided by user.
Extra shell_help removed as it's being called in the caller function.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida
e493d8c268 net: l2: wifi: Fix for typo
Typo: "RTS threashold" changed to "RTS threshold".

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida
76051bbf03 doc: release-notes: Configure BSS specific parameter
Added support to set BSS parameter.
Added support set BSS parameter maximum inactivity time.
Added support set BSS parameter inactivity poll feature.
Added support set BSS parameter maximum number of STA entries.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida
d4b22cd10e net: wifi_mgmt: Support to configure AP parameter max_num_sta
Support to set BSS parameter "max_num_sta" at compile and run time

Added support to configure `max_num_sta` BSS parameter.
Maximum number of stations allowed in station table. New stations will be
rejected after the station table is full.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida
bedd38ce65 net: wifi_mgmt: Support AP parameter configuration "Skip inactivity poll"
Support for configuration of AP parameter "Skip inactivity poll".
Only build time setting is supported.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida
c6d1a91372 net: wifi_mgmt: Support to configure AP mode parameter
Support to set BSS parameter at compile and run time.

Added support to configure `max_inactivity` BSS parameter.
Station inactivity timeout is the period for which AP may keep a client
in associated state while there is no traffic from that particular client.
If a non-zero value is set, AP may choose to disassociate the
client after the timeout.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida
180c22a4fc net: wifi: shell: Support to print name
Support to print name of the argument along with the value.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Marcin Niestroj
197a4b2f5f samples: net: http_get: fix typo in sections names in sample.yaml
Just do: s/sample.get/sample.net/.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-29 14:06:20 +02:00
Ren Chen
766a5ea574 drivers: udc: add IT82xx2 USB device controller driver
Add UDC driver for IT82xx2 SoC. This commit passes tests with
1. samples/subsys/usb/cdc_acm/
2. samples/subsys/usb/console/
3. The extend endpoint test with CDC ACM tool
4. USB suspend/resume detection

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-05-29 14:03:10 +02:00
Piotr Narajowski
20cb4c31ca bluetooth: tester: refactor CSIP btp command
Refactor CSIP btp commands by removing the 'count' parameter from
set_coordinator_lock and set_coordinator_release functions.
If we want to support lock/release procedure on subset of set members
in the future, 'count' param doesn't indicate a specific set member.
Instead, introduce 'address_count' and 'addr' array params, although their
usage is not yet implemented.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2024-05-29 14:02:33 +02:00
Alberto Escolar Piedras
b4d8b44d0f tests settings/file: Add missing overlay for native_sim//64
native_sim//64 is one of the allowed platforms
but lacks an overlay which causes the test to fail
to build.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-29 14:01:27 +02:00
Tomi Fontanilles
03d86fc7c7 boards: st: b_u585_iot02a: stick to RSA signature type in TF-M's MCUboot
The default has been changed to EC-P256, but there are issues with
this board when TF-M is compiled with MCUBOOT_USE_PSA_CRYPTO (required
by EC-P256) because of its integration in TF-M.
Do not enable PSA crypto on this board for the time being.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
6eccdb965a samples: psa_crypto: fix setting of TF-M's CRYPTO_ENGINE_BUF_SIZE
It used to be set as a CMake variable, but TF-M's build system does
not look at such a variable.
Instead, define an additional configuration header file that defines
CRYPTO_ENGINE_BUF_SIZE, and pass it to TF-M's build system.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
1eaa14090c modules: tf-m: support MCUboot signature types other than RSA-3072
With TF-M updated to 2.1.0 it now makes the signature type default
to EC-P256 for the mps2/an521/cpu0/ns board.
So far Zephyr had only supported and assumed that it was RSA-3072.

This brings support for other signature types, and changes the global
default to EC-P256.
The switch from RSA-3072 to EC-P256 reduces the flash usage by ~3.3KB
while having a negligible impact on RAM usage (increase of ~70 bytes)
when compiling the tfm_psa_test sample on mps2/an521/cpu0/ns and
nrf9160dk/nrf9160/ns without explicit optimizations.

The TFM_KEY_FILE_{S,NS} Kconfig options are moved inside an
`if TFM_BL2` as they are only used if MCUboot is included in TF-M.

The TF-M CMake variables MCUBOOT_KEY_{S,NS} are now set so that it's
possible to use signing keys located elsewhere than the default
location.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
c294069b7d modules: tf-m: restore check on CONFIG_TFM_PARTITION_INITIAL_ATTESTATION
Restore the check that was introduced in
cd8d4ccad5 and removed in
cac7f4058f, rather than checking only
CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION in the tfm_psa_test sample.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
925d2ca052 modules: tf-m: fix unused CMake variable warning
Define and pass down PSA_ARCH_TESTS_PATH only in the sample that
needs it (tfm_psa_test).
Otherwise, it provokes a CMake warning because the variable does not
get used in TF-M.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
a8ec15294f samples: tfm_psa_test: fix CMake logs
Remove TF-M version number and explicit mention of the available test
suites; one was missing.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
2c575190bb Revert "tf-m: Silence harmless version warning"
This reverts commit 33786b55ab.

Reverting it because the upstream PR has been abandoned, and
this extra CMake variable is causing the warning
"Manually-specified variables were not used by the project".

As of now the version warning doesn't come up.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
9ad1a7c8d2 modules: tf-m: disable tf-m-tests revision checks
Permanently disable the revision checks made in the tf-m-tests
repository that were introduced with TF-M 2.1.0.

They fail because the expected upstream tags are not found in Zephyr's
tf-m-tests.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Tomi Fontanilles
f451201228 manifest: trusted-firmware-m: update to 2.1.0
Update TF-M to version 2.1.0.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 04:56:40 -07:00
Chaitanya Tata
ef533e2144 tests: spi_loopback: Fix high RAM usage
Display diff of contents for large buffers is not quite helpful and
takes up huge RAM, and if a board has less RAM then this causes the test
module build failures.

So, disable display of diff and just log a failure, small buffer tests
can be used to debug such basic issues and large buffer tests can act as
a smoke test for debugging other issues. This saves about 80K of RAM.

Fixes #72792.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-05-29 12:03:50 +02:00
Jerzy Kasenberg
71ed2e4b02 drivers: spi: Add power management Smartbond SPI
Code adds pm action function that stores SPI configuration
before PD_COM is allowed to be turned off.

PM_DEVICE_RUNTIME scheme is also supported

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-29 12:03:29 +02:00
Johann Fischer
2f272b2d79 usb: device_next: fix BOS descriptor request
Return protocol error if bcdUSB is less than 0x0201. Fix typo in number
of capabilities.

Fixes: b0d7d70834 ("usb: device_next: add initial BOS support")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-29 12:03:12 +02:00
Tim Lin
d1ca30e8f7 ITE: drivers/pwm: Optimize the PWM set cycles
It takes 11 CPU ticks to recalculate ctr and cxcprs at the same frequency.
The previously calculated ctr and cxcprs can be stored at the same
frequency without recalculation.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-29 12:00:22 +02:00
Tomasz Moń
2368623f32 drivers: udc_dwc2: Avoid IN endpoint dequeue race
Flushing TxFIFO is racing with actual use of the TxFIFO. The software
controls only one side of the race (flush trigger) while the host
controls the other side. Therefore, locking interrupts before flushing
TxFIFO is not protecting against the race condition.

Disable the endpoint on dequeue to make sure that TxFIFO flushing won't
conflict with host actions (because the endpoint would be forced to NAK
the IN tokens before the TxFIFO is flushed).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-29 12:00:08 +02:00
Tomasz Moń
4db14f83e5 drivers: udc_dwc2: Fix timeouts when disabling endpoints
Do not set NAK bit again for endpoints that already have NAK bit set.
Do not wait for OUT endpoint 0 disable because it cannot be disabled by
application (DOEPCTL0 EPDis bit is Read-Only).

Disable endpoints before disabling interrupts because it is necessary to
handle RXFLVL interrupt (in Slave mode) for GOUTNAKEFF to become active.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-29 12:00:08 +02:00
Robert Lubos
63d4037e2f samples: net: Exclude native_posix when socket service lib is used
Socket service library uses eventfd, which does not work with
native_posix platform, hence need to exclude it from samples that now
rely on socket services.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-29 11:59:51 +02:00
Ioannis Karachalios
245c7db0da drivers: display: smartbond: Update PM policy
Since the display port should be enabled
by default and sleep is bound to the
blanking status, PM constraints should
be acquired at initialization.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-29 11:59:36 +02:00
Henrik Brix Andersen
88fb5e2edb drivers: can: shell: print device name in RX path
Include the device name when printing received CAN frames. This improves
the user experience when working with multiple CAN controllers via the CAN
shell.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-29 11:58:54 +02:00
Marcin Szymczyk
68c48cd116 tests: kernel: interrupt: account for table offset
When verifying sw_isr_table, take into account custom offset,
like `CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET` in some
RISC-V SoCs.

Relates to #71948 and #73232.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-29 11:58:44 +02:00
Marcin Szymczyk
e17b3fd884 arch: riscv: implement arch_irq_disconnect_dynamic
For SoC with `CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET`,
it should be taken into consideration when disconnecting IRQ.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-29 11:58:44 +02:00
Jakub Zymelka
ae0822d0bf tests: drivers: uart: Add nrf54l15/cpuflpr overlays to test scope
Adding a separate overlay for nrf54l15 flpr is required because
running tests on console uart fails.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-05-29 11:58:14 +02:00
Emil Gydesen
b1b61babec doc: Migration guide: Fix bad formatting for LE Audio
The two items for LE Audio had some formatting issues.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-29 11:57:58 +02:00
Ioannis Karachalios
c140053654 drivers: i2c: smartbond: Add support for PM
This commit should add all the functionality needed for the I2C
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-29 08:42:00 +02:00
Tom Burdick
054f453ea7 rtio: Callback chaining and testing
Callbacks were a bit neglected in terms of test coverage, especially
when used in chains. It was clear from the code that chained callbacks
may not actually work, and callback ordering then was hard to verify.
Test callbacks chained to transactions work as expected.

The test iodev had built up some cruft over time and in the process
showed a few bugs once callback chaining was fixed so the test iodev now
better matches typical iodev implementations at this point.

Cancellation testing now includes an added case for cancelling a the
second submission in the chain prior to calling submit noting that no
completions notifications should be given back for those.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-29 08:41:12 +02:00
Nicolas Pitre
99dcbdf933 drivers/timer/apic_timer: move to periodic mode
This driver is impossible to make time-accurate using single-shot
mode. Time accuracy may be obtained only by using periodic mode, meaning
it is not tickless capable either. Let's simplify the code by only
supporting periodic mode and strip out the TSC stuff. Any hardware with
TSC capability should now use the apic-tsc driver instead.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-29 08:40:43 +02:00
Nicolas Pitre
3c2e57c923 drivers/timer/apic_tsc: use ICR as a fallback timeout event source
This adds support for the local APIC in one-shot mode as the timeout
event source for those cases where the CPU supports invariant TSC but
no TSC deadline capability. It is presented as another timer choice.
Existing Kconfig symbols were preserved to minimize board config
disturbance.

This hybrid approach was implemented kind of backward in the apic_timer
driver but it is far cleaner to carry this here.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-29 08:40:43 +02:00
Nicolas Pitre
e34369ce31 drivers/timer/apic_tsc: move to common code pattern
Let's replicate a common code pattern for this to be abstracted more
easily in the future. In addition to duplicating the correctness fixes
implemented in the ARM and RISC-V drivers, this eliminates a couple large
runtime divisions.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-29 08:40:43 +02:00
Fin Maaß
7d5f2b6af3 doc: migration-guide-3.7: rename litex compatible
Mention the change of compatible of the
LiteX VexRiscV interrupt controller.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-29 08:40:11 +02:00
Fin Maaß
858f25ce39 maintainers: litex: add to maintainers
move the litex part of the codeowners
file over to maintainers and add me as
colaborator.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-29 08:40:11 +02:00
Fin Maaß
c8fda13b4c drivers: interrupt_controller: litex: add prefix
add litex prefix to its interupt controller.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-29 08:40:11 +02:00
Tomi Fontanilles
b9a7c18ce4 tests: mgmt: mcumgr: fs_mgmt_hash_supported: add unsupported platforms
- `stm32h745i_disco/stm32h745xx/m4` says "#error Flash driver on M4 core
  is not supported yet".
- `mpfs_icicle/polarfire/smp` fails in the compilation of the `spi_nor`
  flash driver.
- `cyw920829m2evk_02` fails to build because of undeclared
  `cyhal_nvm_*()` functions.

As a bonus, group the excluded platforms under the common part to
avoid repeating them.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 08:39:26 +02:00
Tomi Fontanilles
7669b58d9d samples: http_get: exclude native_posix in the CONFIG_POSIX_API=y build
CONFIG_POSIX_API depends on !CONFIG_NATIVE_APPLICATION, which is
incompatible with the native_posix platforms.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 08:39:26 +02:00
Tomi Fontanilles
3efdbe6c0c modules: mbedtls: rename CONFIG_MBEDTLS_MAC_*_ENABLED and rm duplicates
Remove the `_MAC` part because those Kconfig options enable only hash
algorithms, nothing MAC-related, and the `_ENABLED` part to align the
naming to the Mbed TLS defines (plus we don't need such a part).

As a bonus, enabling SHA-256 does not automatically enable SHA-224
anymore.

See the migration guide entries for more details on the practical
changes.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 08:39:26 +02:00
Yong Cong Sin
6e8d979336 arch: riscv: stacktrace: handle user threads
Handle user threads stack bound validation in
`in_stack_bound()` to get more accurate traces.

If `CONFIG_PMP_POWER_OF_TWO_ALIGNMENT` is enabled:

```
+------------+ <- thread.arch.priv_stack_start
| Guard      | } Z_RISCV_STACK_GUARD_SIZE
+------------+
| Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
+------------+ <- thread.arch.priv_stack_start +
                  CONFIG_PRIVILEGED_STACK_SIZE +
                  Z_RISCV_STACK_GUARD_SIZE
```

otherwise:

```
+------------+ <- thread.stack_obj
| Guard      | } Z_RISCV_STACK_GUARD_SIZE
+------------+
| Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
+------------+ <- thread.stack_info.start
| Thread     |
| stack      |
|            |
+............|
| TLS        | } thread.stack_info.delta
+------------+ <- thread.stack_info.start +
                  thread.stack_info.size
```

See: zephyr/include/zephyr/arch/riscv/arch.h

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-29 08:38:53 +02:00
Yong Cong Sin
602c993799 arch: riscv: stacktrace: fix cpuid type and optimize branch with compiler
Change the type of `cpu_id` to `uint8_t` since that is the type
of `arch_curr_cpu()->id`.

Instead of using precompiler switch (`#ifdef CONFIG_SMP`), use
if-else shorthand instead (`IS_ENABLED(CONFIG_SMP)`).

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-29 08:38:53 +02:00
Dominik Ermel
25138ff99c storeage/stream_flash: Cache write_block_size to ctx on init
The commit caches write_block_size and erase_value to stream flash
context, at init, to avoid calling Flash API multiple times
to get these values at various stages of code exectuion,
at run-time.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-29 07:35:19 +02:00
Ethan Lu
9baf77dd39 sensor: ms5837: fix compensate parameters for 30BA variant
The previous parameters seems wrong if we refer to:
https://www.te.com/usa-en/product-CAT-BLPS0017.html

Signed-off-by: Ethan Lu <ethan@cpdesign.com.au>
2024-05-29 07:34:51 +02:00
Fredrik Gihl
649d9d31af drivers: w1: Ensure DQ pin is both input and output.
Driver did not work on ESP32c3, by specifying pin to be output and
input solve the issue. Improve documentation, to highlight that driver
is requiring open-drain support.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-29 07:34:29 +02:00
Jeppe Odgaard
a9581c75d1 maintainers: add jeppenodgaard as sensor collaborator
Add myself as collaborator to help with sensor PRs.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-29 07:33:58 +02:00
Arkadiusz Cholewinski
5cfb4bd3f5 CI: Fix Coverage Analysis
The coverage_analysis.py while generating report, duplicates
files and functions of components.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-05-29 07:33:45 +02:00
Johann Fischer
0809b75b42 boards: remove test feature usb_cdc
This test feature is not required and was only used as a dependency in
the usb/console example. It is redundant since the sample already
depends on usb_device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-29 07:32:41 +02:00
Declan Snyder
ce7448b11e doc: migration-guilde-3.7: nxp,lptmr
List change to nxp,lptmr compatible in migration guide.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-29 07:32:25 +02:00
Declan Snyder
2cff570083 dts: nxp: Convert nxp,lptmr compats
Convert compats in tree from nxp,kinetis-lptmr to
nxp,lptmr string.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-29 07:32:25 +02:00
Declan Snyder
eae316ebc9 dts: bindings: Rename nxp,kinetis-lptmr compat
Rename nxp,kinetis-lptmr compat to nxp,lptmr.
Because of concerns over breaking downstream users,
keep support for the old compatible temporarily and
make it clear it should be changed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-29 07:32:25 +02:00
Pisit Sawangvonganan
75165050f7 drivers: gpio: remove '&' when assigning gpio_xxx_init function
Remove address-of operator ('&') when assigning `gpio_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/gpio`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-29 07:32:17 +02:00
Ravi Dondaputi
9e38bcc173 wifi: utils: Get correct channel count
When channel range is configured in scan params, get the
channel count from `chan_idx` instead of taking a difference
of start and end of the channel range. The `difference` method
fails in case of 5GHz band since channels may not be consecutive
numbers.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-05-29 07:32:09 +02:00
Margherita Milani
885d271e57 drivers: sensor: si7006: fix redundant include in si7006
Remove redundant include of `zephyr/logging/log.h` in si7006.c.

Signed-off-by: Margherita Milani <margherita.milani@amarulasolutions.com>
2024-05-29 07:31:53 +02:00
Daniel DeGrasse
0767fd97f8 sd: sd_ops: fix DISK_IOCTL_CTRL_SYNC return code
SD IOCTL handling for DISK_IOCTL_CTRL_SYNC was falling through to the
default return statement, and returning an error when disk sync
succeeded. Fix this issue by properly breaking in IOCTL handler.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-29 07:31:39 +02:00
Sadik Ozer
e31d66a183 boards: Add MAX32690EVKit board
Added MAX32690EVKit board
For more information about this board please check
https://www.analog.com/

MAX32690 has two core, Cortex-M4 and Risc-V.

Examples can be build by below command for cortex-m4

west build -b max32690evkit/max32690/m4 samples/hello_world

As a shorthand, the soc may be omitted from the build command and
keeping the corresponding forward slashes:

west build -b max32690evkit//m4 samples/hello_world

Co-authored-by: Jason Murphy <jason.murphy@analog.com>
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
d33d5b3a79 soc: Add the MAX32690 SoC
Added ADI MAX series soc, first partnumber is MAX32690
The family structure will be
ADI_MAX
  MAX32xxx
    MAX32655
      MAX32655EVKIT
      MAX32655FTHR
    MAX32666
      MAX32666FTHR
      MAX32666FTHR2
    MAX32690
      MAX32690EVKIT
  MAX78xxx
    MAX78000
    MAX78002
        ...

When MAX32 MCUs goes to sleep mode debugger could not access it
and flashing fails, ARM_ON_ENTER_CPU_IDLE_HOOK prevent
the CPU from actually entering sleep
by skipping the WFE/WFI instruction.
Due to ARM_ON_ENTER_CPU_IDLE_HOOK is not configurable at the user
space, added a config wrapper as MAX32_ON_ENTER_CPU_IDLE_HOOK.

If MAX32_ON_ENTER_CPU_IDLE_HOOK config being defined (default y)
devicei will not goes to sleep mode in idle state.

To disable it add below line in your configuration file
CONFIG_MAX32_ON_ENTER_CPU_IDLE_HOOK=n

MAX32690 has two core Cortex-M4 and Risc-V this commit adds M4 core
support.

Co-authored-by: Jason Murphy <jason.murphy@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
0480b2625b drivers: Add MAX32690 uart driver
UART driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
c121f405fe tests: drivers: gpio: Enable gpio driver tests for max32690evkit board
Enable gpio driver test for max32690evkit

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
d6e1753125 drivers: Add MAX32690 gpio driver
GPIO driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
f76256d2f1 drivers: Add MAX32690 pinctrl driver
Pincontrol driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
45df8963f1 drivers: Add MAX32690 clock control driver
Clock control for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
e0528e3852 MAINTAINERS: Add hal_adi as a new HAL module
This commit adds maintainers for hal_adi repository

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer
d7fe6e41d4 manifest: west.yml: Add ADI HAL as a new HAL module
ADI HAL (Hardware Abstraction Layer) provides
a low level peripheral configuration function.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Yong Cong Sin
3570408db5 build: namespace syscall sources to zephyr/
Namespace the `syscall_dispatch.c` & `syscall_export_llext.c`
to `zephyr/` as well

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Yong Cong Sin
0dac6c132b build: namespace autoconf.h with zephyr/
Namespace the generated `autoconf.h` file with `zephyr/`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Yong Cong Sin
2d912d52a0 doc: releases: add notes for namespaced generated headers
Add migration notes for generated headers being namespaced
to the `zephyr/` folder.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Yong Cong Sin
bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Tomasz Moń
d034106b40 usb: device: cdc_acm: Warn once about full ring buffer
Generating separate log entry at INFO level for every single character
dropped is excessive and leads to log flood. Logging dropped character
in no way helps end user and is really a delayed performance killer that
triggers when CDC ACM buffer gets full.

If user does not want to lose outgoing characters then the solution is
to enable hardware flow control which properly blocks in the case the
output buffer is full.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-28 18:58:55 +02:00
Tomasz Moń
20983c7ced usb: device_next: uac2: Fix integer handling issues
Fix integer handling issues found out by Coverity Scan.

Coverity-CID: 363729
Coverity-CID: 363737

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-28 18:58:25 +02:00
Xavier Ruppen
225e28bf35 drivers: ethernet: enc28j60: ESTAT TXABRT bit should be cleared on error
If the TXABRT bit from ESTAT is ever set (because of a single failed
transmission), the driver will continue showing an error on every
subsequent packet sent, although it is correctly sent:

	 <err> eth_enc28j60: TX failed!

The enc28j60 datasheet says under
"12.1.3 TRANSMIT ERROR INTERRUPT FLAG (TXERIF)":

	"After determining the problem and solution, the
	host controller should clear the LATECOL (if set) and
	TXABRT bits so that future aborts can be detected
	accurately."

Therefore, clear the TXABRT and LATECOL bits in case of transmission error.

Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
2024-05-28 18:57:58 +02:00
Alexander Kozhinov
bf77d74e91 usb: device: usb_descriptor.c
fix cbprintf_package warning.
cbprintf_package complains about char usage for %p
string argument and suggests void * usage.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-05-28 18:57:22 +02:00
Alexander Kozhinov
1c968a4a8f drivers: usb: device: fix cbprintf_package warning
cbprintf_package complains about char usage for %p
string argument and suggests void * usage.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-05-28 18:57:22 +02:00
Chris Wilson
b8131b7567 docs: modbus: Update PyModbus GitHub project URL
The PyModbus project changed the GitHub project URL from:

https://github.com/riptideio/pymodbus

to:

https://github.com/pymodbus-dev/pymodbus

Signed-off-by: Chris Wilson <chris@cgnd.dev>
2024-05-28 18:57:02 +02:00
Chris Wilson
8e026ba19e docs: modbus: Change pymodbus unit= parameter to slave=
The PyModbus project changed the `unit=` parameter to `slave=` in the
v3.3.0 release.

See https://pymodbus.readthedocs.io/en/latest/source/api_changes.html#api-changes-3-3-0

Signed-off-by: Chris Wilson <chris@cgnd.dev>
2024-05-28 18:57:02 +02:00
Chris Friedt
aa2b83d4ab clang-format: add array-for-each to correct formatting issues
The ARRAY_FOR_EACH() and ARRAY_FOR_EACH_PTR() macros were not
formatting correctly in vs code (and I would guess other
editors).

Add an entry to .clang-format so that the opening brace is on
the same line as the macro.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-28 18:56:24 +02:00
Ethan Duckett
d8fe0514f8 drivers: adc: ltc2451: Add ltc2451 default conversion speed
Adds default conversion speed as it isn't a required property

Signed-off-by: Ethan Duckett <ethan.duckett@brillpower.com>
2024-05-28 18:56:07 +02:00
Sebastian Głąb
89489d6e2d tests: drivers: counter: counter_nrf_rtc: Run test on nrf54h20
Add nrf54h20dk to platform allow list.
Overlay for tht target was already added.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-28 18:55:01 +02:00
Seppo Takalo
4049e17c62 net: lwm2m: Fix null dereference when post-write cb is set
When opaque resources have post-write callback set, but
the write is not a Block-Wise write, there is no block_ctx
and the code causes null pointer dereference when calculating
the offset of the data.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-28 18:54:31 +02:00
Adam Kondraciuk
2cd2d5fef3 tests: drivers: timer: grtc: Fix GRTC test
The `z_nrf_grtc_timer_get_ticks()` function converts system ticks
to GRTC ticks. It gets the current system tick to calculate an
absolute GRTC value. The same does the test function to provide
an argument to be converted. If the system tick occurs between those
`sys_clock_tick_get()` calls the `z_nrf_grtc_timer_get_ticks()` will
take into account the newer tick while the test estimate bases on
the old tick value. Due to that the maximum result error is 1 system
tick minus 1 GRTC tick which equals (`CYC_PER_TICK` - 1) for GRTC
ticks.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Adam Kondraciuk
cac0da313b drivers: timer: grtc: Update GRTC driver
This commit aligns the GRTC driver to changes introduced in
hal_nordic. Some of the features regarding GRTC sleep/wakeup
functionality has been modified and moved out to the nrfx
driver's code.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Adam Kondraciuk
b4047307fa drivers: timer: grtc: Fix ticks calculation for GRTC
Fixed calculation of GRTC ticks inside
`z_nrf_grtc_timer_get_ticks()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Rubin Gerritsen
ff80c0b926 Bluetooth: Host: Fix connection establishment upon RPA timeout
Before this commit, the following bugs were present:
- When `CONFIG_BT_FILTER_ACCEPT_LIST` was set, connection establishment
  was cancelled upon RPA timeout. This required the application
  to restart the initiator every RPA timeout.
- When `CONFIG_BT_FILTER_ACCEPT_LIST` was not set, the RPA was not updated
  while the initiator was running.

This commit unifies the RPA timeout handling for both these cases.
Upon RPA timeout the initiator is cancelled and restarted when
the controller raises the LE Connection Complete event.
The workqueue state is checked when restarting the initiator to prevent
it being restarted when the timeout is hit.

Corresponding test cases have been added to ensure that this
feature works.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-28 09:12:05 -07:00
Rubin Gerritsen
3ce106c620 Bluetooth: Host: Fix not clearing IDs and keys upon bt_disable()
Expectation: After calling `bt_disable()` it is possible to
use the Bluetooth APIs as if `bt_enable()` was never called.

This was not the case for `bt_id_create()`, it was not possible
to set the default identity. This prevented an application
developer to restart the stack as a different identity.

Keys also need to be cleared to avoid the following pattern:
1. Pair two devices
2. Central calls `bt_disable()` and `bt_enable()`.
   The central will now generate a new identity address.
3. Connect the two devices.
4. Re-establish encryption. Now the central will try to use
   the previously used keys. The procedure will fail
   because the peripheral does not have any keys associated
   with the new central address.

The API documentation is updated accordingly.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-28 09:11:52 -07:00
Simon Hein
a4b37c7947 MAINTAINERS: Add simhein to coding guidelines collaborators
Add myself to coding guidelines collaborators list
to aid in reviewing PRs and move topics forward
in that area.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-05-28 17:58:26 +02:00
Fin Maaß
c00288c37d doc: releases: add k_realloc()
add k_realloc() to the release notes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 17:55:12 +02:00
Fin Maaß
cd0c67f35a tests: kernel: add test for k_realloc
add test for k_realloc.

Co-authored-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 17:55:12 +02:00
Fin Maaß
8c37f14b98 tracing: add k_realloc trace
For `k_realloc` add tracing feature.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 17:55:12 +02:00
Fin Maaß
09eaa8757f kernel: implement k_realloc
implement k_realloc.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 17:55:12 +02:00
Jędrzej Ciupis
0a677ec31b CODEOWNERS: update codeowners
Update codeowner for nRF ieee802154 solutions.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-28 17:54:01 +02:00
Abderrahmane Jarmouni
39e472ffba include: drivers: gpio: fix gpio_dt_flags_t overflow
when GPIO_INT_WAKEUP flag is used in a DT gpios property
the gpio_dt_flags_t var that holds the flags overflows
Hence moving GPIO_INT_WAKEUP flag from bit 28 to bit 6

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-28 17:53:21 +02:00
Jukka Rissanen
96c26c2268 shell: backend: telnet: Rename write and read functions
Rename write() to telnet_write(), and read() to telnet_read() so
that if we enable CONFIG_POSIX_API, the compiler will not complain
about those two functions as they conflict with POSIX API ones.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-28 17:49:59 +02:00
Jukka Rissanen
6465e73825 tests: net: dns_resolve: Increase the number of socket descriptors
The test needs couple of more socket/file descriptors to work because
CONFIG_POSIX_API creates three more file descriptors namely the
stdin, stdout and stderr descriptors.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-28 17:49:59 +02:00
Jukka Rissanen
3f96a87d1c net: dns: Fix resolver debug print
Make sure that we are not trying to print NULL pointer string.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-28 17:49:59 +02:00
Jukka Rissanen
74f9a1c482 net: sockets_service: Add build check for using zephyr libc
Add checks to make sure that we are not trying to use the socket
service library with eventfd if CONFIG_POSIX_API is not set and if
using native_sim based board. The reason is that we should always
use zephyr libc based eventfd implementation instead of host libc one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-28 17:49:59 +02:00
Jukka Rissanen
aa458a279a Revert "net: sockets: Check eventfd errors better"
This reverts commit b56297bf16
because it is causing problems when using native_sim and not
having CONFIG_POSIX_API set.

The proper fix is to set CONFIG_POSIX_API when using eventfd
and native_sim so that picolibc is used instead of host libc.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-28 17:49:59 +02:00
Ioannis Damigos
4b40c11c42 smartbond_timer: Fix convertion of watchdog value to LP clock ticks
Fix convertion of watchdog value to LP clock ticks

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-28 17:49:29 +02:00
Robert Lubos
87bacf378d net: l2: ethernet: arp: Fix ARP probe target HW address matching
According to RFC3927 and RFC5227, an ARP probe target HW address should
be set to all-zeroes:

"The 'target hardware address' field is ignored and
SHOULD be set to all zeroes."

Hence, we should allow the ARP probes to have all-zeroes target HW
address as well.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-28 17:49:03 +02:00
Mark Wang
5a8652b0c2 tests: bluetooth: shell: test a2dp on mimxrt1060_evk + murata 1xk
add the mimxrt1060_evk hci uart overlay file.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-05-28 12:56:42 +02:00
Mark Wang
c56183529c tests: bluetooth: shell: add a2dp shell test
implement the current a2dp APIs test.
update the document.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-05-28 12:56:42 +02:00
Mark Wang
bdca41d0bf Bluetooth: A2DP: Implement the a2dp and avdtp
implement a2dp.c and avdtp.c
add a2dp related Kconfig:
BT_AVDTP_RTP_VERSION, BT_A2DP_SOURCE and BT_A2DP_SINK
a2dp_codec_sbc.c/h are used to provide some APIs to get
A2DP SBC codec information. (like: channel num).

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-05-28 12:56:42 +02:00
Michał Szprejda
7c084b6649 West: Add west robot command
Introduce `robot` command for running Robot Framework test suites.
Initial implementation consists of one runner dedicated for renode-test,
which is a Renode wrapper for running Robot tests.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
2024-05-28 12:54:52 +02:00
Michał Szprejda
80900cbc3b West: Add west simulate command
Introduce `simulate `command for running samples on a simulator of
choice. Initial implementation consists of one runner, dedicated for
Renode.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
2024-05-28 12:54:52 +02:00
Michał Szprejda
f155ff596c West: runners: Add explicit capabilities
Add explicit capabilities to nios2, nsim and openocd runners to prevent
them from having potentially unwanted ones (for example when new
capabilities are added to Zephyr).

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
2024-05-28 12:54:52 +02:00
Michał Szprejda
73b73c91f4 West: Add option to supress elf/bin/hex file params
Add capability allowing to suppress the --file parameters that can be
passed to a west command runner.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
2024-05-28 12:54:52 +02:00
Michał Szprejda
959ea1a172 resc: cmake: robot: Rename Renode variable
Rename Renode variable used to store the .elf file path from `bin` to
`elf` for consistency.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
2024-05-28 12:54:52 +02:00
Michał Szprejda
7bc9a98a70 Twister: Rework integration with renode-test
Initial integration with renode-test was introduced in commit bdf02ff,
which added support for calling the `renode-test` command from both west
and twister.

This commit removes the custom run_renode_test target used for running
Robot tests with the `west build` command and makes twister call
`renode-test` directly instead.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
2024-05-28 12:54:52 +02:00
Emil Gydesen
0b654c1502 Bluetooth: BAP: Fix conn checks for bcast assistant notifications
The notify handle in the BAP broadcast assistant did not handle
conn == NULL properly, and neither did delayed_bap_read_handler.

Add better NULL checks, which also fixes a coverity issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-28 12:53:48 +02:00
Jordan Yates
ed1c78ec15 boards: thingy53: define ADC channel for battery
Define the ADC channel for battery monitoring so that `voltage-divider`
driver works.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-28 12:51:31 +02:00
IBEN EL HADJ MESSAOUD Marwa
fdd6627df9 drivers: i2s: i2s_ll_stm32: tx_stream_disable: Add busy wait
Add a k_busy_wait to the function tx_stream_disable
to be able to complete the drain of the TX queue before disabling.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Franck Thebault
c27ed31eb3 drivers: i2s : correct TRIGGER_DRAIN and TRIGGER_STOP commands
Correction of the handling of Tx audio samples via DMA

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa
f3004dc671 drivers: i2s: Add DMA busy function
Add the function ll_func_i2s_dma_busy to be able to check the
transmission of all the DMA TX packet.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa
6cef92a908 drivers: dma: u5: fix dma reload
In dma_stm32_reload, the size is the number of bytes and not number
of elements.

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa
f000e1a58a drivers: i2s : enable rx path for H7 and H5
In i2s_stm32_isr, remove the errors from SR register
   i2s_stm32_configure, enable the rx path for H7 I2S compatible IP

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa
343f2842bd include: zephyr: dt-bindings: dma: Add flag STM32_DMA_16BITS
Add flag STM32_DMA_16BITS as a combination of
STM32_DMA_PERIPH_16BITS and STM32_DMA_MEM_16BITS

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Franck Thebault
c12cfb247d tests: drivers: i2s: speed: add stm32h5 support
Test on STM32H573i disco board , only the Tx transfer is ok.

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Franck Thebault
69dc875243 dts: arm: st: h5: add I2S nodes
Addition of I2S nodes

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Ioannis Karachalios
d4209ab6c4 drivers: dma: smartbond: Add support for PM
This commit should add all the functionality needed for the DMA
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-28 12:49:46 +02:00
alperen sener
0b220dd6a6 bluetooth: mesh: increase the friend adv latency range
Increasing the adv latency range to the minimum valid
ReceiveDelay value, 10ms. 4ms might be small for some
target systems.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-05-28 10:08:47 +02:00
Krzysztof Chruściński
4a61fa32f0 tests: drivers: gpio: gpio_basic_api: Add nrf54h20dk overlays
Add overlays for nrf54h20dk_nrf54h20 cpuapp and cpurad.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-28 10:08:09 +02:00
Krzysztof Chruściński
1f563b7821 modules: hal_nordic: Add NRFX_GPIOTE130_CHANNELS_USED mask
On SoC like nrf54h20 GPIOTE channels are split between cores. They
are reserved at compile time in devicetree. We need to ensure that
dynamically allocated channels are used only from pool assigned to
the given core. This is done using NRFX_GPIOTE130_CHANNELS_USED mask
which contains data from the device tree.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-28 10:08:09 +02:00
Hess Nathan
20b55425d3 coding guidelines: comply with MISRA Rule 13.4
avoid the direct use of assignment expression
values for conditions

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-28 10:07:31 +02:00
Bjarki Arge Andreasen
51bcc5d20d drivers: gnss: LCX6G use modem chat runtime API
Update the Quectel LCX6G device driver to use the modem chat
runtime API to modify the dynamic pair chat script.

This change makes the driver safer and more readible by
ensuring safe modification of the members of the modem chat
structures.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Bjarki Arge Andreasen
000784b91d modem: chat: Add runtime APIs for chat scripts
Add runtime APIs for chat scripts.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Bjarki Arge Andreasen
2a575a6bf5 modem: chat: Add runtime API to modem_chat_script_chat
Add APIs allowing for modifying the modem_chat_script_chat
safely at runtime.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Bjarki Arge Andreasen
8b4822861b modem: chat: Add runtime API to modem chat matches
Add APIs for changing the contents of modem chat matches
safely at runtime.

This allows for reusing a single modem_chat_match at the cost
of placing the match and its buffers in RAM.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Yong Cong Sin
ab8c0dd3c0 tests: drivers: build_all: gpio: fix efinix_sapphire indentation
Fix indentation of the `efinix_sapphire.overlay`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 09:59:20 +02:00
Yong Cong Sin
af450ea3cc drivers: gpio: add Broadcom iProc GPIO controller driver
Add device driver, bindings and build-only test for
Broadcom iProc GPIO controller.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 09:59:20 +02:00
Yong Cong Sin
97ba7fd48d drivers: i2c: add Broadcom iProc I2C driver
Add device driver, bindings and build-only test for
Broadcom iProc I2C.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 09:57:40 +02:00
Fin Maaß
cefbcc5323 drivers: i2c: i2c_sbcon: use frequency from device tree
use the clock frequency from the device tree.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Fin Maaß
dd1f9c346d drivers: i2c: litex: add get_config and recover_bus
add get_config and recover_bus for the litex i2c driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Fin Maaß
2be9ed7103 drivers: i2c: litex: use frequency from device tree
use the clock frequency from the device tree.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Fin Maaß
dd897b51e0 drivers: i2c: i2c_sbcon: add get_config and recover_bus
add get_config and recover_bus for the sbcon i2c driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Fin Maaß
e7a088b467 drivers: i2c: gpio: add get_config
add get_config for the gpio i2c driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Fin Maaß
b4e81054f2 drivers: i2c: bitbang: add get_config
add get_config for the i2c bitbang driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Emil Gydesen
a66672885d samples: Bluetooth: Audio: Add missing board/conf
Add missing configuration files for the nRF5340DK
and missing configuration values for the unicast
samples w.r.t. buffer sizes and encryption.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-28 09:55:30 +02:00
Omkar Kulkarni
771afc34a5 gitignore: Ignore myresults.xml files
These files are created as a result of local babblesim test runs
and can be safely ignored.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-05-28 09:54:51 +02:00
Chris LaFlash
e94adf1e2b drivers: crypto: stm32: AES CTR IV is 16bytes
AES-CTR IV is the same as the block size 128-bits(16 bytes)
 regardless of key size.

Signed-off-by: Chris LaFlash <chris-github@laflash.com>
2024-05-28 09:54:30 +02:00
Alvis Sun
fec0aaa80e drivers: i3c: npcx: update ibi error handling
1. Emit stop when not in the correct state and unsupported ibi type.
2. For IBI(MDB), ignore the callback when target not in the
   device tree list.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-05-28 09:54:03 +02:00
Alvis Sun
03580e4a1b drivers: i3c: npcx: add HDR-DDR mode for transfer
1. Support HDR-DDR DMA transfer.
2. Remove polling mode in transfer.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-05-28 09:54:03 +02:00
Alvis Sun
4cec19952f drivers: i3c: add hdr command code for i3c_msg
Support 128 possible write and read commands for
HDR-DDR, HDR-TSP and HDR-TSL.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-05-28 09:54:03 +02:00
Erwan Gouriou
8cd8e53faf drivers: ethernet: stm32: Remove deprecated API support on impacted series
In release V3.3 new STM32Cube HAL ethernet API was added to STM32 ethernet
driver for STM32F4, STM32F7 and STM32H7 series. At the same time, the
legacy API was deprecated for these series.
I'm now fully removing the legacy API support for these series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-05-28 09:52:20 +02:00
Pisit Sawangvonganan
f503b7a26d drivers: serial: stm32: replace config parameter with usart
Updated function parameters from `const struct uart_stm32_config *config`
to `USART_TypeDef *usart`. This change reduces the level of pointer
indirection, which minimizes repeated dereferencing and helps reduce
the overall code size.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-28 09:49:09 +02:00
Pisit Sawangvonganan
86e0fe13e1 drivers: serial: stm32: reduce pointer level from config->usart to usart
This change reduces the level of pointer indirection, which minimizes
repeated dereferencing and helps reduce the overall code size.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-28 09:49:09 +02:00
Fin Maaß
49399ec48c dts: litex: add node label for cpu
This adds a node label for the cpu.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:48:06 +02:00
Konrad Derda
3da35039ce net: ipv6: scope checking function fix
Change the implementation of net_ipv6_is_addr_mcast_scope() inline
function that let us check if a given IPv6 address has a specified
scope. Previously, it was comparing the whole byte including flags
of a multicast address. It meant, that while checking for a specific
scope a one was also checking the flags. Even in Zephyr's net stack
there are checks for a IPv6 link local scope that are failing for
addresses that are not marked as "well known" (when least significant
bit of the flags is set).

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-05-28 09:47:14 +02:00
Glenn Andrews
a70bf0e488 modules: lvgl: Fix inverting x/y if screen is rotated
https://github.com/zephyrproject-rtos/zephyr/pull/70541 has an
issue where if the screen has been rotated, values calculated if
invert-x or invert-y are set will be overwritten.

This breaks the adafruit_2_8_tft_touch_v2 touchscreen as the
display is rotated by 90 degrees but uses invert-x and invert-y.

This change makes the invert-x and invert-y options independent
of screen rotation.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-05-27 12:30:05 -07:00
Andrzej Głąbek
7abb9d7593 drivers: watchdog: Allow WDT_DISABLE_AT_BOOT only when supported
Introduce a hidden Kconfig option named HAS_WDT_DISABLE_AT_BOOT and
allow users to enable WDT_DISABLE_AT_BOOT only when that hidden option
is selected by a watchdog driver, i.e. disabling at boot is supported.
Select this new hidden option for all existing watchdog drivers that
refer to WDT_DISABLE_AT_BOOT.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-27 08:40:16 -07:00
Jungo Lin
fa716d9842 shell: fix index out bound issue
In order to prevent index out of bounds access of the sh->ctx->cmd_buff
array when sh->ctx->cmd_buff_pos is 0, it has been added a check for the
value of sh->ctx->cmd_buff_pos.

This ensures that the array will not be accessed beyond its boundaries.

Signed-off-by: Jungo Lin <jungolin.tw@gmail.com>
2024-05-27 08:16:36 -07:00
Pisit Sawangvonganan
512c18393a drivers: clock_control: stm32: clean up unnecessary code
This commit removes unnecessary initialization of the local variable
where its value is guaranteed to be overwritten by subsequent operations.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-27 08:16:30 -07:00
Pisit Sawangvonganan
37466ac887 drivers: clock_control: stm32: fix typo
Use a code spell-checking tool to scan and correct spelling errors in
the following files:
- clock_stm32_ll_common.c
- clock_stm32_ll_h5.c
- clock_stm32_ll_h7.c
- clock_stm32_ll_u5.c
- clock_stm32_ll_wba.c

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-27 08:16:30 -07:00
Jordan Yates
251ddf0ab5 net: l2: ethernet: arp: improve debug output
Improve the ARP debug output by printing:
 * Sending ARP query
 * Queuing packets due to pending ARP query
 * Receiving ARP query response

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-27 08:16:22 -07:00
Erwan Gouriou
8b41f3bebb west.yml: hal_stm32: Don't include legacy headers anymore
We're not supposed to rely on symbols provided by these files.
In case it is required stm32 zephyr code base should be updated rather
than relying on legacy definitions.

Additionally:
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/70136

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-05-27 08:16:16 -07:00
Kai Vehmanen
fa798ce2d5 soc: intel_adsp: only implement FW_STATUS boot protocol for cavs
The software protocol to write status value of 0x05 (FW_ENTERED)
into memory window 0 at Zephyr boot, is not needed in the ace1.x
boot flow and does not match the semantics host systems are expecting
at this location in the memory window (e.g. write of 0x05 is not
expected).

Make this logic specific to intel_adsp_cavs platforms and move the code
out from common intel_adsp code.

This commit depends on update to cavstool.py to use correct
ROM status register to observe boot state.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-27 08:16:10 -07:00
Kai Vehmanen
8fc76f1b6d soc: intel_adsp: tools: improve FW boot handling on ace1.x
Starting with ace1.x, the boot status is no longer reported by
the boot ROM in the SRAM status window as it was done in older
platforms. The current cavstool.py code works on these newer platforms,
as Zephyr soc bootcode writes to same location, but this is not
the recommended boot flow.

Modify boot flow to use a dedicated register to observe boot
state. This change improves usability of cavstool.py on ace1.x
platforms as:
 - it is possible to start cavstool.py (e.g. in log-only or shell mode)
   while DSP has been already been booted, but is currently in
   low-power mode (and SRAM window is not accessible from host)
 - more reliable boot and better error reporting as actual ROM
   status is observed

Furthermore, this change allows to remove the memory window
writes from Zephyr intel_adsp boot_complete(). This IPC interface
is application and IPC revision specific and the write should not
be done in generic Zephyr SoC code. However, to keep cavstool.py
working, the tool has to be updated first.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-27 08:16:10 -07:00
Erwan Gouriou
101f791994 soc: stm32: common: Fix proprocessor if/else flow
No reason to be more complex than it should be.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-05-27 08:15:59 -07:00
Erwan Gouriou
0620cd9912 soc: stm32: common: Fix Kconfig symbol usage
These symbols don't exist.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-05-27 08:15:59 -07:00
Noah Pendleton
3b0a7dedb0 samples: sensors: nucleo_f756zg added to die_temp_polling
Added board overlay file to permit internal temperature sensor testing:

- `nucleo_f756zg`

Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
2024-05-27 08:15:53 -07:00
Marcin Szymczyk
8999446ab8 tests: kernel: gen_isr_table: add support for nRF54L15 FLPR
Align testcase to nRF54L15 FLPR.
Follow up of #71948.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-27 08:15:46 -07:00
Reto Schneider
58cb4557f0 net: ppp: Optimize memory allocation
net_pkt_alloc_buffer() deducts the free space from the requested number
of bytes.

As ppp_save_byte() calls net_pkt_alloc_buffer() when the packet has one
byte available still, this causes all but the first net_buf in the
packet to be of size CONFIG_NET_BUF_DATA_SIZE - 1.

Consequences:
 - With CONFIG_NET_BUF_FIXED_DATA_SIZE enabled, one byte per net_buf
   gets wasted.
 - CONFIG_NET_BUF_DATA_SIZE has typically an even, likely even a power
   of two value. Using exactly one byte less per buffer causes
   operations that require aligned memory (e.g. DMA) to become
   inefficient or to not work at all.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-27 08:15:36 -07:00
Johan Hedberg
641b77b740 Bluetooth: samples: hci_ipc: Fix incorrect NULL pointer check
The condition was the inverse of what it should have been, leading to an
inevitable NULL pointer dereference later.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-27 08:15:28 -07:00
Karol Lasończyk
64de50f052 manifest: Update hal_nordic
Adds 8bit support in SAADC hal.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-05-27 06:29:20 -07:00
Torsten Rasmussen
2b427f19d5 sysbuild: add support for APPLICATION_CONFIG_DIR in sysbuild
APPLICATION_CONFIG_DIR is supported in Zephyr and allows to adjust the
location from which prj.conf and friends are picked up.

This also works for images when using sysbuild, however sysbuild itself
ignores the value of APPLICATION_CONFIG_DIR, meaning that sysbuild only
accepts sysbuild.conf located directly in the sample folder.

Extend sysbuild to support APPLICATION_CONFIG_DIR so sysbuild follows
regular Zephyr CMake behavior.

Introduce SB_APPLICATION_CONFIG_DIR to allow changing the location
for sysbuild only, without propagating the value to images.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-27 14:05:38 +01:00
Torsten Rasmussen
fc1884ecf5 sysbuild: support sysbuild/CMakeLists.txt as entry point for samples
This commit refactors sysbuild entry code by creating a CMake sysbuild
module for image processing and place sysbuild entry code in a
<app>/sysbuild/CMakeLists.txt file.

A template/CMakeLists.txt file will be use as template for applications
which doesn't provide their own entry file.

An application may create a sysbuild/CMakeLists.txt file.
The sysbuild/CMakeLists.txt file is similar in nature to the
toplevel CMakeLists.txt file but intended to used by sysbuild.
This allows application developers to adjust how an application is
built with sysbuild.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-27 14:05:38 +01:00
Torsten Rasmussen
e65c6328ce sysbuild: use ARGN instead of ARGV1
Use of ARGV1 is undefined when number of arguments to function is less
than 2. Therefore switch to ARGN which holds arguments beyond required
arguments.
If there are no optional arguments, then ARGN is just an empty list,
thus making it safe to use.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-27 14:05:38 +01:00
Marcin Szymczyk
809c6c34d3 tests: drivers: timer: nrf_grtc_timer: add nRF54L15 FLPR to targets
Allow testing FLPR with this testcase.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-27 14:04:46 +01:00
Tomasz Moń
c30ac4dfd8 usb: device_next: CDC ACM: Process TX on configuration enable
If CDC ACM uart side has TX enabled when the configuration gets enabled,
depending on fifo state following has to happen:
  * if the fifo is empty - trigger TX ready interrupt
  * if the fifo is not empty - queue TX data on IN endpoint

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-27 14:04:35 +01:00
Tomasz Moń
1784446c8d usb: device_next: Fix string descriptors response
Commit 2f31ee63b5 ("usb: device_next: convert ASCII7 strings to
UTF16LE on the fly") made string descriptors respond with twice as much
of the actual string data.

Fix the issue by taking into account that USB string descriptor length
is already multiplied by two. Additionally, make it possible to return
odd number of bytes if host requested so.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-27 14:04:26 +01:00
Joakim Andersson
3ad57e3030 drivers: spi_bitbang: Fix timing in SPI bitbang driver
Fix timing in SPI bitbang driver.
The issue occurs with CPHA=1 when the input data is changed immediately
after the clock shift on the last bit of the read.
Because we read the input bit after changing the clock, this bit
becomes invalid.
Instead of doing wait, clock-change, read. Do wait, read, clock-change.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-05-27 05:42:26 -07:00
Andries Kruithof
3122296e1c Bluetooth: CAP: fix bug in reception start
The wrong number of subgroups was used in copying subgroups

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-05-27 05:01:49 -07:00
Jukka Rissanen
2a16f4d2bc net: dns: responder: No need to double the socket count
The socket allocation count was incorrectly calculated as
we have only one socket per listened port.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Jukka Rissanen
ee6805d3e0 net: dns: resolver: No need to double the socket count
The socket allocation count was incorrectly calculated as
we have only one socket per DNS server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Jukka Rissanen
631c0a3aab net: doc: socket_select.h: Document zsock_fd_set
This fix avoids this warning:

WARNING:root:Unused expression: \
  .*Duplicate C declaration.*\n.*'\.\. c:.*:: zsock_fd_set'.*

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Jukka Rissanen
81a3d764a0 doc: migration-guide-3.7: Add info for DNS resolver and responder
Add information about DNS resolver and mDNS/LLMNR responders
which are converted to use the socket services API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Jukka Rissanen
5248657f57 tests: net: dns_resolve: Fix resolver tests
The compilation was failing if IPv4 was disabled.
Also fix the IPv6 test so that they pass properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Jukka Rissanen
ecda6b190f net: dns: The DNS_EAI_ALLDONE is not an error
If DNS_EAI_ALLDONE is returned, it indicates that the request
was done and should not be considered an error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Flavio Ceolin
08417b4d73 doc: security/etsi: Provision 5.9.2 assessment
Add self-assessment for provision 5.9.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
9d3222c7cb doc: security/etsi: Provision 5.9.3 assessment
Add self-assessment for provision 5.9.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
8fbf094c4e doc: security/etsi: Provision 5.9.1 assessment
Add self-assessment for provision 5.9.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
124b7af27b doc: security/etsi: Provision 5.5.7 assessment
Add self-assessment for provision 5.5.7

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
8000ed1791 doc: security/etsi: Provision 5.5.6 assessment
Add self-assessment for provision 5.5.6

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
dcb8da2b00 doc: security/etsi: Provision 5.1.5 assessment
Add self-assessment for provision 5.1.5

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
fd95061364 doc: security/etsi: Provision 5.5.6 assessment
Add self-assessment for provision 5.5.6

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
3139ca8f30 doc: security/etsi: Provision 5.5.8 assessment
Add self-assessment for provision 5.5.8

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
d3f49786a2 doc: security/etsi: Provision 5.6.2 assessment
Add self-assessment for provision 5.6.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
b236cf2514 doc: security/etsi: Provision 5.5.4 assessment
Add self-assessment for provision 5.5.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
efa89c4f01 doc: security/etsi: Provision 5.5.3 assessment
Add self-assessment for provision 5.5.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
142a824678 doc: security/etsi: Provision 5.5.2 assessment
Add self-assessment for provision 5.5.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
cc19047cbd doc: security/etsi: Provision 5.5.1 assessment
Add self-assessment for provision 5.5.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
d0a0877a00 doc: security/etsi: Provision 5.4.4 assessment
Add self-assessment for provision 5.4.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
e5398174d3 doc: security/etsi: Provision 5.4.3 assessment
Add self-assessment for provision 5.4.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
0af7ecbfe9 doc: security/etsi: Provision 5.4.2 assessment
Add self-assessment for provision 5.4.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
c1fa0552a9 doc: security/etsi: Provision 5.3.11 assessment
Add self-assessment for provision 5.3.11

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
3e1252d61c doc: security/etsi: Provision 5.3.8 assessment
Add self-assessment for provision 5.3.8

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
ac0d3a72fc doc: security/etsi: Provision 5.8.2 assessment
Add self-assessment for provision 5.8.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
81c2e43677 doc: security/etsi: Provision 5.8.3 assessment
Add self-assessment for provision 5.8.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
bd58b625d6 doc: security/etsi: Provision 5.6.7 assessment
Add self-assessment for provision 5.6.7

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
431ae0e4ed doc: security/etsi: Provision 5.6.5 assessment
Add self-assessment for provision 5.6.5

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
a0b9c513bc doc: security/etsi: Provision 5.6.3 assessment
Add self-assessment for provision 5.6.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
99a6e790ec doc: security/etsi: Provision 5.6.1 assessment
Add self-assessment for provision 5.6.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
5974e1711a doc: security/etsi: Provision 5.3.9 assessment
Add self-assessment for provision 5.3.9

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
26f574c082 doc: security/etsi: Provision 5.3.7 assessment
Add self-assessment for provision 5.3.7

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
ed2d429e7c doc: security/etsi: Provision 5.3.2 assessment
Add self-assessment for provision 5.3.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
255aa4a920 doc: security/etsi: Provision 5.3.1 assessment
Add self-assessment for provision 5.3.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
e285c4c106 doc: security/etsi: Provision 5.7.1 assessment
Add self-assessment for provision 5.7.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
dbd110dd0a doc: security/etsi: Provision 5.6.6 assessment
Add self-assessment for provision 5.6.6

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
058d2eba2c doc: security/etsi: Provision 5.4.1 assessment
Add self-assessment for provision 5.4.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
18403137c8 doc: security/etsi: Provision 5.3.16 assessment
Add self-assessment for provision 5.3.16

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
9ad25f66da doc: security/etsi: Provision 5.3.12 assessment
Add self-assessment for provision 5.3.12

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
abf6c4fce9 doc: security/etsi: Provision 5.3.15 assessment
Add self-assessment for provision 5.3.15

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
1154bc0092 doc: security/etsi: Provision 5.3.14 assessment
Add self-assessment for provision 5.3.14

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
f68413aa86 doc: security/etsi: Provision 5.6.4 assessment
Add self-assessment for provision 5.6.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
96becc41e5 doc: security/etsi: Provision 5.6.8 assessment
Add self-assessment for provision 5.6.8

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
38fc1cb008 doc: security/etsi: Provision 5.7.2 assessment
Add self-assessment for provision 5.7.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
57580c4d38 doc: security/etsi: Provision 5.11.1 assessment
Add self-assessment for provision 5.11.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
7a7c1c3a2b doc: security/etsi: Provision 5.3.13 assessment
Add self-assessment for provision 5.3.13

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
3c8fa43b57 doc: security/etsi: Provision 5.3.10 assessment
Add self-assessment for provision 5.3.10

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
6259e92147 doc: security/etsi: Provision 5.2.3 assessment
Add self-assessment for provision 5.2.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
6d5cc9731a doc: security/etsi: Provision 5.1.3 assessment
Add self-assessment for provision 5.1.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
c3319de966 doc: security/etsi: Provision 5.1.4 assessment
Add self-assessment for provision 5.1.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
ba2717ef85 doc: security/etsi: Provision 5.1.1 assessment
Add self-assessment for provision 5.1.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
7bb89fd029 doc: security/etsi: Provision 5.6.9 assessment
Add self-assessment for provision 5.6.9

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
82e8ab2218 doc: security/etsi: Provision 5.8.1 assessment
Add self-assessment for provision 5.8.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
738b7020ed doc: security/etsi: Provision 5.11.2 assessment
Add self-assessment for provision 5.11.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
058b5732d8 doc: security/etsi: Provision 5.10.1 assessment
Add self-assessment for provision 5.10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
fded16b396 doc: security/etsi: Provision 5.11.4 assessment
Add self-assessment for provision 5.11.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
d7d29690cd doc: security/etsi: Provision 5.11.3 assessment
Add self-assessment for provision 5.11.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
e227a6133a doc: security/etsi: Provision 5.12.1 assessment
Add self-assessment for provision 5.12.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
235b2c93ee doc: security/etsi: Provision 5.12.3 assessment
Add self-assessment for provision 5.12.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
0017c59235 doc: security/etsi: Provision 5.12.2 assessment
Add self-assessment for provision 5.12.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
53ff81038e doc: security/etsi: Provision 5.13.1 assessment
Add self-assessment for provision 5.13.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
b9b0e61f3c doc: security/etsi: Provision 6.1.1 assessment
Add self-assessment for provision 6.1.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
1e763b4d8b doc: security/etsi: Provision 6.1.2 assessment
Add self-assessment for provision 6.1.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
defa4bdc4d doc: security/etsi: Provision 6.1.3 assessment
Add self-assessment for provision 6.1.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
db032226b5 doc: security/etsi: Provision 6.1.5 assessment
Add self-assessment for provision 6.1.5

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
7fc502389d doc: security/etsi: Provision 6.1.4 assessment
Add self-assessment for provision 6.1.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
74d192f8b6 doc: security/etsi: Provision 5.3.6 assessment
Add self-assessment for provision 5.3.6

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
a81591d3ec doc: security/etsi: Provision 5.3.5 assessment
Add self-assessment for provision 5.3.5

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
b170943d9f doc: security/etsi: Provision 5.3.3 assessment
Add self-assessment for provision 5.3.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
5ac871b077 doc: security/etsi: Provision 5.3.4 assessment
Add self-assessment for provision 5.3.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
3abc5da089 doc: security/etsi: Provision 5.1.2 assessment
Add self-assessment for provision 5.1.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
da255c3e3d doc: security/etsi: Provision 5.2.2 assessment
Add self-assessment for provision 5.2.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
2c3e1a3047 doc: security/etsi: Provision 5.2.1 assessment
Add self-assessment for provision 5.2.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Flavio Ceolin
8d446d345b doc: security: Add ETSI 303 645 standard
Add a new section for standards with ETSI 303-645 in
the security related documentation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 03:40:32 -07:00
Jonathan Rico
ea41a24d3a Bluetooth: tests: fix double-registering of callbacks
This was the source of assert failures.
If only they were enabled in the first place...

The issue is that in order to save on build time, these two tests build
only one image, from which two devices are
instantiated (`gatt_client_test.c` and `gatt_server_test.c`).

The double-registration happens as `BT_CONN_CB_DEFINE()` is build-time, and
is included in two files of the same image. Then _both_ images will end up
with both `connected()` `disconnected()` etc callbacks, which have logic
specific to their respective images/devices.

The patch uses runtime registration instead so each device only ever
registers its own callbacks and not the other device's too.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-05-27 03:39:50 -07:00
Jonathan Rico
1b4844aad0 tests: bsim: Enable asserts by default
Asserts should always be enabled in test builds.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-05-27 03:39:50 -07:00
Aaron Ye
69d790b293 dts: arm: ambiq: add bt-hci subnode for Apollo3 Blue SOC
This commit defines the bt-hci subnode under the bleif node on
Ambiq Apollo3 Blue and Apollo3 Blue Plus SOC.
Also add the default configurations for Bluetooth feature on Ambiq
apollo3_evb and apollo3p_evb.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Aaron Ye
3f56baa295 drivers: bluetooth: hci: add retry mechanism for Apollo SPI busy scenario
The controller may be unavailable to receive packets because it is busy
on processing something or have packets to send to host. Need to free the
SPI bus and wait some moment to try again.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Aaron Ye
47ce99f7b0 drivers: bluetooth: hci: correct the Ambiq Apollox support BT feature
The BLE controller of some Ambiq Apollox Blue SOC may have issue to
report the expected supported features bitmask successfully, thought the
features are actually supportive. Need to correct them before going to
the host stack.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Aaron Ye
af54a38827 drivers: bluetooth: hci: add Ambiq Apollo3 Blue SOC support
This commit add the SPI-based HCI support for the Ambiq Apollo3 Blue
SOC (e.g. Apollo3 Blue Plus, Apollo3 Blue) support.
Also correct the dependency of necessary peripheral.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Aaron Ye
9684b957bc boards: arm: apollo3p_evb: create BLEIF instance
This commits add the BLEIF instance which is compatible with
"ambiq,spi-bleif" on Ambiq apollo3p_evb and apollo3_evb.
Also creates the default pinctrl for the defined instance.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Aaron Ye
d84874309e drivers: spi: create Ambiq SPI BLEIF driver
Some Ambiq Apollox Blue SOC (e.g. Apollo3 Blue) uses internal designed
BLEIF module which is different from the general IOM module for SPI
transceiver. The called HAL API will also be independent. This driver is
implemented for the BLEIF module usage scenarios.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-27 03:27:43 -07:00
Emil Gydesen
f5fd2cf49e Bluetooth: ISO: Avoid bt_iso_chan_disconnected in bt_iso_reset
The bt_iso_chan_disconnected function will attempt to
remote ISO data paths as the central.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-27 03:27:15 -07:00
Johann Fischer
85bd852050 samples: sensor: remove fxos8700-hid
This sample uses the FXOS8700 compatible accelerometer to emulate
relative mouse movement. While this is an interesting example, it does
not provide anything unique in terms of sensor drivers or USB device
support. The example has no documentation and unsafe report buffer
handling. The example would need to be completely rewritten to make it
generic and use any accelerometer, e.g. with an accel0 alias. From a USB
perspective, there is no interest in maintaining this sample or porting
it to the new device support and new HID device API.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-27 03:27:06 -07:00
Yong Cong Sin
d084d83baf userspace: fix minor typo in k_is_in_user_syscall
'generasted' should have been 'generated' fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-27 06:19:32 -04:00
Yong Cong Sin
5a35037af3 arch: riscv: check esf before calling z_riscv_unwind_stack
Make sure that esf is not NULL before calling
z_riscv_unwind_stack to prevent NULL pointer dereferencing.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-27 06:19:32 -04:00
Flavio Ceolin
4d85f3d91c pm: Deprecate z_pm_save_idle_exit
Deprecate z_pm_save_idle_exit and promote pm_system_resume.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Flavio Ceolin
e1685bb421 stm32: power: SoC restores the clock
Clock must be restored as soon as the SoC leaves standby.
Keep the logic inside the SoC instead of delegate it to the pm
subsystem.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Flavio Ceolin
5ca3bc92c8 intel_adsp: power: SoC restores the clock
The SoC restores the clock only when leaving soft-off only.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Flavio Ceolin
4c5ee9b2db pm: system: Restore clock after sleep
sys_clock_idle_exits was being called *only* when the system
was resumed from interruption.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Flavio Ceolin
1860dd9153 pm: system: Resume devices in pm_system_resume
pm_system_resume() can be called directly from ISR and because of this
devices should be resumed before calling pm_state_exit_post_ops().

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Flavio Ceolin
f7437ac3b1 pm: Move z_pm_save_idle_exit to pm subsys
There is no need to this function be defined inside the kernel since
all places using it are protecting the call under ifdef PM guards.

This way we can also remove the ifdef condition inside the implementation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Krzysztof Chruściński
59415697c4 modules: hal_nordic: nrfx: nrfx_config: Fix SPIS137 config
Fixing a bug where wrong instance was enabled when SPIS137 was supposed
to be used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-27 02:09:34 -07:00
Lucas Tamborrino
4684b192bc tests: boards: espressif: Add RTC CLK test
Add tests for the rtc clk subsystem.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-27 01:37:18 -07:00
Lucas Tamborrino
0b72ded057 tests: drivers: counter: support rtc timer
Add support for rtc timer node in the test.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-27 01:37:18 -07:00
Lucas Tamborrino
9808aa9f9e tests: drivers: clock control api: Make test generic
Changes for making the clock control api tests generic for
any board.
All the device subsys definitions were moved to its own folder
according to the clock compatible.
Also if the clock's async feature is not supported by the target,
the test is skipped instead of failed.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-27 01:37:18 -07:00
Lucas Tamborrino
e282b0ea84 soc: esp32xx: refactor clock and RTC subsystems
The RTC subsystem in espressif's SOCs, among other tasks
is responsible for clock selection for CPU and for low
power domain clocks such as RTC_SLOW and RTC_FAST.

This commit allows for proper clock source and rate
selection for CPU, using the espressif,riscv and
espressif,xtensa-lx6/7 bindings.

It also enables clock selection for RTC_FAST and RTC_SLOW,
that impacts some peripherals, such as rtc_timer.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-27 01:37:18 -07:00
Lucas Tamborrino
a8dddabdb8 manifest: update hal espressif
Add changes to comply with rtc refactor.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-27 01:37:18 -07:00
Francois Ramu
d490616d08 scripts: west flash with stm32CubeProgrammer testing
Add the option "--extload" for the "extload" argument.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-27 01:34:51 -07:00
Francois Ramu
94d93af91f scripts: west flash with stm32CubeProgrammer and ext-loader
Add the option to support an external loader for flashing
hex file to internal and external NOR flash using
the STM32CubProgrammer CLI with a  board_runner_args
"--extload=MX25LM51245G_STM32U585I-IOT02A.stldr"
The absolute path of the stldr file is added to the
stm32CubeProgrammer command.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-27 01:34:51 -07:00
Francois Ramu
76c0e2cf51 scripts: west flash with stm32CubeProgrammer error line
Correct the error "F541 f-string is missing placeholders"
when ruuning Flake

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-27 01:34:51 -07:00
Henrik Brix Andersen
6a070ee165 drivers: can: shell: print raw DLC when sending frame, not bytes
Print the raw DLC when enqueuing a CAN frame for sending, not the
corresponding number of bytes.

Fixes: #73309

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-27 07:45:01 +02:00
Henrik Brix Andersen
fb4f67b775 drivers: can: shell: fully initialize frame before sending
Zerorise the CAN frame before filling in data to ensure all data bytes are
initialized.

Fixes: #73309

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-27 07:45:01 +02:00
Nikolay Agishev
7180c515c4 ARC: MPU: Add thread stack isolation configs
Regarding recent changes in general MPU configuration
(https://github.com/zephyrproject-rtos/zephyr/pull/71969), add
appropriate configs for isolating thread stacks into ARC MPU.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-05-27 07:44:44 +02:00
Maciej Perkowski
3a3f25c9a6 requirements: Set min version of pylint to 3
PR #72592 made pylint to use json2 output format. However, this
format is introduced in pylint v3. This commit adds an appropriate
setting in the requirements file.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-05-26 21:02:21 +03:00
Younghyun Park
ea29ef36bb debug: coredump: Move COREDUMP_*_STR strings to the public header
This allows a customized coredump_backend_other API to re-use the
COREDUMP_*_STR without re-defining the same strings.

Signed-off-by: Younghyun Park <younghyunpark@google.com>
2024-05-25 14:39:18 -04:00
Lyle Zhu
2d665c1c14 bluetooth: keys_br: Improve bt_foreach_bond
The BR Keys cannot be scanned by function
bt_foreach_bond.

Add function bt_foreach_bond_br for br.

The function bt_foreach_bond_br will be
called by bt_foreach_bond if the BR is
enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-05-25 14:39:06 -04:00
Marco Widmer
ef8a5b7275 debug: coredump: fix multiple definitions
When compiling with CONFIG_DEBUG_COREDUMP=n and including
<zephyr/debug/coredump.h> from any file, linking fails with a multiple
definitions error. Define the functions in the header file as static
inline.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-05-25 14:38:51 -04:00
Vinayak Kariappa Chettimada
68bd4da4c6 samples: Bluetooth: hci_vs_scan_req: Build for BT_LL_SW_SPLIT only
Build the vendor specific sample hci_vs_scan_req for
BT_LL_SW_SPLIT variant of the Controller only.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-25 11:26:26 +03:00
Yong Cong Sin
4a49a88348 tests: drivers: intc: verify registration of controllers
Test the registration of interrupt controller with the
intc_table and verify that thru the sw_isr_table APIs.

Verified registration with all 3 interrupt levels.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
cd0ef1ad27 tests: drivers: build_all: intc: add a common build-only test
Add a generic build-only test for:
 - intc_nxp_irqsteer
 - intc_cavs
 - intc_rv32m1_intmux
 - intc_dw_ace
 - intc_dw

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
7248efcd59 drivers: intc: update to use multi-level API
Update these multi-level interrupt drivers to use the new API.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
a512f68f14 drivers: intc_dw_ace: convert to use instance-based macros
Define the DRV_COMPAT and use instance-based device DT macros.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
5d9e266d13 drivers: interrupt_controller: irq_steer: use new multilevel irq impl
Update the NXP's irq_steer driver to use the new multi-level
interrupt implementation.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
e2bcedc3ad arch: common: multilevel_irq: simplification with new multilevel IRQ APIs
Use the multi-level interrupt APIs that accepts `level` as an
argument for the code where the level of the interrupt is not
known at build time.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
dcaf217336 irq: multilevel: add APIs with level as argument
Add APIs that accept an additional `level` argument, and use
that to call the respective functions. In some cases this can
reduce code complexity, especially when the level isn't known
at build time.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
8f9ebb652f drivers: intc: plic: simplify isr handling
Save the reference of the start index of the `_sw_isr_table`
to the config struct, so that the `local_irq` can be used  as
offset directly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
2300f8a445 doc: migration-guide: 3.7: add note on multilevel interrupt arch changes
Add a note on the revamp of the multilevel interrupt
architecture, the changes to be made, and new macros to help
with the update.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
c5f5b964c1 arch: sw_isr: revamp multi-level interrupt architecture
Previously the multi-level irq lookup table is generated by
looping through the devicetree nodes using macros & Kconfig,
which is hard to read and flimsy.

This PR shifts the heavy lifting to devicetree & DT macros such
that an interrupt controller driver, which has its info in the
devicetree, can register itself directly with the multi-level
interrupt architecture, which is more straightforward.

The previous auto-generated look up table with macros is now
moved in a file of its own. A new compatibility Kconfig:
`CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION` is added and
enabled by default to compile the legacy look up table for
interrupt controller drivers that aren't updated to support the
new architecture yet.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
84da6c8e6c test: gen_isr_table: exclude NRFX_CLIC from riscv_no_direct
VPR cores CLIC supports vectored mode only and can't be
disabled. Filter out `CONFIG_NRFX_CLIC` to prevent build
error.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin
c57f9f12a2 drivers: intc: VPR CLIC should make sure GEN_IRQ_VECTOR_TABLE is enabled
VPR cores CLIC supports vectored mode only. Select
`GEN_IRQ_VECTOR_TABLE` such that it can't be disabled.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yassine El Aissaoui
4a755a3157 samples: tests: bluetooth: Add support for rd_rw612_bga
Adding bt_tester support.

Adding bt_tester app build
with Twister for rd_rw612_bga board

Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.

Disable twister build on samples that are not meant to
be supported on this board, so exclude it from the test cases.

Update peripheral/central ht sample.yaml files
to test build for rd_rw612_bga.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-05-25 11:23:04 +03:00
Yassine El Aissaoui
f062d8bf32 boards: rd_rw612_bga: Update board information
- Add pinctrl for flexcomm0 in usart mode
needed for BLE tester application
- Reserve the firmware storage partition
- Mark HCI as a wakeup source

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-05-25 11:23:04 +03:00
Yassine El Aissaoui
63791f2817 soc: rw61x: Add BLE support for rw61x
- Add SMU regions
- Add HCI definition
- Add config when BT is enabled

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-05-25 11:23:04 +03:00
Axel Le Bourhis
6ffbcd4990 modules: Add Kconfig to Kconfig.mcux for BLE support
Added NXP_FW_LOADER for NXP platforms.
Added NXP_RF_IMU for NXP platforms.
Added MONOLITHIC Flags for NXP platforms.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-05-25 11:23:04 +03:00
Axel Le Bourhis
ee03123dd1 drivers: hci: Add NXP HCI driver
Add HCI driver generic to NXP platforms.
Update west.yml to have ble support for rw61x

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-05-25 11:23:04 +03:00
Yassine EL -AISSAOUI
39e126d6b3 dts: binding: add yaml file for nxp HCI
- used to define hci info

Signed-off-by: Yassine EL -AISSAOUI <yassine.elaissaoui@nxp.com>
2024-05-25 11:23:04 +03:00
Andrzej Kaczmarek
2e2aeb13ed drivers: bluetooth: da1469x: Fix deferred buffer allocation
If rx buffer allocation has to be deferred to rx_thread, we need to stop
isr reading from mailbox as otherwise rx_thread won't be able to process
other buffers.

Since CMAC2SYS irq is cleared before data is read from mailbox, in case
rx buffer allocation was deferred we also need to trigger irq manually
to make sure all pending data is processed.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-25 11:21:16 +03:00
Yasushi SHOJI
bbab3d6940 version.h.in: Do not use @template@
@template@s will be replaced by empty strings and the comment in generated
files will be broken.  Replace them with just simple words.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2024-05-24 18:05:41 -04:00
Sreeram Tatapudi
f96e6ccbc0 boards: arm: Introduce Infineon CYW920829M2EVK-02 board
- Add initial version of CYW920829M2EVK-02 board
- [drivers: clock_control] Make it possible to set up both iho and imo
  clocks instead of just one or the other

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-05-24 18:05:11 -04:00
Krzysztof Chruściński
33db820400 tests: drivers: uart: async_api: Add nrf54h20 support
Add overlays for nrf54h20dk.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-24 18:04:46 -04:00
Torsten Rasmussen
207da52e8e cmake: find python path adjustment
Fixes: #70258

Specify NO_CMAKE_PATH to prevent CMake find_program from having a
preference for searching CMAKE_PREFIX_PATH.

Some tool like NixOS / Nix package manager sets this variable
to point inside the nix store, like this:
CMAKE_PREFIX_PATH=/nix/store/gpvnsgf8zhqjjgk63dd...-python3-3.11.6-env

thus causing `find_program()` to prefer this over the tool in the
default path.

Support Nix environments by specifying NO_CMAKE_PATH and in addition
support `VIRTUAL_ENV` environment setting for search path when set by
the virtual environment.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-24 18:04:28 -04:00
Fin Maaß
f9819dc010 mgmt: hawkbit: option for cold reboot
add option for cold reboot.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-24 18:04:13 -04:00
Swift Tian
e29baf5da3 doc: add a note in 3.7 migration guide
CONFIG_EMUL is no longer default with CONFIG_I2C as it causes I2C
dependency loop.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Swift Tian
12180d6082 samples: lvgl: fix accelerometer_chart compile
Add CONFIG_EMUL=y to prj.conf.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Swift Tian
2a639c9148 samples: subsys: fix sensing/simple compile
Add CONFIG_EMUL=y to native_sim.conf

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Swift Tian
5df8ca2965 tests: sensor: fix compile
Add CONFIG_EMUL=y to prj.conf

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Swift Tian
cf5a273aa5 tests: subsys: fix emul test compile
Add CONFIG_EMUL=y to the test .conf

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Swift Tian
d65d298280 boards: native: fixed i2c dependency loop
This was discovered when trying to add select GPIO to emulator Kconfig.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
Andrzej Kaczmarek
5ead91d099 drivers: clock_control: smartbond: Update CMAC sleep clock
The CMAC uses lp_clk as a sleep clock so it has to be updated if
frequency of lp_clk has changed. This happens either after XTAL32K
settling or RCX calibration.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-24 18:03:26 -04:00
Sebastian Bøe
80209e4fd0 boards: nordic: 54L: Refactor the board DT
Refactor the 54L board file to be able to better support out-of-tree
non-secure boards.

This aligns better with nrf53's DT.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Sebastian Bøe
90332b9a0b dts: nordic: 54l: Change the peripheral address map for ns
Define peripherals with the 0x4000_0000 address range when building
for non-secure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Sebastian Bøe
2c19d3ea92 dts: nordic: 54l: Don't define UICR for the non-secure domain
Don't define UICR for the non-secure domain as it is hardware fixed to
secure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Sebastian Bøe
50aaaa30c2 dts: nordic: 54l: Don't define wdt30 for the non-secure domain
Don't define wdt30 for the non-secure domain as it is hardware fixed
to secure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Sebastian Bøe
afbaaf241d samples: wdt_basic_api: nrf: Add missing nrf overlays
Add missing nrf overlays to fix the sample at build time.

Copied from samples/drivers/watchdog/boards.

It is not clear why the build failure was not detected earlier.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Sebastian Bøe
9ef16f55cd boards: nordic: 54l: use wdt31 instead of wdt30
Use wdt31 instead of wdt30 as wdt30 is hardware fixed to secure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Andrzej Kaczmarek
a6e17b34f6 soc: renesas: smartbond: Fix exiting from suspend state
We need to enable irqs that were disabled when entering suspend state.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-24 18:00:23 -04:00
Ederson de Souza
2654fdc6ba doc/services/llext: Mention the LLEXT EDK
Mention the EDK existence, the build target and discuss some features.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-05-24 18:00:00 -04:00
Flavio Ceolin
ca6f2d6ba5 maintainers: crypto: Add crypto documentation in its section
Add crypto related docs in the crypto section.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 17:59:38 -04:00
Andrzej Głąbek
9c874f0b93 samples: nrfx_prs: Fix pin assignment on nRF5340 DK
Pins P0.06 and P0.07 are shorted on nRF5340 DKs prepared for on-target
tests because that is required for UART tests. That causes background
SPIM transfers in this sample to fail because SPIM is not able to drive
its SCK line configured as P0.06. Rearrange then the pins used in this
sample, so that SCK is not on a pin involved in a GPIO loopback.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 10:00:07 -05:00
Alberto Escolar Piedras
ab50b375e5 tests/posix/env: set CONFIG_PICOLIBC=y
Chosing by default in the prj.conf
PICOLIBC ensures we also use an embedded
libC even when built for a native target
and even if we dont set POSIX_API.

This ensures the test will build and pass
properly when built with default configuration
from command line without using the test yaml.

This change does not affect the build result
for other targets as those defaulted already
to PICOLIBC.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-24 09:57:31 -05:00
Francois Ramu
6db2c2c2c1 drivers: rtc: stm32 rtc driver disable alarm interrupt if not used
Note that the Init of the alarm has no need for BCD2BIN conversion,
the LL_RTC_ALMx_Init will do. Add more log debug
The driver must clear the ALARM enable bit before wrting the alarm
registers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-24 09:56:29 -05:00
Francois Ramu
2499a4b226 drivers: rtc: stm32 rtc driver configure time and Date
Set a Calendar using the LL functions LL_RTC_TIME_Init
and LL_RTC_DATE_Init. Add more DBG info
On the stm32F2 serie, check RS Flag after setting calendar registers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-24 09:56:29 -05:00
Francois Ramu
362588037e tests: drivers: rtc api testing with timeout
Add a timeout to the tests/drivers/rtc_api testcase so twister
can end properly when running with twister.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-24 09:56:29 -05:00
Babak Arisian
b0dceffacc Bluetooth: Audio: add bt_audio_get_chan_count
Implement a function bt_audio_get_chan_count that takes an enum
bt_audio_location and returns the number of channels in that value.

This PR fixes #69617
(https://github.com/zephyrproject-rtos/zephyr/issues/69617)

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-05-24 09:55:37 -05:00
Dmitrii Golovanov
d38913ba48 tests/kernel/timer/timer_behavior/pytest: aligh grpcio version
Align grpcio version with logic2-automation package fixing its fail
on Channel.unary_unary() call with missing _registered_method argument..

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-24 09:54:05 -05:00
Flavio Ceolin
f54232e912 intel_adsp/ace: power: Do not re-implement cache func
Do not re-implement a function to get a cached pointer. Zephyr cache
API already provides it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 09:53:04 -05:00
Flavio Ceolin
693b65583c power_domain: intel_adsp: Use register definitions
Make it a little bit easier to read using already existent
definitions for the registers used here.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 09:53:04 -05:00
Flavio Ceolin
b496d0e52d intel_adsp/ace: pm: Remove unnecessary cache flush
soc_cpus_active is not in cached memory.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 09:53:04 -05:00
Flavio Ceolin
c335cb542c intel_adsp/ace: pm: Keep irq locked until restore context
Keep interruptions locked until we properly restore the core
context.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 09:53:04 -05:00
Flavio Ceolin
e728adffd2 intel_adsp/ace: pm: Remove unnecessary cache flush
core_desc is not located (nor is accessed) in cached memory.
There is no need to flush it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 09:53:04 -05:00
Flavio Ceolin
301055dec0 intel-adsp/ace: pm: Only core 0 can d0i3
Secondary cores are not allowed to be power gated on
runtime-idle. They have to explicitely set off by host command.

Remove this state from secondary CPUs so power management logic
does not need workarounds to enforce this behavior.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 09:53:04 -05:00
Maciej Perkowski
48665f2636 scripts: Allow using quarantine mechanism with test_plan.py script
In twister, applying quarantine is a part of apply_filters() function.
However, this function is not called when --load-test is used.
Therefore, if one wants to use quarantines in combination with
dynamic scope from the test_plan.py script, one has to pass such
info through the script.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-05-24 08:25:20 -04:00
Andrzej Głąbek
418210dbf3 tests: drivers: wdt_basic_api: Allow testing without PAUSE_HALTED_BY_DBG
This is a follow-up to commit e53e5448ee.

In the above commit, the calls to `wdt_setup()` were modified to use
the `WDT_OPT_PAUSE_HALTED_BY_DBG` option to prevent problems with
flashing of boards after this test was executed on them (the still
active watchdog could interrupt such flashing), but this option
is not essential to the test itself. And if a watchdog driver does not
support pausing when the CPU is halted by a debugger (this is the case
for example for wdt_counter), it is not able to pass the test because
of that option. Add then the possibility to continue the test when
pausing by debugger is not supported.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 08:24:56 -04:00
Andrzej Głąbek
ccedcd1ac0 tests: drivers: wdt_basic_api: Add missing failure indications
Two API calls that are supposed to set up the watchdog are not actually
causing the test to fail, only error messages are printed. This patch
adds the proper return statements.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 08:24:56 -04:00
Nikolay Agishev
84898f62a3 DOC: ARCMWDT: Add tip for arc-gnu-toolchain installation
Installation of single toolchain causes problems for customers who
are not familiar with Zephyr infrastructure. This tip is supposed
to help them.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-05-24 08:05:39 -04:00
Alexander Sarmanow
1ed18ad5b2 samples: bluetooth: df: fix misleading comment in rx overlay
The comment is talking about Tx and AoD, while this sample code is about
Rx and AoA.

Signed-off-by: Alexander Sarmanow <asarmanow@gmail.com>
2024-05-24 08:05:19 -04:00
Kapil Bhatt
cc42d16b1c net: wifi: Add disconnection success code
When disconnect request is successful, the status
was taking as WIFI_REASON_DISCONN_UNSPECIFIED only.
Adding WIFI_REASON_DISCONN_SUCCESS which can be help
to determine status of disconnect request. If this status
is failed then reason can be useful.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-05-24 08:04:59 -04:00
Ping Wang
1339ce4bf0 Bluetooth: Audio: Get function for bt_audio_codec_qos_pref.
Get the preferred QoS settings via bt_bap_ep_get_info()
Therefore no need to use the internal header file to get it.

This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/72359

Signed-off-by: Ping Wang <pinw@demant.com>
2024-05-24 08:04:45 -04:00
Jerzy Kasenberg
bd6bb64d8a drivers: timer: smartbond: Fix timer2 timeout set
When function sys_clock_set_timout() is called with small value
(i.e. 1) calculated time to be programmed to TIMER2 reload
register may be such that is expires before code set's it
up. In that case timer interrupt will be scheduled in far
future.

With this change, code checks after it sets reload value if
requested time already passed and if so TIMER2 interrupt
is marked as pending to avoid races.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-24 08:04:18 -04:00
Celina Sophie Kalus
bbbb2865c3 dts: stm32h7_dualcore: Add MBOX driver
Adding the new STM32 hardware semaphore driver into the device tree.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
59bfe591ef samples: drivers: mbox: Add support for stm32h747i_disco board
With the addition of the STM32 hardware semaphore MBOX driver, this
sample is now supported by the board.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
3290da8f1d samples: ipc: icmsg: Add support for stm32h747i_disco
With the addition of the STM32 hardware semaphore MBOX driver, ICMsg is
now supported on the stm32h747i_disco board.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
7da8ca3113 samples: ipc: icmsg: Do not return busy error codes
When sending a lot of data, a busy error code returned by the IPC is to
be expected. But if the last attempted send returns busy, this error
code is returned to the calling function, causing an error log message.
Fix this by setting return variable to 0 on this acceptable error.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
9e0d4ef88f samples: ipc: icmsg: Add received bytes metric
By adding this metric, any problem with the remote core sending messages
is observable.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
e178d21b96 dts: bindings: ipm: Add dummy mbox-cells property
The MBOX driver interface expects a device tree property '#mbox-cells'
which is not known by the IPM driver. This causes build problems when
both drivers are given for a single shared DT node.

To fix this problem for this driver specifically, add a dummy
'#mbox-cells' property to the bindings of the STM32 HSEM IPM driver.
This does not affect any other IPM driver, and the STM32 HSEM IPM driver
is still functioning with this dummy property.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
e1ec8f5884 dts: bindings: mbox: Add STM32 HSEM MBOX driver
Add a device tree binding for the new driver. Since there already
exists an IPM driver using the unsharable hardware semaphore interrupt,
the new driver is not added to any boards or SOCs per default to avoid
compatibility problems. See #37300 for the IPM driver.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
051dc14bb6 drivers: mbox: Add driver for STM32 HSEM
This driver implements a simple MBOX device which supports a single
instance, two channels (one for each direction), and only signalling
mode with no data transfer. Signalling to another core is achieved by
taking and giving two hardware semaphores, similar to the STM32 HSEM
IPM driver.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Andrew Davis
39863b66bd lib: open-amp: Use struct fw_resource_table type instead of void
The type of the resource table is known, casting to and from void* only
hides this type which can prevent the compiler from giving helpful
warnings. One warning would have been the accidental use of
"st_resource_table" in a cast, a struct which does not exist.

Use the fw_resource_table type when dealing with resource tables.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-05-24 07:51:42 -04:00
Andrew Davis
4c5eb92650 lib: open-amp: Use fixed width types for resource table
This structure is shared between cores which may have different type
widths. Use fixed width types when defining the structure. We can
also use struct resource_table to help as it is already defined with
fixed width types and removes the need to redefine these elements.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-05-24 07:51:42 -04:00
Robert Hancock
1af474b575 flash: spi_nor: error-checking fixes
Check the return values of commands such as spi_nor_cmd_* and
spi_nor_wait_until_ready and ensure they are propagated back to the
caller on error.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-05-24 07:51:20 -04:00
Krzysztof Chruściński
c026b55fe5 tests: drivers: clock_control: nrf_lf_clock_start: Fix SYNTH test
Test was not covering nrf54l15 which had Synth source bitfield
renamed. Changing the test to use Kconfig to determine if
Synth is present.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-24 07:50:53 -04:00
Alex Bellon
a655deb046 docs: security: Create CVE-2024 section
Create new section for CVE-2024.

Signed-off-by: Alex Bellon <github@alex-bellon.com>
2024-05-24 07:50:38 -04:00
Dominik Ermel
deabfa3c3a drivers/flash/spi_nor: Fix and rework spi_nor_set_address_mode
The commit removes unneeded check for enter_4byte_addr_exist in
the function, as the utility function is supposed to set the address
by parsing enter_4byte_addr parameter, while the enter_4byte_addr_exist
used to exist only for DTS entries that directly set enter-4byte-addr
parameters for a flash node.

The change also moves LOG_DBG reporting enter_4byte_addr before
it is processed, to allow logging what actually function will be working
with, before it does so.

The enter_4byte_addr_exist is removed as it is no longer used anywhere.

Setting of data->flag_access_32bit has been moved in the same code block
as call to the spi_nor_cmd_write, as it can be only consequence of
successful call to that function.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-24 07:50:25 -04:00
Aurelien Jarno
18c73de93d drivers: spi: stm32: Skip pinctrl suspend/resume for subghzspi
Subghzspi instances cannot have any pinctrl configs. This causes a
failure of the power management suspend and resume operations for the
subghzspi instance because no "default" pinctrl is found.

Fix that by skipping the pinctrl parts on subghzspi instances.

At the same time fix a copy and paste in the suspend error message.

Fixes: b567a7db83

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-24 07:50:09 -04:00
Piotr Kosycarz
8ba222c56a samples: subsys: ipc: ipc_service: keep using remote harness
Temporary solution as there is no such harness as remote.
However console regex are not defined yet.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-24 07:49:57 -04:00
Tomasz Chyrowicz
7d23bd2859 boards: nrf54h20dk: Add SUIT storage definition
Add a definition of SUIT storage, so there will be a common source of
the SUIT storage location for both SDFW and scripts generating SUIT
storage areas, assigned to local domains.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-05-24 07:49:42 -04:00
Yong Cong Sin
e993e994ea sensors: add new channel SENSOR_CHAN_POS_DXYZ
Add new channel: `SENSOR_CHAN_POS_DXYZ`, so that it is
consistent with other 3-axis channels.

Updated pytest, `sensor_shell` & `fake_sensor` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin
4e7168028b sensors: shell: use SENSOR_CHANNEL_3_AXIS whenever possible
Instead of specifying 3 axis channels manually, use
`SENSOR_CHANNEL_3_AXIS` instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin
c13105750d samples: sensor: sensor_shell: update pytest to validate fix
Update the pytest script to exercise the entire
`sensor_channel_name` table with `parse_named_int()`.

The `gauge_desired_charging_current` is selected because
it is the last one in the table before `all`, `all` is not
used because `sensor get sensor@0 all` doesn't return anything.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin
eb37b8620b sensor_shell: fix hang when device is not a sensor
If `CONFIG_SENSOR_INFO` is enabled, use the `sensor_info`
section to validate that the argument is a sensor before using,
otherwise the shell command will hang the application.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin
e879cd0502 sensor_shell: fix assertion due to NULL pointer deref
The `SENSOR_CHAN_VSHUNT` was added in #60717 but was never
added to the `sensor_channel_name[SENSOR_CHAN_COMMON_COUNT]`
table. Since the length of `sensor_channel_name` is fixed to
`SENSOR_CHAN_COMMON_COUNT`, this means that the index at
`SENSOR_CHAN_VSHUNT` points to `NULL`. When we use the
`sensor get` command for anything bigger than
`SENSOR_CHAN_VSHUNT`, we will deref that `NULL` pointer
when we do `strcmp` in the for-loop of `parse_named_int`.

Fix this by defining `SENSOR_CHAN_VSHUNT` in the table.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Aleksander Wasaznik
26f3073b9a Bluetooth: audio: tests: Switch to one-time adv
This patch removes all uses of the adv auto-resume feature in the audio
bsim tests, and instead makes all adv starts explicit.

The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-24 07:48:54 -04:00
Ioannis Karachalios
62f8f160ad drivers: entropy: smartbond: Optimize driver PM
This commit should optimize the way the device is allowed
to enter the suspended state. Instead of returning a PM
error code to abort the PM process, the standby power state
is constrained as long as the device is not allowed to enter
suspension. With that approach, acquiring PD_SYS is not needed
when in PM device runtime mode.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-24 07:48:41 -04:00
Ioannis Karachalios
71a5f1b9fd drivers: display: smartbond: Optimize driver PM
This commit should optimize the way the device is allowed
to enter the suspended state. Instead of returning a PM
error code to abort the PM process, the standby power state
is constrained as long as the device is not allowed to enter
suspension. With that approach, acquiring PD_SYS is not needed
when in PM device runtime mode.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-24 07:48:41 -04:00
Ioannis Karachalios
2958f691bb drivers: mipi_dbi: smartbond: Optimize driver PM
This commit should optimize the way the device is allowed
to enter the suspended state. Instead of returning a PM
error code to abort the PM process, the standby power state
is constrained as long as the device is not allowed to enter
suspension. With that approach, acquiring PD_SYS is not needed
when in PM device runtime mode.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-24 07:48:41 -04:00
Gerard Marull-Paretas
33665348c2 dt-bindings: pinctrl: nrf: allow for more ports
New nRF54H20 SoC series expose more ports, e.g. P9, so reserve more bits
for the Port+Pin field.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-24 07:48:30 -04:00
Marcin Niestroj
c6fd2a1ddf net: dns: don't request address in recvfrom()
Source address is not used anywhere, so don't request it with recvfrom()
API.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-24 07:48:17 -04:00
Aurelien Jarno
44f86dd67d usb: dfu: fix detach happening too fast
In some relatively rare conditions, the DFU detach/attach happens to
fast, which cause the host to not notice it. It seems to to be the case
for instance on STM32 when no endpoint are being used.

Adding a 1 ms delay (i.e. one SOF period) between the detach and the
attach fixes the issue.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-24 07:48:03 -04:00
Nicolas Pitre
b34e94f362 kernel: demand_paging: fix arch_page_location_get() documentation
Symbols from enum arch_page_location are defined as
ARCH_PAGE_LOCATION_* and not ARCH_PAGE_FAULT_*.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-24 07:47:49 -04:00
Krzysztof Chruściński
af3c8b973e drivers: timer: nrf_grtc_timer: Fix for random system hangs
d599e2b670 removed early return from sys_clock_timeout_handler if
current counter value is less than cc_val. It seems that this return is
needed as after the removal some stress tests which were using system
timers heavily started to hang.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-24 07:47:29 -04:00
Andrzej Głąbek
e9256135d6 Bluetooth: Controller: nrf5: Allocate GPIOTE channels
Allocate the GPIOTE channels that the Bluetooth Controller needs to use
with the dedicated function provided by the nrfx_gpiote driver instead
of using hard-coded indexes of these channels, as now, when the driver
supports multiple GPIOTE instances, it would be much more difficult to
properly inform the driver which channels should be reserved.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 07:47:15 -04:00
Andrzej Głąbek
2e8f104425 modules: hal_nordic: nrfx_glue: Remove NRFX_GPIOTE_CHANNELS_USED
This definition is no longer supported by the nrfx_gpiote driver (since
nrfx 3.2.0, reserved channels need to be defined per GPIOTE instance),
so remove it to not mislead users.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 07:47:15 -04:00
Emil Gydesen
cc602a6941 tests: Bluetooth: Fix incorrect comments about adv sets
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.

Modified the comment to omit the scannable part
and corrected the connectable part.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-24 07:46:43 -04:00
Emil Gydesen
04e38ae176 samples: Bluetooth: Fix incorrect comments about adv sets
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.

Modified the comment to omit the scannable part
and corrected the connectable part.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-24 07:46:43 -04:00
Luis Ubieda
4ae093eaf0 drivers: i2c: nrfx_twi_rtio: Minor indentation fixes
Not necessarily related to the namespacing changes, but just
establishing proper indentation formatting throughout the whole file.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-24 07:46:27 -04:00
Luis Ubieda
98c121d262 i2c: nrfx_twi_rtio: Establish proper namespacing in driver
To clearly distinguish between common code and RTIO-only code
on nrfx_twi and nrfx_twi_rtio.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-24 07:46:27 -04:00
Szymon Janc
d3c0dfbf36 tests: Bluetooth: tester: Fix assert in OTS
MCS OTS support doesn't implement OTS checksum and if this is globally
enabled assert is triggered.

[00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0
ASSERTION FAIL [ots_init->cb->obj_cal_checksum]
     @ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476
 Callback for object calculate checksum is not set

This should be reverted when Zephyr issue #72471 is fixed.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-05-24 12:57:26 +03:00
Flavio Ceolin
e0c955eba3 tests: uoscore: Set necessary PSA options
Set necessary psa options to the test execution.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-24 11:39:28 +02:00
Stephanos Ioannidis
8c8e2f6243 doc: requirements: Add pyserial
Since 7eaca455fa, pyserial is required for
building docs because `DeviceAdapter` from the `pytest-twister-harness`
plugin, which is imported by autodoc, now depends on it.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-05-23 17:02:27 -04:00
Valerio Setti
11920e35a0 mbedtls: reduce heap usage when building PSA crypto
By default PSA crypto library copies all the buffers that are passed
in into the heap before further processing them. This is required
when the PSA crypto library is on the secure side and it accepts
buffers from a non-secure code. However this case in Zephyr
is already handled by TF-M, so when the PSA crypto library is
built (CONFIG_MBEDTLS_PSA_CRYPTO_C) then it will be on the
non-secure side. Therefore this malloc copy is useless and
it consumes heap memory. Setting MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
at Mbed TLS build time helps in removing this mechanism and
it saves heap memory.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 09:03:20 -07:00
Jeppe Odgaard
85bc3e6461 codeowners: add sensor veaa-x-3
Add @jeppenodgaard and @MaureenHelm as veaa-x-3 codeowners.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-23 11:54:59 -04:00
Mike J. Chen
3656c1b14c spi_nor: remove unneeded enter_dpd() at end of spi_nor_configure()
This block of code was in the original commit that added
CONFIG_SPI_NOR_IDLE_IN_DPD but later modifications
added acquire_device() and release_device() calls
earlier in spi_nor_configure() and the release_device()
function will have already done the enter_dpd().

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-23 11:53:45 -04:00
Morten Priess
06870146e6 Bluetooth: controller: Allow any valid ISO sync receiver BIG handle
The BIG handle for an ISO sync receiver is provided by the host. The
valid range is [0x00..0xEF], and this requires the controller to allow
non-consecutive handle numbering. This means that even if only one sync
set is supported, a BIG handle of ex. value 2 must be supported.

As the code uses indexing and range checking directly by handle, this
needs to be changed. Introducing the handle index, which sequnces the
handles such that index = 0 is always the "first handle", regardless
of value.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-05-23 11:53:22 -04:00
Valerio Setti
ffe79b5522 test: mbedtls: add custom target to check MbedTLS auto-generated files
This commit adds a custom target to tests/crypto/mbedtls in
order to verify that MbedTLS auto-generated files are up to
date.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti
210e08be5d bluetooth: mesh: update BT_MESH_USES_MBEDTLS_PSA selected symbols
Instead of selecting legacy MBEDTLS symbols, use corresponding
PSA_WANT ones when possible (note: some legacy symbols do not
have a PSA correspondance).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti
a1a7c9081a mbedtls: add new source file from MbedTLS 3.6 release
Add "sha3.c" source file that was previously missing from
CMakeLists.txt and that has been added in MbedTLS 3.6 release.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti
12ff947568 mbedtls: add new PSA_CRYPTO_CLIENT config
Using MBEDTLS_PSA_CRYPTO_CLIENT to guard all PSA_WANT symbols is
not completely correct because:

1. the prefix MBEDTLS suggests that it's something related to
   MbedTLS, while actually PSA APIs can be provided also
   by other implementations (ex: TFM)

2. there might applications which are willing to use PSA APIs
   without using MbedTLS at all. For example computing an hash
   can be as simple as writing psa_hash_compute() and, if the
   PSA function is provided thorugh TFM, then MbedTLS is not
   required at all

Therefore this commit:

- moves MBEDTLS_PSA_CRYPTO_CLIENT to Kconfig.tls-generic since
  that symbol belongs to MbedTLS

- adds a new symbol named PSA_CRYPTO_CLIENT as a generic way
  to state that there is "some" PSA crypto API provider

- let MBEDTLS_PSA_CRYPTO_CLIENT automatically select
  PSA_CRYPTO_CLIENT, since the former is an implementation of
  the latter.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti
2adb4cac17 mbedtls: default enable USE_PSA_CRYPTO when CRYPTO_C
Now that support for all PSA_WANT symbols is in place, we can
enable MBEDTLS_USE_PSA_CRYPTO when MBEDTLS_PSA_CRYPTO_C is
enabled as well.

Note: this commit also moves USE_PSA_CRYPTO out of CRYPTO_C
dependency in config-tls-generic.h because TLS/DTLS/X509 modules
of MbedTLS can rely on *any* implementation of PSA crypto APIs
not only the MbedTLS one. TFM is for example an alternative
to this.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti
c4e1b56ef9 mbedtls: add the python script used to generate PSA Kconfigs
Since PSA has several different symbols defined and since it's
better to keep them aligned with the current MbedTLS release,
a python script is used to generate both:
- Kconfig.psa
- config-psa-generic.h

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Valerio Setti
e58ebe12f4 mbedtls: add configuration file for PSA features
Adding a Kconfig and a header file to control which PSA features
are to be used from MbedTLS:

- new kconfig symbols are placed in a separate header file
  (Kconfig.psa) and are guarded by MBEDTLS_PSA_CRYPTO_CLIENT. The
  reason for this is that TLS/X509 can either rely on PSA functions
  provided by MbedTLS (when MBEDTLS_PSA_CRYPTO_C is defined) or
  TFM (when BUILD_WITH_TFM is selected). Therefore we could
  not make these new Kconfigs depending on MBEDTLS_PSA_CRYPTO_C.

- by default all PSA symbols are enabled, but they can be
  disabled by respective Kconfigs in order to reduce the image
  size.

- the new header file (config-psa-generic.h) mimics what
  config-tls-generic.h does for MbedTLS builtin symbols: it
  enables a build symbol for every Kconfig one. The name is
  kept identical in the 2 cases (a part from the initial CONFIG_
  in order to simplify the mechanism).

- MBEDTLS_PSA_CRYPTO_CONFIG is finally enabled whenever there
  is any PSA crypto provider (either MBEDTLS_PSA_CRYPTO_C or
  TFM)

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Hao Luo
266fb4c73a drivers: counter: Change apollo4p counter base address
Changed apollo4p counter base address to match the updated
counter driver.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-23 11:52:37 -04:00
Hao Luo
d7afd88e71 drivers: counter: Add support for Apollo3 SoCs counter
This commit adds support for the counter which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-23 11:52:37 -04:00
Fin Maaß
48a4269800 maintainers: ite: edit files
Only include dts bindings, that start with ite,
instead of all containing it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-23 11:52:22 -04:00
Yong Cong Sin
c118cd5a13 arch: make the max stack frames configurable
Current on x86 & risc-v that implement stack trace, the
maximum depth of the stack trace is defined by a macro.

Introduce a new Kconfig:EXCEPTION_STACK_TRACE_MAX_FRAMES
so that this is configurable in software.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Yong Cong Sin
2a3d9d0d90 arch: arm64: use symtab to print function name in stack trace
Selecting `CONFIG_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.

Added `arm64` to the `arch.common.stack_unwind.symtab` test.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Yong Cong Sin
eafc4eff04 arch: riscv: print symbol name of mepc if CONFIG_SYMTAB is enabled
The mepc register is the address of the instruction that was
interrupted, it will make debugging easier if we know the
name of the symbol, so print it if `CONFIG_SYMTAB` is enabled.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Yong Cong Sin
c1a925de98 arch: riscv: use symtab to print function name in stack trace
Selecting `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` will
enable the symtab generation which will be used in the
stack trace to print the function name of the return
address.

Updated the `stack_unwind` test to test the symbols in a
stack trace.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Yong Cong Sin
e1ce0aefff debug: implement symtab generation
Use pyelftools to extract the symbol table from the
link stage executable. Then, filter out the function names
and sort them based on their offsets before writing into the
`symtab.c`, this is similar to how the `isr_tables` works.

To access the structure, simply include the new header:
```c
#include <zephyr/debug/symtab.h>
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Jérémy LOCHE - MAKEEN Energy
0af906a533 gpio: imx: Added IRQ lock for RMW operations
The GPIO API performs unprotected RMW operations that
can cause glitching and race conditions when GPIOs are used by
different threads or ISRs.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-05-23 11:51:51 -04:00
Piotr Kosycarz
146195a647 soc: nordic: configure run once for nrf54l15
Needed to support sysbuild (app + flpr) with --erase option.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-23 11:51:31 -04:00
Aleksander Wasaznik
765b244c27 Bluetooth: host: tests: Switch to one-time adv
This patch removes all uses of the adv auto-resume feature in the host
bsim tests, except for the test of that feature itself, and instead
makes all adv starts explicit.

The auto-resume feature is planned for deprecation. And, explicit
starting of adv makes what happens in the test more explicit as well.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-23 11:51:07 -04:00
Kai Vehmanen
991b3623b0 soc: intel_adsp: ipc: don't call k_sem_init() multiple times
k_sem_init() is called for every IPC message sent in
intel_adsp_ipc_send_message(). This has not had any side-effects
in upstream configurations, but has been linked to a failing
run of test_obj_tracking_sanity test case in downstream Zephyr
use.

Replace k_sem_init() with k_sem_reset() as this is more appropriate
API to reset the semaphore count, and ensure deterministic
behaviour in case a thread is waiting on the semaphore at time
of reset.

Suggested-by: Peter Mitsis <peter.mitsis@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-23 11:50:50 -04:00
Simon Hein
ee669d084f MAINTAINERS: add doc/safety to documentation area
Add the missing doc/safety path to the area
documentation.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-05-23 11:50:36 -04:00
Ali Hozhabri
ced9fba95c boards: st: steval_stwinbx1: Add BLE support for STEVAL-STWINBX1 board
Provide BLE support for STEVAL-STWINBX1 board.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-05-23 08:23:29 -04:00
Tomi Fontanilles
d830446c91 modules: tf-m: nordic: remove problematic include path
It made the build of
`samples/tfm_integration/tfm_psa_test/sample.tfm.psa_test_crypto`
break since the update of Mbed TLS to 3.6.0 (#71118), apparently because
`${ZEPHYR_BASE}` wasn't set, and the include doesn't seem to be needed.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-23 08:22:47 -04:00
Roger Wang
e79f7135af logging: backend: uart: fix coverity warning
This commit is to fix a warning which is reported in Coverity scan
after device runtime pm is enabled.

Signed-off-by: Roger Wang <roger1.wang@intel.com>
2024-05-23 08:22:32 -04:00
Phi Bang Nguyen
ea02b93eea drivers: video: csi: Add support for i.MX RT11XX
On i.MX RT11XX which has MIPI CSI-2 Rx, image data from the camera sensor
after passing through the camera pipeline (MIPI CSI-2 Rx --> Video Mux -->
CSI) will be implicitly converted to a 32-bits pixel formats. For example,
an input in RGB565 / YUYV (2-bytes format) will become an XRGB32 / XYUV32
(4-bytes format), respectively. Make changes to support this.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-23 07:52:09 -04:00
Phi Bang Nguyen
e3ad40f883 include: video: Add XYUV32 pixel format
Add XYUV32 pixel format

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-23 07:52:09 -04:00
Rick Bruyninckx
39f99d84d2 data: Use designated initializers consistently in macro's
This PR updates the json macros to be consistend with C++20
Signed-off-by: Rick Bruyninckx <xactme@gmail.com>
2024-05-23 07:51:56 -04:00
Ioannis Karachalios
5c1e7d94ac tests: drivers: memc/ram: Add support for Smartbond Pro DevKit.
Add configuration and overlay files to support the DA1469x development kit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Ioannis Karachalios
db67eaa346 samples: drivers: memc: Add support for Smartbond Pro DevKit.
Add configuration and overlay files to support the DA1469x development kit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Ioannis Karachalios
b820cc2932 boards: renesas: dts: Add overlay files to support the MEMC
In order to avoid defining almost the same overlays in the available
sample codes, tests and user applications, a common overlay file
per memory type is demonstrated under the boards dts folder.
Currently only the PSRAM interface is supported and the APS6404L
PSRAM QSPI memory device is demonstrated. In doing so, an
application code will only have to define another overlay file explicitly,
under application's board folder, to overwrite the default QSPI
controller's settings. In either case, users should explicitly
invoke the requested overlay files  at 'west build' invokation
via the DTC_OVERLAY_FILE system variable.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Ioannis Karachalios
4e2ef1f525 dts: renesas: smartbond: Add support for the memory driver class.
Update DTS and board configurations to support memory controller (QSPIC2).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Ioannis Karachalios
e1772409ce drivers: clock_control: smartbond: Add support for the memc driver.
1. Update the clock control driver so it can update timing settings for
   QSPIC2 following system clock transitions (translated based on
   AHB AMBA bus clock).
2. Remove the QSPIC related subroutines and use the respective HAL API
   which is now available.
3. Add support for PM (CONFIG_PM_DEVICE). This is required as QSPIC2
   register file is powered by PD_SYS which is turned off during device
   sleep and so registers contents are lost (in contrast to QSPIC which
   is used to drive the flash memory).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Ioannis Karachalios
02e739873e drivers: memc: smartbond: Add support for the memory driver class.
Add support for the memory controller by utilizing QSPIC2. The latter is
capable to drive both NOR and PSRAM memory devices. For this to work,
the RAM driving mode is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Jason Murphy
55d6e4cb10 samples: net: add secure MQTT sensor/actuator device sample
This sample demonstrates the implementation of an (industrial) IoT
sensor/actuator device. The application uses the MQTT protocol to
securely send sensor data to a remote MQTT broker, while responding
to commands received over the MQTT connection.

Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2024-05-23 07:51:04 -04:00
Aurelien Jarno
fac04490a4 soc: st: stm32: stm32g0x: enable ART flash cache accelerator
Enable instruction cache and prefetching on STM32G0X SoC family.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-23 07:50:20 -04:00
Aurelien Jarno
858e8c51f1 drivers: spi: stm32: add runtime PM support
Add runtime power management suppor to the STM32 SPI driver. This allows
the driver to be suspended when not in use, and as a stop effect removes
the need to suspend/resume around each transition to stop mode.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-23 07:50:06 -04:00
Ioannis Karachalios
63eccd3b78 drivers: crypto: smartbond: Add support for PM
This commit should add all the functionality needed for the crypto
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:49:37 -04:00
Dong Wang
e17618c00c x86: ia32: linker: move bss/noinit sections after data section
With this change, bss/noinit sections are excluded from generated
kernel binary. Smaller image size saves storage space and reduces
loading time.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-05-23 07:49:06 -04:00
Pieter De Gendt
4cc7753cad cmake: modules: extensions: Check for missing blobs in zephyr_blobs_verify
Add a separate warning/error message if a blob is missing.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-23 07:48:42 -04:00
Filip Kokosinski
49998d93ac samples/subsys/shell/shell_module/overlays: revert to the default prompt
This commits reverts two targets back to the default prompt in the Shell
Sample:
* intel_socfpga_agilex_socdk
* intel_socfpga_agilex5_socdk

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-05-23 07:48:13 -04:00
Karol Lasończyk
aef0eb275d tests: temp: Add overlay for nRF54L15 DK
Adds support to activate testing on TEMP.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-05-23 07:47:58 -04:00
Robert Lubos
1e3f14476b net: tls_credentials: Add missing base64.h header inclusion
base64_encode() was used w/o including the base64.h header. This commit
fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-23 07:47:41 -04:00
Robert Lubos
48230f21c9 tests: net: socket: getaddrinfo: Increase ztest stack size
The ztest stack was to low to execute tests on some platforms (spotted
on nrf52840dk/nrf52840), hence increase it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-23 07:47:18 -04:00
Andrzej Głąbek
0268b9358f samples: drivers: adc_sequence: Fix expected console output regex
Add a missing space in the regular expression that defines the expected
console output so that it matches what the sample actually produces.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-23 07:46:58 -04:00
Piotr Kosycarz
f9ee925bb7 tests: drivers: uart: uart_pm fix 'rxbuf' may be used uninitialized
Fix for uart_pm/src/main.c:106:23:
error: 'rxbuf' may be used uninitialized [-Werror=maybe-uninitialized]

string.h:62:10: note: by argument 2 of type 'const void *' to 'memcmp'
   62 | int      memcmp (const void *, const void *, size_t);
      |          ^~~~~~
tests/drivers/uart/uart_pm/src/main.c:69:17: note: 'rxbuf' declared here
   69 |         uint8_t rxbuf[32];
      |                 ^~~~~

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-23 07:46:35 -04:00
Reto Schneider
1bedf6209b tests: net: net_pkt: Fix typo
This fixes what seems to be a copy and paste error.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-23 07:46:17 -04:00
Lucas Romero
672dab0566 docs: bitarray: fix missing documentation
for method sys_bitarray_xor that was added recently.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-23 07:45:59 -04:00
Glenn Andrews
531c457550 Lib: SMF Modify HSM operation for UML-Style transitions
Modify the SMF such that state transitions from parent states choose the
correct Least Common Ancestor based on the transition source rather than
the current state.

SMF set as experimental.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-05-22 21:41:06 -04:00
Hake Huang
49d0dd810d board: mimxrt1010_evk: add linkserver support docs
add support docs

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-22 21:39:36 -04:00
Hake Huang
5f203922d8 board: mimxrt1010_evk: add linkserver support
linkserver supports rt1010_evk from 1.5.30

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-22 21:39:36 -04:00
Mike Szczys
7eaca455fa twister: fix serial connection for flash_before
The --flash-before flag allows devices to be flashed before the serial
connection is established. However, the implementation was incomplete and
only worked if the port address already existed at the start of the run.
This is incompatible with devices that implement the USB in software
(eg: USB-CDC).

This commit fixes the implementation to delay setting up the connection
until after the device is flashed, and to retry the connection for two
seconds after flashing to give the device time to enumerate as a USB
device.

Signed-off-by: Mike Szczys <mike@golioth.io>
2024-05-22 21:39:13 -04:00
Peter Mitsis
d082cd29af kernel: Relax loop in z_smp_global_lock()
Updates z_smp_global_lock() to follow the pattern used in spinlocks
to relax the loop between atomic_cas() attempts.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-05-22 21:35:06 -04:00
Jordan Yates
0f56974c9d net: lib: dhcpv4: goto INIT on IF down, not RENEWING
When the interface goes down, the safest thing to do is to return to
the INIT state, as there is no guarantee that any state is preserved
upon the interface coming back up again.

This is particularly the case with WiFi.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-22 21:34:44 -04:00
Flavio Ceolin
3fb4e70306 tests: pm/device_runtime: Test pm_device_runtime_usage
Add tests covering possible branches in pm_device_runtime_usage()

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-22 15:08:39 -05:00
Flavio Ceolin
6569ae1798 pm: device_runtime: Fix usage API
Fix pm_device_runtime_usage() API for isr safe devices.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-22 15:08:39 -05:00
Flavio Ceolin
7ded97ee85 tests: pm/power_mgmt: Increase test coverage
Test device API for when a device does not implement device pm.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-22 15:08:39 -05:00
Emilio Benavente
f966353b09 tests: drivers: gpio: gpio_basic_api: Added KE15Z Overlay file.
Added Overlay for testing GPIO on FRDM_KE15Z

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-05-22 15:42:48 -04:00
Emilio Benavente
1cc1f248a0 boards: nxp: frdm_ke15z: Add board support for ke15z
Added initial board support for the
frdm_ke15z board.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
2024-05-22 15:42:48 -04:00
Emilio Benavente
552008cf42 soc: nxp: kinetis: added soc support for ke1xz platforms.
Adding supporting soc files for the ke1xz platforms
updating soc.yaml and kinetis soc files
to support ke1xz.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
2024-05-22 15:42:48 -04:00
Emilio Benavente
24c1d3ed70 drivers: gpio_mcux: Support shared interrupts
Updating the driver to support multiple
ports sharing a single interrupt.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-05-22 15:42:48 -04:00
Emilio Benavente
14158d7bf9 dts: arm: nxp: nxp_ke1xz: added dts file.
Added required dts file to support frdm_ke1xz
platforms.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
2024-05-22 15:42:48 -04:00
Emilio Benavente
ed19ce0ab0 west: updated west.yml to grab ke15z Pinctrl definitions
Updated the west.yml file to add pinctrl support
required for the frdm_ke15z board.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Signed-off-by: Pavel Krenek <pavel.krenek@nxp.com>
2024-05-22 15:42:48 -04:00
Marcin Niestroj
7aa8e2f521 drivers: nsos: fix ENOMEM return from ZFD_IOCTL_POLL_PREPARE
ioctl() API expects error codes to be returned as negative value directly,
instead of using 'errno'. Fix ZFD_IOCTL_POLL_PREPARE handling to respect
that.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-22 13:47:32 -05:00
Marcin Niestroj
ea13a70274 drivers: nsos: set errno on failed z_reserve_fd()
Just propagate proper error code, which is the negated return value from
z_reserve_fd().

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-22 13:47:32 -05:00
Marcin Niestroj
7cf49cc6f7 drivers: nsos: fix nsos_sendmsg() error code
There is a goto statement with conversion using errno_from_nsos_mid(). Use
NSOS_MID_ERRNO instead of ERRNO to return proper error code.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-22 13:47:32 -05:00
Marcin Niestroj
3666b46b2e drivers: nsos: propagate POLLHUP from host's epoll()
This flag is set in case socket was closed, so propagate it as well.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-22 13:47:32 -05:00
Jerzy Kasenberg
2f1a07f315 boards: renesas: da1469x_dk_pro: Update SPI pins
Two pins assigned to SPI controller (P0_22,P0_23) are dedicated
to XTAL32K which is present on devkit.

For this reason SPI function are re-assigned to pins available
on optional header MikorBUS 1 to match configuration of SPI2
which is routed to MikorBUS 2 header.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-22 13:47:04 -05:00
Ravi Dondaputi
d8c89f2b08 wifi: shell: Support configuration of timeout in connect command
Add support for configuring timeout in `wifi connect` command.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-05-22 13:46:40 -05:00
Declan Snyder
79f1b23cdb doc: Add missing ABNF macros for child num
Commit 5871ff010b
added support for generated DT macros to get the number
of child nodes of a node, but we forgot to update
the documentation of the augmented Backus–Naur form
of the DT macros to reflect this addition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-22 13:46:04 -05:00
Alberto Escolar Piedras
02d988e784 tests/posix/env: Remove arch posix filter
This test runs fine in "native" targets
based on the toolchain and C library filtering.
As there is no need to exclude this architecture,
let's remove the exclusion to improve coverage.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-22 13:45:47 -05:00
Jens Rehhoff Thomsen
1c70e87047 Bluetooth samples: Fix broadcast source device name
The device name explicitly added in the advertising data.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-05-22 13:45:11 -05:00
Alberto Escolar Piedras
cb7f20f436 boards nrf54l15bsim: Update docs with RRAMC, FICR and UICR mention
This board HW models now include the RRAMC, FICR and UICR.
Let's update the docs accordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-22 13:44:54 -05:00
Alberto Escolar Piedras
7f907ec2f2 boards nrf54l15bsim: Enable RRAMC and add storage partition
The RRAMC is now supported by the HW models.
Let's enable the RRAM controller, and
add a storage partition definition which
tests and samples can use by default.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-22 13:44:54 -05:00
Alberto Escolar Piedras
0ec5c9c27b drivers/flash/ nrf RRAM: Support simulated targets
In simulated targets the RRAM is not allocated
starting at address 0x0, but on an area allocated
at runtime.
Let's support this, to enable running the
real RRAM driver for simulated targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-22 13:44:54 -05:00
Alberto Escolar Piedras
f9770ba0c1 manifest: Update nRF hw models to latest
Update the HW models module to:
36b12714a5ed32450d907c89bb118f6280da3483

Including the following:
 * 36b1271 54L15: Added RRAMC, RRAM & UICR
 * b60af23 FICR 54L: Added first version

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-22 13:44:54 -05:00
Andy Ross
7dd4c4d312 soc/qemu_xtensa_dc233c: Use the automatically-generated vector region
Remove all the hard-configured absolute addresses and zillions of tiny
ELF segments in favor of the auto-generated vector region, which is
guaranteed correct as long as core-isa.h is matched to the target.

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-22 13:39:47 -05:00
Andy Ross
3aeefd2250 arch/xtensa: Add automatic vector linkage generation
Existing solutions for linking the Xtensa vector table are a
cut-and-paste mess of inherited code, with more than a dozen special
sections that need to be linked into many special MEMORY{} regions.

Accept the existing convention used by C/asm code, but automatically
detect the needed offsets for the platform from core-isa.h (it can
share the preprocessing with gen_zsr.py) and emit a file that can be
included in lieu of all the existing boilerplate.

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-22 13:39:47 -05:00
Conor Paxton
18541b631f boards: microchip: add icicle kit smp variant
With the introduction of the new Hardware model, we now have an easy
method to describe variants of boards. This is especially helpful for
Microchip's PolarFire SoC Icicle Kit which has a heterogeneous
core-complex. Introduce an SMP capable variant with four SMP capable
harts for the SMP cluster and disables the e51 monitor hart

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2024-05-22 13:39:30 -05:00
Wilfried Chauveau
6a8fcdaf21 boards: fvp_baser_armv8r: add missing SMP variant
ARMFVP configuration was not defined for SMP variants leading to test
failure.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-05-22 13:38:57 -05:00
Vinayak Kariappa Chettimada
bd3a2f5bd1 samples: Bluetooth: hci_ipc: Use LTO when building ISO features
Use Link Time Optimisation (LTO) when building Controller
with Isochronous channels support.

nRF53x SoCs has 256KB flash and using speed optimisation,
which is the default today, overflows flash when adding
new features related to ISO support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-22 13:38:14 -05:00
Vinayak Kariappa Chettimada
32bc8f2221 tests: Bluetooth: init: Build time coverage for Controller optimization
Added build time coverage for added new Controller
optimization related Kconfigs.

New Kconfigs are either covered in samples.yaml or in the
tests/bluetooth/init conf files.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-22 13:38:14 -05:00
Vinayak Kariappa Chettimada
1b7fe792e0 Bluetooth: Controller: Support Link Time Optimizations (LTO)
Support for using Link Time Optimization (LTO) when
building application with open source Bluetooth Low
Energy Controller. This reduces code space usage.

Current Memory Usage at the time of this PR (hci_ipc):

BT_CTLR_OPTIMIZE_FOR_SPEED:
Memory region         Used Size  Region Size  %age Used
           FLASH:      260112 B       256 KB     99.22%
             RAM:       60136 B        64 KB     91.76%
           SRAM1:           0 B        64 KB      0.00%
        IDT_LIST:           0 B        32 KB      0.00%

BT_CTLR_OPTIMIZE_FOR_SIZE:
Memory region         Used Size  Region Size  %age Used
           FLASH:      232292 B       256 KB     88.61%
             RAM:       60128 B        64 KB     91.75%
           SRAM1:           0 B        64 KB      0.00%
        IDT_LIST:           0 B        32 KB      0.00%

BT_CTLR_OPTIMIZE_FOR_APP_DEFAULT:
Memory region         Used Size  Region Size  %age Used
           FLASH:      232292 B       256 KB     88.61%
             RAM:       60128 B        64 KB     91.75%
           SRAM1:           0 B        64 KB      0.00%
        IDT_LIST:           0 B        32 KB      0.00%

BT_CTLR_LTO:
Memory region         Used Size  Region Size  %age Used
           FLASH:      221484 B       256 KB     84.49%
             RAM:       60120 B        64 KB     91.74%
           SRAM1:           0 B        64 KB      0.00%
        IDT_LIST:           0 B        32 KB      0.00%

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-22 13:38:14 -05:00
Vinayak Kariappa Chettimada
31c048f4e3 Bluetooth: Controller: Remove legacy LL optimize for speed dependency
Remove legacy LL optimize for speed dependency required to
support encryption feature in Controller where crypto was
performed in highest priority ISRs to setup encryption in 3
radio events (this now requires 5 radio events in split LL).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-22 13:38:14 -05:00
Shawn Nematbakhsh
00e3ea89dd MAINTAINERS: Add snematbakhsh as OpenTitan platform maintainer
Add myself as maintainer for OpenTitan.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2024-05-22 13:37:21 -05:00
Yong Cong Sin
c211cb347e drivers: sensor: rtio: use catch-remaining for decoding
As new channels are added to the `enum sensor_channel`, some
of the newer channel aren't updated in the whitelist of rtio
decoder.

Instead of specifying every channel in the list, do:
1. Verify that the `channel` is valid
2. cherry-pick the channels that require special handling, i.e.
   1. `three_axis_data`
   2. `byte_data`
   3. `uint64_data`
3. handle the remaining `channel` in the default case as
   `q31_data`

to make sure that all channels are handled.

Updated the pytest to get channel 32, previously nothing would
happen for this channel as there isn't a decoder for it, now
it would return:

```
channel type=32((null))
```

the channel name is NULL because it wasn't added to the channel
name look up table in the sensor_shell.c, that is being fixed
in #72815.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-21 20:55:47 -04:00
Hao Luo
c8ae26549d drivers: i2c: Add support for Apollo3 SoCs I2C
This commit adds support for the I2C which
can be found in Apollo3 SoCs, it can work in
both DMA and non-DMA modes

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-21 20:55:34 -04:00
Flavio Ceolin
95dde52b1e tests: dynamic_thread_stack: Check thread stack permission
Check if a user thread is capable of free another thread stack.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-21 20:54:56 -04:00
Flavio Ceolin
c12f0507b6 userspace: dynamic: Fix k_thread_stack_free verification
k_thread_stack_free syscall was not checking if the caller
had permission to given stack object.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-21 20:54:56 -04:00
Dong Wang
ea288283a3 logging: log_output: Prevent redundant flush with zero-length data
There's such a case captured. When log immediate mode is enabled, each log
message is output per character. However, "log_output_flush()" function is
still called with zero data length at the end of "log_output_process()".
Better to make "buffer_write()" returns immediatley if buffer data
length is zero.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-05-21 20:54:29 -04:00
Paul He
027e00955d samples: pktqueue: remove main.h
Normally main.c file doesn't have a header file, because it doesn't
need to declare any interface to other modules.

In this sample, it makes more sense to put all the relevant macro
definitions in main.c directly.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2024-05-21 20:54:13 -04:00
Marcio Ribeiro
d2c060d1ef test: dac: esp32s2_devkitc bugfix
add dts and dac setting for tests/driver/dac/dac_api

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-05-21 20:53:58 -04:00
Hake Huang
35e266d2c1 tests: dac: frdm_mcx947 add dac test support
add frdm_mcx947 defines in source

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-21 20:53:58 -04:00
Hake Huang
ee91493e64 tests: dac: add rd_rw612_bga support
add dac rd_rw612_bga support

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-21 20:53:58 -04:00
Aurelien Jarno
2194331431 drivers: sensor: stm32_temp/vbat/vref: ensure the ADC is not suspended
The STM32 temperature, battery and voltage reference sensors needs to
write the ADC common registers to enable the corresponding ADC features.
For that we need to ensure that the ADC is not suspended by using the
pm_device_runtime_get/put methods.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-21 20:53:32 -04:00
Daniel Leung
27b0651f7a riscv: pmp: select CONFIG_MEM_DOMAIN_ISOLATED_STACKS
RISC-V PMP implementation supports isolating thread stacks
within the same memory domain, and also is the only
supported operating mode. So select the corresponding
kconfig by default.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-21 20:53:09 -04:00
Daniel Leung
7289dcdcda arm: mpu: select CONFIG_MEM_DOMAIN_ISOLATED_STACKS
ARM MPU implementation supports isolating thread stacks
within the same memory domain, and also is the only
supported operating mode. So select the corresponding
kconfig by default.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-21 20:53:09 -04:00
Daniel Leung
8426a05e0e tests: mem_protect/userspace: use kconfig for other stack tests
This uses the newly introduced CONFIG_MEM_DOMAIN_ISOLATED_STACKS
to determine whether to proceed with the tests to access other
threads' stacks. This provides more precise control on when to
run or skip these tests.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-21 20:53:09 -04:00
Daniel Leung
e6abc035c8 kernel: mem_domain: new config for isolated stacks
This adds a new kconfig to indicate if architecture code
supports isolating thread stacks within the same domain,
and another new kconfig to selectively enable this
behavior.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-21 20:53:09 -04:00
Daniel Leung
169bc07e83 kernel: move memory domain kconfigs into its own file
This moves memory domain related kconfigs into its own file
Kconfig.mem_domain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-21 20:53:09 -04:00
Andy Ross
17a5beb341 kernel: Predicate _cpus_active on CONFIG_PM
This value isn't used outside of the PM subsystem, so don't build it.

More important than the four bytes of .bss was the use of an
atomic_inc().  Some platforms are forced to use
CONFIG_ATOMIC_OPERATIONS_C (but in almost all cases are single-core
devices that won't use atomics at runtime).  There, this turns into a
function call that pulls in the whole atomics implementation.

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-21 15:42:50 -07:00
Jukka Rissanen
356c650ccf net: doc: zperf.h: Add missing doxygen comments
The zperp.h header file was missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
457877fc34 net: doc: wifi_utils.h: Add missing doxygen documentation
The wifi_utils.h was missing couple of doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
0870af5f9f net: doc: wifi_nm.h: Hide internal data from documentation
No need to generate documentation for internal data in wifi_nm.h

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
3b56c7baf8 net: doc: wifi_mgmt.h: Improve documentation
Add missing doxygen comments for wifi_mgmt.h header file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
4a7e6ffde5 net: doc: wifi.h: Improve documentation
Add missing doxygen comments and improve documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
e86719d8cc net: doc: websocket.h: Add missing doxygen comments
Opcodes were not documented. Also removed init function from
public documentation as it is not needed there.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
d44d814bb5 net: doc: virtual.h: Add missing doxygen comment
The virtual API was not properly documented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
a485eb0ddf net: doc: trickle.h: Add missing doxygen comments
The trickle.h was missing couple of doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
c32492af54 net: doc: tftp.h: Fix the @file section
The @brief was in wrong place.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
478f4d1f6d net: doc: socketutils.h: Add missing @file section
This will improve documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
a0b51ebc6f net: doc: socketcan.h: Improve documentation
Add missing doxygen documentation to socketcan.h header file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
97979604de net: doc: socket_types.h: Hide internal data from documentation
No need to generate documentation for internal data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
d433c9cc17 net: doc: socket_service.h: Hide internal documentation
Do not add internal symbols to generated documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b1956dfa08 net: doc: socket_select.h: Hide internal data from documentation
No need to generate public documentation for internal data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
77a8f1b105 net: doc: socket_offload.h: Improve documentation
Fix the socket_offload.h header file documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
f8a3c95132 net: doc: socket_net_mgmt.h: Hide internal docs
No need to generate documentation for internal data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b38132113a net: doc: socket.h: Hide internal documentation
Some of the internal macros can be hidden from generated
documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
8b031c7952 net: doc: sntp.h: Improve documentation
Fix doxygen documentation in sntp.h header file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
6a76641619 net: doc: ptp_time.h: Improve documentation
Fix the documentation in ptp_time.h to improve the documentation
coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
bd0816afea net: doc: ppp.h: Improve PPP documentation
Some of the symbols in ppp.h were not documented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
35c64657a1 net: doc: phy.h: Add missing documentation
Couple of cabatility checking macros were missing documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
c168ef39c0 net: doc: openthread.h: Hide internal symbol
No need to show internal symbols in generated documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
8fed255da5 net: doc: offloaded_netdev.h: Fix doxygen comment
The get_type API function was missing doxygen comment.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
5c91793911 net: doc: net_timeout.h: Fix doxygen comments
Some of the already documented variables were missing proper
doxygen comment.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
2a28a13a6d net: doc: net_stats.h: Improve statistics documentation
Lot of statistics variables were not documented at all.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
d08c93bbc9 net: doc: net_pkt_filter.h: Improve documentation
Add more documentation to net_pkt_filter.h header file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
f1f77046fb net: doc: net_pkt.h: Improve net_pkt documenation
Add more documentation to net_pkt.h

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b330357fdc net: doc: net_mgmt.h: Fix net_mgmt documentation
Some documentation was missing in net_mgmt.h header file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
03e4716830 net: doc: net_ip.h: Improve documention
Add doxygen documentation and hide internal documentation from
generated documents.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
3f24da5761 net: doc: net_if.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
f1d1603eda net: doc: net_event.h: Document network events
Add documentation to events that are triggered by the network stack.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
06abfee94b net: doc: net_context.h: Improve documentation
Some doxygen comments were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
8825075438 net: doc: mqtt_sn.h: Reshuffle doxygen comment
Moving doxygen comment to proper place.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
aa59ac9de1 net: doc: mqtt.h: Improve documentation
Some doxygen comments were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b711f5ac94 net: doc: mii.h: Add missing doxygen comments
Some defines were missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
fe2bc1703d net: doc: mdio.h: Add missing doxygen comments
Some defines were missing proper doxygen comment.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
1366371442 net: doc: lwm2m_path.h: Add missing @file specifier
This will improve document coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
055665238d net: doc: lwm2m.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
a28949b451 net: doc: ipv4_autoconf.h: Improve documentaion
Add missing doxygen comments to improve documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
4d46300be4 net: doc: igmp.h: Improve IGMP documentation
Adding doxygen comments to improve documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
f5ae486c0e net: doc: ieee802154_radio_openthread.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
04d12cc699 net: doc: ieee802154_radio.h: Add more documentation
Added more doxygen comments to ieee802154 radio header file in
order to improve documentation coverage percentage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b3bbc8f763 net: doc: ieee802154_mgmt.h: Improve documentation coverage
Add missing doxygen documentation markers to improve documentation
coverage percentage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
78aaaba2cd net: doc: ieee802154_ie.h: Add more info to documentation
This improves documentation coverage numbers for this file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
effb78d03a net: doc: ieee802154.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
8eb91fa11e net: doc: icmp.h: Add ICMPv4/6 packet type documentation
Descriptions of both the ICMPv4 and v6 packet types were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
3a555048f4 net: doc: http/service.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
5b7b378dfe net: doc: http/server.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
5119235a00 net: doc: http/method.h: Hide internal documentation
Do not generate documentation for internal symbols.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
639fa20d08 net: doc: http/hpack.h: Hide internal documentation
Prevent internal symbols from being in generated documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b0fa414039 net: doc: http/frame.h: Improve documentation
Doxygen documentation was totally missing in this file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
de2cdd538b net: doc: http/client.h: Improve documentation
Add missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
d206c5931a net: doc: hostname.h: Document hostname length macro properly
Max hostname length was not documented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
fb4dda2605 net: doc: gptp.h: Documentation missing for structs
Add more struct documentation to gptp.h

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
9ec0f6ec4f net: doc: ethernet_bridge.h: Hide internal structs from doxygen
Mark internal structs as hidden to avoid generating public
documentation for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
f1852b4a1d net: doc: ethernet.h: Document header file properly
Documentation to various public features was missing.
Also some of the public features were marked in hidden section.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
ce3512bfaf net: doc: dummy.h: Document dummy L2 header file
The dummy L2 header file was missing documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
ee26be4113 net: doc: dsa.h: Hide internal documentation
Do not generate documentation for internal symbols.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
86537ca469 net: doc: dns_resolve.h: Improve documentation
Couple of doxygen comments were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
03e9b3f320 net: doc: dhcpv4.h: Document DHCPv4 message types
The DHCPv4 message type documentation was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
bacff7fd28 net: doc: conn_mgr_monitor.h: Add @file documentation
This improves documentation coverage metric for this file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
931dffd755 net: doc: conn_mgr_connectivity.h: @endcond was incorrectly placed
The net_event_conn_cmd is internal so no need to generate public
documentation for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
b994970068 net: doc: coap: Fix doxygen documentation
Fix doxygen documentation in COAP header files to improve
documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
0a49160d1e net: doc: canbus.h: Added missing @file section
This will improve documentation coverage.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Jukka Rissanen
fb64753c28 net: doc: buf.h: Improve documentation
Added missing doxygen comments. Also hide internal symbols from
generated documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Erwan Gouriou
492cf3c250 boards: steval_stwinbx1: Remove adc support from board's yaml
Leftover from review.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-05-21 15:20:42 -07:00
Phi Bang Nguyen
9e03d5ada3 tests: drivers: build_all: video: Add test for mipi csi2rx
Add test case for mipi csi2rx driver. As this driver selects the csi
driver, the csi node has to be enabled as well.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-21 15:19:52 -07:00
Phi Bang Nguyen
ae8115275c dts: arm: nxp: Add devicetree node for MIPI CSI-2 Rx
Add a node for MIPI CSI-2 Rx in i.MX RT11xx devicetree and connect it to
the CSI node.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-21 15:19:52 -07:00
Phi Bang Nguyen
61a16be840 soc: nxp: imxrt11xx: Enable power, clocks and muxing for MIPI CSI-2 Rx
Enable power and clocks for MIPI CSI-2 Rx.
Configure Video Mux to connect it to CSI.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-21 15:19:52 -07:00
Phi Bang Nguyen
f1846eca02 drivers: video: Add NXP MIPI CSI-2 Rx driver
Add driver to support NXP MIPI CSI-2 Rx which is a MIPI CSI-2 receiver
connecting a camera sensor to the NXP CSI. This IP is present in the
i.MX RT11XX series.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-21 15:19:52 -07:00
Phi Bang Nguyen
fd157a81be dts: bindings: video: Add bindings for NXP MIPI CSI-2 Rx
Add bindings for NXP MIPI CSI-2 Rx which is a MIPI CSI-2 receiver
connecting a camera sensor to the NXP CSI.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-21 15:19:52 -07:00
Javad Rahimipetroudi
c46466e48a boards: stm32wb5mmg_dk: add RGB LED support
This patch add RGB LED support for the TI
TLC59731 RGB controller.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-05-21 16:50:24 -04:00
Javad Rahimipetroudi
9d15f6623a driver: led: add support for TI TLC59731 RGB STRIP controller
TLC59731 is a 3-Channel, 8-Bit, PWM LED Driver with
TI Single-Wire interface (EasySet) protocol.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-05-21 16:50:24 -04:00
Daniel DeGrasse
1ed9ef465b docs: releases: migration-guide-3.7: add note about ST7735R migration
Add note about migration of ST7735R displays to MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-21 16:50:08 -04:00
Daniel DeGrasse
6347aa74c4 tests: drivers: build_all: add st7735r to test
Add entry for st7735r to display build all test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-21 16:50:08 -04:00
Daniel DeGrasse
13ae32e1c2 drivers: display: st7735r: convert to MIPI DBI API
Convert the ST7735R display to use the MIPI DBI API. Boards and overlays
using this display are also updated.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-21 16:50:08 -04:00
Daniel DeGrasse
b8049b41ae drivers: mipi_dbi: mipi_dbi_spi: require 3 wire mode use 9 bit SPI
Require that SPI config within the MIPI DBI API use 9 bit SPI mode, as 3
wire spi requires the command/data bit be packed into the start of the
SPI packet.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-21 16:50:08 -04:00
Declan Snyder
9b9a4eb027 dts: nxp: Add comment reminders to some DT
The RTXXX and RW61X DT are using syscon compatible
depsite not having a syscon. This is a technical debt
to remain aware of. The reason they use these compatibles
is to use the syscon driver which is a shim to an SDK API
that is somewhat similar to syscon.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
5edaa5e276 soc: lpc: Remove peripheral reset code from soc.c
Remove peripheral reset code from soc.c, it should
be handled by driver inits.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
eeb3e808f5 drivers: nxp: Add reset code to driver inits
Add peripheral reset handling code to driver init for:

- mcan
- i2c flexcomm
- spi flexcomm
- lpc mailbox
- mrt timer

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
c2901c3bb6 dts: nxp: Add resets properties to LPC heritage
Add resets properties to nodes on the LPC heritage syscon parts.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
7a17e141cc dts: bindings: Add reset device to some NXP schema
Include reset device binding in some of the NXP LPC
IP bindings to be able to add the resets property.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
565a62065b MAINTAINERS: Add decsny to reset collaborator
Add myself to reset controller collaborator

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
e7d0f3feaf include: reset.h: Add _OR dt spec macros
Add _OR versions of all the reset_dt_spec macros.

Also bump the API version to 0.2.0 (unstable) since
there are multiple implementations of this API.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
399193f54e drivers: reset: Add NXP RSTCTL driver
Add driver for NXP RSTCTL reset controller peripheral.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
1a7d95e26c drivers: reset: Add NXP LPC SYSCON reset driver
Add driver for the peripheral reset control function
of the NXP LPC SYSCON SOC control module.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
1db901e2c9 dts: bindings: Add bindings for NXP LPC resets
Add binding representing the peripheral reset controller
of the NXP LPC SYSCON heritage hardware including SYSCON
itself and the newer RSTCTL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Declan Snyder
eb866a345d dts: bindings: reset_controller: Clarify cell name
Clarify that there needs to be a cell named "id" in order
to be usable by the reset controller macros.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:49:42 -04:00
Anas Nashif
ef5a620b5a manifest: update mipi-syst to latest revision
Update manifest to include recent fixes in mipi-syst.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-05-21 16:49:22 -04:00
Jean-Nicolas Graux
c2f65cddfc net: gptp: fix race condition on timestamp callback
If time aware system has more than 1 gptp port, because there is only
one boolean to handle callback registering, a race condition can occur
for instance in case 2 master ports are waiting for a timestamp following
sending of sync message. More in details, callback may be unregistered
by port 1 while port 2 is waiting for timestamp event.

The issue is solved by declaring as much as boolean and struct
net_if_timestamp_cb as the number of declared ports
(=CONFIG_NET_GPTP_NUM_PORTS).

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
2024-05-21 16:49:05 -04:00
Jean-Nicolas Graux
64aa577c92 net: gptp: fix rate_ratio in gptp_mi_set_ps_sync_cmss()
Setting a ration of 0 breaks the computation of scaled_rate_offset
in gptp_md_follow_up_prepare().

According to IEEE802.1AS 10.2.2.3.9, when sent by clock master
entity, rate_ratio shall be equal to gmRateRatio. But since
in gptp_md_follow_up_prepare(), in case we are the grand master
clock, we take the assumption that clock source is the local clock,
we may set this ratio to 1.0.

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
2024-05-21 16:49:05 -04:00
Jean-Nicolas Graux
cec4818fde net: gptp: do not run clock master sync send SM if we are not the GM clock
Without this patch, in case time aware system is grand master capable
but is not the grand master clock and behave as a bridge so that it
shall ONLY relay SYNC and FUP messages from slave port to master port(s),
SYNC and FUP are mistakenly generated by ClockMasterSyncSend state
machine.

This patch only call ClockMasterSyncSend state machine in case a Grand
Master clock is present and is this time aware system.
This check is not described by IEEE802.1AS. Instead, according to
10.2.9.3, the SiteSyncSync state machine shall not take into account
information from ClockMasterSyncSend in case this time aware system is
not grand-master capable. Current implementation of ClockMasterSyncSend
state machine sends sync indication to the PortSync entities, instead of
sending it to the SiteSyncSync entity. And the SiteSyncSync state machine
does not make any check.

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
2024-05-21 16:49:05 -04:00
Jean-Nicolas Graux
c2cd0fe3ed net: gptp: fix again computation of follow up correction field
Commit 413eceeddb ("net: gptp: fix follow_up message correction_field")
breaks computation of follow up correction field in case time aware system
is not the grand master clock but behave as a transparent clock which relay
sync and follow-up messages from one slave port to one or several master
port(s). In this case, according to IEEE802.AS 11.1.3 and 11.2.14.2.3,
md sync send state machine shall compute the sum of link propagation delay
and residence time, expressed in grand master time base. Then this quantity
shall be added to last received fup correction field to build value of
correction field. This patch checks whether time aware system is the grand
master clock or not, and computes value correction field accordingly.

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
2024-05-21 16:49:05 -04:00
Krzysztof Chruściński
29fd12818d doc: services: debugging: Add documentation for MIPI STP decoder
Add section about MIPI STP decoder.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-21 16:48:28 -04:00
Krzysztof Chruściński
a5931c716f tests: debug: Add test for MIPI STPv2 decoder
Add test suite.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-21 16:48:28 -04:00
Krzysztof Chruściński
299b52d1a7 debug: Add MIPI STPv2 data stream decoder
Add a decoder of STPv2 stream.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-21 16:48:28 -04:00
Declan Snyder
0ae759cb96 boards: nxp: Add frdm_rw612
Add basic board definition of the freedom rw612 board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:48:14 -04:00
Declan Snyder
488760638d soc: nxp: rw: Add flash config header
Add header file for flash configuration blocks
which is an image header consumed by the RW bootrom.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-21 16:48:14 -04:00
Luis Ubieda
788b985509 i2c: nrfx_twi: Refactor nrfx_twi to utilize common code
Code is refactored to take advantage of common codebase shared with
i2c_nrfx_twi_rtio driver.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-21 16:48:00 -04:00
Luis Ubieda
7d5265f610 i2c: Add nRFX TWI RTIO-compatible driver
First version of RTIO-compatible nrfx_twi driver.

Test Setup:
- Board: nrf52840dk
- Test: `tests/drivers/i2c/i2c_ram`
- Additional Kconfig: `CONFIG_I2C_RTIO=y`

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-21 16:48:00 -04:00
Luis Ubieda
34e1333a43 tests: i2c: i2c_ram: Add nrf52840dk overlay
To make it compatible with this test.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-21 16:48:00 -04:00
Jukka Rissanen
64531e8213 manifest: Update net-tools to latest version
Updating net-tools to latest version in order to get the
missing dnsmasq.conf file to Docker.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 16:47:42 -04:00
Henrik Brix Andersen
519813b3ce scripts: west: commands: build: fix pylint issue
Do not end except block with a useless return, use a pass instead. This
fixes pylint R1711: "Useless return at end of function or method
(useless-return)".

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
be14f9802a scripts: west: commands: completion: bash: support shield argument
Add Bash completion support for "west build" shield argument.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
5197660073 scripts: west: commands: build: add argument for specifying shields
Add "west build" argument for specifying shields. This saves users from
having to do "west build ... -- -DSHIELD=...", making shields a much better
integrated feature.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
888900f979 scripts: west: commands: completion: bash: add "west shields" completion
Add Bash completion for the "west shields" command.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
f3e4c9685c scripts: west: commands: shields: add cmd for listing supported shields
Add "west shields" command for listing supported shields.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
a6a3891691 scripts: list_shields: add script for listing the supported shields
Add Python script for listing the supported shields.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
7aadd19d38 scripts: west: completion: bash: add snippet arguments to build command
Add snippet arguments to the "west build" command completion.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Henrik Brix Andersen
b93361e89c scripts: west: build: add snippet argument to usage output
Add example snippet argument to usage output of the "west build" command
and use the singular "SNIPPET" in the generated help text.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:47:24 -04:00
Aleksander Wasaznik
a530010fe2 Bluetooth: Remove useless field init_credits
Remove `bt_l2cap_le_endpoint.init_credits` that has zero uses and is
just taking up RAM for no reason.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-21 16:45:50 -04:00
Scott Worley
c6e3bc3252 soc: microchip: mec: Add new HAL based MEC5 family chips
Add new Microchip MEC chips using the new MEC5 HAL and
add a HAL version of a legacy chip named MECH172x.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-05-21 16:45:30 -04:00
Daniel DeGrasse
0707a6f302 boards: nxp: rd_rw612_bga: add support for goworld 16880 display module
Add support for the goworld 16880 display module. As this display module
only features an FFC cable, it is added as a board overlay for the RW612
BGA. This module uses an ST7796S display controller as well as an FT7401
touch controller (which is managed by the FT5336 input driver)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-21 16:45:16 -04:00
Lucas Romero
3f50197a90 lib: bitarray: add method to find nth bit set in region
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Lucas Romero
752d3c529e lib: bitarray: add method to xor two bitarrays
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Lucas Romero
c5e5686805 lib: bitarray: add method to count bits set in region
This is part one of several changes to add more methods to the bitarray api
so that it can be used for broader usecases, specifically LoRaWAN forward
error correction.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-21 16:44:38 -04:00
Arkadiusz Cholewinski
e36caec3ba CI: Reschedule codecov workflow
Reschedule from '6:25 and 18:25, Monday-Friday'
to 'everyday at the same time'.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-05-21 16:44:19 -04:00
Ben Lauret
4d40a96362 MAINTAINERS: updated hal_renesas maintainers list
Added ioannis-karachalios as maintainer in
the hal_renesas
Moved andrzej-kaczmarek to collaborators and added
blauret as collaborator too.

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2024-05-21 16:43:59 -04:00
cyliang tw
10f0859967 tests: drivers: pwm: pwm_loopback: correct numaker_pfm_m467 pinmux
Fix pinmux of numaker_pfm_m467.overlay to meet pinmux format.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
cyliang tw
07e2e87fde tests: drivers: pwm: pwm_loopback: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for TEST_USERSPACE, so set CONFIG_TEST_USERSPACE=n.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
cyliang tw
60ccb8e425 dts: arm: nuvoton: add pwm node of numaker m2l31x
Update m2l31x.dtsi, to add pwm nodes for pwm driver support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
Piotr Kosycarz
a7cb8659bd scripts: ci: test_plan: add parameter for no of testcase roots
Allow to provide from CLI, threshold value for number of test case roots
selected for execution base on changed files.
When such threshold will be exceeded, full scope will be executed.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-21 16:43:28 -04:00
Piotr Kosycarz
65703a80af scripts: ci: test_plan: fix usage with files
When modified files list is used instead of commit range,
repo object was incorrect.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-21 16:43:28 -04:00
Bartosz Sokolski
852f452b03 boards: nrf54l15pdk: set default pdk to 0.3.0
Replace default pdk board from 0.2.1 to 0.3.0

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2024-05-21 16:42:58 -04:00
Benjamin Lindqvist
ed025b2f04 net: lib: coap_client: observe-related fixes
An earlier pull request implementing observe support was merged too
hastily. It had a few issues:

1. The predicate for whether a request should be marked not ongoing was
wrong (it checked ret != 0 instead of ret < 0)
2. Without observes in mind, MID-based deduplication is not a required
feature. Deduplication was handled implicitly - the exchange would get
dropped after the first response anyway, so duplicate responses would
not get matched to anything. But with observes, there are several
responses in an exchange. This commit adds this.
3. Using coap_request_is_observe(&internal_req->request) in the response
handler requires the whole request to stay in scope for the lifetime of
the observation, which I observed was not always the case. Adding an
is_observe bool to the internal struct improved stability significantly.

With these fixes, GETs with observe option works very well.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2024-05-21 16:42:38 -04:00
Andrej Butok
85755dd83a MAINTAINERS: add butok as "NXP Platforms (MCU)" collaborator
Add myself as "NXP Platforms (MCU)" collaborator.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-05-21 16:42:12 -04:00
Henrik Brix Andersen
59402fd82e drivers: sensor: nxp: kinetis: temp: fix memset() length
Use the correct buffer size when calling memset().

Fixes: #73093

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:41:58 -04:00
Henrik Brix Andersen
0a49b788a4 drivers: sensors: nxp: kinetis: temp: select CONFIG_ADC
The NXP Kinetis temperature sensor depends on CONFIG_ADC. Make the driver
Kconfig select CONFIG_ADC to get better CI coverage (enabling the driver
when CONFIG_SENSOR is enabled without depending on CONFIG_ADC=y).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-21 16:41:58 -04:00
Ioannis Damigos
b21b50b02b drivers/clock_control: Add build assertion for RC32K
Add build assertion for RC32K to prevent user from
disabling RC32K in DT

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-21 18:43:43 +02:00
Ioannis Damigos
ffa5b30c33 dts/bindings/renesas,smartbond-lp-osc: Substitute calibration-interval
Substitute calibration-interval property with kconfig option
SMARTBOND_LP_OSC_CALIBRATION_INTERVAL

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-21 18:43:43 +02:00
Ioannis Damigos
4e58ec3202 drivers/clock_control/smartbond: Always calibrate RC32K
RC32K clocks HW FSM. We should always calibrate it.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-21 18:43:43 +02:00
Adrian Warecki
369a3a1675 soc: intel: adsp: tgl: ace: Set correct virtual memory size
Corrected virtual memory size to match the range supported by the
Translation Lookup Buffer. The TLB size is 16 MB, however the first 128 KB
is dedicated to LPSRAM and bypasses the TLB. This was taken into account in
KERNEL_VM_BASE, so KERNEL_VM_SIZE was reduced accordingly.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-05-21 18:43:37 +02:00
Charlie Gilliland
30f72eb0a3 drivers: eth: stm32: fix typo in Kconfig
For the choice ETH_STM32_HAL_API_VERSION, both options
ETH_STM32_HAL_API_V2 and ETH_STM32_HAL_API_V1 had the same
prompt "Use new HAL driver". This commit fixes the prompt for the
legacy driver.

Signed-off-by: Charlie Gilliland <charliegilly1@gmail.com>
2024-05-21 18:43:29 +02:00
Hake Huang
369ee6d130 doc: mimxrt1160_evk: update doc for linkserver
linkserver cmsis-dap fw need updated for this board

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-21 18:41:17 +02:00
Andrej Butok
14762736b1 dts: nxp_mcxn94x: fix flash write-block-size
- Fix mcxn94x flash write-block-size from 16 to 128.
- Fix flash_program() return error 0x65,
  that means "Address or length does not meet the required alignment."
- The mcxn94x Flash ROM API flash_program() start address and
  the length must be 128 bytes-aligned.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-05-21 18:40:19 +02:00
Emil Gydesen
96c1cfcfb0 tests: Bluetooth: CAP: Add missing CSIP function
The bt_csip_set_coordinator_csis_member_by_conn function
was seemingly missing, causing the CAP unit tests to not build.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-21 18:01:38 +02:00
Robert Lubos
ec0e2d6308 tests: net: lib: http_server: Bump min_ram requirements
The values set as a min_ram requirement were far from the actual RAM
usage reported during build, make them more realistic.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-21 11:51:39 +01:00
Robert Lubos
1ee4a8b52c samples: net: tftp-client: Configs cleanup
As native_posix is no longer supported, due to incompatibility with
CONFIG_POSIX_API, remove a dedicated config for it.
A config for qemu_cortex_m3 needed to enable RNG, as otherwise it's not
available for the platform and gives build error.
Finally,  enable qemu_cortex_m3 build in the CI.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-21 11:51:27 +01:00
Aleksander Wasaznik
93d0eac834 Bluetooth: Host: Forbid holding on to buf given to stack
These are safety checks to guard against silent data corruption. The
implementation currently does not clobber bufs, but soon it will. The
bufs will be zero-copy segmented and fragmented, which involves
overwriting already-sent contents with headers for the next fragment.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-21 11:51:20 +01:00
Anders Storrø
261b358dc3 Bluetooth: Mesh: Shell: Update DFD start bool parse
Changes the parsing of boolean input parameter "PolicyApply"
to DFD start command to use shell boolean parse library.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2024-05-21 11:51:10 +01:00
Ioannis Damigos
8716b6a900 soc/da1469x: Take PD_SYS control only once during initialization
Take PD_SYS control only once during initialization

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-21 11:30:14 +01:00
Ioannis Damigos
d308265f5f west: Update Renesas HAL submodule
Update Renesas HAL submodule

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-21 11:30:14 +01:00
Nazar Palamar
72fcbcbde0 xmc47_relax_kit: board: port xmc47_relax_kit to HWMv2
Port board xmc47_relax_kit to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
a82ac8aeb8 xmc45_relax_kit: board: port xmc45_relax_kit to HWMv2
Port board xmc45_relax_kit to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
2f6fb18cf3 cy8ckit_062_wifi_bt : board: port cy8ckit_062_wifi_bt to HWMv2
Port board cy8ckit_062_wifi_bt to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
279a048a25 cy8ckit_062_ble: board: port cy8ckit_062_ble to HWMv2
Port board cy8ckit_062_ble to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
92a9c9a16a cy8cproto_062_4343w: board: port cy8cproto_062_4343w to HWMv2
Port board cy8cproto_062_4343w to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
281a037b70 cy8ckit_062s4: board: port cy8ckit_062s4 to HWMv2
Port board cy8ckit_062s4 to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
769b6d5d15 cy8cproto-063-ble: board: port cy8cproto-063-ble to HWMv2
Port board cy8cproto-063-ble to HWMv2

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
879c10d818 soc: infineon: port Infineon SOC to HWMv2
Port Infineon SOC to HWMv2.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
242f1f6b78 dts: infineon: move xmc4*** to cat3\xmc\*
- move dts\arm\infineon\xmc4*** files to dts\arm\infineon\cat3\xmc\*

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Nazar Palamar
6ad6d59c4d dts: infineon: port infineon CAT1A (psoc6) to HWMv2
port infineon CAT1A (psoc6) to HWMv2:
1. move dts\arm\cypress\**  to dts\arm\infineon\cat1a\legacy
2. remove dts\arm\cypress\**
3. rename dts\arm\infineon\psoc6 to dts\arm\infineon\cat1a

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-05-21 11:29:49 +01:00
Jun Lin
2ec8f442a5 doc: releases: Add npcx watchdog driver related notes
Add release note and migration guide for npcx watchdog driver
in 3.7 release.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-05-21 11:15:04 +01:00
Jun Lin
c864024c32 driver: watchdog: npcx: support longer watchdog timeout
In the current driver, the longest time of the watchdog timeout is ~8
seconds because the pre-scalar is fixed at 32 (WDCP=5). This commit
removes this limitation by dynamically calculating the pre-scalar
according to the watchdog timeout setting from the API.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-05-21 11:15:04 +01:00
Jamie McCrae
b3ffe0aede mgmt: mcumgr: transport: Add missing net include file
Adds a missing network include file which was causing an undefined
function build failure, likely caused by a recent change affecting
includes in other header files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-05-21 09:36:24 +02:00
Hake Huang
de526632ae doc: mimxrt1160_evk: update board document for linkserver
add linkserver in supported debugger

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-20 20:52:56 -04:00
Hake Huang
a46fb055bc board: mimxrt1160_evk: linkserver support
add linkserver support for mimxrt1160_evk

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-20 20:52:56 -04:00
Tom Chang
3f8fe6b4b5 drivers: espi: npcx: select RING_BUFFER for p80
This CL adds automatic select CONFIG_RING_BUFFER for port 80 multi-byte.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-05-20 20:52:35 -04:00
Tom Chang
fe138fc246 drivers: espi: npcx: update espi taf driver
This CL updates the read, write, erase, and get_channel_status
implementations of NPCX chip.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-05-20 20:52:35 -04:00
Yong Cong Sin
8c6da49f73 arch: riscv: relocate stack unwinding code into a separate file
Declutter `fatal.c` by moving the stack unwinding logic into
`stacktrace.c` and guard its compilation with `CMakeLists.txt`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 20:52:18 -04:00
Yong Cong Sin
10a807537b arch: riscv: Add support for stack unwind without fp
Add a stack unwind implementation that only uses `sp`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 20:52:18 -04:00
Andy Ross
1472195197 soc/qemu_xtensa_dc233c: Use auto-generated interrupt handlers
The script runs as part of the build now.  Use that feature and
remove the old static file from the manually-run script.

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-20 20:50:55 -04:00
Andy Ross
bcf6b27c6b arch/xtensa: xtensa_intgen.py: Emit handlers for all levels
The original code would (unsurprisingly) only emit handler functions
for interrupt levels with interrupts associated with them.  But it
turns out that it's possible to configure an xtensa device with an
empty-but-otherwise-real interrupt level (specifically mt8195 has a
"Level 3" interrupt not associated with any input IRQS, it's one level
above EXCM_LEVEL and one level below the DEBUG exception).

This script is old, and not set up to parse the full core-isa.h
directly, so modifying it to detect this condition is difficult.
Instead, just emit all 15 possible interrupt handlers, even empty
ones.  The extra stubs are harmless as they'll be dropped if uncalled.

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-20 20:50:55 -04:00
Andy Ross
03cafbdaef arch/xtensa: "NMILEVEL" is an optional feature
Some oddballs cores can be generated without an "NMI" interrupt, in
which case core-isa.h will not define XCHAL_NMILEVEL.  This code is
trying to unconditionally mask interrupts, so XCHAL_EXCM_LEVEL is the
pedantically correct choice anyway (NMI's by definition, cannot be
masked).

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-20 20:50:55 -04:00
Andy Ross
6ab7735774 arch/xtensa: Automatically generate interrupt handlers (finally)
The script to generate the _soc_inthandlers.h header has been run
manually for years, only because I was a cmake novice at the time and
unsure how to integrate it into the build.  So every new platform has
to find the script and template file and figure out how to generate
the file.  And in a few cases it looks like we've tried to EDIT the
resulting files in the tree.

Let's finally do this right.  The file is now dropped (for every
xtensa platform) as a "xtensa_handlers.h" file, and there is a Kconfig
to control whether the original/manual file or the new one is used by
the platform code.  We can migrate the other platforms slowly as
people have time to validate.

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-20 20:50:55 -04:00
Hao Luo
35aae8b5c1 drivers: watchdog: Add support for Apollo3 SoCs watchdog
This commit adds support for the watchdog which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-20 20:50:26 -04:00
Helmut Lord
ddc1d8706e snippets: rtt console
Adds a snippet to enable RTT as console backend.

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-05-20 20:49:45 -04:00
Flavio Ceolin
7c06739829 drivers: system_timer: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin
b4a1ac5ac6 drivers: loapic: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin
9faaf0f8ce headers: memory_domain: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin
b8d40c790d headers: arch/x86: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Flavio Ceolin
97ed2a8f03 headers: arch/xtensa: Drop extern attr from functions
Drop extern attribute from function signature.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-20 20:49:25 -04:00
Aurelien Jarno
52935edc5c drivers: sensor: stm32_temp: use sensor_value_from_float()
The temperature being computed using a float variable, use
sensor_value_from_float() instead of sensor_value_from_double(). This
saves some flash.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-20 20:39:01 -04:00
Yong Cong Sin
46ed467339 samples: sensor: sensor_shell: add pytest
Use pytest to test the shell commands.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Yong Cong Sin
d462ed4d95 samples: sensor: sensor_shell: add fake sensor driver
Add a simple fake sensor driver so that the sample is more fun
for boards without real sensor.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Yong Cong Sin
1e196f0f75 sensor: sensor_shell: print something when trig command succeeds
Print something to the shell when the `trig` command
completed successfully.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Anas Nashif
12b96dc324 MAINTAINERS: cleanup x86/xtensa areas
cleanup x86/xtensa areas and update maintainers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-05-20 22:55:39 +03:00
Stephanos Ioannidis
105fc79267 ci: codecov: Fix merged coverage report path
This commit updates the codecov workflow to specify the full coverage
report file path under `files` because codecov-action v4 does not correctly
process the `directory` parameter.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-05-20 12:21:18 -04:00
Hess Nathan
861235a9bc coding guidelines: comply with MISRA Rule 11.6
removed unneeded conversions from integer to pointer

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-20 19:21:01 +03:00
Juliane Schulze
72b20315ea drivers: set LIS2DH default trigger mode to "EDGE_BOTH"
Previous value just activated the ability to trigger for both edges,
without (de)-activating the gpio. This caused an assrtion error in GPIO.h.

Fixes #71227

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-20 18:05:01 +02:00
Patryk Duda
0079ab1cb3 toolchain/llvm: Fix integer macros implementation
Currently __INT64_C() doesn't add any suffix to provided constant which
causes the constant to have 'int' type. On the other side, __UINT64_C()
adds ULL suffix which makes the constant 'unsigned long long'.

Of course, __INT64_C() is wrong here because 'int' type, in most cases,
has 32 bit width.

According to the C standard, these macros are for minimum-width integer
constants. For example, it means that using INT16_C() macro will give
you constant with type the same as 'int_least16_t' type.

Clang doesn't provide defines like __INT_LEAST16_C_SUFFIX__, which makes
implementation difficult, because we need to determine appropriate type
first.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
Patryk Duda
1f4e911d68 toolchain/llvm: Provide integer macros only when necessary
Using '#ifndef' before defining a macro is a good way to provide default
version of the macro if not defined elsewhere. But it has some
disadvantages:
- It hides information about the users of these macros. It's hard to
  determine when this implementation is used.
- Correctness depends on file including order.

It looks like these macros are used only by minimal libc and only if
ENFORCE_ZEPHYR_STDINT is not selected. We expect other libc to provide
their own implementation.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
Patryk Duda
759dcfe18f llvm: stdint: Don't define integer constant macros in llvm.h
Zephyr minimal libc implements integer constant macros using internal
headers provided by GCC, for example INT64_C(x) is just a __INT64_C(x)
which is implemented by the GCC.

Clang compiler doesn't provide these definitions, so we define them
(__INT64_C() and INT64_C()) in zephyr/toolchain/llvm.h, but it looks
like INT64_C() definition doesn't come from llvm.h, but from stdlib.h
despite of checking if __GNUC__ is defined.

This is because Clang sometimes pretends to be GNU compiler:
$ x86_64-pc-linux-gnu-clang -dM -E - < /dev/null | grep "GNU"
 #define __GNUC_MINOR__ 2
 #define __GNUC_PATCHLEVEL__ 1
 #define __GNUC_STDC_INLINE__ 1
 #define __GNUC__ 4

Let's keep the integer constant macros in stdlib.h and their
actual implementation in llvm.h. Also define these macros if __clang__
is defined, just in case.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-20 18:04:54 +02:00
Jordan Yates
44f5a5d5d4 scripts: twisterlib: handlers: early QEMU timeout
Terminate QEMU earlier if the test finishes and no output data is
received for 1 second. This new timeout operates in parallel with the
global test timeout.

For coverage testing, this can reduce the time spent running individual
tests by up to 29 seconds, while still giving the full 30 extra seconds
to dump gcov data if needed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-20 18:04:42 +02:00
Kevin Wang
52284f57ce drivers: counter: fix the bug for atcpit100
Let the callback execute after the interrupt status has cleared.
Because if the callback is executed before the interrupt status
is cleared, it might cause subsequent counter interrupts to fail to
trigger due to the callback function taking too long to execute.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2024-05-20 15:17:15 +01:00
Johan Hedberg
274507fc52 Bluetooth: Controller: Add BT_CTLR_HCI Kconfig option
Add a new option to split off the building of the HCI layer of the
controller. This layer is not needed by the controller unit tests, and
becomes problematic with the planned change to use devicetree for HCI
drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-20 15:16:54 +01:00
frei tycho
85a4b22c3f arch: x86: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-20 15:16:38 +01:00
Aleksander Wasaznik
442f208cb3 Bluetooth: Add BT_LE_ADV_CONN_ONE_TIME
The adv auto resume feature is planned for deprecation. This new define
is the new default applications should use.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-05-20 15:16:03 +01:00
Joel Guittet
b876bd26fd modules: mbedtls: fix pk ecc functions undefined references
Fix undefined reference to mbedtls_pk_ecc_xxx functions following update
to latest mbedtls version.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-05-20 14:43:31 +03:00
Bjarki Arge Andreasen
84e9f52fc4 samples: net: cellular modem: Select modem backend statistics
select modem backend statistics and enable shell in cellular
modem sample. This will help advertise the feature, and can
help quickly identify issues with to small buffers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen
5e193edbc3 modem: chat: implement buffer stats
implement buffer statistics for modem_chat module.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen
88bb45082a modem: ppp: implement modem_statistics
Implement modem buffer statistics for ppp module.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen
b636327601 modem: cmux: Implement modem backend statistics
Implement modem backend statistics into modem CMUX DLCI
channel receive buffer and CMUX transmit and receive buffers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen
9f45102299 modem: backend: uart: async: Implement modem backend stat
Implement modem backend statistics in async uart modem backend.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen
beeb769bb1 modem: backend: uart: isr: Implement modem backend stat
Implement modem backend statistics into isr uart modem backend.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Bjarki Arge Andreasen
aba5580af3 modem: backend: Add statistics module
Add statistics module which tracks the usage of modem backend
transmit/receive buffers if implemented by a backend.

A modem backend may register itself to the modem backend
stat module, and advertise its transmit and receive buffer
sizes and momentary usage (length).

The modem backend module tracks the maximum usage, which can be
output to the shell using the "modem_stats buffer" shell command.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Anders Storrø
f8bbf753fc Bluetooth: Mesh: Change log lvl for element_model_recv
Changes the log level from ERR to DBG for element_model_recv for the
following cases:
- Element does not have the appkey for incoming message.
- Element does not have destination address for incoming meesage.

When the received message is for a group address, element_model_recv
is called for all elements on the device. One or more elements may contain
a model that is subscribing to this address. If more than one element
contains the same model. but they do not all share the same application
key as the incoming message is encrypted with, or they do not all
subscribe to the same group address, then the log will show error
message for these elements, which is misleading.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2024-05-20 14:37:46 +03:00
Chauncy Liu
5d737e2ab4 include: net: fix compiler warning on unused variable & unsupported type
Use ARG_UNUSED on unused variable
Cast variables to correct type to avoid compilation warnings.

Signed-off-by: Chauncy Liu <chauncy@beechwoods.com>
2024-05-20 14:36:35 +03:00
Robert Lubos
9c8ed2dca7 tests: net: ipv6: Add more test cases involving iface state changes
Add tests verifying valid IPv6 ND behaviors on interface state changes,
specifically:
* Verify RS is sent, and upon RA reception prefix and autoconf address
  added accordingly.
* DAD is triggered for autoconf, static and LL IPv6 addresses.
* IPv6 address is not used upon DAD conflict.
* IPv6 neighbor discovery works as expected.
* Multicast transmission/reception is functional after interface state
  changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos
b9f7ffe79d test: net: ipv6: Cleanup Ethernet test interface operation
One of the test interfaces is defined as Ethernet interface, however it
was missing ethernet_init() call, hence for example interface flags were
uninitialized. This can cause issues with multicast tests, as
NET_L2_MULTICAST flag was missing on the interface.

Additionally, Ethernet-type interfaces should use struct
ethernet_context as a base for their context data, otherwise Ethernet L2
will reach to some rubbish memory locations.

Finally, since the interface now defines correct flags, all-nodes
multicast address is now added to the interface automatically as a part
of ND logic. Therefore, skip adding that address manually from
ipv6_setup().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos
f33a183936 tests: net: ipv6: Fix packet leak
Receive callback has to unref the packet received, otherwise we leak
packet.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos
1d7239d00a tests: net: ipv6: Restore original LL address in test_change_ll_addr
Restore the original LL address on the interface after tests, instead of
generating a new one, to avoid dangling link-local IPv6 on the
interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos
adc8fd8bbc tests: net: mld: Add more test cases involving iface state changes
Add more test cases verifying that MLD events/reports are sent
accordingly when interface state changes.

Introduce separate semaphores for waiting for network events, as having
a single one for transmit and events is ambiguous in tests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Robert Lubos
0874f609f1 net: ipv6: Fix DAD conflict detection
Filtering out received packets which source address matches one of our
own addresses has broken the duplicate address detection conflict
reporting.

In case Neighbor Advertisement is sent during DAD collision, the source
address of such packet might be set to the address that triggered the
collision. This address would also be set on our interface, marked as
tentative. Therefore in order to make duplicate address detection work,
we cannot filter out packets in case our own address is still in
tentative state.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Tim Sørensen
68dfaee894 boards: fixed SPI DTS bug for nrf5340_audio_dk board
This fixes the SPI DTS bug on the nrf5340_audio_dk board
which was introduced by b8978e9:
unit address and first address in 'reg' (0x0) don't match
for /soc/peripheral@50000000/spi@a000/sdhc@1
unit address and first address in 'reg' (0x1) don't match
for /soc/peripheral@50000000/spi@a000/cs47l63@2

Signed-off-by: Tim Sørensen <tims@demant.com>
2024-05-20 14:26:03 +03:00
Robert Lubos
62a55d03af net: ipv6: Fix RA RDNSS and DNS_RESOLVER interdependencies
A support for RDNSS option should not force DNS subsystem being enabled
in the system, especially that the option is enabled by default. It
should work the other way around - the option is supported only if DNS
was enabled by the user.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
b042c5796a logging: Fix network backend compilation
Because of include file changes, we now need to include both
hostname.h and net_if.h in the syslog logging module directly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
6924b0d49a tests: net: Exclude native_posix because of socket service
The native_posix board does not work well with eventfd so disable
it with tests that use socket service API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
3770b07a0e tests: net: socketpair: Fix log printing
The LOG_MODULE_REGISTER() was not called anywhere so if one tried
to enable logging, there was a linker error about missing logger
functions.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
7bfbc937e6 tests: openthread: Disable native_posix board
Eventfd is not compatible with native_posix so disable testing
for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
d3df57afd4 tests: openthread: Add CONFIG_NET_TEST to make self contained
Add CONFIG_NET_TEST=y to make the test self contained and not
trying to create native_posix Ethernet interface which will
normally fail.
This prevents this error from printing

[00:00:00.000,000] <err> eth_posix: Cannot create zeth (-1)

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
e670637f42 samples: net: Add net_if.h include
Because of changes in other network header files, the net_if.h
was not included so add it directly to the echo-client and
mqtt_azure sources.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
07d64352fe samples: mgmt: updatehub: Fix build failure on frdm_k64f board
The CONFIG_MAX_THREAD_BYTES=3 needs to be set otherwise this error
is printed by CI.

    Too many thread objects (17)
    Increase CONFIG_MAX_THREAD_BYTES to 3

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
b56297bf16 net: sockets: Check eventfd errors better
With native_sim, this error is seen a lot when socket
service API is used.

  <dbg> net_sock: get_sock_vtable: (net_socket_service):
    Invalid access on sock 3 by thread 0x807a8e0 (net_socket_service)

If we just ignore the error, then we might get into forever
loop which is not good. So if this happens, mark the eventfd
fd as not pollable to basically ignore the eventfd support in
this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
3f1bd6b29e net: sockets: Add extra debug print for invalid socket access
Print also thread name when printing socket access error.
This helps debugging what thread caused it.
Lowering the Error to Debug as we could be missing vtable
for example for eventfd descriptors, this is easily seen when using
socket service API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
d5cd41a0fe net: llmnr_responder: Convert LLMNR responder to use socket service API
Instead of using net_context API directly, the LLMNR responder is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
94433b9ce2 net: mdns_responder: Convert mDNS responder to use socket service API
Instead of using net_context API directly, the mDNS responder is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
9a40066b4f net: dns: Convert resolver to use socket service API
Instead of using net_context API directly, the DNS resolver is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Tomáš Juřena
2fe8e9853b tests: drivers: can: timing: enable all bitrates on STM32H745I-Disco
Enable testing of all CiA recommended bitrates on the STM32H745I.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-05-20 14:24:05 +03:00
Tomáš Juřena
d477c66909 boards: st: stm32h745i_disco: Use PLL2Q as FDCAN clock source
With this configuration of the device tree, we use 80 MHz as
a FDCAN bus clock. This configuration allows to pass the tests.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-05-20 14:24:05 +03:00
Erik Brockhoff
9d8059b6e5 Bluetooth: controller: minor cleanup and a fix-up re. LLCP
Only perform retention if not already done.
Ensure 'sched' is performed on phy ntf even if dle is not.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-05-20 10:56:17 +03:00
Erik Brockhoff
806a4fcf92 Bluetooth: controller: fix node_rx retention mechanism
Ensure that in LLCP reference to node_rx is cleared when
retention is NOT used, to avoid corruption of node_rx later
re-allocated

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-05-20 10:56:17 +03:00
Erik Brockhoff
edef1b7cf4 Bluetooth: controller: fixing rx node leak on CPR reject of parallel CPR
In case a CPR is intiated but rejected due to CPR active on
other connection, rx nodes are leaked due to retained node not
being properly released.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-05-20 10:56:17 +03:00
Lyle Zhu
34c84eccec doc: releases: release-notes-3.7: Add info for Handsfree AG
Added information about implementing handsfree AG to
the Bluetooth section.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-05-19 10:57:33 +03:00
Benjamin Gwin
723a8fcf36 twister: Add logging of stderr for BinaryHandlers
In the case where a test causes the test executor to crash, the stderr
is currently lost, making it hard to debug failures. This changes it
so that the process' stderr gets captured to 'handler_stderr.log' for
inspection.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
2024-05-19 10:57:16 +03:00
Kai Vehmanen
0ca7ef78bc soc: intel_adsp: tools: merge cavstool.py and acetool.py code
Merge codebases of cavstool.py and acetool.py as the two have
a lot of duplicated code.

To ease with transition, keep acetool.py around with implementation
imported from cavstool.py. This will help to keep any automated
testing flows working that assume both tools exist.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-19 10:56:37 +03:00
Bartosz Bilas
7046c9030e drivers: spi: remove deprecated spi_is_ready function
`spi_is_ready` is depreceted since v3.3 so let's remove it.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2024-05-18 12:20:05 -04:00
Jeppe Odgaard
69065fa317 samples: sensors: add veaa_x_3 sample
Add sample for VEAA-X-3 sensor.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Jeppe Odgaard
0b94ab7704 drivers: sensors: add veaa_x_3 proportional pressure regulator sensor
Add driver for Festo VEAA-X-3 series proportional pressure regulator.

The driver assumes that the maximum ADC value matches the maximum
output from the device, and that the maximum DAC value matches the
maximum input value for the device. External hardware is probably
required between the ADC/DAC and the device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Jeppe Odgaard
5e4d55246a dts: bindings: add festo_veaa_x_3 support
Add bindings for the Festo proportional pressure regulator.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Jeppe Odgaard
b6cc70e438 dts: bindings: Add vendor prefix festo
Add vendor prefix for Festo SE & Co. KG

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Björn Stenberg
63c8b950e5 voltage_divider: Add support for single-ended 16-bit ADC
Unless configured as differential, the raw ADC data is unsigned.

Includes workaround for #71119.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2024-05-18 15:55:02 +03:00
Emil Gydesen
7c96743fae Bluetooth: ISO: Upgrade from experimental to unstable
The ISO API and implementation have existed in Zephyr
for several years, and while not fully qualified, stable
or tested yet, it's not experimental anymore (and have
not been for a long time).

This commit removes any references to it being experimental
and instead defines it as unstable by setting the version to
> 0.1.0. 0.8.0 is being used as the initial version, as that
is what other unstable modules was defined to have as their
initial version if they were not stable (>= 1.0.0).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:31 +03:00
Emil Gydesen
c476456c59 Tests: Bluetooth: Add BSIM test of ISO BIS
Adds 2 tests for ISO broadcast.

First test is just a minimal test that sets up a BIG,
transmits data and verifies that it is being received
on the ISO sync receiver.

The second test creates a BIG, disables BT, enables BT,
and the verifies the above.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Emil Gydesen
4a97746312 Bluetooth: Host: Guard set state in conn_destroy
If bt_conn_set_state(conn, BT_CONN_DISCONNECTED) is called
while the connection is already disconnected, this triggers
a warning. This is likely to happen when bt_conn_cleanup_all
is called as part of bt_disable.

Added the state check to avoid unnecessary warnings in the log.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Emil Gydesen
fcf089574d Bluetooth: ISO: Guard sec_level for iso_chan with unicast
The required_sec_level is only valid for unicast iso channels.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Emil Gydesen
c40856e5aa Bluetooth: ISO: Support bt_disable
Add support for bt_disable in the ISO implementation.
This involves clearing all information related to states
in the controller, such as the BIGs and CIGs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:54:19 +03:00
Nikolay Agishev
3ccbef2d55 ARCMWDT: Turn off picolibc support
MetaWare toolchain doesn't support building Zephyr with
Picolibc module. This PR fixes biuld process by turning off
picolibc support on compiler side.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-05-18 15:54:05 +03:00
Daniel Leung
2ad265cb75 kernel: userspace: manipulate _thread_idx_map on per-byte basis
The sys_bitfield_(clear/set)_bit() work on pointer size element.
However, _thread_idx_map[] is a byte array. On little endian
systems, the bitops should work fine. However, on big endian
systems, changing the lower bits may actually be manipulating
memory outside the array when CONFIG_MAX_THREAD_BYTES is not
multiple of 4. So modify the code to perform bit ops on
a per-byte basis.

Fixes #72430

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-05-18 15:53:27 +03:00
Emil Gydesen
f58ac3476f Bluetooth: CAP: Add reference to the set member for CAP discover
Since the CSIP API expects a set member struct for nearly all
functionality, the reference to the full set member (along with
the CAS specific CSIS) should be given to the application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:51:26 +03:00
Yong Cong Sin
cc1894b844 soc: nxp: rw: remove DT_NODE_HAS_STATUS_OKAY
We do not have `DT_NODE_HAS_STATUS_OKAY`, change that to
`DT_NODE_HAS_STATUS(node_id, okay)` instead

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-18 15:51:09 +03:00
Taras Zaporozhets
a20e962340 net: if: Fix potential unaligned word access
The input address originates from an RX net_buf which may
be unaligned. Consequently, word access to this unaligned buffer
can trigger an unaligned access exception on certain platforms,
such as the ARMv7 Cortex-A9.

Signed-off-by: Taras Zaporozhets <zaporozhets.taras@gmail.com>
2024-05-18 15:50:37 +03:00
Declan Snyder
938050c7ce drivers: lpuart: Fix async configure
Fix async configure function not being called
when the irq driven api is not used, which
both causes a build warning and would not
work at runtime.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-18 15:50:11 +03:00
Tomasz Moń
f4e95ccd48 drivers: udc_dwc2: Properly revive STALLed endpoints
DWC2 documentation unfortunately assigns somewhat confusing semantics to
endpoint "enable"/"disable" and "activate"/"deactivate". The Zephyr USB
device stack endpoint enable/disable refers to DWC2 activate/deactivate.
The DWC2 endpoint enable/disable actions can be loosely referred to
Zephyr USB stack enqueue/dequeue.

Rename the functions and rework internal working to match DWC2
Programming Guide. This makes endpoint halt work as expected by the
stack and therefore fixes all classes that rely on correct STALL
handling. Most notable STALL user is the Mass Storage class.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-18 13:24:26 +02:00
Tomasz Moń
00e2b86708 drivers: udc_dwc2: Process SETUP stage when allowed
DWC2 programming guide mentions that SETUP can only be processed by
application after DOEPINTn.SETUP interrupt. Not respecting this
requirement makes setting Global OUT NAK hang while waiting for
GOUTNAKEFF interrupt until the host starts next control transfer.
Global OUT NAK is necessary if the application ever wants to properly
cancel any ongoing transfer.

Change the processing to comply with the programming guide.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-18 13:24:26 +02:00
Tomasz Moń
fa912f4389 drivers: udc_dwc2: Add missing register bit defines
Add missing GINTSTS, GRXSTSR and DEPCTL bit defines based on nRF54H20
register map.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-18 13:24:26 +02:00
Phi Bang Nguyen
04293dcfac tests: drivers: build_all: video: Add entry for ov5640
Add entry for ov5640 and add mimxrt1170_evk to the test platforms

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-17 14:50:56 -05:00
Phi Bang Nguyen
95657e3312 drivers: video: Add ov5640 camera driver
Add driver to support ov5640 camera sensor

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-17 14:50:56 -05:00
Phi Bang Nguyen
e987321b25 dts: bindings: Add bindings for ov5640 camera
Add bindings for ov5640 camera sensor

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-17 14:50:56 -05:00
Dominik Ermel
cda52f80b5 mgmt/MCUmgr/img: Fix img_mgmt_get_unused_slot_area_id checks
Remove image == -1 check that can not happen anymore.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-17 14:48:24 -05:00
Abderrahmane Jarmouni
4d038fb523 drivers: rtc: stm32: fix error handling
re-enable Write Protection when Init Mode errors.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-17 14:47:05 -05:00
Ioannis Karachalios
d9a49cb761 tests: drivers: rtc: Add support for Smartbond Pro DevKit
This commit should add support for the DA1469x Pro DevKit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-17 14:46:11 -05:00
Ioannis Karachalios
6f0476eb77 drivers: rtc: smartbond: Update RTC driver
This commit should fix the followings:
1.  When an alarm event is initialized, the driver should only
    consume the valid alarm fields, based on the given mask.
    Otherwise, the driver should use default valid subfield
    values.
2.  Setting an alarm event should not return with error code
    if the timer and/or calendar counters have yet to be
    initialized, explicitly. Instead, a log warning should be
    issued.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-17 14:46:11 -05:00
Ioannis Karachalios
b8836ab94a drivers: display: smartbond: Acquire power rail when using PM
The power rail of a peripheral block should always be
acquired/released before/after its employment even if
it's known that it should already be up and running.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-17 14:42:24 -05:00
Torsten Rasmussen
99097bdddb doc: introduce SoC porting guide
Fixes: #27439

This commit introduces an initial SoC porting guide with a general
description of the minimal set of files needed to support a new SoC in
Zephyr, along with some examples of the content.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-05-17 21:41:44 +02:00
Andrzej Głąbek
fa86c518f6 dts: nordic: nrf54h20: Fix exmif node definition
Remove the "snps,designware-spi" compatible from the EXMIF node in
nRF54H20i, as the spi_dw driver cannot be used for this peripheral
without Nordic-specific modifications that are not present upstream.
An attempt to do so (just setting CONFIG_SPI=y will cause that,
as the driver initialization function will be executed then) results
in a bus fault.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-17 14:41:20 -05:00
Karthikeyan Krishnasamy
5e7d74bd23 samples: bluetooth: hci_uart: fix dtsi path in overlay
fix dtsi overlay include path for nrf9160dk_nrf52840

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-05-17 14:40:15 -05:00
Karthikeyan Krishnasamy
89fcb5a9b4 samples: cellular: fix dtsi path in overlay
fix dtsi include path for board nrf9160dk_nrf52840

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-05-17 14:40:15 -05:00
frei tycho
18fd294b5c include: arch: x86: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-17 14:39:21 -05:00
Benjamin Cabé
bdfb6afe70 samples: net: http_server: add link to HTTP Server doc page
Improve navigability in the documentation by adding a link to the main
HTTP Server documentation page to the HTTP Server sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-17 14:38:15 -05:00
2034 changed files with 46768 additions and 15504 deletions

View file

@ -32,6 +32,8 @@ ColumnLimit: 100
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
ForEachMacros:
- 'ARRAY_FOR_EACH'
- 'ARRAY_FOR_EACH_PTR'
- 'FOR_EACH'
- 'FOR_EACH_FIXED_ARG'
- 'FOR_EACH_IDX'

View file

@ -2,7 +2,7 @@ name: Code Coverage with codecov
on:
schedule:
- cron: '25 06,18 * * 1-5'
- cron: '25 06,18 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
@ -222,9 +222,8 @@ jobs:
if: always()
uses: codecov/codecov-action@v4
with:
directory: ./coverage/reports
env_vars: OS,PYTHON
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
files: merged.xml
files: coverage/reports/merged.xml

1
.gitignore vendored
View file

@ -39,6 +39,7 @@ sanity-out*
twister-out*
bsim_out
bsim_bt_out
myresults.xml
tests/RunResults.xml
scripts/grub
doc/reference/kconfig/*.rst

View file

@ -109,6 +109,15 @@ add_library(zephyr_interface INTERFACE)
# flags that come with zephyr_interface.
zephyr_library_named(zephyr)
if(CONFIG_LEGACY_GENERATED_INCLUDE_PATH)
zephyr_include_directories(${PROJECT_BINARY_DIR}/include/generated/zephyr)
message(WARNING "
Warning: CONFIG_LEGACY_GENERATED_INCLUDE_PATH is currently enabled by default
so that user applications can continue to use the legacy include paths for the
generated headers. This Kconfig will be deprecated and eventually removed in
the future releases.")
endif()
zephyr_include_directories(
include
${PROJECT_BINARY_DIR}/include/generated
@ -541,9 +550,9 @@ if(ZEPHYR_GIT_INDEX)
endif()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/include/generated/version.h
OUTPUT ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h
COMMAND ${CMAKE_COMMAND} -DZEPHYR_BASE=${ZEPHYR_BASE}
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/version.h
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h
-DVERSION_TYPE=KERNEL
-DVERSION_FILE=${ZEPHYR_BASE}/VERSION
-DKERNEL_VERSION_CUSTOMIZATION="$<TARGET_PROPERTY:version_h,KERNEL_VERSION_CUSTOMIZATION>"
@ -552,13 +561,13 @@ add_custom_command(
DEPENDS ${ZEPHYR_BASE}/VERSION ${git_dependency}
COMMAND_EXPAND_LISTS
)
add_custom_target(version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/version.h)
add_custom_target(version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h)
if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/include/generated/app_version.h
OUTPUT ${PROJECT_BINARY_DIR}/include/generated/zephyr/app_version.h
COMMAND ${CMAKE_COMMAND} -DZEPHYR_BASE=${ZEPHYR_BASE}
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/app_version.h
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/zephyr/app_version.h
-DVERSION_TYPE=APP
-DVERSION_FILE=${APPLICATION_SOURCE_DIR}/VERSION
-DAPP_VERSION_CUSTOMIZATION="$<TARGET_PROPERTY:app_version_h,APP_VERSION_CUSTOMIZATION>"
@ -567,7 +576,9 @@ if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION)
DEPENDS ${APPLICATION_SOURCE_DIR}/VERSION ${git_dependency}
COMMAND_EXPAND_LISTS
)
add_custom_target(app_version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/app_version.h)
add_custom_target(
app_version_h
DEPENDS ${PROJECT_BINARY_DIR}/include/generated/zephyr/app_version.h)
add_dependencies(zephyr_interface app_version_h)
endif()
@ -622,8 +633,8 @@ set(ZEPHYR_CURRENT_CMAKE_DIR)
get_property(LIBC_LINK_LIBRARIES TARGET zephyr_interface PROPERTY LIBC_LINK_LIBRARIES)
zephyr_link_libraries(${LIBC_LINK_LIBRARIES})
set(syscall_list_h ${CMAKE_CURRENT_BINARY_DIR}/include/generated/syscall_list.h)
set(edk_syscall_list_h ${CMAKE_CURRENT_BINARY_DIR}/edk/include/generated/syscall_list.h)
set(syscall_list_h ${CMAKE_CURRENT_BINARY_DIR}/include/generated/zephyr/syscall_list.h)
set(edk_syscall_list_h ${CMAKE_CURRENT_BINARY_DIR}/edk/include/generated/zephyr/syscall_list.h)
set(syscalls_json ${CMAKE_CURRENT_BINARY_DIR}/misc/generated/syscalls.json)
set(struct_tags_json ${CMAKE_CURRENT_BINARY_DIR}/misc/generated/struct_tags.json)
@ -761,7 +772,7 @@ add_custom_target(${SYSCALL_LIST_H_TARGET} DEPENDS ${syscall_list_h} ${picolibc_
set_property(TARGET ${SYSCALL_LIST_H_TARGET}
APPEND PROPERTY
ADDITIONAL_CLEAN_FILES
${CMAKE_CURRENT_BINARY_DIR}/include/generated/syscalls
${CMAKE_CURRENT_BINARY_DIR}/include/generated/zephyr/syscalls
)
add_custom_target(${PARSE_SYSCALLS_TARGET}
@ -781,19 +792,30 @@ if(CONFIG_TIMEOUT_64BIT)
set(SYSCALL_SPLIT_TIMEOUT_ARG --split-type k_timeout_t --split-type k_ticks_t)
endif()
add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
# Also, some files are written to include/generated/syscalls/
# percepio/TraceRecorder/kernelports/Zephyr/scripts/tz_parse_syscalls.py hardcodes the path
# to the `syscall_list.h`, make a copy of the generated file so that percepio is able to build
if(CONFIG_LEGACY_GENERATED_INCLUDE_PATH)
set(LEGACY_SYSCALL_LIST_H_ARGS
${CMAKE_COMMAND} -E copy
${syscall_list_h}
${CMAKE_CURRENT_BINARY_DIR}/include/generated/syscall_list.h)
endif()
add_custom_command(OUTPUT include/generated/zephyr/syscall_dispatch.c ${syscall_list_h}
# Also, some files are written to include/generated/zephyr/syscalls/
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/build/gen_syscalls.py
--json-file ${syscalls_json} # Read this file
--base-output include/generated/syscalls # Write to this dir
--syscall-dispatch include/generated/syscall_dispatch.c # Write this file
--syscall-export-llext include/generated/syscall_export_llext.c
--base-output include/generated/zephyr/syscalls # Write to this dir
--syscall-dispatch include/generated/zephyr/syscall_dispatch.c # Write this file
--syscall-export-llext include/generated/zephyr/syscall_export_llext.c
--syscall-list ${syscall_list_h}
$<$<BOOL:${CONFIG_USERSPACE}>:--gen-mrsh-files>
${SYSCALL_LONG_REGISTERS_ARG}
${SYSCALL_SPLIT_TIMEOUT_ARG}
COMMAND
${LEGACY_SYSCALL_LIST_H_ARGS}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${PARSE_SYSCALLS_TARGET}
)
@ -801,7 +823,7 @@ add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
# This is passed into all calls to the gen_kobject_list.py script.
set(gen_kobject_list_include_args --include-subsystem-list ${struct_tags_json})
set(DRV_VALIDATION ${PROJECT_BINARY_DIR}/include/generated/driver-validation.h)
set(DRV_VALIDATION ${PROJECT_BINARY_DIR}/include/generated/zephyr/driver-validation.h)
add_custom_command(
OUTPUT ${DRV_VALIDATION}
COMMAND
@ -834,7 +856,7 @@ add_dependencies(zephyr_generated_headers
set(OFFSETS_LIB offsets)
set(OFFSETS_C_PATH ${ARCH_DIR}/${ARCH}/core/offsets/offsets.c)
set(OFFSETS_H_PATH ${PROJECT_BINARY_DIR}/include/generated/offsets.h)
set(OFFSETS_H_PATH ${PROJECT_BINARY_DIR}/include/generated/zephyr/offsets.h)
add_library( ${OFFSETS_LIB} OBJECT ${OFFSETS_C_PATH})
target_include_directories(${OFFSETS_LIB} PRIVATE
@ -1197,7 +1219,7 @@ if(CONFIG_USERSPACE)
PUBLIC $<TARGET_PROPERTY:zephyr_interface,INTERFACE_SYSTEM_INCLUDE_DIRECTORIES>
)
set(KOBJECT_LINKER_HEADER_DATA "${PROJECT_BINARY_DIR}/include/generated/linker-kobject-prebuilt-data.h")
set(KOBJECT_LINKER_HEADER_DATA "${PROJECT_BINARY_DIR}/include/generated/zephyr/linker-kobject-prebuilt-data.h")
add_custom_command(
OUTPUT ${KOBJECT_LINKER_HEADER_DATA}
@ -1205,7 +1227,7 @@ if(CONFIG_USERSPACE)
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/build/gen_kobject_placeholders.py
--object $<TARGET_OBJECTS:kobj_prebuilt_hash_output_lib>
--outdir ${PROJECT_BINARY_DIR}/include/generated
--outdir ${PROJECT_BINARY_DIR}/include/generated/zephyr
--datapct ${CONFIG_KOBJECT_DATA_AREA_RESERVE_EXTRA_PERCENT}
--rodata ${CONFIG_KOBJECT_RODATA_AREA_EXTRA_BYTES}
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
@ -1297,6 +1319,20 @@ if(CONFIG_GEN_ISR_TABLES)
set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES isr_tables.c)
endif()
if(CONFIG_SYMTAB)
add_custom_command(
OUTPUT symtab.c
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/build/gen_symtab.py
-k $<TARGET_FILE:${ZEPHYR_LINK_STAGE_EXECUTABLE}>
-o symtab.c
DEPENDS ${ZEPHYR_LINK_STAGE_EXECUTABLE}
COMMAND_EXPAND_LISTS
)
set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES symtab.c)
endif()
if(CONFIG_USERSPACE)
set(KOBJECT_HASH_LIST kobject_hash.gperf)
set(KOBJECT_HASH_OUTPUT_SRC_PRE kobject_hash_preprocessed.c)
@ -1948,7 +1984,7 @@ if(LOG_DICT_DB_NAME_ARG)
${ZEPHYR_BASE}/scripts/logging/dictionary/database_gen.py
${KERNEL_ELF_NAME}
${LOG_DICT_DB_NAME_ARG}=${LOG_DICT_DB_NAME}
--build-header ${PROJECT_BINARY_DIR}/include/generated/version.h
--build-header ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating logging dictionary database: ${LOG_DICT_DB_NAME}"
DEPENDS ${logical_target_for_zephyr_elf}
@ -2079,13 +2115,13 @@ add_custom_command(
OUTPUT ${llext_edk_file}
# Regenerate syscalls in case CONFIG_LLEXT_EDK_USERSPACE_ONLY
COMMAND ${CMAKE_COMMAND}
-E make_directory edk/include/generated
-E make_directory edk/include/generated/zephyr
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/build/gen_syscalls.py
--json-file ${syscalls_json} # Read this file
--base-output edk/include/generated/syscalls # Write to this dir
--syscall-dispatch edk/include/generated/syscall_dispatch.c # Write this file
--base-output edk/include/generated/zephyr/syscalls # Write to this dir
--syscall-dispatch edk/include/generated/zephyr/syscall_dispatch.c # Write this file
--syscall-list ${edk_syscall_list_h}
$<$<BOOL:${CONFIG_LLEXT_EDK_USERSPACE_ONLY}>:--userspace-only>
${SYSCALL_LONG_REGISTERS_ARG}

View file

@ -151,7 +151,6 @@
/drivers/*/*sam4l* @nandojve
/drivers/*/*cc13xx_cc26xx* @bwitherspoon
/drivers/*/*gd32* @nandojve
/drivers/*/*litex* @mateusz-holenko @kgugala @pgielda
/drivers/*/*mcux* @mmahadevan108 @dleach02
/drivers/*/*stm32* @erwango @ABOSTM @FRASTM
/drivers/*/*native_posix* @aescolar @daor-oti
@ -211,7 +210,6 @@
/drivers/entropy/*b91* @andy-liu-telink
/drivers/entropy/*bt_hci* @JordanYates
/drivers/entropy/*rv32m1* @dleach02
/drivers/entropy/*litex* @mateusz-holenko @kgugala @pgielda
/drivers/ethernet/*dwmac* @npitre
/drivers/ethernet/*stm32* @Nukersson @lochej
/drivers/ethernet/*w5500* @parthitce
@ -257,13 +255,12 @@
/drivers/i2c/i2c_test.c @mbolivar-ampere
/drivers/i2c/*rcar* @aaillet
/drivers/i2c/*kb1200* @ene-steven
/drivers/i2s/*litex* @mateusz-holenko @kgugala @pgielda
/drivers/i2s/i2s_ll_stm32* @avisconti
/drivers/i2s/*nrfx* @anangl
/drivers/i3c/i3c_cdns.c @XenuIsWatching
/drivers/ieee802154/ @rlubos @tbursztyka @jukkar @fgrandel
/drivers/ieee802154/*b91* @andy-liu-telink
/drivers/ieee802154/ieee802154_nrf5* @jciupis
/drivers/ieee802154/ieee802154_nrf5* @ankuns
/drivers/ieee802154/ieee802154_rf2xx* @tbursztyka @nandojve
/drivers/ieee802154/ieee802154_cc13xx* @bwitherspoon @cfriedt @vaishnavachath
/drivers/interrupt_controller/ @dcpleung @nashif
@ -333,6 +330,7 @@
/drivers/sensor/qdec_stm32/ @valeriosetti
/drivers/sensor/rpi_pico_temp/ @soburi
/drivers/sensor/st*/ @avisconti
/drivers/sensor/veaa_x_3/ @jeppenodgaard @MaureenHelm
/drivers/sensor/ene_tack_kb1200/ @ene-steven
/drivers/serial/*b91* @andy-liu-telink
/drivers/serial/uart_altera_jtag.c @nashif @gohshunjing
@ -449,7 +447,6 @@
/dts/riscv/ite/ @ite
/dts/riscv/microchip/microchip-miv.dtsi @galak
/dts/riscv/openisa/rv32m1* @dleach02
/dts/riscv/riscv32-litex-vexriscv.dtsi @mateusz-holenko @kgugala @pgielda
/dts/riscv/starfive/ @rajnesh-kanwal @pfarwsi
/dts/riscv/andes/andes_v5* @cwshu @kevinwang821020 @jimmyzhe
/dts/riscv/niosv/ @sweeaun
@ -484,8 +481,6 @@
/dts/bindings/*/st* @erwango
/dts/bindings/sensor/ams* @alexanderwachter
/dts/bindings/*/sifive* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/litex* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/vexriscv* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/andes* @cwshu @kevinwang821020 @jimmyzhe
/dts/bindings/*/neorv32* @henrikbrixandersen
/dts/bindings/*/*lan91c111* @sgrrzhf

View file

@ -1048,3 +1048,20 @@ config BOOTLOADER_BOSSA_ADAFRUIT_UF2
endchoice
endmenu
menu "Compatibility"
config LEGACY_GENERATED_INCLUDE_PATH
bool "Legacy include path for generated headers"
default y
help
Allow applications and libraries to use the Zephyr legacy include
path for the generated headers which does not use the `zephyr/` prefix.
From now on, i.e., the preferred way to include the `version.h` header is to
use <zephyr/version.h>, this Kconfig is currently enabled by default so that
user applications won't immediately fail to compile.
This Kconfig will be deprecated and eventually removed in the future releases.
endmenu

View file

@ -114,11 +114,7 @@
ACPI:
status: maintained
maintainers:
- jhedberg
- najumon1980
collaborators:
- finikorg
- tbursztyka
files:
- lib/acpi/
- include/zephyr/acpi/
@ -650,6 +646,7 @@ Coding Guidelines:
- nashif
- carlescufi
- jfischer-no
- simhein
files:
- .checkpatch.conf
- .clang-format
@ -856,6 +853,7 @@ Documentation:
- doc/project/
- doc/releases/
- doc/security/
- doc/safety/
- README.rst
- doc/substitutions.txt
- doc/images/Zephyr-Kite-in-tree.png
@ -1094,6 +1092,7 @@ Release Notes:
- include/zephyr/crypto/
- samples/drivers/crypto/
- tests/crypto/
- doc/services/crypto/
labels:
- "area: Crypto / RNG"
tests:
@ -1423,7 +1422,7 @@ Release Notes:
- fgrandel
collaborators:
- rlubos
- jciupis
- ankuns
- cfriedt
- jukkar
files:
@ -1494,6 +1493,8 @@ Release Notes:
"Drivers: Reset":
status: odd fixes
collaborators:
- decsny
files:
- drivers/reset/
- include/zephyr/drivers/reset.h
@ -1674,10 +1675,6 @@ Release Notes:
status: maintained
maintainers:
- dcpleung
collaborators:
- jhedberg
- finikorg
- tbursztyka
files:
- drivers/pcie/
- include/zephyr/drivers/pcie/
@ -1821,6 +1818,7 @@ Release Notes:
- yperess
- tristan-google
- ubieda
- jeppenodgaard
files:
- drivers/sensor/
- include/zephyr/drivers/sensor.h
@ -2418,7 +2416,6 @@ Mbed TLS:
- ithinuel
files:
- tests/crypto/mbedtls/
- doc/services/crypto/
- tests/benchmarks/mbedtls/
labels:
- "area: Crypto / RNG"
@ -3235,11 +3232,12 @@ SiLabs Platforms:
Intel Platforms (X86):
status: maintained
maintainers:
- jhedberg
- edersondisouza
collaborators:
- tbursztyka
- laurenmurphyx64
- najumon1980
- teburd
- dcpleung
- ceolin
files:
- boards/intel/adl/
- boards/intel/ehl/
@ -3248,16 +3246,18 @@ Intel Platforms (X86):
- soc/intel/atom/
- soc/intel/lakemont/
- soc/intel/*_lake/
- drivers/timer/Kconfig.x86
- drivers/timer/hpet.c
- drivers/timer/apic*
labels:
- "platform: X86"
Intel Platforms (Xtensa):
status: maintained
maintainers:
- nashif
- dcpleung
collaborators:
- andyross
- dcpleung
- lyakh
- lgirdwood
- marc-hb
@ -3267,6 +3267,7 @@ Intel Platforms (Xtensa):
- softwarecki
- jxstelter
- marcinszkudlinski
- nashif
files:
- boards/intel/adsp/
- soc/intel/intel_adsp/
@ -3285,6 +3286,7 @@ Intel Platforms (ISH):
collaborators:
- teburd
- likongintel
- nashif
files:
- boards/intel/ish/
- soc/intel/intel_ish/
@ -3352,6 +3354,7 @@ NXP Platforms (MCU):
- yvanderv
- EmilioCBen
- decsny
- butok
files:
- boards/nxp/mimxrt*/
- boards/nxp/frdm*/
@ -3491,6 +3494,21 @@ nRF Platforms:
labels:
- "platform: nRF"
OpenTitan Platforms:
status: maintained
maintainers:
- snematbakhsh
files:
- boards/lowrisc/opentitan_earlgrey/
- drivers/*/*opentitan*
- dts/bindings/*/*opentitan*
- dts/riscv/lowrisc/*opentitan*
- soc/lowrisc/opentitan/
labels:
- "platform: OpenTitan"
description: >-
OpenTitan boards, SOCs, dts files and related drivers.
Renesas SmartBond Platforms:
status: maintained
maintainers:
@ -3629,7 +3647,7 @@ ITE Platforms:
- drivers/sensor/ite/
- drivers/*/*it8xxx2*.c
- drivers/*/*_ite_*
- dts/bindings/*/*ite*
- dts/bindings/*/ite*
- dts/riscv/ite/
- soc/ite/
labels:
@ -3709,8 +3727,6 @@ Infineon Platforms:
- drivers/*/*xmc*
- drivers/sensor/infineon/
- dts/arm/infineon/
- dts/arm/cypress/
- soc/cypress/
- dts/bindings/*/*infineon*
- soc/infineon/
labels:
@ -3719,6 +3735,29 @@ Infineon Platforms:
Infineon SOCs, dts files and related drivers. Infineon Proto, Pioneer, Eval and Relax
boards.
LiteX Platforms:
status: maintained
maintainers:
- tgorochowik
- kgugala
- fkokosinski
collaborators:
- mateusz-holenko
- maass-hamburg
files:
- boards/enjoydigital/litex_vexriscv/
- drivers/*/*litex*
- drivers/spi/spi_litespi*
- drivers/*/Kconfig.litex
- dts/bindings/*/litex*
- dts/riscv/riscv32-litex-vexriscv.dtsi
- include/zephyr/drivers/*/*litex*
- samples/boards/litex/
- samples/drivers/*litex/
- soc/litex/
labels:
- "platform: LiteX"
Panasonic Platforms:
status: maintained
maintainers:
@ -3838,7 +3877,7 @@ TF-M Integration:
labels:
- "area: TF-M"
tests:
- tfm
- trusted-firmware-m
"Toolchain Integration":
@ -4018,9 +4057,6 @@ West:
status: maintained
maintainers:
- najumon1980
- jhedberg
collaborators:
- tbursztyka
files:
- modules/acpica/
labels:
@ -4195,6 +4231,16 @@ West:
labels:
- "area: Storage"
"West project: hal_adi":
status: maintained
maintainers:
- MaureenHelm
collaborators:
- ozersa
files: []
labels:
- "platform: ADI"
"West project: hal_altera":
status: odd fixes
collaborators:
@ -4359,6 +4405,9 @@ West:
status: maintained
maintainers:
- KhiemNguyenT
- ioannis-karachalios
collaborators:
- blauret
- andrzej-kaczmarek
files: []
labels:
@ -4791,15 +4840,14 @@ Xtensa arch:
x86 arch:
status: maintained
maintainers:
- jhedberg
- edersondisouza
collaborators:
- tbursztyka
- andyross
- nashif
- dcpleung
- ceolin
- laurenmurphyx64
- najumon1980
- nashif
files:
- arch/x86/
- include/zephyr/arch/x86/

View file

@ -35,5 +35,7 @@ config ARC_MPU
select GEN_PRIV_STACKS if !(ARC_MPU_VER = 4 || ARC_MPU_VER = 8)
select MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT if !(ARC_MPU_VER = 4 || ARC_MPU_VER = 8)
select MPU_REQUIRES_NON_OVERLAPPING_REGIONS if (ARC_MPU_VER = 4 || ARC_MPU_VER = 8)
select ARCH_MEM_DOMAIN_SUPPORTS_ISOLATED_STACKS
select MEM_DOMAIN_ISOLATED_STACKS
help
Target has ARC MPU

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_ARC_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_ARC_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
/* kernel */

View file

@ -98,7 +98,7 @@ void _arch_isr_direct_pm(void)
if (_kernel.idle) {
_kernel.idle = 0;
z_pm_save_idle_exit();
pm_system_resume();
}
irq_unlock(key);

View file

@ -131,7 +131,7 @@ void _arch_isr_direct_pm(void)
if (_kernel.idle) {
_kernel.idle = 0;
z_pm_save_idle_exit();
pm_system_resume();
}
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)

View file

@ -42,7 +42,7 @@ void _isr_wrapper(void)
* idle, this ensures that the calculation and programming of the
* device for the next timer deadline is not interrupted. For
* non-tickless idle, this ensures that the clearing of the kernel idle
* state is not interrupted. In each case, z_pm_save_idle_exit
* state is not interrupted. In each case, pm_system_resume
* is called with interrupts disabled.
*/
@ -59,7 +59,7 @@ void _isr_wrapper(void)
if (_kernel.idle != 0) {
/* clear kernel idle state */
_kernel.idle = 0;
z_pm_save_idle_exit();
pm_system_resume();
}
/* re-enable interrupts */
__enable_irq();

View file

@ -14,6 +14,8 @@ config ARM_MPU
select MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT if !(CPU_HAS_NXP_MPU || ARMV8_M_BASELINE || ARMV8_M_MAINLINE || AARCH32_ARMV8_R)
select MPU_REQUIRES_NON_OVERLAPPING_REGIONS if CPU_HAS_ARM_MPU && (ARMV8_M_BASELINE || ARMV8_M_MAINLINE || AARCH32_ARMV8_R)
select MPU_GAP_FILLING if AARCH32_ARMV8_R
select ARCH_MEM_DOMAIN_SUPPORTS_ISOLATED_STACKS
select MEM_DOMAIN_ISOLATED_STACKS
help
MCU implements Memory Protection Unit.

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
/* kernel */

View file

@ -13,6 +13,7 @@
* exceptions
*/
#include <zephyr/debug/symtab.h>
#include <zephyr/drivers/pm_cpu_ops.h>
#include <zephyr/arch/common/exc_handle.h>
#include <zephyr/kernel.h>
@ -224,8 +225,16 @@ static void esf_unwind(const z_arch_esf_t *esf)
LOG_ERR("");
while (fp != NULL) {
lr = fp[1];
#ifdef CONFIG_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(lr, &offset);
LOG_ERR("backtrace %2d: fp: 0x%016llx lr: 0x%016llx [%s+0x%x]",
count++, (uint64_t) fp, lr, name, offset);
#else
LOG_ERR("backtrace %2d: fp: 0x%016llx lr: 0x%016llx",
count++, (uint64_t) fp, lr);
#endif
fp = (uint64_t *) fp[0];
}
LOG_ERR("");

View file

@ -7,7 +7,7 @@
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
#include <offsets.h>
#include <zephyr/offsets.h>
#include "boot.h"
#include "macro_priv.inc"

View file

@ -10,7 +10,7 @@
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <offsets.h>
#include <zephyr/offsets.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/arch/arm64/tpidrro_el0.h>
#include <offsets_short.h>

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_ARM64_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_ARM64_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
#define _thread_offset_to_exception_depth \
(___thread_t_arch_OFFSET + ___thread_arch_t_exception_depth_OFFSET)

View file

@ -22,6 +22,8 @@ zephyr_library_sources_ifdef(
multilevel_irq.c
)
zephyr_library_sources_ifdef(CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION multilevel_irq_legacy.c)
zephyr_library_sources_ifdef(CONFIG_SHARED_INTERRUPTS shared_irq.c)
if(NOT CONFIG_ARCH_HAS_TIMING_FUNCTIONS AND

View file

@ -15,3 +15,18 @@ config SEMIHOST
https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc
This option is compatible with hardware and with QEMU, through the
(automatic) use of the -semihosting-config switch when invoking it.
config LEGACY_MULTI_LEVEL_TABLE_GENERATION
bool "Auto generates the multi-level interrupt LUT (deprecated)"
default y
select DEPRECATED
depends on MULTI_LEVEL_INTERRUPTS
depends on !PLIC
depends on !NXP_IRQSTEER
depends on !RV32M1_INTMUX
depends on !CAVS_ICTL
depends on !DW_ICTL_ACE
depends on !DW_ICTL
help
A make-shift Kconfig to continue generating the multi-level interrupt LUT
with the legacy way using DT macros.

View file

@ -15,162 +15,71 @@ BUILD_ASSERT((CONFIG_NUM_2ND_LEVEL_AGGREGATORS * CONFIG_MAX_IRQ_PER_AGGREGATOR)
BIT(CONFIG_2ND_LEVEL_INTERRUPT_BITS),
"L2 bits not enough to cover the number of L2 IRQs");
/*
* Insert code if the node_id is an interrupt controller
*/
#define Z_IF_DT_IS_INTC(node_id, code) \
IF_ENABLED(DT_NODE_HAS_PROP(node_id, interrupt_controller), (code))
/*
* Expands to node_id if its IRQN is equal to `_irq`, nothing otherwise
* This only works for `_irq` between 0 & 4095, see `IS_EQ`
*/
#define Z_IF_DT_INTC_IRQN_EQ(node_id, _irq) IF_ENABLED(IS_EQ(DT_IRQ(node_id, irq), _irq), (node_id))
/*
* Expands to node_id if it's an interrupt controller & its IRQN is `irq`, or nothing otherwise
*/
#define Z_DT_INTC_GET_IRQN(node_id, _irq) \
Z_IF_DT_IS_INTC(node_id, Z_IF_DT_INTC_IRQN_EQ(node_id, _irq))
/**
* Loop through child of "/soc" and get root interrupt controllers with `_irq` as IRQN,
* this assumes only one device has the IRQN
* @param _irq irq number
* @return node_id(s) that has the `_irq` number, or empty if none of them has the `_irq`
* @brief Get the aggregator that's responsible for the given irq
*
* @param irq IRQ number to query
*
* @return Aggregator entry, NULL if irq is level 1 or not found.
*/
#define INTC_DT_IRQN_GET(_irq) \
DT_FOREACH_CHILD_STATUS_OKAY_VARGS(DT_PATH(soc), Z_DT_INTC_GET_IRQN, _irq)
/* If can't find any matching interrupt controller, fills with `NULL` */
#define INTC_DEVICE_INIT(node_id) .dev = DEVICE_DT_GET_OR_NULL(node_id),
#define INIT_IRQ_PARENT_OFFSET(d, i, o) { \
INTC_DEVICE_INIT(d) \
.irq = i, \
.offset = o, \
}
#define IRQ_INDEX_TO_OFFSET(i, base) (base + i * CONFIG_MAX_IRQ_PER_AGGREGATOR)
#define CAT_2ND_LVL_LIST(i, base) \
INIT_IRQ_PARENT_OFFSET(INTC_DT_IRQN_GET(CONFIG_2ND_LVL_INTR_0##i##_OFFSET), \
CONFIG_2ND_LVL_INTR_0##i##_OFFSET, IRQ_INDEX_TO_OFFSET(i, base))
const struct _irq_parent_entry _lvl2_irq_list[CONFIG_NUM_2ND_LEVEL_AGGREGATORS]
= { LISTIFY(CONFIG_NUM_2ND_LEVEL_AGGREGATORS, CAT_2ND_LVL_LIST, (,),
CONFIG_2ND_LVL_ISR_TBL_OFFSET) };
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
BUILD_ASSERT((CONFIG_NUM_3RD_LEVEL_AGGREGATORS * CONFIG_MAX_IRQ_PER_AGGREGATOR) <=
BIT(CONFIG_3RD_LEVEL_INTERRUPT_BITS),
"L3 bits not enough to cover the number of L3 IRQs");
#define CAT_3RD_LVL_LIST(i, base) \
INIT_IRQ_PARENT_OFFSET(INTC_DT_IRQN_GET(CONFIG_3RD_LVL_INTR_0##i##_OFFSET), \
CONFIG_3RD_LVL_INTR_0##i##_OFFSET, IRQ_INDEX_TO_OFFSET(i, base))
const struct _irq_parent_entry _lvl3_irq_list[CONFIG_NUM_3RD_LEVEL_AGGREGATORS]
= { LISTIFY(CONFIG_NUM_3RD_LEVEL_AGGREGATORS, CAT_3RD_LVL_LIST, (,),
CONFIG_3RD_LVL_ISR_TBL_OFFSET) };
#endif /* CONFIG_3RD_LEVEL_INTERRUPTS */
static const struct _irq_parent_entry *get_parent_entry(unsigned int parent_irq,
const struct _irq_parent_entry list[],
unsigned int length)
static const struct _irq_parent_entry *get_intc_entry_for_irq(unsigned int irq)
{
unsigned int i;
const struct _irq_parent_entry *entry = NULL;
const unsigned int level = irq_get_level(irq);
for (i = 0U; i < length; ++i) {
if (list[i].irq == parent_irq) {
entry = &list[i];
break;
/* 1st level aggregator is not registered */
if (level == 1) {
return NULL;
}
const unsigned int intc_irq = irq_get_intc_irq(irq);
/* Find an aggregator entry that matches the level & intc_irq */
STRUCT_SECTION_FOREACH_ALTERNATE(intc_table, _irq_parent_entry, intc) {
if ((intc->level == level) && (intc->irq == intc_irq)) {
return intc;
}
}
__ASSERT(i != length, "Invalid argument: %i", parent_irq);
return entry;
return NULL;
}
const struct device *z_get_sw_isr_device_from_irq(unsigned int irq)
{
const struct device *dev = NULL;
unsigned int level, parent_irq;
const struct _irq_parent_entry *entry = NULL;
const struct _irq_parent_entry *intc = get_intc_entry_for_irq(irq);
level = irq_get_level(irq);
__ASSERT(intc != NULL, "can't find an aggregator to handle irq(%X)", irq);
if (level == 2U) {
parent_irq = irq_parent_level_2(irq);
entry = get_parent_entry(parent_irq,
_lvl2_irq_list,
CONFIG_NUM_2ND_LEVEL_AGGREGATORS);
}
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
else if (level == 3U) {
parent_irq = irq_parent_level_3(irq);
entry = get_parent_entry(parent_irq,
_lvl3_irq_list,
CONFIG_NUM_3RD_LEVEL_AGGREGATORS);
}
#endif /* CONFIG_3RD_LEVEL_INTERRUPTS */
dev = entry != NULL ? entry->dev : NULL;
return dev;
return intc != NULL ? intc->dev : NULL;
}
unsigned int z_get_sw_isr_irq_from_device(const struct device *dev)
{
for (size_t i = 0U; i < CONFIG_NUM_2ND_LEVEL_AGGREGATORS; ++i) {
if (_lvl2_irq_list[i].dev == dev) {
return _lvl2_irq_list[i].irq;
/* Get the IRQN for the aggregator */
STRUCT_SECTION_FOREACH_ALTERNATE(intc_table, _irq_parent_entry, intc) {
if (intc->dev == dev) {
return intc->irq;
}
}
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
for (size_t i = 0U; i < CONFIG_NUM_3RD_LEVEL_AGGREGATORS; ++i) {
if (_lvl3_irq_list[i].dev == dev) {
return _lvl3_irq_list[i].irq;
}
}
#endif /* CONFIG_3RD_LEVEL_INTERRUPTS */
__ASSERT(false, "dev(%p) not found", dev);
return 0;
}
unsigned int z_get_sw_isr_table_idx(unsigned int irq)
{
unsigned int table_idx, level, parent_irq, local_irq, parent_offset;
const struct _irq_parent_entry *entry = NULL;
unsigned int table_idx, local_irq;
const struct _irq_parent_entry *intc = get_intc_entry_for_irq(irq);
const unsigned int level = irq_get_level(irq);
level = irq_get_level(irq);
if (intc != NULL) {
local_irq = irq_from_level(irq, level);
__ASSERT_NO_MSG(local_irq < CONFIG_MAX_IRQ_PER_AGGREGATOR);
if (level == 2U) {
local_irq = irq_from_level_2(irq);
__ASSERT_NO_MSG(local_irq < CONFIG_MAX_IRQ_PER_AGGREGATOR);
parent_irq = irq_parent_level_2(irq);
entry = get_parent_entry(parent_irq,
_lvl2_irq_list,
CONFIG_NUM_2ND_LEVEL_AGGREGATORS);
parent_offset = entry != NULL ? entry->offset : 0U;
table_idx = parent_offset + local_irq;
}
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
else if (level == 3U) {
local_irq = irq_from_level_3(irq);
__ASSERT_NO_MSG(local_irq < CONFIG_MAX_IRQ_PER_AGGREGATOR);
parent_irq = irq_parent_level_3(irq);
entry = get_parent_entry(parent_irq,
_lvl3_irq_list,
CONFIG_NUM_3RD_LEVEL_AGGREGATORS);
parent_offset = entry != NULL ? entry->offset : 0U;
table_idx = parent_offset + local_irq;
}
#endif /* CONFIG_3RD_LEVEL_INTERRUPTS */
else {
table_idx = intc->offset + local_irq;
} else {
/* irq level must be 1 if no intc entry */
__ASSERT(level == 1, "can't find an aggregator to handle irq(%X)", irq);
table_idx = irq;
}

View file

@ -0,0 +1,72 @@
/*
* Copyright (c) 2018 Intel Corporation.
* Copyright (c) 2024 Meta.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/sw_isr_table.h>
#include <zephyr/sys/util.h>
/**
* @file
* @brief This file houses the deprecated legacy macros-generated multi-level interrupt lookup
* table code, compiled when `CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION` is enabled.
*/
/*
* Insert code if the node_id is an interrupt controller
*/
#define Z_IF_DT_IS_INTC(node_id, code) \
IF_ENABLED(DT_NODE_HAS_PROP(node_id, interrupt_controller), (code))
/*
* Expands to node_id if its IRQN is equal to `_irq`, nothing otherwise
* This only works for `_irq` between 0 & 4095, see `IS_EQ`
*/
#define Z_IF_DT_INTC_IRQN_EQ(node_id, _irq) IF_ENABLED(IS_EQ(DT_IRQ(node_id, irq), _irq), (node_id))
/*
* Expands to node_id if it's an interrupt controller & its IRQN is `irq`, or nothing otherwise
*/
#define Z_DT_INTC_GET_IRQN(node_id, _irq) \
Z_IF_DT_IS_INTC(node_id, Z_IF_DT_INTC_IRQN_EQ(node_id, _irq))
/**
* Loop through child of "/soc" and get root interrupt controllers with `_irq` as IRQN,
* this assumes only one device has the IRQN
* @param _irq irq number
* @return node_id(s) that has the `_irq` number, or empty if none of them has the `_irq`
*/
#define INTC_DT_IRQN_GET(_irq) \
DT_FOREACH_CHILD_STATUS_OKAY_VARGS(DT_PATH(soc), Z_DT_INTC_GET_IRQN, _irq)
#define INIT_IRQ_PARENT_OFFSET_2ND(n, d, i, o) \
IRQ_PARENT_ENTRY_DEFINE(intc_l2_##n, DEVICE_DT_GET_OR_NULL(d), i, o, 2)
#define IRQ_INDEX_TO_OFFSET(i, base) (base + i * CONFIG_MAX_IRQ_PER_AGGREGATOR)
#define CAT_2ND_LVL_LIST(i, base) \
INIT_IRQ_PARENT_OFFSET_2ND(i, INTC_DT_IRQN_GET(CONFIG_2ND_LVL_INTR_0##i##_OFFSET), \
CONFIG_2ND_LVL_INTR_0##i##_OFFSET, \
IRQ_INDEX_TO_OFFSET(i, base))
LISTIFY(CONFIG_NUM_2ND_LEVEL_AGGREGATORS, CAT_2ND_LVL_LIST, (;), CONFIG_2ND_LVL_ISR_TBL_OFFSET);
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
BUILD_ASSERT((CONFIG_NUM_3RD_LEVEL_AGGREGATORS * CONFIG_MAX_IRQ_PER_AGGREGATOR) <=
BIT(CONFIG_3RD_LEVEL_INTERRUPT_BITS),
"L3 bits not enough to cover the number of L3 IRQs");
#define INIT_IRQ_PARENT_OFFSET_3RD(n, d, i, o) \
IRQ_PARENT_ENTRY_DEFINE(intc_l3_##n, DEVICE_DT_GET_OR_NULL(d), i, o, 3)
#define CAT_3RD_LVL_LIST(i, base) \
INIT_IRQ_PARENT_OFFSET_3RD(i, INTC_DT_IRQN_GET(CONFIG_3RD_LVL_INTR_0##i##_OFFSET), \
CONFIG_3RD_LVL_INTR_0##i##_OFFSET, \
IRQ_INDEX_TO_OFFSET(i, base))
LISTIFY(CONFIG_NUM_3RD_LEVEL_AGGREGATORS, CAT_3RD_LVL_LIST, (;), CONFIG_3RD_LVL_ISR_TBL_OFFSET);
#endif /* CONFIG_3RD_LEVEL_INTERRUPTS */

View file

@ -9,7 +9,7 @@
#ifndef ZEPHYR_ARCH_MIPS_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_MIPS_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
#define _thread_offset_to_sp \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_sp_OFFSET)

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_NIOS2_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_NIOS2_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
/* kernel */

View file

@ -112,7 +112,7 @@ void posix_irq_check_idle_exit(void)
{
if (_kernel.idle) {
_kernel.idle = 0;
z_pm_save_idle_exit();
pm_system_resume();
}
}
#endif

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_POSIX_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_POSIX_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
/* kernel */

View file

@ -50,7 +50,6 @@ config RISCV_ENABLE_FRAME_POINTER
config RISCV_EXCEPTION_STACK_TRACE
bool
default y
depends on RISCV_ENABLE_FRAME_POINTER
depends on EXCEPTION_STACK_TRACE
imply THREAD_STACK_INFO
help
@ -267,6 +266,8 @@ config RISCV_PMP
select ARCH_MEM_DOMAIN_SYNCHRONOUS_API if USERSPACE
select ARCH_MEM_DOMAIN_DATA if USERSPACE
select THREAD_LOCAL_STORAGE if USERSPACE
select ARCH_MEM_DOMAIN_SUPPORTS_ISOLATED_STACKS
select MEM_DOMAIN_ISOLATED_STACKS
help
MCU implements Physical Memory Protection.

View file

@ -25,4 +25,5 @@ zephyr_library_sources_ifdef(CONFIG_RISCV_PMP pmp.c pmp.S)
zephyr_library_sources_ifdef(CONFIG_THREAD_LOCAL_STORAGE tls.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S)
zephyr_library_sources_ifdef(CONFIG_SEMIHOST semihost.c)
zephyr_library_sources_ifdef(CONFIG_RISCV_EXCEPTION_STACK_TRACE stacktrace.c)
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/debug/symtab.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
@ -28,83 +29,30 @@ static const struct z_exc_handle exceptions[] = {
#define NO_REG " "
#endif
#ifdef CONFIG_RISCV_EXCEPTION_STACK_TRACE
#define MAX_STACK_FRAMES 8
/* Stack trace function */
void z_riscv_unwind_stack(const z_arch_esf_t *esf);
struct stackframe {
uintptr_t fp;
uintptr_t ra;
};
static bool in_stack_bound(uintptr_t addr)
uintptr_t z_riscv_get_sp_before_exc(const z_arch_esf_t *esf)
{
#ifdef CONFIG_THREAD_STACK_INFO
uintptr_t start, end;
/*
* Kernel stack pointer prior this exception i.e. before
* storing the exception stack frame.
*/
uintptr_t sp = (uintptr_t)esf + sizeof(z_arch_esf_t);
if (_current == NULL || arch_is_in_isr()) {
/* We were servicing an interrupt */
int cpu_id;
#ifdef CONFIG_SMP
cpu_id = arch_curr_cpu()->id;
#else
cpu_id = 0;
#endif
start = (uintptr_t)K_KERNEL_STACK_BUFFER(z_interrupt_stacks[cpu_id]);
end = start + CONFIG_ISR_STACK_SIZE;
#ifdef CONFIG_USERSPACE
/* TODO: handle user threads */
if ((esf->mstatus & MSTATUS_MPP) == PRV_U) {
/*
* Exception happened in user space:
* consider the saved user stack instead.
*/
sp = esf->sp;
}
#endif
} else {
start = _current->stack_info.start;
end = Z_STACK_PTR_ALIGN(_current->stack_info.start + _current->stack_info.size);
}
return (addr >= start) && (addr < end);
#else
ARG_UNUSED(addr);
return true;
#endif /* CONFIG_THREAD_STACK_INFO */
return sp;
}
static inline bool in_text_region(uintptr_t addr)
{
extern uintptr_t __text_region_start, __text_region_end;
return (addr >= (uintptr_t)&__text_region_start) && (addr < (uintptr_t)&__text_region_end);
}
static void unwind_stack(const z_arch_esf_t *esf)
{
uintptr_t fp = esf->s0;
uintptr_t ra;
struct stackframe *frame;
if (esf == NULL) {
return;
}
LOG_ERR("call trace:");
for (int i = 0; (i < MAX_STACK_FRAMES) && (fp != 0U) && in_stack_bound(fp);) {
frame = (struct stackframe *)fp - 1;
ra = frame->ra;
if (in_text_region(ra)) {
LOG_ERR(" %2d: fp: " PR_REG " ra: " PR_REG, i, fp, ra);
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
}
fp = frame->fp;
}
LOG_ERR("");
}
#endif /* CONFIG_RISCV_EXCEPTION_STACK_TRACE */
FUNC_NORETURN void z_riscv_fatal_error(unsigned int reason,
const z_arch_esf_t *esf)
{
@ -116,12 +64,6 @@ FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf
{
#ifdef CONFIG_EXCEPTION_DEBUG
if (esf != NULL) {
/*
* Kernel stack pointer prior this exception i.e. before
* storing the exception stack frame.
*/
uintptr_t sp = (uintptr_t)esf + sizeof(z_arch_esf_t);
LOG_ERR(" a0: " PR_REG " t0: " PR_REG, esf->a0, esf->t0);
LOG_ERR(" a1: " PR_REG " t1: " PR_REG, esf->a1, esf->t1);
LOG_ERR(" a2: " PR_REG " t2: " PR_REG, esf->a2, esf->t2);
@ -136,18 +78,16 @@ FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf
LOG_ERR(" a6: " PR_REG " t6: " PR_REG, esf->a6, esf->t6);
LOG_ERR(" a7: " PR_REG, esf->a7);
#endif /* CONFIG_RISCV_ISA_RV32E */
#ifdef CONFIG_USERSPACE
if ((esf->mstatus & MSTATUS_MPP) == 0) {
/*
* Exception happened in user space:
* consider the saved user stack instead.
*/
sp = esf->sp;
}
#endif
LOG_ERR(" sp: " PR_REG, sp);
LOG_ERR(" sp: " PR_REG, z_riscv_get_sp_before_exc(esf));
LOG_ERR(" ra: " PR_REG, esf->ra);
#ifndef CONFIG_SYMTAB
LOG_ERR(" mepc: " PR_REG, esf->mepc);
#else
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(esf->mepc, &offset);
LOG_ERR(" mepc: " PR_REG " [%s+0x%x]", esf->mepc, name, offset);
#endif
LOG_ERR("mstatus: " PR_REG, esf->mstatus);
LOG_ERR("");
}
@ -167,9 +107,9 @@ FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const z_arch_esf
LOG_ERR("");
}
#ifdef CONFIG_RISCV_EXCEPTION_STACK_TRACE
unwind_stack(esf);
#endif /* CONFIG_RISCV_EXCEPTION_STACK_TRACE */
if (IS_ENABLED(CONFIG_RISCV_EXCEPTION_STACK_TRACE) && (esf != NULL)) {
z_riscv_unwind_stack(esf);
}
#endif /* CONFIG_EXCEPTION_DEBUG */
z_fatal_error(reason, esf);
@ -323,6 +263,6 @@ static void z_vrfy_user_fault(unsigned int reason)
z_impl_user_fault(reason);
}
#include <syscalls/user_fault_mrsh.c>
#include <zephyr/syscalls/user_fault_mrsh.c>
#endif /* CONFIG_USERSPACE */

View file

@ -7,7 +7,7 @@
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <offsets.h>
#include <zephyr/offsets.h>
#ifdef CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION
#define LOAD fld

View file

@ -9,6 +9,7 @@
#include <zephyr/logging/log.h>
#include <zephyr/arch/riscv/csr.h>
#include <zephyr/irq_multilevel.h>
#include <zephyr/sw_isr_table.h>
#ifdef CONFIG_RISCV_HAS_PLIC
#include <zephyr/drivers/interrupt_controller/riscv_plic.h>
@ -53,4 +54,17 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
#endif
return irq;
}
#ifdef CONFIG_SHARED_INTERRUPTS
int arch_irq_disconnect_dynamic(unsigned int irq, unsigned int priority,
void (*routine)(const void *parameter), const void *parameter,
uint32_t flags)
{
ARG_UNUSED(priority);
ARG_UNUSED(flags);
return z_isr_uninstall(irq + CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET, routine,
parameter);
}
#endif /* CONFIG_SHARED_INTERRUPTS */
#endif /* CONFIG_DYNAMIC_INTERRUPTS */

View file

@ -8,7 +8,7 @@
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
#include <offsets.h>
#include <zephyr/offsets.h>
#include "asm_macros.inc"
/* exports */

View file

@ -0,0 +1,146 @@
/*
* Copyright (c) 2024 Meta Platforms
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/debug/symtab.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
uintptr_t z_riscv_get_sp_before_exc(const z_arch_esf_t *esf);
#if __riscv_xlen == 32
#define PR_REG "%08" PRIxPTR
#elif __riscv_xlen == 64
#define PR_REG "%016" PRIxPTR
#endif
#define MAX_STACK_FRAMES CONFIG_EXCEPTION_STACK_TRACE_MAX_FRAMES
struct stackframe {
uintptr_t fp;
uintptr_t ra;
};
#ifdef CONFIG_RISCV_ENABLE_FRAME_POINTER
#define SFP_FMT "fp: "
#else
#define SFP_FMT "sp: "
#endif
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
#define LOG_STACK_TRACE(idx, sfp, ra, name, offset) \
LOG_ERR(" %2d: " SFP_FMT PR_REG " ra: " PR_REG " [%s+0x%x]", idx, sfp, ra, name, \
offset)
#else
#define LOG_STACK_TRACE(idx, sfp, ra, name, offset) \
LOG_ERR(" %2d: " SFP_FMT PR_REG " ra: " PR_REG, idx, sfp, ra)
#endif
static bool in_stack_bound(uintptr_t addr, const z_arch_esf_t *esf)
{
#ifdef CONFIG_THREAD_STACK_INFO
uintptr_t start, end;
if (_current == NULL || arch_is_in_isr()) {
/* We were servicing an interrupt */
uint8_t cpu_id = IS_ENABLED(CONFIG_SMP) ? arch_curr_cpu()->id : 0U;
start = (uintptr_t)K_KERNEL_STACK_BUFFER(z_interrupt_stacks[cpu_id]);
end = start + CONFIG_ISR_STACK_SIZE;
#ifdef CONFIG_USERSPACE
} else if (((esf->mstatus & MSTATUS_MPP) == PRV_U) &&
((_current->base.user_options & K_USER) != 0)) {
/* See: zephyr/include/zephyr/arch/riscv/arch.h */
if (IS_ENABLED(CONFIG_PMP_POWER_OF_TWO_ALIGNMENT)) {
start = _current->arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE;
end = _current->arch.priv_stack_start;
} else {
start = _current->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = _current->stack_info.start;
}
#endif /* CONFIG_USERSPACE */
} else {
start = _current->stack_info.start;
end = Z_STACK_PTR_ALIGN(_current->stack_info.start + _current->stack_info.size);
}
return (addr >= start) && (addr < end);
#else
ARG_UNUSED(addr);
ARG_UNUSED(esf);
return true;
#endif /* CONFIG_THREAD_STACK_INFO */
}
static inline bool in_text_region(uintptr_t addr)
{
extern uintptr_t __text_region_start, __text_region_end;
return (addr >= (uintptr_t)&__text_region_start) && (addr < (uintptr_t)&__text_region_end);
}
#ifdef CONFIG_RISCV_ENABLE_FRAME_POINTER
void z_riscv_unwind_stack(const z_arch_esf_t *esf)
{
uintptr_t fp = esf->s0;
uintptr_t ra;
struct stackframe *frame;
LOG_ERR("call trace:");
for (int i = 0; (i < MAX_STACK_FRAMES) && (fp != 0U) && in_stack_bound(fp, esf);) {
frame = (struct stackframe *)fp - 1;
ra = frame->ra;
if (in_text_region(ra)) {
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(ra, &offset);
#endif
LOG_STACK_TRACE(i, fp, ra, name, offset);
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
}
fp = frame->fp;
}
LOG_ERR("");
}
#else /* !CONFIG_RISCV_ENABLE_FRAME_POINTER */
void z_riscv_unwind_stack(const z_arch_esf_t *esf)
{
uintptr_t sp = z_riscv_get_sp_before_exc(esf);
uintptr_t ra;
uintptr_t *ksp = (uintptr_t *)sp;
LOG_ERR("call trace:");
for (int i = 0; (i < MAX_STACK_FRAMES) && ((uintptr_t)ksp != 0U) &&
in_stack_bound((uintptr_t)ksp, esf);
ksp++) {
ra = *ksp;
if (in_text_region(ra)) {
#ifdef CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(ra, &offset);
#endif
LOG_STACK_TRACE(i, (uintptr_t)ksp, ra, name, offset);
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
}
}
LOG_ERR("");
}
#endif /* CONFIG_RISCV_ENABLE_FRAME_POINTER */

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_RISCV_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_RISCV_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
#define _thread_offset_to_sp \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_sp_OFFSET)

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_SPARC_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_SPARC_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
#define _thread_offset_to_y \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_y_OFFSET)

View file

@ -25,8 +25,8 @@
* together.
*/
static mm_reg_t mmio;
#define IN(reg) (sys_read32(mmio + reg * 4) & 0xff)
#define OUT(reg, val) sys_write32((val) & 0xff, mmio + reg * 4)
#define IN(reg) (sys_read32(mmio + (reg) * 4) & 0xff)
#define OUT(reg, val) sys_write32((val) & 0xff, mmio + (reg) * 4)
#elif defined(X86_SOC_EARLY_SERIAL_MMIO8_ADDR)
/* Still other devices use a MMIO region containing packed byte
* registers

View file

@ -140,7 +140,7 @@ struct stack_frame {
#endif
};
#define MAX_STACK_FRAMES 8
#define MAX_STACK_FRAMES CONFIG_EXCEPTION_STACK_TRACE_MAX_FRAMES
__pinned_func
static void unwind_stack(uintptr_t base_ptr, uint16_t cs)

View file

@ -1169,8 +1169,8 @@ static int range_map(void *virt, uintptr_t phys, size_t size,
{
int ret = 0, ret2;
LOG_DBG("%s: %p -> %p (%zu) flags " PRI_ENTRY " mask "
PRI_ENTRY " opt 0x%x", __func__, (void *)phys, virt, size,
LOG_DBG("%s: 0x%" PRIxPTR " -> %p (%zu) flags " PRI_ENTRY " mask "
PRI_ENTRY " opt 0x%x", __func__, phys, virt, size,
entry_flags, mask, options);
#ifdef CONFIG_X86_64
@ -1781,8 +1781,8 @@ static inline int apply_region(pentry_t *ptables, void *start,
__pinned_func
static void set_stack_perms(struct k_thread *thread, pentry_t *ptables)
{
LOG_DBG("update stack for thread %p's ptables at %p: %p (size %zu)",
thread, ptables, (void *)thread->stack_info.start,
LOG_DBG("update stack for thread %p's ptables at %p: 0x%" PRIxPTR " (size %zu)",
thread, ptables, thread->stack_info.start,
thread->stack_info.size);
apply_region(ptables, (void *)thread->stack_info.start,
thread->stack_info.size,
@ -1929,8 +1929,8 @@ int arch_mem_domain_thread_add(struct k_thread *thread)
}
thread->arch.ptables = z_mem_phys_addr(domain->arch.ptables);
LOG_DBG("set thread %p page tables to %p", thread,
(void *)thread->arch.ptables);
LOG_DBG("set thread %p page tables to 0x%" PRIxPTR, thread,
thread->arch.ptables);
/* Check if we're doing a migration from a different memory domain
* and have to remove permissions from its old domain.

View file

@ -7,7 +7,7 @@
#ifndef ZEPHYR_ARCH_X86_INCLUDE_IA32_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_X86_INCLUDE_IA32_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
/* kernel */

View file

@ -6,7 +6,7 @@
#ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#include <zephyr/offsets.h>
#define _thread_offset_to_rsp \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_rsp_OFFSET)

View file

@ -22,6 +22,16 @@ config XTENSA_RESET_VECTOR
This is always needed for the simulator. Real boards may already
implement this in boot ROM.
config XTENSA_GEN_HANDLERS
bool "Automatically generate interrupt handlers"
default n
help
When set, an "xtensa_handlers.h" file is generated
containing definitions for the interrupt entry code of the
target Xtensa core, based automatically on the details in
the core-isa.h file. This replaces the previous scheme
where a _soc_inthandlers.h file would be generated offline.
config XTENSA_USE_CORE_CRT1
bool "Use crt1.S from core"
default y

View file

@ -48,7 +48,7 @@ add_subdirectory(startup)
# are the official places where we find core-isa.h. (Also that we
# undefine __XCC_ because that compiler actually trips an error trying
# to build this file to protect against mismatched versions.)
set(CORE_ISA_DM ${CMAKE_BINARY_DIR}/zephyr/include/generated/core-isa-dM.h)
set(CORE_ISA_DM ${CMAKE_BINARY_DIR}/zephyr/include/generated/zephyr/core-isa-dM.h)
set(CORE_ISA_IN ${CMAKE_BINARY_DIR}/zephyr/include/generated/core-isa-dM.c)
file(WRITE ${CORE_ISA_IN} "#include <xtensa/config/core-isa.h>\n")
add_custom_command(OUTPUT ${CORE_ISA_DM}
@ -73,7 +73,7 @@ else()
endif()
# Generates a list of device-specific scratch register choices
set(ZSR_H ${CMAKE_BINARY_DIR}/zephyr/include/generated/zsr.h)
set(ZSR_H ${CMAKE_BINARY_DIR}/zephyr/include/generated/zephyr/zsr.h)
add_custom_command(OUTPUT ${ZSR_H} DEPENDS ${CORE_ISA_DM}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gen_zsr.py
$<$<BOOL:${CONFIG_XTENSA_MMU}>:--mmu>
@ -84,3 +84,30 @@ add_custom_target(zsr_h DEPENDS ${ZSR_H})
add_dependencies(zephyr_interface zsr_h)
unset(MAY_NEED_SYSCALL_SCRATCH_REG)
# Similar: auto-generate interrupt handlers
set(HANDLERS ${CMAKE_BINARY_DIR}/zephyr/include/generated/xtensa_handlers)
add_custom_command(
OUTPUT ${HANDLERS}_tmp.c
COMMAND ${CMAKE_C_COMPILER} -E -U__XCC__
-I${ZEPHYR_XTENSA_MODULE_DIR}/zephyr/soc/${CONFIG_SOC}
-o ${HANDLERS}_tmp.c
- < ${CMAKE_CURRENT_SOURCE_DIR}/xtensa_intgen.tmpl)
add_custom_command(
OUTPUT ${HANDLERS}.h
DEPENDS ${HANDLERS}_tmp.c
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/xtensa_intgen.py
${HANDLERS}_tmp.c > ${HANDLERS}.h)
add_custom_target(xtensa_handlers_h DEPENDS ${HANDLERS}.h)
add_dependencies(zephyr_interface xtensa_handlers_h)
# Auto-generate interrupt vector entry
set(VECS_LD ${CMAKE_BINARY_DIR}/zephyr/include/generated/xtensa_vectors.ld)
add_custom_command(OUTPUT ${VECS_LD} DEPENDS ${CORE_ISA_DM}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gen_vectors.py
${CORE_ISA_DM} > ${VECS_LD})
add_custom_target(xtensa_vectors_ld DEPENDS ${VECS_LD})
add_dependencies(zephyr_interface xtensa_vectors_ld)

View file

@ -7,7 +7,7 @@
#include <string.h>
#include <zephyr/debug/coredump.h>
#include <xtensa_asm2_context.h>
#include <offsets.h>
#include <zephyr/offsets.h>
#define ARCH_HDR_VER 1
#define XTENSA_BLOCK_HDR_VER 2

View file

@ -10,7 +10,7 @@
#include <xtensa/hal.h>
#include <xtensa_asm2_context.h>
#include <offsets.h>
#include <zephyr/offsets.h>
.section .iram1, "ax"
.align 4

View file

@ -154,6 +154,6 @@ static void z_vrfy_xtensa_user_fault(unsigned int reason)
z_impl_xtensa_user_fault(reason);
}
#include <syscalls/xtensa_user_fault_mrsh.c>
#include <zephyr/syscalls/xtensa_user_fault_mrsh.c>
#endif /* CONFIG_USERSPACE */

122
arch/xtensa/core/gen_vectors.py Executable file
View file

@ -0,0 +1,122 @@
#!/usr/bin/env python3
# Copyright 2023 The ChromiumOS Authors
# SPDX-License-Identifier: Apache-2.0
import sys
import re
# Xtensa Vector Table linker generator
#
# Takes a pre-processed (gcc -dM) core-isa.h file as its first
# argument, and emits a GNU linker section declartion which will
# correctly load the exception vectors and literals as long as their
# code is declared using standard conventions (see below).
#
# The section name will be ".z_xtensa_vectors", and a symbol
# "z_xtensa_vecbase" is emitted containing a valid value for the
# VECBASE SR at runtime.
#
# Obviously, this requires that XCHAL_HAVE_VECBASE=1. A similar trick
# could be played to load vectors at fixed addresses on hardware that
# lacks VECBASE, but the core-isa.h interface is inexplicably
# different.
#
# Because the "standard conventions" (which descend from somewhere in
# Cadence) are not documented anywhere and just end up cut and pasted
# between devices, here's an attempt at a specification:
#
# + The six register window exception vectors are defined with offsets
# internal to their assembly code. They are linked in a single
# section named ".WindowVectors.text".
#
# + The "kernel", "user" and "double exception" vectors are emitted in
# sections named ".KernelExceptionVector.text",
# "UserExceptionVector.text" and "DoubleExceptionVector.text"
# respectively.
#
# + XEA2 interrupt vectors are in sections named
# ".Level<n>InterruptVector.text", except (!) for ones which are
# given special names. The "debug" and "NMI" interrupts (if they
# exist) are technically implemented as standard interrupt vectors
# (of a platform-dependent level), but the code for them is emitted
# in ".DebugExceptionVector.text" and ".NMIExceptionVector.text",
# and not a section corresponding to their interrupt level.
#
# + Any unused bytes at the end of a vector are made available as
# storage for immediate values used by the following vector (Xtensa
# can only back-reference immediates for MOVI/L32R instructions) as
# a "<name>Vector.literal" section. Note that there is no guarantee
# of how much space is available, it depends on the previous
# vector's code size. Zephyr code has historically not used this
# space, as support in existing linker scripts is inconsistent. But
# it's exposed here.
coreisa = sys.argv[1]
debug_level = 0
# Translation for the core-isa.h vs. linker section naming conventions
sect_names = { "DOUBLEEXC" : "DoubleException",
"KERNEL" : "KernelException",
"NMI" : "NMIException",
"USER" : "UserException" }
offsets = {}
with open(coreisa) as infile:
for line in infile.readlines():
m = re.match(r"^#define\s+XCHAL_([^ ]+)_VECOFS\s*(.*)", line.rstrip())
if m:
(sym, val) = (m.group(1), m.group(2))
if sym == "WINDOW_OF4":
# This must be the start of the section
assert eval(val) == 0
elif sym.startswith("WINDOW"):
# Ignore the other window exceptions, they're internally sorted
pass
elif sym == "RESET":
# Ignore, not actually part of the vector table
pass
elif sym == "DEBUG":
# This one is a recursive macro that doesn't expand,
# so handle manually
m = re.match(r"XCHAL_INTLEVEL(\d+)_VECOFS", val)
if not m:
print(f"no intlevel match for debug val {val}")
assert m
debug_level = eval(m.group(1))
else:
if val == "XCHAL_NMI_VECOFS":
# This gets recursively defined in the other
# direction, so ignore the INTLEVEL
pass
else:
addr = eval(val)
m = re.match(r"^INTLEVEL(\d+)", sym)
if m:
offsets[f"Level{m.group(1)}Interrupt"] = addr
else:
offsets[sect_names[sym]] = addr
if debug_level > 0:
old = f"Level{debug_level}Interrupt"
offsets[f"DebugException"] = offsets[old]
del offsets[old]
sects = list(offsets)
sects.sort(key=lambda s: offsets[s])
print("/* Automatically Generated Code - Do Not Edit */")
print("/* See arch/xtensa/core/gen_vector.py */")
print("")
# The 1k alignment is experimental, the docs on the Relocatable Vector
# Option doesn't specify an alignment at all, but writes to the
# bottom bits don't take...
print( " .z_xtensa_vectors : ALIGN(1024) {")
print( " z_xtensa_vecbase = .;")
print(f" KEEP(*(.WindowVectors.text));")
for s in sects:
print(f" KEEP(*(.{s}Vector.literal));")
print( " . = 0x%3.3x;" % (offsets[s]))
print(f" KEEP(*(.{s}Vector.text));")
print(" }")

View file

@ -5,7 +5,7 @@
#include <zephyr/kernel.h>
#include <zephyr/irq_offload.h>
#include <zsr.h>
#include <zephyr/zsr.h>
#include <zephyr/irq.h>
static struct {

View file

@ -5,10 +5,10 @@
*/
#include <xtensa_asm2_s.h>
#include <offsets.h>
#include <zephyr/offsets.h>
#include <offsets_short.h>
#include <zephyr/syscall.h>
#include <zsr.h>
#include <zephyr/zsr.h>
#include <xtensa/config/core-isa.h>

View file

@ -10,13 +10,18 @@
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
#include <kswap.h>
#include <_soc_inthandlers.h>
#include <zephyr/toolchain.h>
#include <zephyr/logging/log.h>
#include <offsets.h>
#include <zsr.h>
#include <zephyr/offsets.h>
#include <zephyr/zsr.h>
#include <zephyr/arch/common/exc_handle.h>
#ifdef CONFIG_XTENSA_GEN_HANDLERS
#include <xtensa_handlers.h>
#else
#include <_soc_inthandlers.h>
#endif
#include <xtensa_internal.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
@ -359,7 +364,7 @@ void *xtensa_excint1_c(int *interrupted_stack)
* thread.
*/
__asm__ volatile("rsil %0, %1"
: "=r" (ignore) : "i"(XCHAL_NMILEVEL));
: "=r" (ignore) : "i"(XCHAL_EXCM_LEVEL));
_current_cpu->nested = 1;
}

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <xtensa/coreasm.h>
#include <zsr.h>
#include <zephyr/zsr.h>
/* WINDOW OVERFLOW AND UNDERFLOW EXCEPTION VECTORS AND ALLOCA EXCEPTION
* HANDLER

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <xtensa_asm2_s.h>
#include <offsets.h>
#include <zsr.h>
#include <zephyr/offsets.h>
#include <zephyr/zsr.h>
#if defined(CONFIG_SIMULATOR_XTENSA) || defined(XT_SIMULATOR)
#include <xtensa/simcall.h>

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <offsets.h>
#include <zephyr/offsets.h>
#include <xtensa/config/tie.h>
#include <xtensa/config/tie-asm.h>

View file

@ -105,13 +105,11 @@ for l in ints_by_lvl:
cprint("#endif")
cprint("")
# Populate empty levels just for sanity. The second-to-last interrupt
# level (usually "debug") typically doesn't have any associated
# vectors, but we don't have any way to know that a-prioi.
max = 0
for lvl in ints_by_lvl:
if lvl > max:
max = lvl
# Populate all theoretical levels just in case. Odd cores have been
# seen in the wild with "empty" interrupt levels that exist in the
# hardware but without any interrupts associated with them. The
# unused handlers will be ignored if uncalled.
max = 15
for lvl in range(0, max+1):
if not lvl in ints_by_lvl:

View file

@ -14,7 +14,7 @@
#include <kernel_internal.h>
#include <string.h>
#include <zephyr/cache.h>
#include <zsr.h>
#include <zephyr/zsr.h>
#ifdef __cplusplus
extern "C" {

View file

@ -7,10 +7,10 @@
#ifndef ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_ASM2_S_H
#define ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_ASM2_S_H
#include <zsr.h>
#include <zephyr/zsr.h>
#include "xtensa_asm2_context.h"
#include <offsets.h>
#include <zephyr/offsets.h>
/* Assembler header! This file contains macros designed to be included
* only by the assembler.

View file

@ -9,7 +9,6 @@ toolchain:
supported:
- adc
- usb_device
- usb_cdc
- ble
- watchdog
- counter

View file

@ -16,7 +16,6 @@ supported:
- i2c
- pwm
- spi
- usb_cdc
- usb_device
- watchdog
vendor: adafruit

View file

@ -0,0 +1,7 @@
# MAX32690 board configuration
# Copyright (c) 2023-2024 Analog Devices, Inc.
# SPDX-License-Identifier: Apache-2.0
config BOARD_MAX32690EVKIT
select SOC_MAX32690_M4 if BOARD_MAX32690EVKIT_MAX32690_M4

View file

@ -0,0 +1,9 @@
# Copyright (c) 2023-2024 Analog Devices, Inc.
# SPDX-License-Identifier: Apache-2.0
board_runner_args(openocd --cmd-pre-init "source [find interface/cmsis-dap.cfg]")
board_runner_args(openocd --cmd-pre-init "source [find target/max32690.cfg]")
board_runner_args(jlink "--device=MAX32690" "--reset-after-load")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,8 @@
# Copyright (c) 2023-2024 Analog Devices, Inc.
# SPDX-License-Identifier: Apache-2.0
board:
name: max32690evkit
vendor: adi
socs:
- name: max32690

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View file

@ -0,0 +1,292 @@
.. _max32690_evkit:
MAX32690EVKIT
#############
Overview
********
The MAX32690 evaluation kit (EV kit) provides a platform for evaluating the capabilities
of the MAX32690 microcontroller, which is an advanced system-on-chip (SoC).
It features an Arm® Cortex®-M4F CPU for efficient computation of complex functions and
algorithms, and the latest generation Bluetooth® 5 Low Energy (Bluetooth LE) radio designed
for wearable and hearable fitness devices, portable and wearable wireless medical devices,
industrial sensors/networks, internet of things (IoT), and asset tracking.
The Zephyr port is running on the MAX32690 MCU.
.. image:: img/max32690evkit_img1.jpg
:align: center
:alt: MAX32690 EVKIT Front
.. image:: img/max32690evkit_img2.jpg
:align: center
:alt: MAX32690 Back
Hardware
********
- MAX32690 MCU:
- Ultra-Efficient Microcontroller for Battery-Powered Applications
- 120MHz Arm Cortex-M4 Processor with FPU
- 7.3728MHz and 60MHz Low-Power Oscillators
- External Crystal Support (32MHz required for BLE)
- 32.768kHz RTC Clock (Requires External Crystal)
- 8kHz Always-On Ultra-Low Power Oscillator
- 3MB Internal Flash, 1MB Internal SRAM (832kB ECC ON)
- TBDμW/MHz Executing from Cache at 1.1V
- 1.8V and 3.3V I/O with No Level Translators
- External Flash & SRAM Expansion Interfaces
- Bluetooth 5.2 LE Radio
- Dedicated, Ultra-Low-Power, 32-Bit RISC-V Coprocessor to Offload Timing-Critical Bluetooth Processing
- Fully Open-Source Bluetooth 5.2 Stack Available
- Supports AoA, AoD, LE Audio, and Mesh
- High-Throughput (2Mbps) Mode
- Long-Range (125kbps and 500kbps) Modes
- Rx Sensitivity: -97.5dBm; Tx Power: +4.5dBm
- Single-Ended Antenna Connection (50Ω)
- Multiple Peripherals for System Control
- 16-Channel DMA
- Up To Five Quad SPI Master (60MHz)/Slave (48MHz)
- Up To Four 1Mbaud UARTs with Flow Control
- Up To Two 1MHz I2C Master/Slave
- I2S Master/Slave
- Eight External Channel, 12-bit 1MSPS SAR ADC w/ on-die temperature sensor
- USB 2.0 Hi-Speed Device
- 16 Pulse Train Engines
- Up To Six 32-Bit Timers with 8mA High Drive
- Up To Two CAN 2.0 Controllers
- Up To Four Micro-Power Comparators
- 1-Wire Master
- Security and Integrity
- ChipDNA Physically Un-clonable Function (PUF)
- Modular Arithmetic Accelerator (MAA), True Random Number Generator (TRNG)
- Secure Nonvolatile Key Storage, SHA-256, AES-128/192/256
- Secure Boot ROM
- External devices connected to the MAX32690EVKIT:
- Bluetooth SMA Connector with a Hinged 2.4GHz Whip Antenna
- 3-Pin Terminal Block for CAN Bus 2.0
- Selectable On-Board High-Precision Voltage Reference
- On-Board HyperRAM
- Stereo Audio Codec with Line-In and Line-Out 3.5mm Jacks
- 128 x 128 (1.45in) Color TFT Display
- USB 2.0 Micro-B Interface to the MAX32690
- USB 2.0 Micro-B to Serial UART
- Board Power Provided by either USB Port
- Jumpers to Enable Optional Pull-Up Resistors on I2C port
- All GPIOs Signals Accessed through 0.1in Headers
- Three Analog Inputs Accessed through 0.1in Headers with Optional Filtering
- SWD 10-Pin Header
- On-Board 3.3V, 1.8V, and 1.1V LDO Regulators
- Individual Power Measurement on All IC Rails through Jumpers
- Two General-Purpose LEDs and One GeneralPurpose Push Button Switch
Supported Features
==================
Below interfaces are supported by Zephyr on MAX32690EVKIT.
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock and reset control |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
Connections and IOs
===================
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| Name | Name | Settings | Description |
+===========+===============+===============+==================================================================================================+
| JP1 | VREF | | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects external voltage reference to VREF pin, must be enabled in software. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects external voltage reference. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP2 | I2C0 PU | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-1 | | | Connects VDDIO (1V8) to I2C0 pull-up resistors. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-3 | | | Connects VDDIOH (3V3) to I2C0 pull-up resistors. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects power from I2C0 pull-up resistors. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP3 | I2C0_SDA_PU | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects pull-up to I2C0A_SDA (P2.7) sourced by I2C0 PU (JP2). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects pull-up from I2C0A_SDA (P2.7) sourced by I2C0 PU (JP2). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP4 | I2C0_SCL_PU | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects pull-up to I2C0A_SCL (P2.8) sourced by I2C0 PU (JP2). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects pull-up from I2C0A_SCL (P2.8) sourced by I2C0 PU (JP2). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP5 | LED0 EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects red LED D1 to P0.14. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects red LED D1 from P0.14. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP6 | LED1 EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects green LED D2 to P2.12. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects green LED D2 from P2.12. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP7 | RX EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects the USB - serial bridge to UART2A_RX (P1.9). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects the USB - serial bridge from UART2A_RX (P1.9). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP8 | TX EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects the USB - serial bridge to UART2A_TX (P1.10). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects the USB - serial bridge from UART2A_TX (P1.10). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP9 | P1_7 SEL | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-1 | | | Connects the USB - serial bridge to UART2A_CTS (P1.7). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-3 | | | Connects I2C2C_SDA (P1.7) to the codec. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP10 | P1_8 SEL | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-1 | | | Connects the USB - serial bridge to UART2A_RTS (P1.8). | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-3 | | | Connects I2C2C_SCL (P1.8) to the codec. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP11 | V_AUX SEL | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-1 | | | Connects V_AUX to 1V8. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 2-3 | | | Connects V_AUX to 3V3. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP12 | VDD3A EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects 3V3 to VDD3A. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects 3V3 from VDD3A. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP13 | VDDIOH EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects 3V3 to VDDIOH. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects 3V3 from VDDIOH. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP14 | VDDB EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects a 3V3 LDO sourced by USB_VBUS (CN1) to VDDB. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects a 3V3 LDO sourced by USB_VBUS (CN1) from VDDB. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP15 | VDDA EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects 1V8 to VDDA. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects 1V8 from VDDA. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP16 | VDDIO EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects 1V8 to VDDIO. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects 1V8 from VDDIO. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP17 | VCORE EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects 1V1 to VCORE. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects 1V1 from VCORE. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JP18 | BLE LDO EN | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects 1V4 to BLE_LDO. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects 1V4 from BLE_LDO. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
| JH6 | ANALOG PORT3 | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 1-2 | | | Connects LPUART0B_RX (P3.0) to the SWD connector. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | 3-4 | | | Connects LPUART0B_TX (P3.1) to the SWD connector. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | Open | | | Disconnects LPUART0B_RX (P3.0) and LPUART0B_TX (P3.1) from the SWD connector. | |
| | | +-----------+ | +-------------------------------------------------------------------------------+ |
| | | | |
+-----------+---------------+---------------+--------------------------------------------------------------------------------------------------+
Programming and Debugging
*************************
Flashing
========
The MAX32690 MCU can be flashed by connecting an external debug probe to the
SWD port. SWD debug can be accessed through the Cortex 10-pin connector, J3.
Logic levels are fixed to VDDIO (1.8V).
Once the debug probe is connected to your host computer, then you can simply run the
``west flash`` command to write a firmware image into flash.
.. note::
This board uses OpenOCD as the default debug interface. You can also use
a Segger J-Link with Segger's native tooling by overriding the runner,
appending ``--runner jlink`` to your ``west`` command(s). The J-Link should
be connected to the standard 2*5 pin debug connector (JW3) using an
appropriate adapter board and cable.
Debugging
=========
Please refer to the `Flashing`_ section and run the ``west debug`` command
instead of ``west flash``.
References
**********
- `MAX32690EVKIT web page`_
.. _MAX32690EVKIT web page:
https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/MAX32690EVKIT.html

View file

@ -0,0 +1,87 @@
/*
* Copyright (c) 2023-2024 Analog Devices, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <adi/max32/max32690.dtsi>
#include <adi/max32/max32690-pinctrl.dtsi>
#include <zephyr/dt-bindings/gpio/adi-max32-gpio.h>
/ {
model = "Analog Devices MAX32690EVKIT";
compatible = "adi,max32690evkit";
chosen {
zephyr,console = &uart2;
zephyr,shell-uart = &uart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
red_led: led_0 {
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
label = "LED0";
};
green_led: led_1 {
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
label = "LED1";
};
};
buttons {
compatible = "gpio-keys";
pb0: pb0 {
gpios = <&gpio4 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "SW2";
};
};
aliases {
led0 = &red_led;
led1 = &green_led;
sw0 = &pb0;
};
};
&clk_ipo {
status = "okay";
};
&clk_ibro {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&gpio4 {
status = "okay";
};
&uart2 {
clock-source = <ADI_MAX32_PRPH_CLK_SRC_IBRO>;
pinctrl-0 = <&uart2a_tx_p1_10 &uart2a_rx_p1_9>;
pinctrl-names = "default";
current-speed = <115200>;
data-bits = <8>;
parity = "none";
status = "okay";
};

View file

@ -0,0 +1,13 @@
identifier: max32690evkit/max32690/m4
name: max32690evkit m4
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- gpio
- serial
ram: 1024
flash: 3072

View file

@ -0,0 +1,13 @@
# Copyright (c) 2023-2024 Analog Devices, Inc.
# SPDX-License-Identifier: Apache-2.0
# Enable GPIO
CONFIG_GPIO=y
# Console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Enable UART
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -148,4 +148,15 @@
ambiq,iom-num = <6>;
};
};
bleif_default: bleif_default{
group1 {
pinmux = <BLEIF_SCK_P30>,
<BLEIF_MISO_P31>,
<BLEIF_MOSI_P32>,
<BLEIF_CSN_P33>,
<BLEIF_STATUS_P35>,
<BLEIF_IRQ_P41>;
};
};
};

View file

@ -84,6 +84,12 @@
};
};
&bleif {
pinctrl-0 = <&bleif_default>;
pinctrl-names = "default";
status = "okay";
};
&uart0 {
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
@ -91,6 +97,50 @@
status = "okay";
};
&wdt0 {
status = "okay";
};
&i2c3 {
compatible = "ambiq,i2c";
pinctrl-0 = <&i2c3_default>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
status = "okay";
};
&counter0 {
status = "okay";
};
&counter1 {
status = "okay";
};
&counter2 {
status = "okay";
};
&counter3 {
status = "okay";
};
&counter4 {
status = "okay";
};
&counter5 {
status = "okay";
};
&counter6 {
status = "okay";
};
&counter7 {
status = "okay";
};
&gpio0_31 {
status = "okay";
};

View file

@ -9,7 +9,10 @@ toolchain:
- gnuarmemb
supported:
- uart
- watchdog
- counter
- gpio
- i2c
testing:
ignore_tags:
- net

View file

@ -193,4 +193,15 @@
ambiq,iom-num = <2>;
};
};
bleif_default: bleif_default{
group1 {
pinmux = <BLEIF_SCK_P30>,
<BLEIF_MISO_P31>,
<BLEIF_MOSI_P32>,
<BLEIF_CSN_P33>,
<BLEIF_STATUS_P35>,
<BLEIF_IRQ_P41>;
};
};
};

View file

@ -84,6 +84,12 @@
};
};
&bleif {
pinctrl-0 = <&bleif_default>;
pinctrl-names = "default";
status = "okay";
};
&uart0 {
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
@ -91,6 +97,50 @@
status = "okay";
};
&wdt0 {
status = "okay";
};
&i2c3 {
compatible = "ambiq,i2c";
pinctrl-0 = <&i2c3_default>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
status = "okay";
};
&counter0 {
status = "okay";
};
&counter1 {
status = "okay";
};
&counter2 {
status = "okay";
};
&counter3 {
status = "okay";
};
&counter4 {
status = "okay";
};
&counter5 {
status = "okay";
};
&counter6 {
status = "okay";
};
&counter7 {
status = "okay";
};
&gpio0_31 {
status = "okay";
};

View file

@ -9,7 +9,10 @@ toolchain:
- gnuarmemb
supported:
- uart
- watchdog
- counter
- gpio
- i2c
testing:
ignore_tags:
- net

View file

@ -14,6 +14,5 @@ supported:
- arduino_spi
- spi
- memc
- usb_cdc
- usb_device
vendor: arduino

View file

@ -14,7 +14,6 @@ supported:
- serial
- spi
- uart
- usb_cdc
- usb_device
- watchdog
vendor: arduino

View file

@ -14,7 +14,6 @@ supported:
- serial
- spi
- uart
- usb_cdc
- usb_device
- watchdog
vendor: arduino

View file

@ -5,7 +5,8 @@ set(SUPPORTED_EMU_PLATFORMS armfvp)
set(ARMFVP_BIN_NAME FVP_BaseR_AEMv8R)
set(ARMFVP_MIN_VERSION 11.16.16)
if(CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH64)
if(CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH64 OR
CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH64_SMP)
set(ARMFVP_FLAGS
-C cluster0.has_aarch64=1
-C cluster0.VMSA_supported=0
@ -38,7 +39,8 @@ if(CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH64)
-C bp.vis.rate_limit-enable=0
-C cache_state_modelled=1
)
elseif(CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH32)
elseif(CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH32 OR
CONFIG_BOARD_FVP_BASER_AEMV8R_FVP_AEMV8R_AARCH32_SMP)
set(ARMFVP_FLAGS
-C cluster0.has_aarch64=0
-C cluster0.VMSA_supported=0

View file

@ -14,6 +14,5 @@ testing:
only_tags:
- arm
- kernel
- tfm
- userspace
- trusted-firmware-m

View file

@ -18,4 +18,4 @@ toolchain:
testing:
default: true
only_tags:
- tfm
- trusted-firmware-m

View file

@ -20,7 +20,6 @@ supported:
- pwm
- spi
- uart
- usb_cdc
- usb_device
- watchdog
vendor: atmel

View file

@ -20,7 +20,6 @@ supported:
- pwm
- spi
- uart
- usb_cdc
- usb_device
- watchdog
vendor: atmel

View file

@ -20,7 +20,6 @@ supported:
- pwm
- spi
- uart
- usb_cdc
- usb_device
- watchdog
vendor: atmel

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
board_set_sim_runner_ifnset(renode)
board_runner_args(renode "--renode-command=$elf=@${PROJECT_BINARY_DIR}/${KERNEL_ELF_NAME}")
board_runner_args(renode "--renode-command=include @${RENODE_SCRIPT}")
board_finalize_runner_args(renode)

View file

@ -0,0 +1,17 @@
# SPDX-License-Identifier: Apache-2.0
board_set_robot_runner_ifnset(renode-robot)
# `--variable` is a renode-test argument, for setting a variable that can be later used in a .robot file:
# ELF: used in common.robot to set the `elf` variable in the default .resc script defined in board.cmake
# RESC: path to the .resc script, defined in board.cmake
# UART: default UART used by Robot in tests, defined in board.cmake
# KEYWORDS: path to common.robot, which contains common Robot keywords
# RESULTS_DIR: directory in which Robot artifacts will be generated after running a testsuite
board_runner_args(renode-robot "--renode-robot-arg=--variable=ELF:@${PROJECT_BINARY_DIR}/${KERNEL_ELF_NAME}")
board_runner_args(renode-robot "--renode-robot-arg=--variable=RESC:@${RENODE_SCRIPT}")
board_runner_args(renode-robot "--renode-robot-arg=--variable=UART:${RENODE_UART}")
board_runner_args(renode-robot "--renode-robot-arg=--variable=KEYWORDS:${ZEPHYR_BASE}/tests/robot/common.robot")
board_runner_args(renode-robot "--renode-robot-arg=--variable=RESULTS_DIR:${APPLICATION_BINARY_DIR}")
board_finalize_runner_args(renode-robot)

View file

@ -7,7 +7,7 @@
/dts-v1/;
#include <cypress/psoc6_cm0.dtsi>
#include <infineon/cat1a/legacy/psoc6_cm0.dtsi>
#include "cy8ckit_062_ble_common.dtsi"
/ {

View file

@ -7,7 +7,7 @@
/dts-v1/;
#include <cypress/psoc6_cm4.dtsi>
#include <infineon/cat1a/legacy/psoc6_cm4.dtsi>
#include "cy8ckit_062_ble_common.dtsi"
/ {

View file

@ -7,7 +7,7 @@
/dts-v1/;
#include <cypress/psoc6_cm0.dtsi>
#include <infineon/cat1a/legacy/psoc6_cm0.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {

View file

@ -6,7 +6,7 @@
/dts-v1/;
#include <cypress/psoc6_cm4.dtsi>
#include <infineon/cat1a/legacy/psoc6_cm4.dtsi>
/ {
model = "cy8ckit_062_wifi_bt_m4 with a Cypress PSoC6 SoC";

View file

@ -18,14 +18,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&ipm0 {
status = "okay";
};

View file

@ -39,15 +39,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
cpu-power-states = <&light_sleep &deep_sleep>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&uart0 {
status = "okay";
current-speed = <115200>;

View file

@ -18,14 +18,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&ipm0 {
status = "okay";
};

View file

@ -39,14 +39,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&uart0 {
status = "okay";
current-speed = <115200>;

View file

@ -18,14 +18,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&ipm0 {
status = "okay";
};

View file

@ -26,14 +26,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&uart0 {
status = "okay";
current-speed = <115200>;

View file

@ -11,7 +11,7 @@
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "Espressif ESP32-DevkitM";
model = "Espressif ESP32C3-DevkitM";
compatible = "espressif,esp32c3";
chosen {
@ -38,10 +38,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_160M>;
};
&uart0 {
status = "okay";
current-speed = <115200>;

View file

@ -39,10 +39,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&uart0 {
status = "okay";
current-speed = <115200>;
@ -163,3 +159,7 @@
&wdt0 {
status = "okay";
};
&dac {
status = "okay";
};

View file

@ -39,10 +39,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&uart0 {
status = "okay";
current-speed = <115200>;

View file

@ -17,14 +17,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&trng0 {
status = "okay";
};

View file

@ -42,14 +42,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&usb_serial {
status = "disabled";
};

View file

@ -17,14 +17,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&trng0 {
status = "okay";
};

View file

@ -42,14 +42,6 @@
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&usb_serial {
status = "okay";
};

Some files were not shown because too many files have changed in this diff Show more