Commit Graph

90370 Commits

Author SHA1 Message Date
Miika Karanki 8b86645108 fs: Add Kconfig key for init priority
Non-configurable init priority POST_KERNEL/99 might
be too late for certain uses cases (e.g. fetching data from
the file system in driver initialization). Chabge it to
be configurable so that applications can mount the
file systems earlies if they want.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-01-24 09:22:23 +00:00
Miika Karanki 89d4f06c17 fs: remove not needed SYS_INIT function
fs_init was just initializing mutex and dlist. Those can be
done statically. Not having the SYS_INIT function helps
in ordering the init functions in case e.g. file system
mounts are wanted to happen early stage on the system
startup.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-01-24 09:22:23 +00:00
Caspar Friedrich 8a2a44f9e9 drivers: adc: tla2021: Raise default initialization priority
The TLA2021 driver depends on it's i2c controller and therefore needs
to be initialized later. ADC_INIT_PRIORITY by default equals
KERNEL_INIT_PRIORITY_DEVICE which should be used by independent devices.
Using this by default causing projects to fail where this driver is
enabled implicitly through board configuration and the priority is not
explicitly set.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2024-01-24 08:22:33 +01:00
Vivekananda Uppunda 7eb0aa0468 net: wifi_shell: Remove TX-Injection and Promiscuous mode from Wi-Fi mode
Remove TX-Injection and Promiscuous mode setting from Wi-Fi mode shell
command. These commands are being moved to ethernet l2 layer

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-01-24 00:08:38 -05:00
Vivekananda Uppunda db4bf8d409 net: l2: ethernet: bring in TX-Injection mode to l2 ethernet
This set of changes brings in raw packet tx injection mode
feature to ethernet and removes it from being a Wi-Fi only feature.

It was earlier envisaged as Wi-Fi net management feature only.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-01-24 00:08:38 -05:00
Paszkiet Kamil 114548ef60 scripts: twister_blackbox: Added the ability to clear log from the code
clear_log is used as a fixture by pytest. We need to be able to call
it from the code level. Example of use in the file
test_harwaremap.py line 157.

Signed-off-by: Paszkiet Kamil <kamilx.paszkiet@intel.com>
2024-01-23 23:03:56 -05:00
Derek Snell 117dc55233 doc: linkserver: update installer link
Updates link to MCUXpresso Installer

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-01-23 22:11:02 -05:00
Andriy Gelman b302308e5f drivers: eth_sam_gmac: Use CONFIG_PTP_CLOCK_INIT_PRIORITY to init ptp
Use dedicated Kconfig symbol to set init priority.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-23 17:51:01 -05:00
Armando Visconti 72b3c3ea3a drivers: i2c: rv32m1: Fix build error
This fixes following build error when rv32m1_vega_zero_riscy
board gets compiled:

    implicit declaration of function 'INST_DT_CLOCK_IP_NAME'

Fixes #68012

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-23 18:14:16 +00:00
Toon Stegen 1d23ac5577 boards: arm: stm32h750b_dk: add support for sdram
128 Mbit sdram devicetree definition

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
2024-01-23 12:27:53 -05:00
Øyvind Rønningstad 33c84d8af0 west.yml: Update uoscore-edhoc
from 2.2.1 to 3.0.2

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-23 16:59:23 +00:00
Laurentiu Mihalcea 6abc5921e1 drivers: dma: Introduce driver for NXP's eDMA IP
This commit introduces a driver for NXP's eDMA IP.

The main reasons for introducing a new driver are the following:

	1) The HAL EDMA wrappers don't support well different
	eDMA versions (e.g: i.MX93 and i.MX8QM). As such, a new
	revision had to be introduced, thus requiring a new Zephyr
	driver.

	2) The eDMA versions found on i.MX93, i.MX8QM, and i.MX8QXP
	don't use the DMAMUX IP (instead, channel MUX-ing is performed
	through an eDMA register in the case of i.MX93).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-23 10:54:21 -05:00
Laurentiu Mihalcea c3a185f4ee manifest: Bump up hal_nxp revision
Bump up hal_nxp revision to contain the EDMA REV2-related
changes from NXP HAL.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-23 10:54:21 -05:00
Bjarki Arge Andreasen 592647cf0b tests: flash: Add erase_blocks test for flash controllers
Add test suite which tests writing to and erasing all pages,
of any size defined by the page layout.

