Commit graph

100803 commits

Author SHA1 Message Date
Richard Wheatley
1aebfcdb99 drivers: serial: UART PL011 Ambiq PM Fix
apollo3 driver added PM to UART for only apollo3
but defined PM function for both causing an error
in twister

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-27 10:49:38 -04:00
Emil Gydesen
095d1d75e2 MAINTAINERS: Exclude BT ISO from BT Host
Changes to ISO files should only get the BT ISO label
and not the BT host label.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-27 10:49:24 -04:00
Sven Ginka
63f8f7ff2a scripts: RISCV instruction SEPC
In RISCV "sepc" is actually the name of an instruction.
As this prevents building. We should remove the line.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-08-27 10:48:58 -04:00
Filip Kokosinski
77cec9d935 tests: kernel.common.stack_sentinel: exclude m2gl025_miv
This commit excludes the `m2gl025_miv` platform from running the
`kernel.common.stack_sentinel` test. It experiences the same issue as
`hifive1`, which was described in issue #66070.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-27 10:48:44 -04:00
Jordan Yates
7b4e7ff9ed flash: spi_nor: handle SPI bus power
Automatically request and release the SPI bus before talking to the
flash chip.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 07:15:28 -04:00
Jordan Yates
986fd88416 flash: spi_nor: automatically run device runtime PM
Automatically handle device runtime PM for all flash API calls.
Asynchronously release the device after a small delay to minimise power
state transitions under multiple sequential API calls (e.g. NVS).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 07:15:28 -04:00
Jordan Yates
6487a2a663 flash: spi_nor: remove SPI_NOR_IDLE_IN_DPD
Remove `SPI_NOR_IDLE_IN_DPD` to simplify the possible transition states
in the `spi_nor` driver. This option was originally added 5 years ago
when device runtime PM was in a much less mature state.

I do not believe having a separate power management implementation for
this one in-tree driver is in the interests of the project.

The behaviour of `SPI_NOR_IDLE_IN_DPD` leads to extremly suboptimal
behaviour in use cases where multiple small reads are performed
sequentially, see #69588.

Removal of this option does not break the behaviour of any existing
applications, only increases current consumption in idle by ~10uA until
device runtime PM is enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 07:15:28 -04:00
Szymon Janc
77cbd27a80 bluetooth: gatt: Fix ATT Read By Type by DB change unaware client
When change unaware client send ATT request it shall get Database
Out of Sync error. Reading GATT database hash is an exception here.

This was affecting GATT/SR/GAS/BV-05-C qualification test case.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-27 07:14:59 -04:00
Quy Tran
d1d42ec7f3 dts: bindings: clock: Change clock control binding for Renesas RA
Background of this modification is to make clock control
driver code provided by Renesas vendor to support for Renesas MCU
on Zephyr.

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
2bafb83771 boards: renesas: Add initial support for EK-RA4W1 board
Initial commit to support Renesas EK-RA4W1 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
6e6403d4cb soc: renesas: Add initial support for RA4W1 SOC
Initial commit to support Renesas RA4W1 SOC

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
d95ebf90b9 boards: renesas: Add initial support for EK-RA4M3 board
Initial commit to support Renesas EK-RA4M3 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
41e140d781 soc: renesas: Add initial support for RA4M3 SOC
Initial commit to support Renesas RA4M3 SOC

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
7638952f03 boards: renesas: Add initial support for EK-RA4M2
Initial commit to support Renesas EK-RA4M2 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
73848437b3 soc: renesas: Add initial support for RA4M2 SoC
Initial commit to support Renesas RA4M2 Soc

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
5663c885e7 boards: renesas: Add initial support for EK-RA4E2 board
Initial commit to support Renesas EK-RA4E2 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
81b83902cf soc: renesas: Add initial support for RA4E2 soc
Initial commit to support Renesas RA4E2 SoC

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Armando Visconti
9ea4cb96cd drivers/sensor/st: Fix wrong data byte swap for be
A 16-bit value built using byte shifts and ORs from a given
couple of lsb and msb bytes will result to be the same on both
little-endian and big-endian architectures, e.g.

    uint8_t lsb, msb;
    int16_t val;

    /* val is the same number on both le and be archs, but has
       different layout in memory */
    val = (msb << 8) | lsb;

All the xyz_raw_get() APIs of stmemsc sensor module build the sensor
data using the above method and DO NOT hence require (it actually leads
to wrong values on big-endian machines) to use any le/be swap routines,
such as sys_le16_to_cpu().

