Commit Graph

88683 Commits

Author SHA1 Message Date
Bryan Zhu 3e456e8cfb drivers: serial: pl011: Remove busy wait in Ambiq UART initiate
Ambiq UART requires specific busy wait during initialization for
propagating powering control registers, original k_busy_wait()
used here generated a dead loop because k_busy_wait() relays on
timer, who's driver is initialized after UART(UART init in
PRE_KERNEL_1, timer init in PRE_KERNEL_2), replace k_busy_wait()
with checking power status register is more suitable here.

Signed-off-by: Bryan Zhu <bzhu@ambiq.com>
2023-12-11 10:10:39 +01:00
Daniel Leung 51b3420b80 doc: doxygen: move float_apis group into correct place
The float_apis group is incorrectly placed in x86/32 header.
This should be in kernel.h enclosing k_float_* functions.
So move it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-11 10:10:30 +01:00
Yong Cong Sin 54573e7c4c boards: arm: Add RTC clock source for mikroe_mini_m4_for_stm32
The `mikroe_mini_m4_for_stm32` board doesn't have its RTC node
enabled, and is failing the following test:

`tests/benchmarks/footprints/benchmark.kernel.footprints.pm`

This board seems to have been missed out from 44b8370, let's
enable the rtc & clk_lsi here.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-11 09:10:20 +00:00
Anas Nashif 0ebeca2eb7 intel_adsp: ace: add firmware loading tool
Add python script for loading intel_adsp ACE FW into hardware.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-11 09:58:18 +01:00
Chaitanya Tata ceee997c6f wifi: Add the enums to the status
This helps to demonstrate that the enumerations have to be used to
interpret the status.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-12-11 09:57:19 +01:00
Chaitanya Tata d8d4c77603 wifi: Add an enum for disconnect reasons
This can be used to interpret the "status" in the disconnect result event.
To start with a few common reasons are enumerated but can be extended in
the future.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-12-11 09:57:19 +01:00
Chaitanya Tata b3453c3f74 wifi: Add an enum for connect result status
This can be used to interpret the "status" in the connect result event.
To start with a few common reasons are enumerated but can be extended in
the future.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-12-11 09:57:19 +01:00
Seppo Takalo b4bdbfd76b test: lwm2m: Run interop tests in tickless mode
Tickless mode is important to be tested against real server.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-11 09:57:09 +01:00
Seppo Takalo 005dc60d24 net: lwm2m: Fix pmin handling on tickless
If observed resource was written during the pMin period, it did
not schedule any wake-up event into the future. Notify message would
then only be generated as a result of any other (like Update) event.

Refactor check_notifications() to follow same pattern as retransmit_req().
Return the next event timestamp, which could be now.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-11 09:57:09 +01:00
Sylvio Alves b8d887f0e1 net: wifi: esp32: disable automatic reconnection on leaving
Automatic Wi-Fi station reconnection is forced even when
application requests disconnection. This PR adds a check
in the disconnection event reason to decide whether or not
perform the reconnection.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-12-11 09:57:02 +01:00
Joakim Andersson a8e340eb7e tests: flash: Use a flash partition that is known to be nonsecure
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Joakim Andersson afe4cce831 samples: soc_flash_nrf: Make sure that the flash partition is valid
Make sure that the flash partition is valid.
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Joakim Andersson 29fc537bfb samples: soc_flash_nrf: Print finished message
Print a finished message, so that it is clear that this in the end
of the sample. This makes it certain that we didn't crash without
output on the last test.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Joakim Andersson 3063c6ae46 samples: soc_flash_nrf: Stop erasing outside of test partition
Stop erasing outside of the test partition.
We shouldn't really on this being accesible memory.
This region may be consider as secure when application is non-secure.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Joakim Andersson 08413e1fb8 soc: nordic_nrf: Enable the TF-M NS storage partition for nordic boards
Enable the TF-M NS storage partition for nordic boards.
This partition is otherwise not used, and configured as secure.

Fixes: #59376

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Mateusz Karlic 6c9ff66e5f dts: arm: ambiq: Add SoC compat string
Add `compatible` node to Ambiq SoCs, along with secondary common compat,
since they share many similarities.

Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
2023-12-11 09:56:48 +01:00
Marcus Folkesson cbae54c7f7 drivers: display: remove dummy functions for unsupported API
As the display API now check against valid callback functions and
returns -ENOSYS (or equalent), there is no need to provide
such functions in the driver code

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
2023-12-11 09:56:42 +01:00
Andrei Emeltchenko effca0609d tests: fatal: Add message explaining OOPS
Add message explaining the cause of the OOPS like it is done in many
other cases.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-12-11 09:56:33 +01:00
Manuel Argüelles eee09a55c5 drivers: pwm: mcux_ftm: check against period cycles overflow
The FTM counter modulo register (MOD) holds a 16-bit value, but PWM
set_cycles API allows to set 32-bit cycles values.

