Commit graph

25,525 commits

Author SHA1 Message Date
Jilay Pandya
b5ff37297d samples: stepper: add generic stepper sample
Add a generic stepper sample with gpio-stepper

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-12 07:13:33 +01:00
Andrew Davis
e07b8733d5 drivers: mm: rat: Only fetch region_config from translate_config once
We only need to dereference translate_config once to get the current
region_config we are working with, do this once at the start of the
sections that use it multiple times.

The compiler should optimize the multiple fetches anyway, so this
is purely for code readability.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Andrew Davis
99de7521ca drivers: mm: rat: Simplify sys_mm_drv_page_phys_get logic
Instead of tracking if a matching address has been found and then
doing the translation after, we can loop until one is found and
do the translation and return immediately.

This saves having to keep a "found" variable, and makes the code
shorter and more readable IMHO. Do this here.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Andrew Davis
7949ffd7d8 drivers: mm: rat: Fix virt and phys NULL checks
Do not check virt being NULL as 0 is a valid address that can be
translated. Phys on the other hand is an output pointer that will be
assigned to and so cannot be NULL, check this instead to prevent a
NULL pointer dereference later.

Note that phys is allowed to be NULL, so this is not an invalid argument.
It can set to NULL when the caller wants to check if a virtual address is
mapped but does not care about the address itself. In that case -EFAULT
should be returned if the virtual address is not mapped, 0 otherwise.
For RAT, all addresses not translated are still valid and mapped as
pass-through, so we always return 0 in this check case.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Andrew Davis
8580c6d50b drivers: mm: rat: Remove extra ASSERT for num_regions
This was already checked on initialization, not need to do it
every time we do a translation.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Andrew Davis
d2d43b9d97 drivers: mm: rat: Move internal struct and definitions into source file
These struct and definitions are only used internally by this driver,
move them out of the public interface header and into the driver source.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Andrew Davis
693172becd drivers: mm: rat: Pass region_config as a struct not void pointer
The struct address_trans_region_config is already defined, no reason
to pass this in as a void pointer then cast it later. Pass it in
as a struct pointer.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Andrew Davis
4b855962df drivers: mm: rat: Merge address_trans_init into base init function
This helper function is only used once and is way too small to need
to be factored into its own function. Inlining it greatly reduces
code size and complexity.

While merging, move the ASSERT()S out of the loop, they only need
checked once.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-03-12 07:13:22 +01:00
Marcio Ribeiro
233d6b1bf5 drivers: dma: esp32: remove block size limitation
Removes block size limitation from dma rx and tx configuration

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-03-12 07:13:06 +01:00
Ibrahim Abdalkader
b887cc4db5 drivers: video: gc2145: Fix video_format_cap array.
video_format_cap needs to be terminated with a NULL entry
to allow looping over the formats.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-03-12 02:28:40 +01:00
Alberto Escolar Piedras
1bfbd9262e Bluetooth: userchan: Remove support for native_posix and clarify msg
native_posix has been removed, so let's remove its support from
kconfig for this driver.
Also let's replace its mention in the help message.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 02:27:36 +01:00
Alberto Escolar Piedras
14a4f50642 drivers/can/can_native_linux_adapt: Correct a refernece to native_posix
Replace it with the driver name

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 02:27:36 +01:00
Alberto Escolar Piedras
b617418532 drivers/timer/native_sim_timer: Correct comments
Correct the introduction comment, removing the native_posix mention,
and something which did not apply for several years.
Also remove an unnecessary include.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:49 +01:00
Alberto Escolar Piedras
ba64291088 drivers timer: Rename native_posix_timer native_sim_timer
Including renaming the kconfig option
NATIVE_POSIX_TIMER into NATIVE_SIM_TIMER deprecating the first one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:49 +01:00
Yangbo Lu
605335716a drivers: interrupt_controller: intc_nxp_irqsteer: fix system INTID
Current system INTID calcualtion only worked for SoCs whose extended
interrupts started from IRQ 0.
Otherwise, FSL_FEATURE_IRQSTEER_IRQ_START_INDEX should be added for
system INTID.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-11 18:54:40 +01:00
Yangbo Lu
8108c891b8 drivers: interrupt_controller: intc_nxp_irqsteer: support ARM Cortex-M
Added ARM Cortex-M support for intc_nxp_irqsteer driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-11 18:54:40 +01:00
Jeppe Odgaard
8b8d56a5ca drivers: sensor: explorir_m: increase max response delay
The sensor does not always finish responding within 200 ms.
This is the sometimes the case when using the sensor calibrate command `X`.
Response delay up to 212 ms has been measured with a logic analyzer.

Increase the max response delay to 300 ms to fix the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-03-11 18:54:34 +01:00
Jeppe Odgaard
e575eea233 drivers: sensor: explorir_m: improve transceive
During calibration feature development the following loop was used for
testing:

```shell
CMD="sensor attr_set explorir_m co2 calibration 1234"
while : ; do echo "$CMD" > /dev/ttyACM0; sleep .8; done
```

At some point calibration would fail and all following calibration commands
would fail.

