Commit Graph

117 Commits

Author SHA1 Message Date
Alberto Escolar Piedras
3883ef279e boards nrf54l15bsim: Remove out of date notes in doc
Remove two out of date/incorrect notes in the documentation for this
board:
For quite a while now, we have models of some parts of the CRACEN HW.
Since f4cdb0f07e we are using the CRACEN
RNG driver.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-03 03:21:03 +01:00
Alberto Escolar Piedras
e96b2a7c11 boards nrf54l15bsim: Remove uncessary defconfig
This board is using since f4cdb0f07e
the cracen RNG driver, so there is no need to set default options for
the native_posix entropy driver.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-03 03:21:03 +01:00
Alberto Escolar Piedras
ac2d1e66ba boards nrf54l15bsim: Do not delete grtc clock properties
Revert the change to this file done in
865b2456c0
In which these clock properties were added to the GRTC binding but
they were, at the same time, not added/removed for the simulated
target.
The author indicates this was done due to some test failing,
but at this point no test fails with these properties present also
in the simulated target, and there is no understanding of why they
would.
So let's avoid diverging the simulated target from the real
one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-21 15:13:29 +00:00
Adam Kondraciuk
865b2456c0 dts: nordic: Add support for clock outputs
Add support for GRTC clock output pins.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-02-18 18:37:35 +01:00
Piotr Krzyzanowski
ae80fb10d4 boards: nrf_bsim: disable insted of deletion spi node
Disable insted of deletion of spi00 node on 54l15bsim

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2025-02-17 14:03:27 +01:00
Alberto Escolar Piedras
5e7df92082 boards nrf54l15bsim: Do not work around peripheral clock issue
In 923d313a04 the clock frequency in DTS
for the UART00 was fixed, but not for the simulated target. This was
likely due to the HW models modeling it as 16MHz instead of 128MHz for
this particular one as it is in reality.

Now that the HW models have been fixed, let's let this clock be
configured like for real HW.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-14 13:36:55 +01:00
Rubin Gerritsen
0f3e6fd3d6 boards: nrf_bsim: Document how to use the console with bsim
This commit describes how to build and run applications using
the console. This documentation is added because it may
not be obvious how this is done. That is, sometimes a user
may believe that the terminal launching the application is the
the console which is not the case.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-02-07 10:25:20 +01:00
Rubin Gerritsen
77de5935f2 boards: nrf_bsim: Set chosen console dts entry
This makes the bsim boards more similar to their corresponding DKs.
This makes it simpler to run samples and application requiring
the use of a console.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-02-07 10:25:20 +01:00
Rubin Gerritsen
a2d1b28ba0 boards: nrf52_bsim: Remove disabling of LOG_BACKEND_UART
There seems like there is no good reason for having it disabled.
For bsim boards CONFIG_SERIAL is disabled by default, there will
anyways not be any logging on the UART.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-02-07 10:25:20 +01:00
Krzysztof Chruściński
f96064379b boards: native_sim: Detect attempt to configure not existing int
Similar to e770128c2. Prevent overrunning the irq vector table.
This is not happening today in tree, but coverity thinks it
does. Checking for it to prevent it is not a bad idea
anyhow, so let's do it.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-29 11:03:02 +01:00
Krzysztof Chruściński
cd23fdf63f boards: nrf*_bsim: Detect attempt to configure not existing int
Similar to 923d4fbad8. Prevent overrunning the irq vector table.
This is not happening today in tree, but coverity thinks it
does. Checking for it to prevent it is not a bad idea
anyhow, so let's do it.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-29 11:03:02 +01:00
Krzysztof Chruściński
e54a050785 boards native_posix: Detect attempt to configure not existing int
Similar to 66a4fe32ce. Prevent overrunning the irq vector table
in posix_irq_priority_set. This is not happening today in tree,
but coverity thinks it may. Checking for it to prevent it is not
a bad idea anyhow, so let's do it.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-29 11:03:02 +01:00
Alberto Escolar Piedras
a211999141 doc boards nrfbsim: Update list of supported HW
The models include enough of the CRACEN to run the same
nrfx drivers as in Zephyr. So let's add it to the list.

