Commit graph

107217 commits

Author SHA1 Message Date
Francois Ramu
7044876b0b dts: arm: stm32f412 device has a clock 48MHz multiplexer
Add a clk48Mhz node to the stm32f412 serie.
This clock is sourced by PLL_Q (default) or PLLI2S_Q
That 48MHz clock is used by the USB /SDMMC/RNG peripherals.
The sdmmc/SDIO clock is sourced by this CK48 (default)
or by the SYSCLOCK.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-13 20:05:11 +01:00
Francois Ramu
fcc5f9dac1 dts: bindings: pll i2s for the stm32f412 has a Q divider
There is a Q-divider factor [2..15] for the stm32f412 serie
which supplies the 48MHz clock.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-13 20:05:11 +01:00
Francois Ramu
15bdefecc0 drivers: clock control: stm32F412 has PLL48MHz
Add the configuration of the PLL Q divider of main PLL
and I2S_Q of the PLLI2S toset the PLL48MHz clock which feeds
 the USB, SDMMC, RNG through the RCC_DCKCFGR2 register.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-13 20:05:11 +01:00
Laurentiu Mihalcea
3651725316 dts: xtensa: nxp_imx8: add edma power domains
Add power domains for EDMA0's channels 6, 7, 14, and 15.
For QM these are identified as IMX_SC_R_DMA_2_*, while
for QXP thy are identified as IMX_SC_R_DMA_0_*.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
2eecf88698 dts: xtensa: nxp_imx8: move up the definition of system-controller
This has no address space and doesn't belong between peripheral
nodes. Move it up the DTSI for better visibility. No functional
change.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
c8a984708c dts: xtensa: add imx8qm and imx8qxp DTSI variants
imx8qm and imx8qxp have a couple of differences regarding
the peripheral address spaces and how the DT nodes are
configured, which is why using a generic DTSI (nxp_imx8.dtsi)
for the both of them is not right.

One of the differences between the two, which affects Zephyr
is the fact that irqstr's address space is different. Up until
now this has been dealt with at the board level (i.e:
imx8qxp_mek_mimx8qx6_adsp.dts), which is not right as this is not
board-specific, but rather soc-specific. Additionally, this
causes the following warning during compilation:

"unit address and first address in 'reg' (0x51080000) don't
match for /interrupt-controller@510a0000"

To fix this, add two new DTSIs: nxp_imx8qm and nxp_imx8qxp.
Each board (i.e: imx8qm_mek and imx8qxp_mek) will have to include
the DTSI for their soc instead of the generic DTSI (i.e: nxp_imx8).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
8a060ba4a1 dma: dma_nxp_edma: add support for managing per-channel PDs
Add support for managing per-channel power domains (1 channel,
1 PD).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
520c967c42 dma: dma_nxp_edma: make sure channel is inactive when releasing
Make sure that channels are inactive before releasing them.
This way, there won't be any leftover interrupts needed to be
handled when disabling IRQs.

This patch introduces a new state: CHAN_STATE_RELEASING. This is mostly
useful for the per-channel PD support in which the ISR needs to check
that the channel PD is enabled before attempting to access its register
space.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
b3fa605dec dma: dma_nxp_edma: perform IRQ enable/disable on channel request/release
Commit 48b98a9284 ("drivers: dma: dma_nxp_edma: disable IRQs when
not needed") moved the IRQ enable operation to edma_start() and added
an IRQ disable operation in edma_stop(). This is wrong because it breaks
the DMA API contract w.r.t dma_start() being `isr-ok` on imx8qm/imx8qxp.

As such, move the IRQ enable and disable operations in
dma_request_channel() and dma_release_channel().

Note1: managing the interrupts like this is only really needed when
dealing with interrupt controllers that have a power domain associated
with it (which is the case for irqstr on imx8qm/imx8qxp).

Note2: Zephyr has no reference count for shared interrupts so disabling
a shared interrupt without checking if someone else is using it is
dangerous.

Based on the aforementioned notes, the irq_disable() operation is only
performed if irqstr is used as an interrupt controller (which is only
the case for imx8qm/imx8qxp). Otherwise, the operation isn't needed.

Fixes #80573.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
80df3a0d2d dma: dma_nxp_edma: refactor state transitioning
The channel state transitions are currently performed at the
beginning of each of the functions that triggers them
(e.g: edma_start(), edma_stop(), etc...).  The main issue with
this approach is the fact if there's any failures after the state
transition then the channel will be in the target state without
performing the required steps for it.

For instance, during edma_config(), if any of the functions after
the state transition (the channel_change_state() call) fails
(e.g: get_transfer_type()) fails then the state of the channel
will be CONFIGURED even if not all the required steps were performed
(e.g: setting the MUX, configuring the transfer, etc...).

To fix this, split the state transition into two steps:

	1) Check if the transition is possible.
	2) Do the transition.