Reset buffer and semaphore just before terminating the command to better
mitigate disturbance from previous failed command.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-03-11 18:54:34 +01:00
Alberto Escolar Piedras
cb53e40ff9 drivers uart_native_posix: rename to native_pty and support N instances
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.

And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.

Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
  now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
  being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
  terminal to PTY instead of PTTY.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Krzysztof Chruściński
841e852513 drivers: mbox: nrf_vevif_event_tx: Fix errata 16 workaround
Pend until requested event is set before clearing it. Without that
check event could be cleared too early and APP core is not waken up.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-11 11:34:44 +01:00
Piotr Pryga
ceb4298566 drivers: hci: ipc: Make IPC endpoint bound timeout configurable
The HCI IPC endpoint bound timeout value was hardcoded and set
to 1000 ms. This value may be differ between platforms, for
exampel due to extended boot time.
The default value used was a bit short for multicore SoCs
that usually may wait for some other service reposnes for
similar time. That may lead to timeout error while other
end of an endpoint was slightly late. Change the default
duration to 2000 ms to give more room for possible delays.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2025-03-11 09:00:29 +01:00
Bjarki Arge Andreasen
7e9301697d drivers: spi: nrfx_spis: impl pm device runtime
Implement PM device runtime in nrx spis device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-03-11 09:00:19 +01:00
Luis Ubieda
4aef791a0e sensor: icm45686: Add Triggers functionality
Only working with SENSOR_TRIG_DATA_READY so far.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Luis Ubieda
05e8a65ba0 sensor: icm45686: Add low-pass filter configuration options
Both for Gyro and Accelerometer.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Luis Ubieda
25793fe33c sensor: icm45686: Add basic sensor functionality
- Add support for Fetch/Get API.
- Add support for Read/Decode API.
- Add config settings through device-tree.
- Add bus support for SPI (although easily extensible to others as
based on RTIO).

Fetch/Get API tested with accel_polling sample.
Read/Decode API tested with sensor_shell sample.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Gerard Marull-Paretas
1494cdb0bf drivers: misc: devmux: fix init signature
It is no longer possible to use other signatures other than
`int fn(const struct device *)`. Just cast the device pointer,
safe in this context because CONFIG_DEVICE_MUTABLE=y.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-10 21:32:40 +01:00
Paul Wedeck
1cfec8c19a drivers: dma_wch: add support for the WCH DMA controller
This patch adds an initial driver for the WCH DMA
controller. All hardware features and most interface
features are implemented.

Signed-off-by: Paul Wedeck <paulwedeck@gmail.com>
2025-03-10 21:32:27 +01:00
Ibe Van de Veire
200b886d3c drivers: eth: native_posix: Add IPv4 parameter input from cmd line
Added the abililty to set the IPv4 addres, gateway and netmask from the
command line when running a native_posix build.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2025-03-10 21:31:27 +01:00
Miguel Gazquez
8722c03222 drivers: udc: udc_skeleton: fix call to K_THREAD_STACK_DEFINE
The udc_skeleton driver incorrectly calls `K_THREAD_STACK_DEFINE` with
`CONFIG_UDC_SKELETON` instead of `CONFIG_UDC_SKELETON_STACK_SIZE`. This
causes stack overflows when developing a driver based on this code.

Fix the call to `K_THREAD_STACK_DEFINE`.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-03-10 21:30:58 +01:00
Kapil Bhatt
928534455b nrf_wifi: src: Fix include file path
With recent code restructuring file name and path
has been changed in nrf_wifi lib.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-03-10 15:20:08 +01:00
Fin Maaß
b0f603cfe5 drivers: ethernet: litex: check phy-handle property
Adds a check, that the phy device in the device tree, referenced
by the phy-handle property, is enabled.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-03-10 15:02:26 +01:00
Bjarki Arge Andreasen
9c6195a2da drivers: flash: sam: fix flash erase last page
The implementation for erasing pages in the flash_sam.c driver
indicated a successful erase after exceeding the last page to be
erased successfully. Since the last page has no proceeding page,
the succeeded status was not set.

This fix switches around the status to be set as succeeded before
erase begins, to have the succeeded status cleared if page unlock
or erase fails.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-03-10 15:02:16 +01:00
TOKITA Hiroshi
5184fb9257 drivers: gpio: rpi_pico: Add support for RP2350B
As the RP2350B has more than 32 GPIO pins,
we changed the configuration so that it is split into two ports.

To do this, we created a `raspberrypi,pico-gpio-port` node and
moved the previous `raspberrypi,pico-gpio-port` functions to it.

This became a child node of `raspberrypi,pico-gpio-port`, and
`raspberrypi,pico-gpio-port` will remain a gpio mapper.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-10 11:20:30 +01:00
Henrik Brix Andersen
63c24d9d34 soc: neorv32: update to support NEORV32 v1.11.1
Update the NEORV32 SoC, peripheral drivers, and board to support NEORV32
v1.11.1. Notable changes include:

- Optional RISC-V ISA Kconfigs are now selected on the board level.
- Peripheral registers are now automatically reset in hardware, no need for
  software initialization code.