Fixes #66226

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-11 09:56:15 +01:00
Sebastian Bøe 3b24ef305f tz: Remove unused trustzone driver
The arm_core_tz.c trustzone driver was developed by Nordic and was
previously used by Nordic, but it is not used by us any more. Since we
stopped using it I can see that it has bit rotted (the include path
for tz.h is not available), so no else has started using it either
evidently.

Remove the broken and dead code.

We keep the HAS_ARM_SAU Kconfig as it is selected by a myriad of
platforms and determines if __SAUREGION_PRESENT is defined. I have
been unable to prove that this define is also unused.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2023-12-11 09:56:08 +01:00
Andrej Butok 923ac2bb1b doc: mimxrt1040_evk: fix documentation links
Fix mimxrt1040_evk documentation links.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-12-11 09:54:47 +01:00
Mariusz Skamra a42fb9d586 tests: bsim: gatt: Fix missing connection reference release
This fixes missing connection reference release.
The bt_conn_le_create returns the connection object reference that needs
to be released by API caller.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-11 09:54:13 +01:00
Emil Gydesen 6158ff03f5 Bluetooth: Shell: Only auto-connect to unconnected devices
The bt connect and bt connect-name commands should only
attempt to connect to connectable devices that we are not
already connected to.

This commit moves the check for BT_GAP_ADV_PROP_CONNECTABLE
as well as checks that we do not already have a connection
to that device with the current ID.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-11 09:54:04 +01:00
Emil Gydesen e54902bdbe Samples: Bluetooth: Fix bug in is_substring for broadcast sink
The is_substring did not work for true substrings, as it
would always compare [0] to [0], so it would return false
for the substring "BC" being in "ABC".

Removed the tolower as it is not necessary and fixes the issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-11 09:53:36 +01:00
Emil Gydesen 01bd94ac4f Bluetooth: Shell: Remove tolower from is_substring
The tolower is not necessary and is what strncasecmp
does anyhow.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-11 09:53:36 +01:00
Henrik Brix Andersen 7ddc0f713f drivers: spi: mcux: lpspi: fix error on first configure on MKE1xF
Fix error writing to the CR register on the first call to SPI configure on
NXP MKE1xF. On the first call, the module clock is not enabled and writing
to the CR register will fail.

Fixes: #66036

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-11 09:52:20 +01:00
Mahesh Mahadevan 41c2c3d4b8 drivers: dma_mcux_lpc: Clear out the dma channel structure
The DMA channel data structure can retain config information.
We need to clear this everytime dma_configure is called on a
channel.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-12-11 09:52:12 +01:00
Joakim Andersson f390f7d0a1 bluetooth: shell: Use helper function to convert string to int
Use helper function to convert string to int for appearance value.
This makes the code more clear, as the big-endian conversion function
gives the wrong impression about the byte order of advertising data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:51:31 +01:00
Marc Herbert 352980be98 scripts/build: make struct_tags.json deterministic
It's not good to see struct_tags.json change from one build to the next
when nothing changes.

Python's sets are not deterministic, see long story for older commit
f896fc2306 ("scripts: gen_handles: Sort the device handles")

Simply convert multiple_directories to a sorted list before using it.

