Commit Graph

101168 Commits

Author SHA1 Message Date
Andriy Gelman 4ffe418253 drivers: rtc: Add RTC driver for Infineon XMC4xxx devices
Adds support for settings/getting RTC time and using alarm/update feature.
The alarm option needs all fields to be set due to a hardware limitation.

RTC shares the same interrupt with the watchdog. Thus shared
interrupts must be enabled when WDT and RTC both need to trigger the ISR.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Andriy Gelman a761280318 tests: drivers: rtc: Fix typos
Compare tm_nsec instead of tm_yday and fix error message.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Sercan Erat 668003857a boards: rak: Change to use sw controlled cs for rak11720
Added support for newly added Ambiq spi driver sw controlled spi cs pins.

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-09-04 09:54:46 +02:00
Krzysztof Chruściński 5ac99428ea shell: backends: rtt: Set panic_mode flag
A bug was introduced when fb17d0e365 introduced host presence detection.
Panic_mode flag was added which indicates that RTT should work in
synchronous, blocking mode but it was not set when backend was switched
to panic mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-04 09:54:39 +02:00
Benjamin Cabé 1858c1512a include: cbprintf: drop deprecated CBPRINTF_PACKAGE_COPY_* macros
Commit bb74b4f028 deprecated a few
CBPRINTF_PACKAGE_COPY_* macros. This drops them and calls out the
change in the release notes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 09:54:32 +02:00
Tomi Fontanilles 938748177f boards: ezurio: fix qspi definition
Do not change the default value of `NORDIC_QSPI_NOR`. It resulted in
undefined references to the DT node `/soc/qspi@40029000/mx25r6435f@0`
when enabling the flash driver.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 09:54:25 +02:00
William Tambe 9c4a6712b2 xtensa: fix xtensa-sample-controller.ld to avoid .note.GNU-stack warnings
Prevent `warning: orphan section `.note.GNU-stack'` when building using
`west build -b xt-sim samples/hello_world`

Signed-off-by: William Tambe <williamt@cadence.com>
2024-09-04 09:54:19 +02:00
Emil Gydesen b5ff2cc667 Bluetooth: AICS: Replace bools with atomic
Replace several bools in bt_aics_client with an atomic value.
Update how these values are modified so that we can better
prevent race conditions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-04 09:54:05 +02:00
Kai Vehmanen 81977f2bff drivers: dma: intel_adsp_hda: fix intel_adsp_hda_unused() check
The ringbuffer availability check is subject to race with regards to
update of BF (Buffer Full) and BNE (Buffer Not Empty) bits in DGCS
register, and status of RP (Read Position) and WP (Write Position).

Following sequence is observed without this patch when
calling dma_get_status() on multiple Intel ADSP platforms:

iter 154 pending 1536 RP 768 WP 768, BNE 1, BF 1
-> dma_reload for 384
iter 155 pending 1536 RP 1152 WP 1152, BNE 1, BF 1
-> dma_reload for 384
iter 156 pending 0 RP 0 WP 0, BNE 1, BF 0

Value of pending is not expected to go from 1536 to zero if only 384
bytes have been consumed via dma_reload() since last call to
dma_get_status().

Change the logic to read DGCS register later, after the WP and RP have
been already read, and only check the BNE bit if Read and Write
Positions are equal.

Link: https://github.com/thesofproject/sof/issues/9418
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-04 09:53:57 +02:00
Francois Ramu 0fd7028eeb soc: stm32 decrease ticks per sec if sysclock is not LPTIM
Reduce the ticks per sec when the sysclock is low and
not LPTIM.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-09-04 09:53:50 +02:00
Yong Cong Sin 0fc2de4d4f MAINTAINERS: hawkBit: remove ycsin from the collaborator
Remove myself from the collaborator as there's a maintainer now.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-04 09:53:43 +02:00
Benjamin Cabé 08688b1876 doc: Check redirect entries are valid
While it's by definition not possible to check that the "source" for a
redirect entry is a valid path, the "destination" could be checked to be
pointing to an existing resource. This will also help catch potential
errors in the "source" as well since it's common to mess up the paths
for both.

