Commit Graph

103487 Commits

Author SHA1 Message Date
Mahesh Mahadevan 1f0a15fa08 drivers: sensor: Fix NXP LPCMP driver
Fix Build failure due to undefined variable.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-14 13:01:13 +02:00
Daniel Leung 1ec5ce05f9 dp: swdp_bitbang: fix unused variable build error
The variable config in sw_port_off() is not used, and it's
causing CI build error about unused variable. So remove it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-11 17:04:38 -05:00
Chaitanya Tata 10d49736cf boards: nordic: nrf7002dk: Remove NS variants
The NS variants need crypto changes from NCS, so, remove it from
upstream till their support is upstreamed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-11 13:32:09 -04:00
Yonatan Schachter 9472f845b8 samples: Add read_bindesc sample
Added a sample to demonstrate how to read binary descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter 31fe9645ea tests: Add tests for bindesc reading
Added tests for bindesc reading, to test reading on multiple C/C++
standards. Only RAM and flash backends are tested, as the flash
simulator can't simulate a memory mapped flash.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter 41e1c436e5 doc: bindesc: Add documentation for bindesc read
Added documentation for reading binary descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter 00800d4818 bindesc: Add support for reading binary descriptors
This commit adds support for reading and parsing binary descriptors.
It can be used for reading the descriptors of another image, or for
iterating over one's own descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter fd68fc486c bindesc: Add maximum data size and assertion
Add a Kconfig symbol to limit the maximum size of a descriptor's
data, enforced by a build assertion.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter 5da7ba55aa west: bindesc: Added get_offset command
Add `west bindesc get_offset` command to print the offset of
the descriptors inside the given image.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter c8c25b5c52 bindesc: Fix placing of the descriptors end tag
Prior to this fix the descriptors end tag was placed in the binary
using LONG. This was wrong because the tag is of type short, and
the size of the descriptor (0), should have also been placed.
It so happened that on little endian machines the incorrect linker
script yielded correct results, as the extra zeros added to make
the value a long ended up as the correct byte sequence
(FF FF 00 00). On big endian machines however, the wrong sequence
is generated (00 00 FF FF).
This patch correct this issue.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Moritz Geier da87952948 west: runners: stm32cubeprogrammer: Fixed behaivor if programmer is in path
Enabled west commands to use CubeProgrammer installed in custom directory.

Signed-off-by: Moritz Geier <moritz.geier@proton.me>
2024-10-11 13:20:29 -04:00
Maximilian Deubel b0936ae353 drivers: dp: swdp_bitbang: power optimization
This patch changes GPIO initialization
to be in PORT_OFF state by default.
Also, if no transceiver is attached to the signals,
the GPIOs are configured to be disconnected to preserve power.