- The NEORV32 GPIO controller now supports 32 pins, not 64. Interrupt
  support will be submitted in a separate PR.
- Default board configuration has 64k RAM and is clocked at 18 MHz.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-10 11:11:22 +01:00
Camille BAUD
3334a8e9cd drivers: display: Introduce Sitronix ST7567
Introduces a driver for the Sitronix ST7567 132x65 LCD driver.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-03-10 11:10:48 +01:00
Tim Lin
0d4f8feb6f drivers/gpio: ite: it8801: Fix the GPIO output configure issue
If the output level does not change to high or low, it should not be
changed to 0.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-03-10 08:59:46 +01:00
Chekhov Ma
c87900aa40 drivers: gpio: adp5585: fix wrong reg during pin configure
The ADP5585_GPO_OUT_MODE_A is used when configuring initial output
during pin configuration, causing pins configured HIGH is incorrectly
configured as open-drain. Replacing the reg with ADP5585_GPO_DATA_OUT
fixes the issue.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-03-10 08:59:26 +01:00
Khoa Nguyen
8671fdd86d drivers: adc: Remove channel_count property for Renesas driver
Currently, in Renesas adc driver, channel_count is used
as the maximum index of the channels can be supported.
However, the value input in dts of "channel_count"
represents the total number of supported channels.

After consideration, we have decided to remove this
reduntant property.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-03-10 08:58:52 +01:00
Alberto Escolar Piedras
ab7a6de5bb drivers/counter/counter_native_sim: Rename from counter_native_posix
Including renaming the DTS binding and kconfig options
deprecating the old one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-10 06:52:37 +01:00
Alberto Escolar Piedras
b2b6f3c314 Bluetooth: userchan: Support other libCs
Refactor the userchan driver into a top and a bottom part.
The bottom is the one which interacts with the host and is built
with the host libC, while the top is built with the embedded code
and whatever libC that is built with.

Errors (errno) is converted between the top and bottom to ensure they
are coherent with the local libC.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-10 06:52:19 +01:00
Elliott Cutmore
e44a9523d4 drivers: adc: Fix ads1x4s0x driver initialised asynchronously
Definition of stack variable did not match the initialiser
reference in the driver

Signed-off-by: Elliott Cutmore <elliott.cutmore@gmail.com>
2025-03-08 08:56:33 +01:00
Alberto Escolar Piedras
8c8db7dd64 drivers/timer/native_posix_timer: Support only native_sim
Now that native_posix has been removed, this driver only needs to
support native_sim. Let's stop using the transitional headers which
supported both.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 08:46:34 +01:00
Georgij Cernysiov
8b7bfd45c1 drivers: ethernet: phy: sort includes
* Sort includes by groups each alphabetically:
  - standard lib
  - zephyr
  - private
* Move log registration to be after all includes.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2025-03-08 03:38:50 +01:00
Georgij Cernysiov
b55940cc23 drivers: ethernet: phy: add missing private include
Adds missing private adin phy include.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2025-03-08 03:38:50 +01:00
Georgij Cernysiov
910e3f82f8 drivers: ethernet: phy: correct adin logger name
Use phy_adin instead of undefined DT_DRV_COMPAT.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2025-03-08 03:38:50 +01:00
Alberto Escolar Piedras
4338122248 drivers entropy: fake_entropy_native_posix rename to _native_sim
Rename the driver files, binding and kconfig options, while deprecating
the old binding and kconfig options.

Uses in tree are replaced.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 03:38:13 +01:00
Pavel Vasilyev
179f3c6f05 bluetooth: hci: ipc: assert when building HCI IPC driver w/o ACL FC
The HCI IPC driver is not reliable and can lead to lost ACL data if
built without Controller-to-Host ACL flow control.

This commit prevents building HCI IPC driver and hci_ipc sample without
CONFIG_BT_HCI_ACL_FLOW_CONTROL.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-03-08 03:37:16 +01:00
Tomasz Moń
962a53ef8e drivers: udc_dwc2: Avoid unnecessary context switches
DWC2 thread must acquire UDC mutex before accessing shared resources
(peripheral registers and software data structures). Whenever software
enqueues a buffer, the caller first obtains mutex, adds the buffer to
the list, posts event to wake up DWC2 thread and releases mutex. If DWC2
thread has higher priority than the task currently holding a mutex,
there will be two completely unnecessary task switches: DWC2 will switch
in, try to obtain mutex, and then the control will be returned to the
mutex holder.

Avoid the unnecessary task switches by locking scheduler prior to
obtaining the mutex and unlocking scheduler after releasing the mutex.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-07 21:29:09 +01:00
Nils Ruf
1972a3f5fc drivers: uart: uart_native_tty: allow multiple instances
Adds one RX thread per instance. Previously, only one global RX thread was
used resulting in crashes due to the thread instance being overwritten by
other instances.

Signed-off-by: Nils Ruf <nils.ruf@endress.com>
2025-03-07 20:25:04 +01:00
Ren Chen
9388349957 drivers: i3c: ccc: add missing data length for entas
This commit adds the missing data length(=0) for entas ccc.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2025-03-07 20:24:04 +01:00