Fixes #77797

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 09:53:35 +02:00
Benjamin Cabé d77719ee37 doc: redirects: cleanup stale or broken entries
Fixed entries pointing to invalid destinations either due to resource
having  been removed or moved once more, or entries being plain broken
from day 1.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 09:53:35 +02:00
Andrej Butok 4df241b006 doc: release: 4.0: Add note about .elf flash support
Added note about enabled support for the flashing of
.elf files for jlink, pyocd and linkserver runners.
By commits:
- e767ac0703
- c1fe3150e9
- 3f5fc42fba

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-04 09:53:28 +02:00
Maciej Panek 532b279ef0 net: l2: ethernet: check if the dev->api not NULL
adds a check for Ethernet driver's API not being NULL
in ethernet_mcast_monitor_cb

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2024-09-04 09:53:20 +02:00
Maciej Panek a452aa5763 net: l2: ethernet: check if the dev->api->send method not NULL
adds a check for "send" method in Ethernet driver's API
not being NULL in ethernet_send

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2024-09-04 09:53:20 +02:00
Maciej Panek 62df6108c7 net: l2: ethernet: check if the dev->api->get_capabilities method not NULL
Adds missing checks for get_capabilities method not being NULL.
Fixes crash with netusb and possibly other drivers.

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2024-09-04 09:53:20 +02:00
Maochen Wang d5a5f072a9 drivers: wifi: nxp: link the library of hostap
When build with the psa_crypto_driver, it will try to include common.h
of mbedtls, but actually include the common.h from hostap, and causes
build error of undefined symbol. Now link the library of hostap to use
the header file in /utils path, to fix the build error.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-04 09:53:12 +02:00
Maochen Wang a7e97e8799 hostap: fix build error of common.h
When build with the psa_crypto_driver, it will try to include common.h
of mbedtls, but actually include the common.h from hostap, and causes
build error of undefined symbol. Use zephyr_interface_library_named
to define hostap, and other modules needs to link the library of hostap
when wants to use the header file in /utils path, such as the common.h.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-04 09:53:12 +02:00
chao an 5831d91ad9 arm/gicv3: set routing affinity before enable IRQ
In corner case, the pending ISR will be triggered immediately
after enable the IRQ, this PR will setting CPU affinity first
to avoid routing the unexpected IRQ to other CPUs.

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-04 09:53:04 +02:00
Alberto Escolar Piedras 1dd139f857 manifest: Update nRF hw models to latest
Update the HW models module to:
4b0b020e25dbf1a11ccccf7b7741d6ca991ba9e4