I tested this on a prototype board where we are going to have
a debugger in a low-power context.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-11 13:20:18 -04:00
Jordan Yates 8746a2aa12 tests: fs: fat_fs_api: add timestamp integration
Add an example implementation of `get_fattime` to the API tests. Also
ensure that `FS_FATFS_EXTRA_NATIVE_API` compiles in a test.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-11 13:20:08 -04:00
Jordan Yates a1d6f8081a fs: fatfs: additional ELM FAT options
Make additional ELM FAT library options configurable to the user.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-11 13:20:08 -04:00
Jordan Yates 4235dbfd2b fs: fatfs: add missing dependency
Add a missing dependency on `!FS_FATFS_READ_ONLY`` for `FS_FATFS_MKFS`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-11 13:20:08 -04:00
Jamie McCrae 3406515f12 sysbuild: images: bootloader: Add RAM load note
Adds a note about MCUboot RAM requirements for this

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Jamie McCrae 525f2b9153 samples: mgmt: mcumgr: smp_svr: Add RAM load configuration
Adds configuration for booting this sample in RAM load mode on
nrf52840dk

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Jamie McCrae 646f116cca mcuboot: Add support for RAM load mode
Adds supporting code that allows the RAM load mode of MCUboot to
be used and for applications to build successfully with it.
Sysbuild can be used to build images for this mode

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Jamie McCrae 8774f15bd2 sysbuild: cmake: Add set_config_int() function
Adds a function that will add an integer value to an image

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Krzysztof Chruściński e11d050b23 drivers: pwm: nrfx: Improve runtime PM
Rework PM handling to use pm_device_driver_init(). Shim is not using
put and get internally as there is no api that disables or stops
pwm so it is hard to determine when to put the device. There are cases
when PWM peripheral is stopped but PWM is still active because
duty cycle is 100% or 0% and pin is driven by GPIO and not PWM.

If user want to use runtime PM with PWM it is possible and getting
the device will initialize internal data and putting will suspend
by forcing PWM stop if used and setting pins to sleep state. However,
from power consumption perspective it is enough to set 0% or 100%
duty cycle on all channels.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-11 13:18:34 -04:00
Krzysztof Chruściński c3a33cfd3e drivers: pwm: nrfx: Disable PWM peripheral when not used
Shim was not correctly disabling PWM when it was not used. Task
STOP was triggered but PWM->ENABLE remained set which caused
increased current. Added interrupt and enabled event handler in
the nrfx driver to allow disabling PWM on STOPPED event.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-11 13:18:34 -04:00
Krzysztof Chruściński 0ab86c48dd drivers: pwm: nrfx: Improve device generation macros
Use NRFX_FOREACH_PRESENT macro to iterate over all PWM instances
and create device only for those enabled in the devicetree.
This approach removes need of changing driver code when new
instance id is added.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-11 13:18:34 -04:00
Yangbo Lu 85501c5414 include: arm: arm_mpu_v8: support memory attribute for device for Cortex-M
Supported memory attribute for device for Cortex-M.
Not sure why such code was conditional compile for only Cortex-R,
but Cortex-M also suited.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-11 13:18:21 -04:00
Guillaume Gautier ded9e11d59 drivers: dma: stm32 dmamux: fix for c0 hal update
Fix the DMAMUX driver for the STM32C0 HAL update. Typedef used in function
is now const.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-11 13:18:01 -04:00
Guillaume Gautier 48ba84bb95 drivers: clock: stm32 common: update ahb prescaler
STM32C0 have a different prescaler for SYSCLK and for HCLK.
Updates the clock driver to use the appropriate prescaler for each series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-11 13:18:01 -04:00
Guillaume Gautier d61a984bd6 west.yml: update hal_stm32 to use latest version
Update hal_stm32 to use the latest version.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-11 13:18:01 -04:00
Sudan Landge 8bdd45be47 arch: arm: cortex_a_r: smp: minor fix for non cache coherent cores
What is changed?
1. Updated the data sync barrier to make sure the other parameters of
   `arm_cpu_boot_params` are updated before updating its member `mpidr`
2. Updated the MPIDR affinity level mask to account for affinity level
   1 and 2 along with level 0.

Why do we need this change?
1. As reported in issue #76182, on Cortex_A_R, the current code
   execution fails to consider the correct sequence of data sync
   barrier and cache maintenece for the code to work on non cache
   coherent cores in SMP enabled mode.
   The secondary cores are waiting in a loop for primary core to set
   `arm_cpu_boot_params.mpidr`. As soon as primary core set this,
    the secondary cores start reading other parameters from the
   `arm_cpu_boot_params` however, the existing position of DSB
   instruction doesn't guarantee that `arg`, `cpu_num` and other
   parameters of `arm_cpu_boot_params` would be updated before `mpidr`
   is udpated and this could lead to a unpredicatble behaviour so,
   we need to move the DSB instruction.
2. The affinity level mask is updated because it didn't account for
   level 1 to identify individual cores within a cluster and
   level 2 to identify different clusters within the system which can
   lead to an incorrect conversion between mpidr to core-id.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
Sudan Landge 67f3d0b923 tests: kernel: smp: Test cpu affinity with custom ROM offset
What is the changed?
CPU affinity test for SMP cores will now cover a change in ROM offset.

How is it changed?
Add a new testcase section with ROM offset set to something other than
the default 0.

Why is it change?
There is no test to cover the issue reported in #76182 and the cpu
affinity test is the closest to test the issue. Adding a new testcase
will makes sure there is no breaking change in the future.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
Sudan Landge ac2de3fa7c arch: arm: cortex_a_r: Set VBAR for all cores
What is changed?
Secondary cores can now boot successfully on cache and non-cache
coherent systems if the Zephyr image/vector table is loaded at an
address other than the default address 0x0.

How is it changed?
1. By calling the relocate_vector() from reset.S as part of EL1 reset
   initialization instead of prep_c to have VBAR set for all cores and
   not just for the primary core.
2. Remove dead code under CONFIG_SW_VECTOR_RELAY and
   CONFIG_SW_VECTOR_RELAY_CLIENT.

Why do we need this change?
1. As reported in issue #76182, on Cortex_ar, VBAR is set only for
   the primary cores while VBAR for the secondary cores are left with
   default value 0.
   This results in Zephyr not booting on secondary cores if the vector
   table for secondary cores is loaded at an address other than 0x0.
   VBAR is set in relocate_vector() so we move it to reboot.c which is
   better suited to have configs related to system control block.
2. The two SW_VECTOR_RELAY configs have a direct dependency on
   CONFIG_CPU_CORTEX_M, which is disabled while compiling for
   Cortex-A and Cortex-R hence leading to a dead code.

How is the change verified?
Verified with fvp_baser_aemv8r/fvp_aemv8r_aarch32/smp.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
TOKITA Hiroshi 2c95978f3b MAINTAINERS: Add build_all test files for bbram and flash
Add build_all to `files:` entry to bbram and flash.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
TOKITA Hiroshi eebed141cf tests: drivers: build_all: Add a build_all test for flash
The test targets the following devices at this time.

- atmel,at45
- jedec,spi-nor

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
TOKITA Hiroshi 60dc055f9e tests: drivers: build_all: Add a build_all test for bbram
The test targets the following devices at this time.

- microchip,mcp7940n

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
TOKITA Hiroshi 23496f5208 tests: drivers: build_all: eeprom: Add config for ti,tmp116-eeprom
Add configuration to add `ti,tmp116-eeprom` to build test.

Also, adding emulator build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
Francois Ramu 48a2aedb78 soc: st: stm32h7rs serie requires specific power rails
Enables the XSPIM2 rail when using GPIO bank N
Enables the XSPIM1 rail when using GPIO bank O or P
Enables the USBvoltage detector when using the GPIO M

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-11 13:16:43 -04:00
Marek Pieta bc5f1c8186 doc: releases: Add note for CONFIG_BT_CONN_TX_NOTIFY_WQ
Change adds a release note informing about the newly introduced Kconfig
option for Bluetooth stack.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-10-11 13:16:26 -04:00
Marek Pieta 341f1f502d bluetooth: conn: Use a separate workqueue for connection TX notify
Use a separate workqueue instead of system workqueue for connection TX
notify processing. This makes Bluetooth stack more independent from the
system workqueue.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-10-11 13:16:26 -04:00
Reto Schneider 7fa5a222a0 drivers: flash: Sort CMake and Kconfig files alphabetically
By sorting the lines alphabetically, merge conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-11 13:16:15 -04:00
Joakim Andersson d794d58d64 drivers: nrf_qspi_nor: Check poll period before sleep
Check that the poll period is non-zero before sleeping.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-10-11 13:16:05 -04:00
Joakim Andersson 14c896b647 drivers: nrf_qspi_nor: Fix build without multithreading
Fix build of nrf_qspi_nor flash driver without multithreading enabled.
This is required for builds like mcuboot.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-10-11 13:16:05 -04:00
Alexandre Bailon 0d5f8e3524 cmake: flash: Update OPENOCD variables to work with sysbuild
Defining OPENOCD and OPENOCD_DEFAULT_PATH when we are using sysbuild
doesn't make any effect.
This updates flash.cmake to make these variables compatible with sysbuild.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-10-11 13:15:56 -04:00
Torsten Rasmussen 32e5894ab9 manifest: update picolibc to avoid setting of CMAKE_BUILD_TYPE
This commit updates picolibc module so that CMAKE_BUILD_TYPE is not
defined by picolibc when building with Zephyr.

The avoids a situation where both picolibc and Zephyr defines the
optimization level, for example like: `-Os -O2`.

And remove the warning:
> CMake Warning at .../zephyr/CMakeLists.txt:2166 (message):
>
> The CMake build type was set to 'MinSizeRel', but the optimization
> flag was set to '-O2'.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-11 13:15:37 -04:00
Fabio Baltieri 523efee132 tests: build_all: input: clean up the i2c device list
Make the address sequential again, drop a stray blank line.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-11 13:15:27 -04:00
Wajdi ELMuhtadi 9af50a7b19 drivers: sensor: wsen_tids: remove wsen_tids driver
Remove wsen_tids since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi 8f684cfe9b drivers: sensor: wsen_pdus: remove wsen_pdus driver
Remove wsen_pdus since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi 8c0b09ddc3 drivers: sensor: wsen_pads: remove wsen_pads driver
Remove wsen_pads since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi 449bf8019c drivers: sensor: wsen_hids: remove wsen_hids driver
Remove wsen_hids since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi 5f584052d8 drivers: sensor: wsen_itds: remove wsen_itds driver
Remove wsen_itds driver since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Henrik Brix Andersen 164447a3c6 boards: st: stm32h745i_disco: m7: remove CAN sample-point properties
Remove explicit CAN controller sample-point/sample-point-data values and
instead rely on the defaults, as they change with the configured bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-11 13:14:40 -04:00
Benjamin Cabé 3af51ddce1 doc: boards: extensions: fix vendor selection from URL
Apply selection from the hash URL *after* having sorted the vendors
alphabetically.
Remove the initial call to updateBoardCount() as it is useless to
have one this early.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-11 13:14:29 -04:00
Benjamin Cabé a1261773db doc: boards: extensions: fix CSS rule
Fix a regression introduced at the last minute when cleaning up
the stylesheet. The rule as it was made no sense.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-11 13:14:29 -04:00