Also let's remove the RTC from the list as the hal does not
expose it anymore for this platform as the GRTC is to be used
instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-01-23 16:33:12 +01:00
Alberto Escolar Piedras
f4cdb0f07e boards nrf54l15bsim: Default to new cracen rng driver
Let's default to this new driver.
And therefore change the conditions in the BT controller kconfig
which were selecting the native_posix fake entropy driver

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-01-22 18:32:35 +01:00
Krzysztof Chruściński
32898cf38f boards: native: nrf_bsim: nrf54l15: Bring back clocks
Do not delete clocks for the bsim target. Clocks are referenced
by peripherals and it can be used to get frequency that clocks
the peripheral.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-17 09:07:58 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Valerio Setti
bc3baf096a boards|soc: remove selection of ENTROPY_GENERATOR
Now that MbedTLS is capable of automatically enabling
CONFIG_ENTROPY_GENERATOR (when available), we can remove forced
enablements in boards|soc deconfig files.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-19 17:53:37 +01:00
Valerio Setti
c79991fd29 Revert "boards: remove ENTROPY_GENERATOR selection if BT"
This reverts commit 9789d4d5f8.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
e05518146b boards: remove ENTROPY_GENERATOR selection if BT
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Johan Hedberg
8b02141ca7 Bluetooth: Controller: Replace BT_CTLR with HAS_BT_CTLR
Deprecate BT_CTLR, and add a new HAS_BT_CTLR as a virtual option which
specific users (like BT_LL_SW_SPLIT) select. This also means that we can
remove all places that were forcefully enabling the BT_CTLR option, and
instead we now depend on devicetree to get some local LL HCI driver
enabled which in turn also enables the HAS_BT_CTLR option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-03 10:16:44 +01:00
Krzysztof Chruściński
923d313a04 dts: common: nordic: nrf54l: Add hfpll clock source
Add 128 MHz clock source and use it for uart00. Baudrate setting
must be adjusted based on uart clock source so without this
change there is wrong baudrate on uart00.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-29 11:44:49 +01:00
Valerio Setti
72555fabb4 board: enable random/entropy generators if BT
BT uses PSA Crypto API to perform crypto operations and, on this
platform, these APIs are implemented through Mbed TLS. In order
to properly initialize this library, a random number generator
is required.

* If the platform supports an HW entropy generator (ex: native_sim,
  nrf), then ENTROPY_GENERATOR must be used;
* Otherwise (ex: qemu_cortex_m3) test random generator can be
  enabled.

Enabling the proper option at board Kconfig level allows for
a more compact code change instead of manually editing _all_
the samples/tests that required this fix.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Jordan Yates
b13985d806 boards: nrf_bsim: add default soc_secure_mem_read
Add the default implementation of `soc_secure_mem_read` from
`nordic/common/soc_secure.h`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-25 14:41:43 +01:00
Wilfried Chauveau
85f36aae51 boards: twister: update boards' twister metadata files
Following the update of the schema, this updates all boards with the new
structure.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-11-25 08:31:28 +01:00
Yong Cong Sin
b1def7145f arch: deprecate _current
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Alberto Escolar Piedras
890f13426e doc boards nrfbsim: Mention the UARTE as supported for nrf54l15
Include in the list of supported peripherals the UARTE for the
simulated nrf54l15

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
ca46c7c816 boards nrfbsim: Enable UART(E) peripherals for nrf54l15bsim
The HW models now support this peripheral for this target.
Let's enable it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
b77d896ff6 boards native_sim: Deprecate CONFIG_NATIVE_SIM_NATIVE_POSIX_COMPAT
This option existed only to make the transition from native_posix to
native_sim easier. As native_posix is going to be removed in v4.2
we deprecate this option now, so it will also be removed.