Including the following:
* 4b0b020 54L CLOCK: Generate XOSTARTED event
* 79287fb hal: RADIO: support also triggering TASK_SOFTRESET from HAL

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Alberto Escolar Piedras c2c17ea733 boards: nrf54l15bsim: Compare it to the DK instead of the PDK
The nrf54l15dk is now avaliable in the tree.
Let's compare the simulated board to this one instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Alberto Escolar Piedras 8a7c16c9da boards: nrf54l15_bsim: Update docs including AAR,CCM, ECB
These peripherals are now included. Let's mention them
and remove the warning about them being missing.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Alberto Escolar Piedras b03db5e4c9 boards: nrf54l15_bsim: Actively set psa-rng to disabled
This target does not yet support the PSA random generator.
Lets explicitly set it to disabled, to even if the
SOC definition sets it to "okay" it is not built in
by default.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Jiafei Pan eb4d1ef170 board: imx93_evk: fix document introduced by hwmv2
Fixed board name according to hwmv2 update, and also updated the demo
log.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-04 09:52:50 +02:00
Alberto Escolar Piedras f2711b20b6 boards: nrf54l15bsim: DTS cleanup
Remove 3 delete-node directives which do not apply to this
SOC.
They made it in originally thru a copy paste mistake
from the nrf5340bsim dts file.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:40 +02:00
Daniel Leung 11e5a0de1d boards: xtensa/sample_controller: no HAL for xcc or xt-clang
Xtensa toolchains also contain a profile for sample_controller.
So if compiling for it, skip the Xtensa HAL module in Zephyr
tree so the toolchain can use the one included in the toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-04 09:52:31 +02:00
Marco Widmer ca48767be4 boards: byteSENSI-L: add gnss support
Add support for the integrated u-blox M8C GNSS module.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-09-03 14:41:08 +01:00
Erwan Gouriou c3c7e513c4 boards: stm32 based: Remove useless CONFIG_PINCTRL assignment
PINCTRL should not be set per board, but rather depending on drivers needs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Erwan Gouriou e6a296bbe4 boards: st: Remove useless CONFIG_PINCTRL assignment
PINCTRL should not be set per board, but rather depending on drivers needs.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Erwan Gouriou d13f9d9b9b drivers: stm32: Select PINCTRL when required
Select PINCTRL subsystem by drivers which require it.
Prevent the need from enabling this symbol at board or soc level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Vivekananda Uppunda 9679083e9f modules: hostap: Fix Kconfig parameters for build
Fix build failures when selecting WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-03 14:40:45 +01:00
Vivekananda Uppunda 242f7ad3b4 modules: hostap: CRYPTO_MBEDTLS_PSA should not be default selected
WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA should not be by default
selected when WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT is selcted. Enable
PSA APIs if desired separately.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-03 14:40:45 +01:00
Vivekananda Uppunda f2eda942f8 modules: hostap: Set WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT as crypto
Set WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT as the default crypto
configuration. The crypto ALT implementation contains the necessary
crypto operations and also allows the user to choose PSA or non PSA
crypto operation.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-03 14:40:45 +01:00
Ren Chen 1c769c342b usb: it82xx2: fix issue with the unexpected setting of the ready bit
In the IT82xx2 chip, the ready bit is automatically cleared by
hardware. When setting other bits, there is a chance that the ready bit
hasn't been cleared yet, leading to unexpected USB transactions. This
change ensures that the ready bit is always set to '0' when setting the
endpoint control value.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-03 14:40:31 +01:00
Ren Chen d410231c7c usb: it82xx2: enable RESUME interrupt
This commit enables RESUME interrupt mask.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-03 14:40:31 +01:00
Tomasz Moń 9f6b66f162 drivers: udc_dwc2: Enter hibernation during suspend
Save power when the bus is suspended by entering hibernation if
hibernation support is enabled and controller supports hibernation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-03 14:40:17 +01:00
Tomasz Moń 42f2e1c18b drivers: udc_dwc2: Add power saving related registers
Add Power and clock gating control register to register map and
appropriate bit macros. Add missing GHWCFG4, GLPMCFG and GPWRDN bits.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-03 14:40:17 +01:00
Krzysztof Chruściński d8c3ae0286 drivers: counter: nrfx_timer: Add barrier when reading CC
Add barrier between triggering Capture task and reading CC as otherwise
it is possible that CC read will occur before task is triggered when
bus is busy.

Add barrier between reading previous CC value and writing the new one.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 14:40:10 +01:00
Krzysztof Chruściński dc711d721e Revert "tests: drivers: counter: basic_api: Tweak test timing"
This reverts commit 331442f059.

Change was introduced because it was failing on slow core
(nrf54h20/cpuppr) however it turned out that there was a bug in the
driver and now test passes without this tweak which make the test
last twice longer.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 14:40:10 +01:00
Nicolas Pitre 87f68b4dfe arm64: linker: move data section between rodata and bss
Having .data after .bss creates a big empty gap in zephyr.bin to provide
proper offset for the data section. Reversing them allows for dropping
.bss from zephyr.bin's output as it is typically done, saving precious
flash memory space.

For demonstration purpose, let's consider those changes:

|--- a/samples/hello_world/src/main.c
|+++ b/samples/hello_world/src/main.c
|@@ -6,9 +6,12 @@
|
| #include <stdio.h>
|
|+int dummybuf[1024 * 1024];
|+
| int main(void)
| {
| 	printf("Hello World! %s\n", CONFIG_BOARD_TARGET);
|+	dummybuf[0] = 42;
|
| 	return 0;
| }

Before this commit:

$ ls -l build/zephyr/zephyr.bin
-rwxr-xr-x 1 nico nico 4561908 Aug  2 15:13 build/zephyr/zephyr.bin*

After this commit:

$ ls -l build/zephyr/zephyr.bin
-rwxr-xr-x 1 nico nico 37028 Aug  2 15:17 build/zephyr/zephyr.bin*