Fix #75758

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-27 07:07:52 -04:00
Emilio Benavente
cdfa11ee94 drivers: counter: mcux_lptmr: Updated lptmr to support multi instance.
Updated the counter_mcux_lptmr driver to support multiple
instances of the lptmr peripheral. Also added a new
binding property to identify if the user is using
counter-mode or pulse mode. since we were previously using the
prescaler value to check this which could be wrong
if used as a division value for getting the freq.
Added a property that allows the user to decide
what the counter value in lptmr should be divided by.
Cleaned up INIT macro for lptmr.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-08-27 12:46:11 +02:00
Lucien Zhao
edfeedfcd9 boards: nxp: mimxrt1180_evk: Set GPT2 status as ok
Set GPT2 status as ok for cm33 and cm7 core
Update feature guide description

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-27 12:46:00 +02:00
Lucien Zhao
e4341a40c3 soc: nxp: imxrt: imxrt118x: Enable GPT1/2 clock
dts: arm: nxp: mimxrt1180_evk: add GPT1/2 instance into devicetree

Enable GPT1/2 clock
Add GPT1/GPT2 instances
Set GPT2 as a counter, the default frequency is 240000000

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-27 12:46:00 +02:00
Thorsten Spätling
5ce7845f71 mipi_dbi: stm32: use proper type for timeout argument
The reset function uses uint32_t as its 2nd parameter, which leads to the
following compiler warning.

zephyr/drivers/mipi_dbi/mipi_dbi_stm32_fmc.c:176:18: warning:
  initialization of 'int (*)(const struct device *, k_timeout_t)' from
  incompatible pointer type 'int (*)(const struct device *, uint32_t)'
  {aka 'int (*)(const struct device *, unsigned int)'}
  [-Wincompatible-pointer-types]
  176 |         .reset = mipi_dbi_stm32_fmc_reset,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~

When you look at similar drivers,

/drivers/mipi_dbi/mipi_dbi_smartbond.c#L126
/drivers/mipi_dbi/mipi_dbi_nxp_lcdic.c#L561

you notice they use k_timeout_t.

So the whole fix is to correct the type.

Signed-off-by: Thorsten Spätling <thorsten.spaetling@vierling.de>
2024-08-27 12:45:48 +02:00
Tomasz Moń
0f41950564 usb: device_next: Respect granularity in UDC buf pool define
Round up buffer size used in UDC_BUF_POOL_DEFINE() to respect the
required buffer granularity. The issue was observed with UAC2 explicit
feedback data, but the problem applies to any UDC_BUF_POOL_DEFINE() use.

In order for every buffer returned by UDC_BUF_POOL_DEFINE() to be both
aligned and to have required granurality, it is required to allocate the
buffers for ROUND_UP(size, LCM(UDC_BUF_GRANULARITY, UDC_BUF_ALIGN)).
Because we do not have Least Common Multiple nor Greatest Common Divisor
compile time macros, assume that granularity is multiple of alignment.
Validate the assumption with a build time assert. When we get a target
where this assumption fails we would have to come up with a solution to
compute LCM and/or GCD at compile time.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
debc744665 drivers: udc_dwc2: Allow not-multiple-of-4 mps in DMA mode
Remove the early max packet size check on endpoint activation, because
there are valid use cases where the max packet size is not multiple of 4
and the stack won't perform multi-transaction transfers. Example use
case is UAC2 explicit feedback endpoint that has Max Packet Size equal
3 when device is operating at Full-Speed.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
0b242dea42 drivers: udc_dwc2: Do not enable inactive endpoint
Fail TxFIFO write if the endpoint is not activated, because there is
essentially no fifo assigned. Writing to not activated endpoint is
possible, but it does tend to corrupt fifo number 0 which is used for
control transfers. USB stack should not really be attempting to write to
endpoints that have not been activated (ep_enable called).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
c3daf6f220 drivers: udc_dwc2: Support isochronous endpoints
Store SOF frame number and use the information to set the Even/Odd
microframe bit when enabling isochronous endpoints. Reject received
isochronous data if number of packets received does not align with
received PID.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
de28a828c5 drivers: udc_dwc2: Unify OUT transfers in Completer and DMA mode
RxFLvl interrupt should only handle the actual data movement from RxFIFO
to the buffer. OUT transfers are completed in XferCompl handler both in
DMA and Completer mode. This reduces code size by avoiding having
separate code paths based on operating mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
31ee5d9787 drivers: udc_dwc2: Pass fifo number to tx fifo flush
Function dwc2_set_dedicated_fifo() calls dwc2_flush_tx_fifo() before the
diepctl register is written. The register will be only written after the
dwc2_set_dedicated_fifo() finishes. Solve the problem by passing fifo
number directly instead of endpoint address to dwc2_flush_tx_fifo().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
9f98ee854c drivers: udc_dwc2: Add isochronous register bit defines
Add all register bit defines necessary for isochronous transfers. Clean
up the endpoint transfer size register defines clearly separating IN and
OUT registers because they do use different bit fields. Add alternate
bit names for bits that do have different meaning based on configured
endpoint transfer type.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Chaitanya Tata
29921bbf92 manifest: hal_nordic: Pull fix for FW blobs path
Fixes west blobs fetch.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-27 12:45:35 +02:00
Pieter De Gendt
fda5ca34c2 scripts: ci: Fix clang-format notice at file beginning/end
The clang-format check outputs a git diff with surrounding context. It
naively removed the first and last 3 lines, but this does not work if
there are less lines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-27 12:45:21 +02:00
Henrik Brix Andersen
15f5e2de07 boards: st: nucleo_h723zg: enable fdcan1
Enable FDCAN1 on the ST Nucleo H723ZG development board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-27 12:45:15 +02:00
Kapil Bhatt
b9ef207ee1 net: wifi: Display rts threshold in wifi shell
Add a new offload API to get rts threshold and
display to the user in wifi shell.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-27 12:45:02 +02:00
Andrej Butok
c1fe3150e9 runners: pyocd: Add support for .elf files to the pyocd flash command
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the pyocd runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-27 12:44:55 +02:00
Yong Cong Sin
fd1be9849c shell: shell_help: fix width for subcommands help text
The terminal offset for subcommands' help text isn't
computed correctly, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-27 12:44:46 +02:00
Yong Cong Sin
276ccd04e7 shell: devmem: minor optimizations
- Use `SHELL_CMD_ARG_REGISTER` for the main cmd to state the
  required number of arguments, this helps to remove the
  runtime check from the command, and also print the help
  message to the terminal when the argument count is
  unexpected.