Fixes commit 80e78208e6 ("kernel: syscalls: no need to include all
syscalls in binary")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-11 09:51:22 +01:00
Declan Snyder 79b00f6cd3 drivers: nxp_enet: Add link state logging message
Add info logging message to NXP ENET MAC driver about link state.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 247f9e61ef samples: zperf: Add NXP driver test case
Test the experimental NXP ENET driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 3d6c1fd6f7 boards: nxp: Support NXP ENET FRDM_K64F & RT11xx
Support NXP ENET on FRDM_K64F and rt11xx boards.
Document the experimental driver in all boards.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 17a99367d2 soc: rt11xx: support nxp_enet in soc
Support NXP ENET on RT11xx soc

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder e66876126e soc: k6x: Support NXP ENET Driver
NXP ENET driver support from soc.c for k6x series

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 7008350a32 drivers: mdio_nxp_enet: Fix typo in MDC frequency
MDC frequency had one extra 0 by mistake

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 3ec0f3a462 drivers: clock_control: Support NXP_ENET
Support ENET peripheral clock in MCUX SIM and CCM_REV2 driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 20af909df5 drivers: nxp_enet: Do clock init from zephyr
Need to do the ENET module-level clock initialization from zephyr
instead of MCUX HAL, because now there are multiple zephyr drivers with
different init priorities that rely on the module being clocked. MDIO
must be initialized before the ENET MAC, and the MAC driver currently
calls ENET_Init from the HAL to initialize the clock, but MDIO needs the
module clock enabled first on some platforms. So replace the MAC init
with ENET_Up from the HAL, which doesn't include clock init, then do
clock init from a higher priority sys init based on the parent
compatible.

Also, add support for enet clock ungating with clock_control_on on ccm
driver do this with current platforms supported.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder 19773a61c6 drivers: ksz8081: Some bug fixes & 25MHz RMII
- PHY can be set up as rmii but still use 25 MHz MDC, add DT property
  value for this case
- Fix KSZ8081 driver spamming phy status in debug level logging,
  and fix some other state/logging logic
- Fix PHY driver not rescheduling monitor work if first configuration
  fails, change code path to use goto for errors
- Handle case where some phys are not using the gpio pins in phy driver
  Make GPIO properties of ksz8081 phy optional since these hardware pins
  may be unused on some boards

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Szymon Janc a2184305f2 bluetooth: tester: Enable Periodic Advertising support
This is required by GAP/PADV/PASM/BV-01-C and GAP/PADV/PAM/BV-01-C
qualification test cases.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-12-11 09:50:48 +01:00
Flavio Ceolin 899d4f997e userspace: Additional checks in K_SYSCALL_MEMORY
This macros needed additional checks before invoking
arch_buffer_validate.

- size can not be less then 0. Some functions invoke this macro
  using signed type which will be promote to unsigned when invoking
  arch_buffer_validate. We need to do an early check.
- We need to check for possible overflow, since a malicious user
  application could use a negative number that would be promoted
  to a big value that would cause a integer overflow when adding it
  to the buffer address, leading to invalid checks.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-12-11 09:50:33 +01:00
Aleksandr Khromykh 450ad68ca8 tests: Bluetooth: Mesh: delayable message unit tests
Commit adds unit tests for the newly created
access delayable messages.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-11 09:50:18 +01:00
Aleksandr Khromykh d175ac0572 Bluetooth: Mesh: access tx msg randomizer
Commit adds implementation of the specification
recommendations regarding randomization of
responses on the access layer.
3.7.3.1 Transmitting an Access messages

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-11 09:50:18 +01:00
Cong Nguyen Huu 3533178713 drivers: eth_nxp_s32_netc: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the handler of SI Rx event within
the shim driver itself.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-12-11 09:50:08 +01:00
Henrik Brix Andersen 0bf4efc780 tests: drivers: build_all: can: add build test for native posix linux
Add build-only test for the native POSIX Linux (SocketCAN) driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-10 09:24:30 +01:00
Henrik Brix Andersen c86f5c0f61 drivers: can: native_posix_linux: add embedded libc support
Add support for compiling the native POSIX Linux (SocketCAN) driver with an
embedded C-library.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-10 09:24:30 +01:00
Henrik Brix Andersen 399eb55381 drivers: can: native_posix_linux: remove unused functions
Remove the functions linux_socketcan_setsockopt() and
linux_socketcan_getsockopt() as they are unused.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-10 09:24:30 +01:00
Flavio Ceolin 052590b0c1 doc: vuln: Disclose information about CVE-2023-4424
Information about CVE-2023-4424

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-12-09 15:31:42 -05:00
Anas Nashif bf7d7d6214 modules/hal_ethos_u: do not expose module kconfigs if not enabled
Do not expose module Kconfigs if not enabled or used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-09 07:31:04 -05:00
Adam Wojasinski 7b78393b07 samples: drivers: spi_flash: Extend requirements description
The patch updates README with detailed description of  the requirements
regarding target devicetree needed to correctly build the sample.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-08 20:21:07 +00:00
Adam Wojasinski 8fdb8004dd samples: drivers: spi_flash: Add nordic,qspi-nor to test filter
When commit 5b4f4253c1 introduced
"nordic,qspi-nor" dts binding the sample wasn't aligned to the change.
From that moment the sample started to be filtered out by the Twister.

The patch adds Nordic's compatible to the test filter.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-08 20:21:07 +00:00