First step should be done before any configurations to make sure
that we should be performing them in the first place, while the
second step should be performed after all configurations, thus
guaranteeing that all the required steps for the target state were
performed before transitioning to it.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Laurentiu Mihalcea
acb77b3629 manifest: bump up hal_nxp revision
Bump up the hal_nxp revision to pull in the following patch:

dd8bc4f60e7("drivers: edma_rev2: add macro for CHn_CSR's ACTIVE bit")

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-12-13 20:05:00 +01:00
Rafał Kuźnia
bcc756223f samples: drivers: counter: add nRF54L20 config
Added build configuration for nRF54L20.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-13 20:04:51 +01:00
Rafał Kuźnia
07ee796c7d tests: nrf: enable twister tests for nrf54l20pdk
Enabled the following tests on nrf54l20
- i2c_slave
- clock_control_api
- nrf_clock_calibration
- nrf_lf_clock_start
- onoff
- retained_mem/api
- uart_elementary
- uart_errors
- uart_mix_fifo_poll
- uart_pm
- uart_async_api
- wdt_error_cases
- wdt_basic_api
- counter_basic_api
- fcb
- nrf/qdec

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-13 20:04:51 +01:00
Rafał Kuźnia
413ca65d65 dts: common: nordic: nrf54l20: set timer frequency to 64MHz
The timer counter frequency is set to 64MHz as a workaround.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-13 20:04:51 +01:00
Krzysztof Chruściński
adcd68936b tests: unit: util: Extend test_IS_EQ
Extend test to check for unsigned literals.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 20:04:33 +01:00
Krzysztof Chruściński
78ba5cd61a sys: util: Extend IS_EQ to support unsigned literals
Extend IS_EQ to include unsigned integer literals like 0U.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 20:04:33 +01:00
Matt Rodgers
0f267e4878 MAINTAINERS: add mrodgers-witekio as collaborator to 'Networking: HTTP'
Add myself to collaborator list for newly created 'Networking: HTTP'
area.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-13 17:46:04 +01:00
Jilay Pandya
50928c0482 drivers: sensor: bmp180 fix unintentional integer overflow issue
cast partial_x3 explicitly to uint64_t to circumvent unintentioanl integer
overflow coverity issue

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-13 17:45:15 +01:00
Anas Nashif
306d2f4a56 doc: contributor: change language around PR review escalation
Refrain from using Escalation language when requesting review and
getting awareness from maintainers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-13 17:44:52 +01:00
Lothar Felten
c552379f0e drivers: input: cap12xx, support 3 to 8 channels
The Microchip CAP12xx series are available in 3, 6 or 8 channel versions.