- Some changes to the help text that hopefully makes the
  mandatory and optional arguments more obvious to the user

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-27 12:44:46 +02:00
Daniel DeGrasse
ff7ac415d7 drivers: mipi_dbi: nxp_lcdic: calculate reset delay correctly
Reset delay was not being calculated correctly in lcdic driver, the
ticks field needs to be accessed directly within the timeout structure
to calculate the correct delay time

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:38 +02:00
Anas Nashif
b2a9fca9c8 ci: twister: remove reference to opensearch
We have been using elasticsearch for a while now. Remove references and
old script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-27 12:44:31 +02:00
Daniel DeGrasse
138e9591f8 tests: net: wifi: exclude RW612 based boards
Exclude RW612 based boards from the WiFi testsuite, as these boards
require binary blobs be downloaded in order to build as expected

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:22 +02:00
Jilay Pandya
19203c2655 MAINTAINERS: add maintainer for stepper api and driver
This commit adds stepper api and drivers to maintainers.yml

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
179f990e46 tests: drivers: stepper: build all
This commit introduces preliminary build all test for stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Fabian Blatz
32390d55ab doc: stepper: Add Stepper motor controller documentation
Added stepper motor controller documentation entry to peripherals.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
4f36fa8010 stepper: driver: introduce gpio driver
This commit introduces a basic gpio stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
1af0ec1d96 stepper motor controller: introduce api
This commit introduces api for stepper motor controllers

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
Signed-off-by: Florian Guhl <florian.guhl@zeiss.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-27 12:43:39 +02:00
Emil Gydesen
eaf92a1494 tests: Bluetooth: CAP: Initiator unicast start unittests
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-26 17:27:36 -04:00
Jordan Yates
d97cc46bdd gnss: rename u-blox M10 driver to M8
The driver in tree is for u-blox M8 devices, not M10. The M10 series
devices (from Protocol Version 23.01) use a different, non backwards
compatible interface for configuring the modem behaviour.

Of the two boards tested in the original PR, the "VMU RT1170" is
explicitly listed as having a u-blox NEO-M8N modem, while I have
been unable to find any information online about the "FMURT6" board.

Leaving the naming as-is will cause problems when M10 drivers are
contributed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:27:12 -04:00
Alexi Demers
bf41e53e00 disk: disk_access: changed mutex for a spinlock
disk_access functions were called from an interupt context, thus
crashing on mutexes (no sleep is allowed in interrupt context).
The usage of a spinlock is permitted. The functions guarded by
the spinlock are executed very quickly anyway, so the spinlock
is applicable.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
Alexi Demers
32481b6418 usb: fix wrong capacity report for USB mass storage device
Usb "write" method never copies the input data buffer, it uses the
buffer pointer directly. The fact that it was on the stack made
the buffer ephemeral, and could disappear before the USB transfer
actually occurred. The data transmitted was then random. This commit
converts the transfer buffer to a static buffer, so that it always
exists for the duration of the USB transfer.

Known side-effect: if "read capacity" command is read twice
simultaneously, the same buffer will be used twice. As the capacity of a
USB drive should not change between 2 calls, this side effect can be
ignored.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
Lucien Zhao
15a2ec66a8 dts: arm: nxp_rt118x: Complement full LPUART/GPIO devices and ocram spaces
Complement full LPUART and GPIO devices, and ocram spaces

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-26 17:26:02 -04:00
Nicolas Pitre
c9aa98ebc0 kernel: mmu: support for on-demand mappings
This provides memory mappings with the ability to be initialized in their
paged-out state and be paged in on demand. This is especially nice for
anonymous memory mappings as they no longer have to allocate all memory
at mem_map time. This also allows for file mappings to be implemented by
simply providing backing store location tokens.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:25:41 -04:00