While at it, remove some more repetitive comments with no value.
Also defaults CONFIG_LINKER_LAST_SECTION_ID to n as it otherwise screws
everything up for the same reason as above.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-03 14:40:01 +01:00
Elias Speinle fc7e8fb862 tests: drivers: regulator: add test for mps mpm54304 driver
add test for MPS MPM54304 DC/DC step-down power module

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-09-03 14:39:52 +01:00
Elias Speinle 022cfdff98 drivers: regulator: add basic mps mpm54304 driver
add driver for Monolithic Power Systems MPM54304 with basic
functionality to enable/disable the buck regulators

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-09-03 14:39:52 +01:00
Yannis Damigos 956edd1c3d odroid_go: Enable CONFIG_ESP32_USE_UNSUPPORTED_REVISION
odroid_go is using ESP32 chip revision (1) that is unsupported,
so we need to enable 'CONFIG_ESP32_USE_UNSUPPORTED_REVISION'

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Yannis Damigos 9637071114 odroid_go: Move flash partition table to a separate file
Move flash partition table to a separate file

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Yannis Damigos dc1353a336 boards/odroid_go: Fix update partitions size
Update partitions size to utilize the entire flash

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Lukasz Stepnicki 83e3c2eb78 drivers: watchdog: nrfx wdt without IRQs
Add config option to build nrfx wdt driver with
NRFX_WDT_CONFIG_NO_IRQ enabled.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-03 14:39:37 +01:00
Grygorii Strashko e638602b6a fs: fatfs: Add CONFIG_FS_MULTI_PARTITION
This option switches support for multiple volumes on the physical drive. By
default (0), each logical drive number is bound to the same physical drive
number and only a first FAT volume found on the physical drive will be
mounted.
When this function is enabled (1), each logical drive number can be bound
to arbitrary physical drive and partition listed in the VolToPart[].
The VolToPart[] is expected to be provided by Zephyr application.

For example, 2 FAT partition on SD disk ("SD" index 3) in terms of Zephyr:
   {3, 1} - mount point "/0:"
   {3, 2} - mount point "/1:"
The mount points have to be numbered in this case.

Code example of mounting a second FATFS partition places on SD-card:

static FATFS fat_fs;
static struct fs_mount_t mp = {
	.type = FS_FATFS,
	.fs_data = &fat_fs,
       .mnt_point = "/1:
};

/*
 * 2 FAT partition on SD disk
 * PARTITION.pd - Physical drive number. "SD" has index 3 in terms of
 * Zephyr (see FF_VOLUME_STRS)
 * PARTITION.pt - Partition (0:Auto detect, 1-4:Forced partition). So 1 for
 * the first FATFS partition and 2 - for second.
 */
PARTITION VolToPart[FF_VOLUMES] = {
    [0] = {3, 1},     /* "0:" ==> 1st partition on the pd#0 */
    [1] = {3, 2},     /* "1:" ==> 2nd partition on the pd#0 */
    [2] = {0, -1},     /* "2:" ==> 3rd partition on the pd#0 */
    [3] = {0, -1},
    [4] = {0, -1},
    [5] = {0, -1},
    [6] = {0, -1},
    [7] = {0, -1},
};

fs_mount(&mp);

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-09-03 14:39:18 +01:00
Grygorii Strashko 01f72f92b4 fs: fatfs: Add CONFIG_FS_FATFS_LBA64
The Kconfig option enables support for 64-bit LBA, which also allows
to enable  GUID Partition Table (GPT) support.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-09-03 14:39:18 +01:00
Michael R Rosen cba339a6f4 dts: arm: st: correct npgios for all stm32 gpio controllers
For almost all STM32 GPIO controllers, the number of supported GPIO
pins managed by a single controller is 16 (with some exceptions for
fewer). However, the default for ngpios in the device tree bindings
for gpio-controllers is 32; leading to inaccuracies in handling GPIO
for these controllers, such as presenting too many GPIOs in the GPIO
shell. This patch redefines the default for ngpios for "st,stm32-gpio"
compatible devices to 16 and adds the correct ngpios for the few
exceptions Zephyr current supports.

Signed-off-by: Michael R Rosen <mrrosen@alumni.cmu.edu>
2024-09-03 10:44:06 +02:00