Co-authored-by: Benjamin Cabé <kartben@gmail.com>

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-12-13 17:44:35 +01:00
Lothar Felten
058f107089 drivers: input: cap1203, rename to cap12xx
rename cap1203 to cap12xx to support 3 to 8 channels

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-12-13 17:44:35 +01:00
Bjarki Arge Andreasen
73a45a7012 drivers: clock_control: nrf: hfxo: impl zero-latency isr API
Implement the zero latency interrupt safe APIs to the HFXO clock
commonly used by the bluetooth stach from zero latency interrupt
context.

Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-12-13 17:44:26 +01:00
Bjarki Arge Andreasen
2aec438b43 drivers: clock_control: nrf: add zero-latency-isr safe APIs
Add zero latency interrupt safe APIs to allow requesting and
releasing HFXO. These will be used from components running
in zero latency interrupt context, like the bluetooth stack.

Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-12-13 17:44:26 +01:00
Krzysztof Chruściński
90b2aa8c22 tests: lib: devicetree: api: Add test for DT_PROP_LAST
Extend test to cover for DT_PROP_LAST.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 17:44:13 +01:00
Krzysztof Chruściński
0b4818478f devicetree: Add DT_PROP_LAST macro
Add macro for getting the last element of an array type property.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 17:44:13 +01:00
Chaitanya Tata
5a461e7625 modules: nrf_wifi: Remove unused define
This is now passed as argument instead of using the Kconfig in the OSAL
code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-13 17:44:06 +01:00
Fin Maaß
fe44cee4d3 MAINTAINERS: add maass-hamburg to ethernet and mdio
add maass-hamburg as colaborator
to ethernet and mdio drivers.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-13 16:13:46 +01:00
Krzysztof Chruściński
4615890792 modules: hal_nordic: nrfs: Optimize communication
It is not needed to use always the system work queue to send a
message over IPC. In thread context IPC service can be called
directly. It speeds up the communication and allows to use nrfs
from the system work queue. Legacy approach could easily lead
to the deadlock if user would call nrfs from work queue and
pend on semaphore until response is received.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 16:13:37 +01:00
Krzysztof Chruściński
fe0e2dbc60 drivers: clock_control: nrf: Add API for synchronous request
Add API for synchronous request for clock attributes.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 11:46:41 +01:00
Pisit Sawangvonganan
b44250ae46 shell: modules: kernel: streamline code
This commit includes cleanups to `kernel_service`:
- `shell_tdata_dump()`:
  Adjust formatting to align with `.clang-format`.
- `shell_stack_dump()`:
  Update to pass `sh` directly instead of `user_data` since
  it is already assigned.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-13 11:35:28 +01:00
Pisit Sawangvonganan
8fedee30ee shell: modules: devmem: use shell_strtoul in cmd_dump
Switch from using direct `strtoul` calls to `shell_strtoul`.
This change leverages the extensive error handling provided
by `shell_strtoul`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-13 11:35:28 +01:00
Pisit Sawangvonganan
27cbe0553c shell: modules: date: omit NULL initialization of endptr
As `strtol` guarantee to set `endptr`, the initial `NULL` can be omitted.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-13 11:35:28 +01:00
Pisit Sawangvonganan
09f13a31e9 shell: utils: omit NULL initialization of endptr
As `strtoul`, `strtoll`, and `strtol` guarantee to set `endptr`,
the initial `NULL` can be omitted.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-13 11:35:28 +01:00
Ricardo Rivera-Matos
a351d28c25 charger: bq24190: Adds support for ce-gpios
Adds driver support for the charge enable (ce) gpio. This GPIO is
optional and if no GPIO is allocated the pin is assumed to be asserted.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-12-13 11:35:17 +01:00
Ricardo Rivera-Matos
6d30055809 dts: charger: bq24190: Documents the ce-gpio
Documents the charge enable (ce) gpio.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-12-13 11:35:17 +01:00
Stephanos Ioannidis
734fa185c8 arch: arm: cortex_m: Use Thumb-1 compatible 'mov reg, imm' mnemonic
The ARM Thumb-1 instruction set, used by ARMv6-M and ARMv8-M Baseline
cores, does not have a valid encoding for "immediate-to-register move
without affecting flags" instruction (i.e. `mov reg, imm`), and the only
valid variant of immediate-to-register move instruction for it is `movs`,
which affects the flags.

Since none of the register initialisation instructions used here are
flag-sensitive in their context, this commit changes `mov` to `movs`.

This fixes the compilation errors with Clang/LLVM, which is more picky
about the `mov` mnemonic usage and prints out an "invalid instruction"
error when `mov reg, imm` is specified in Thumb-1 mode.