If the test is built with MCUBOOT, the test will jump into the
application, then run write/erase/boundary tests on the
bootload partition. If MCUBOOT is not selected, the test will
target the slot1 partition instead, performing the same tests.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-23 15:22:26 +00:00
Bjarki Arge Andreasen b6c1bf8225 drivers: flash: sam: Use interrupt to sync
Use interrupt to wait for flash controller to finish
its command and become ready.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2024-01-23 15:22:26 +00:00
Bjarki Arge Andreasen efa4727296 drivers: flash: sam: Add logging
Add log messages to help diagnose and understand flash
driver behavior.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2024-01-23 15:22:26 +00:00
Bjarki Arge Andreasen ed854f008a flash: sam: Rewrite driver to dyncamically adapt to pages
This commit updates the driver to use the flash layout pages,
rewriting it to utilize the flash_page_layout.c driver to
avoid duplicate code.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2024-01-23 15:22:26 +00:00
Bjarki Arge Andreasen 6f28ea08a5 atmel: sam: flash: Add flash pages property
This commit adds layput page cells to the atmel sam flash
controller and the flash node. These allow for describing
the actual flash page layout of each soc, allowing the
flash driver to fully utilize the capabilities of the
flash.

With this update, we unlock the following capabilties:
  - utilize 2048 erase block size for small sectors
  - utilize 16384 erase block size for large sectors

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2024-01-23 15:22:26 +00:00
Michael R Rosen 193ad777f4 driver: adc: stm32: combine shared and separate irqs
Several STM32 variants include both shared IRQs for some ADCs and
separate IRQs for others (for example, STM32G473 has 5 ADCs, ADC1 and
ADC2 share one IRQ while ADC3, ADC4 and ADC5 each have unique
IRQs). The STM32 ADC driver however previously only supported either
separate IRQ lines for each operational ADC in the devicetree or a
single shared IRQ for all operational ADCs in the devicetree which
prevented all ADCs from being usable at the same time when the variant
contained a mix of both shared and separate ADC IRQ lines (only either
all the shared or all the separate and one of the shared might be used
at most for one application).

To allow for all ADCs in an STM32 variant to be usable in a single
application, generate an ISR and initialization function for each
unique IRQn as defined in the devicetree and give the task of
initialization to the first ADC which connects to that particular
IRQ. Each ISR function will generate code to call the ISR for each ADC
associated with that IRQn as was previously done for
CONFIG_ADC_STM32_SHARED_IRQS, allowing an ISR to be shared for the
ADCs sharing an IRQ while simultaneously providing separate ISRs for
each IRQ. Thus, the only information required to have ADCs either
share an ISR or not is provided by the devicetree.

Signed-off-by: Michael R Rosen <mrrosen@alumni.cmu.edu>
2024-01-23 15:21:55 +00:00
Benedikt Schmidt 2141bb4561 drivers: spi: fix unreliable SPI busy flag for some STM32 devices
Extend the workaround for the unreliable SPI busy flag
to all F7 and L4 devices, which are affected by the same
erratum.

Fixes  #67739

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-23 09:46:57 -05:00
Toon Stegen 8ae315764c boards: arm: stm32h750b_dk: add support for QPSI flash
devicetree definition for quad spi

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
2024-01-23 09:46:25 -05:00
Fabio Baltieri 1dd2307b3f input: gpio_qdec: add optical encoder support
Change the gpio_qdec driver to support optical encoders.

Add a property to use for defining an arbitrary number of GPIOs for the
sensing devices (typically infrared LEDs, but could also be the
biasing for the phototransistor), and one for adding a delay between
turning those on and reading the pin status.

The infrared LEDs typically consume a non negligible amount of power, so
there's also a new idle-poll-time-us property that enables two possible
modes of operation:

- if idle-poll-time-us is zero (default) the LEDs are enabled all the
  time and the driver enters polling mode using the GPIO interrupt as
  with mechanical encoders. This is usable for mains powered devices and
  has the lowest overhead on the CPU.

- if idle-poll-time-us is non zero, then the driver polls the encoder
  all the time, turning on the LEDs just before reading the state and
  shutting them off immediately after, but when the encoder is idle it
  switches the polling rate to idle-poll-time-us to save power, and only
  polls at sample-time-us when some movement is detected.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-23 09:45:57 -05:00