We also switch this option to default to false already now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-19 20:04:55 -05:00
Alberto Escolar Piedras
7065b4628b doc boards nrfbsim: Mention the UARTE as supported for nrf5340
Include in the list of supported peripherals the UARTE for the
simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
a7abf80064 boards nrfbsim: Enable UART(E) peripherals for nrf5340bsim
The HW models now support this peripheral for these targets.
Let's enable them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
3418305eb8 doc boards nrfbsim: Mention the GPIO & GPIOTE as supported
Include in the list of supported peripherals the GPIO
and GPIOT for both the nrf5340 and nrf54l15

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
d0746f1177 boards nrfbsim: Enable GPIO & GPIOTE peripherals for nrf5340bsim
The HW models now support these pheripherals, let's enable them

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
4b890bc7b5 boards nrfbsim: Enable GPIO & GPIOTE peripherals for nrf54l15bsim
The HW models now support these pheripherals, let's enable them

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
2324d5daa1 doc nrf54l15bsim: Clarify the L10 and L05 are also covered
Clarify that one can simulate equally well the nRF54L10 and L05
variants with this target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 13:30:49 -05:00
Alberto Escolar Piedras
5e6c28bfa3 doc nrf54l15bsim: Remove experimental warning
This target simulated is reasonably tested.
Let's stop warning about it being experimental.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 13:30:49 -05:00
Alberto Escolar Piedras
24c2c43bcd boards nrf52_bsim: Fix sample used as example
Let's fix the sample used in the example. The peripheral_hr and
central_hr are meant to be run with each other.
Let's also use the :zephyr:code-sample: directive to refer to the
samples so we get a link.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-15 08:10:08 -06:00
Alberto Escolar Piedras
a8d28928ed boards: nrf54l15bsim doc: Clarify around entropy and crypto
Let's explicitly mention we are enabling the native_posix entropy
driver for this board (the real nrf54l15dk does not have an entropy
driver in Zephyr yet).
And correct a bit the wording around mbedtls as for the real target we
don't have mbedtls with HW acceleration.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-01 09:56:18 -05:00
Benjamin Cabé
14d0a19cc2 doc: fix occurrences of broken zephyr_file: links
In preparation of adding a check for dead references, this commit fixes
currently broken zehpyr_file: links.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-30 09:43:50 -07:00
Alberto Escolar Piedras
1c7540883f boards nrf_bsim: Add NVIC_GetPendingIRQ() equivalent
Add a substitute for NVIC_GetPendingIRQ()

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:01:50 +01:00
Alberto Escolar Piedras
c4e6ec89a7 boards nrf_bsim: Provide IRQ_PRIO_LOWEST
Some apps use it, so let's provide it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:01:50 +01:00
Krzysztof Chruściński
ec224fde28 boards: native: nrf_bsim: Add include path to common
Add include path to nordic/soc/nordic/common where some internal
headers for nordic devices are kept (e.g. dmm.h).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Benjamin Cabé
05d59f7207 boards: Set full_name for all boards
Full name was set based on the information available either in board
documentation or in Twister files.
Whenever applicable, vendor name was dropped from the full name so that
all boards have a consistent naming scheme.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 20:22:21 -04:00
Pieter De Gendt
de93f95622 boards: native: Add display to native board features
Add a 'display' entry for the native sim/posix supported features.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-10 14:58:13 -04:00
Dominik Lau
8941a2100c samples: drivers: added a simple touch controller sample
The sample is supposed to help examine the issues with touchscreen.
It draws a plus in last touched position.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-09 18:11:21 +01:00
Alberto Escolar Piedras
afbba5fb9b boards native_sim docs: Clarify which SDL version is needed
One needs the 32bit version of the SDL development library when
building for 32bit native_sim, and for the 64bit native_sim the
64bit version. Let's clarify this.

Also fix the SDL2 link.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-07 13:39:00 +02:00
Alberto Escolar Piedras
3ee9b40a5a eeprom sim: Enhance & refactor native part so it works w emb libCs
For the parts of the simulator which are dedicated for the native
platforms (POSIX arch based):
* Refactor the parts that interacts with the host, so it is possible to
  use it also with embedded libCs
* Enhance it with more options to allow:
  * Keeping the content just in RAM
  * Erasing the EEPROM file at exit
  * Clearing the file at boot
* Also show in the command line help the default file name.

As part of this:

* Update the kconfig dependencies, so we allow building it with other
  C libraries in the native targets
* Update the table in the native_sim docs to indicate all C libraries
  are supproted now

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 09:48:12 +02:00
Alberto Escolar Piedras
d67d64de91 boards/native/doc: Update architecture description
The architecture description was quite out of date in some parts,
specially those which changed with the introduction of the native
simulator.
Let's update it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-27 14:30:39 +01:00
Alberto Escolar Piedras
5efe751240 boards native: Add function to remap embedded address
Add a function which can be used to remap embedded device address,
into addresses which can be used in the simulated native boards.

For the nrf_bsim boards we provide an actual implementation.
For other boards, we provide an optional dummy version which does
nothing.
It is up to each board implementation to decide if they want to
provide one or use the dummy.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Ivan Iushkov
e35781419b dts: nordic: Add Channel Sounding support to nrf-radio
- Added `cs-supported` property to nrf-radio devicetree
- Added `HAS_HW_NRF_RADIO_CS` Kconfig option which is set if
`cs-supported` property is enabled
- Enabled `cs-supported` property for nrf54-series devices
- Disabled `cs-supported` on nrf54l15bsim because it is not
yet supported

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2024-09-26 03:32:03 -04:00
Alberto Escolar Piedras
50f2800d80 boards nrfbsim docs: Explain relation between native sim and nrfbsim
Add a section to the docs ellaborating on the relationship between
Zephyr, the native simulator, the nRF HW models and BabbleSim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-19 03:27:22 -04:00