Note that GNU assembler implicitly converts `mov reg, imm` to `movs reg,
imm` when assembling in Thumb-1 mode.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-12-13 11:35:06 +01:00
Tuomas Parttimaa
342c25924d dts: nordic: Add SUIT storage partition for nRF9280 SiP
Add definition of the SUIT storage partition for the nRF9280 SiP.

Signed-off-by: Tuomas Parttimaa <tuomas.parttimaa@nordicsemi.no>
2024-12-13 11:34:55 +01:00
Pisit Sawangvonganan
13c74a0764 modbus: serial: remove redundant cfg->dev usage in uart_cb_handler
Simplify `uart_cb_handler` by directly using `dev` instead of `cfg->dev`,
as both hold the same value.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-13 11:34:44 +01:00
Jordan Yates
a072d993ef tests: rtio: rtio_api: explicit RTIO_SUBMIT_SEM=n
Now that `CONFIG_RTIO_SUBMIT_SEM` is the default option, testing the
alternate code path requires explicitly disabling it.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-13 11:34:34 +01:00
Alexandre Bailon
851bda1bb3 boards: cc1352p7_lp: Adds a way to select the board to flash
This updates openocd.cfg file to support flashing multiple boards
attached to the host computer.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-12-13 11:34:27 +01:00
Xudong Zheng
e04bc90e0f boards: rp2040: set startup-delay-multiplier for applicable boards
This is based on boards in
https://github.com/raspberrypi/pico-sdk/tree/2.1.0/src/boards/include/boards
that have a custom value set for PICO_XOSC_STARTUP_DELAY_MULTIPLIER.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-12-13 11:34:14 +01:00
Xudong Zheng
d2010e7750 dts: arm: rpi_pico: remove default startup-delay-multiplier from .dtsi
The default is defined in dts/bindings/clock/raspberrypi,pico-xosc.yaml.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-12-13 11:34:14 +01:00
IBEN EL HADJ MESSAOUD Marwa
3c630f4b2b Revert "boards: arm: enable CONFIG_USB_DC_HAS_HS_SUPPORT"
This reverts commit f6235e03cf.

Reason for revert:
The modifications introduced in this commit caused a problem
with the WebUSB.
As a result, these modifications are not needed and are being
reverted to restore proper operation of the WebUSB sample.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-12-13 11:34:02 +01:00
Vivekananda Uppunda
fcbf70f44d twister: wifi: Add PSA API Wi-Fi build support to twister
This enables the PSA API support for Wi-Fi in twister test setup
for Wi-Fi.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-12-13 09:13:27 +01:00
Vivekananda Uppunda
ab6dfa2bf2 doc: wifi: Add section for PSA enabled build for Wi-Fi
Add a section which describes how to enable PSA API support
for Wi-Fi build.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-12-13 09:13:27 +01:00
Vivekananda Uppunda
b87f9d5775 boards: Add RNG default selection, supplicant and tcp config settings
This change brings in certain default configurations that are needed
for selection of random number generator, and to set tcp
configuration CONFIG_NET_TCP_ISN_RFC6528=n for nRF7002dk board.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-12-13 09:13:27 +01:00
Vivekananda Uppunda
4bbeb55e05 modules: hostap: Add needed PSA_WANT_XX settings in mbedtls PSA config
Add the PSA_WANT_XXX settings that might be needed for various crypto
algorithms and Keys in WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA
configuration setting.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-12-13 09:13:27 +01:00
Make Shi
345c3f17eb Bluetooth: Shell: BR: Add NULL pointer check for result->resp_buf
In case the peer device has NO SDP record, the result is valid,
but the result->resp_buf is NULL, it would introduce a hardfault.
Therefore, also add a NULL pointer check for result->resp_buf.

Signed-off-by: Make Shi <make.shi@nxp.com>
2024-12-13 09:13:17 +01:00
Anas Nashif
82f7857a94 twister: debug: change skipped -> filtered
Change debug message to say filtered instead of skipped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-13 09:12:59 +01:00
Anas Nashif
63caa67f52 twister: plan: unify messaging, testsuite vs testcase
Many places use test case instead of testsuite or testsuite scenario.
Unify to avoid confusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-13 09:12:59 +01:00