Fabio Baltieri 91ee5c4db2 input: gpio_qdec: rename gpio to ab_gpio
Rename gpio to ab_gpio, this is in preparation for adding another gpio
pointer.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-23 09:45:57 -05:00
Grzegorz Chwierut 3e234966dc twister: pytest: Update MCUmgr helper method
Update helper method used by pytest fixtures. Extended upload
method with 'slot' parameter. Added searching of uploaded images
that can be tested or confirmed.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-01-23 09:45:27 -05:00
Vinayak Kariappa Chettimada 585d98e0d8 Bluetooth: Controller: Fix prepare overhead in scheduling ISO
Fix double prepare overhead considered in scheduling
extended, periodic and ISO broadcast radio events when using
LOW LAT variant.

ticks_slot maintained in ticker includes the overhead, the
ticks_slot stored in role/state context exclude the overhead
hence take care to include ticks_slot_overhead when value is
used from context and not when value used from ticker nodes.

Add jitter due to ticker resolution unit between scheduled
radio events. This will allow the synchronizing side too to
not overlap due to ticker resolution related jitter.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:45:29 +01:00
Vinayak Kariappa Chettimada 4a51f68bcc Bluetooth: Controller: Fix ISO Sync Receiver subevent Rx window
Fix ISO Synchronized Receiver subevent Rx window timing and
PDU address receive timeout to consider the +/- 2us active
clock jitter.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:45:16 +01:00
Vinayak Kariappa Chettimada 83174ef7dc Bluetooth: Controller: Fix ISO Sync Receiver sequential subevent skip
Fix ISO Synchronized Receiver sequential packing subevent
skip to next BIS subevent, so that radio channel is
correctly calculated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:45:02 +01:00
Vinayak Kariappa Chettimada 6e51950cd8 Bluetooth: Controller: Use EVENT_OVERHEAD_RESERVE_MAX in Periodic Sync
Use EVENT_OVERHEAD_RESERVE_MAX conditional compile in
Periodic Advertising Sync implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:44:41 +01:00
Yong Cong Sin 8cfff4b48f tests: devicetree: api: align `DT_IRQN` test
Not sure why the `DT_IRQN` tests are tabbed, fix that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 734a7db5c4 devicetree.h: rework multilevel interrupt encoding macros
Now that we have a very easy way to get the interrupt
controller and the interrupt level of a node, we can
simplify the multilevel interrupt encoding macros.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 170c659292 tests: devicetree: api: test DT_IRQ_LEVEL and DT_INST_IRQ_LEVEL
Added new test for `DT_IRQ_LEVEL` and `DT_INST_IRQ_LEVEL`.

Introduced a new `vnd.cpu-intc` compatible so that we have a
root level interrupt controller that acts as level 1
aggregator, and modified `test_intc` to be level 2 aggregator,
updated test of `DT_IRQN(TEST_I2C_BUS)` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 0b43699366 devicetree.h: add macros to get the interrupt level of a node
Added new DT macros to get the interrupt level of a node.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 450a66fa36 gen_defines: output the interrupt level of a node
Currently it is tedious to know the level of an interrupt for
a node in C. One would have to go through a very complex and
error prone macros to check if there's a parent interrupt
controller & if the controller has an interrupt number and thus
not a pseudo interrupt controller like the one found in
`rv32m1`. The level of a node is required to encode the
Zephyr's multi-level interrupt number

Since it is easier to do it in the `gen_defines` script, let's
do the heavy lifting there so that we can introduce new DT
macros to get the interrupt level very easily later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 89fb8f8b98 gen_isr_tables: print index number at the end of each entry as comment
Make it easier to debug by printing the index number at the
end, this is especially helpful when there's a lot of
interrupts.

Before:

```c
/* build/zephyr/isr_tables.c */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
```

After:

```c
/* build/zephyr/isr_tables.c */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 0 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 1 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 2 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 3 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 4 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 5 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 6 */
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:40:32 -05:00
Christopher Friedt 8556ae5afe samples: posix: change Subsystem to API
The POSIX API in Zephyr is considered more of a library than a
Subsystem.

Adjust the samples doc to reflect that.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-23 10:03:13 +00:00
Christopher Friedt f6373d6918 samples: portability: link to posix samples
POSIX API Samples live in another directory, but they should
still be easy to find from Portability Samples.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-23 10:03:13 +00:00
Peter Mitsis 7c5a57b87b tests: latency_measure: Fix MPU fault
Fixes an MPU fault that was occurring on some ARM platforms when
executing the events portion of the latency_measure benchmark. The
fault was tracked to an attempt by a user thread to read an MMIO
register that it did not have permissions to access.

The solution was to move the printing of the stats averages out of
the test thread and into the main thread as the main thread always
executes at kernel/supervisor level and will always have permissions
to read that MMIO register.

Fixes #67438

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-23 10:02:46 +01:00
Benjamin Cabé de21b50002 doc: guidelines: drop mentions of Parasoft Codescan
Drop the section of the coding guidelines that's referring to Parasoft
Codescan as it's not used by the project anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-01-23 10:02:39 +01:00
Ayush Singh ef04b5226e MAINTAINERS: Add BeagleBoard Platforms
- Due to the incresing support for ZephyrRTOS in BeagleBoard boards, it
  would be good to have this entry.
- Was discussed in Discord when asking for help for PR review

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-01-23 10:02:32 +01:00
Sean Madigan a9a3b808e8 samples: bluetooth: iso_receive: Allow syncing any subevent number
When using softdevice controller on iso_broadcast sample, the BIG
created uses more than 1 subevent. This means that when you try to
use the iso_receive sample to sync it does not work.

So update the sample to use mse=0 and allow any number of subevents,
making the sample more flexible and work with SDC without any changes.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-01-23 10:02:26 +01:00
Przemyslaw Bida a6184b9be3 net: openthread: Fix key import in case of ECDSA.
According to PSA specification in case of `PSA_KEY_TYPE_ECC_KEY_PAIR`
function `psa_import_key` takes private key from key pair as argument.
This commit adds extraction of Private key from ECDSA key pair.

Also removes not needed `otPlatCryptoEcdsaGetPublicKey`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-01-23 10:02:17 +01:00
Przemyslaw Bida f661aa7641 net: openthread: Regular openthread upmerge to `00076af`
Regular upmerge.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-01-23 10:02:17 +01:00
Anders Storrø 93a6ee501a Bluetooth: Mesh: Add artificial beacon delay
After removing 20ms in advertiser, all subnetwork beacons are sent as high
dense packet of frames with minimal distance between them. That might
cause collisions if beacon interval on devices will coincide.

This commit adds an artificial delay between each subnet advertsing
beacons.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2024-01-23 10:02:00 +01:00
Gerard Marull-Paretas 68799d507d arch: riscv: make __soc_is_irq optional
It looks like all SoCs in tree check if an exception comes from an IRQ
the same way, so let's provide a common logic by default, still
customizable if the SoC selects RISCV_SOC_ISR_CHECK.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 49e2bc69a2 arch: riscv: add RISCV_HAS_(C|P)LIC from soc/riscv
Because these are general RISC-V options, not soc specific.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 2dcbb0ee3f soc: riscv: make RISCV_HAS_(C|P)LIC promptless
These options are meant to be selected by SoC series supporting
(C|P)LIC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 00904c4267 boards: riscv: beaglev_fire|mpfs_icicle: drop redundant options
CONFIG_RISCV_SOC_INTERRUPT_INIT=y and CONFIG_RISCV_HAS_PLIC=y are both
defaulted to y by the board SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Anas Nashif 6df6935b67 intel_adsp: ace: do not use external kconfigs in code
use CONFIG_SOC_INTEL_ACE15_MTPM instead of CONFIG_ACE_VERSION_1_5.

CONFIG_ACE_VERSION_1_5 leaked from SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-22 17:02:47 -05:00
Declan Snyder e4b761aafb MAINTAINERS: Create NXP Drivers group
Create NXP Drivers group separate from the platforms.
The idea being that currently there are two problems:

- All the Drivers drivers are falling under the responsibility
of the MCUX platforms' maintainers, some of whom do not have the
cycles or interest to maintain these things.

- The maintainers of the other platform groups do not get counted
as reviewers of the Drivers drivers that their platforms use.

So, separate all the driver files from the MCUX platforms, and add the
relevant people who have an interest in maintaining the Drivers, including:

- At least one maintainer of each platform group, and
- The NXP contributors who are highly active in maintaining
  and reviewing the NXP drivers in upstream Zephyr.

Another two problems this PR fixes:

- The platforms of the other NXP groups are still falling under the MCUX
  group. Exclude the platforms of the other NXP groups from MCUX group.
  MCUX group will still be the default group for unsorted NXP platforms.

- Add a few file paths to some of these groups to cover a few missed
  files, and add description properties of the NXP groups.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-01-22 15:25:53 -05:00
Anas Nashif 5df0cf1701 MAINTAINERS: add wildcard for ITE drivers
Include ITE drivers in ITE platforms area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-22 14:48:01 -05:00