Commit graph

23353 commits

Author SHA1 Message Date
Emilio Benavente
d85cb222e4 drivers: timer: updated lptmr_timer binding
Updated the lptmr timer binding from
nxp,kinetis-lptmr to nxp,lptmr.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Emilio Benavente
c8d6f39e11 drivers: counter: counter_mcux_lptmr: Update to start with top value
Updated the driver to start with a value to compare the counter
with otherwise the counter will not start until the user sets
the top value manually, an issue that will occur inside the counter
test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-06-11 17:04:26 +03:00
Niek Ilmer
be71be5db9 drivers: adc device: smartbond: Add power management
Add support for power management to the gpadc.

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2024-06-11 16:36:25 +03:00
Fabio Baltieri
4d2e46478d drivers: usb: stm32: add disconnect gpio support
Add support for GPIO controlled disconnect pullups. This is used in F1
based devices, copied from the legacy driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-11 11:39:19 +01:00
Sumit Batra
8d790a8979 drivers: pwm: generate pwm with nxp flexio IP
This driver can be used for both mcux and
s32k series SoCs which have flexio IP.
PWM channel is automatically allocated by
flexio driver based on the available timers.

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2024-06-11 11:38:48 +01:00
Karol Lasończyk
13196ec7c8 drivers: adc: Update adc driver to support nRF54H20 device
Expands driver to cover nRF54H20 features like 8bit sample width.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Karol Lasończyk
5f1fdc4b4d drivers: adc: Update adc driver to support nRF54L15 device
Expands driver to cover nRF54L15 features like AIN as GPIO configuration,
new reference voltage, different set of supported gain options.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-11 11:37:59 +01:00
Cong Nguyen Huu
0781caf408 drivers: can: nxp_s32_canxl: calculate and set the TDCO
Calculate and set the Transceiver Delay Compensation Offset (TDCO).

Fixes #73824

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-06-11 10:05:24 +02:00
Jakub Topic
2efc447c1b drivers: rtc: add RV3028 RTC driver
Adds support for the Micro Crystal RV3028 RTC connected to the I2C bus.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-06-10 21:03:59 -04:00
Declan Snyder
2e4e9a9494 dts: bindings: Fix KSZ8081 property names
Fix KSZ8081 binding properties:
- reset-gpios and interrupt-gpios are generally standard
  properties and therefore should not be using a special name
- mc, is not the correct vendor prefix for microchip

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-10 21:03:35 -04:00
Aurelien Jarno
326d6059c6 drivers: bbram: stm32-bbram: fix write for devices with TAMP
On devices where the backup memory is part of the TAMP peripheral, the
Backup Domain Protection prevents write to the backup registers. This
fix disables the protection before writing registers and re-enables it
afterwards.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-10 15:16:59 -05:00
Reto Schneider
ce35fbfbb2 driver: Move away from SOC_VENDOR_SILABS
This allows to remove SOC_VENDOR_SILABS in a later commit.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-10 15:15:34 -05:00
Bjarki Arge Andreasen
1dab746dc6 drivers: modem: add at shell
Add AT shell which uses the newly exposed pipes to
send/receive at commands from the modem identified by the
chosen node zephyr,at-shell.

To send an AT command, the shell command at is used, followed
by the command to send, and an optional response which
overwrites the default "OK"

For example, sending "AT", which returns "OK"
  modem at at <- command
  OK <- response

Enabling echo, then sending "AT" which will now return "AT" + "OK"
  modem at ati1 <- command
  OK <- response
  at at <- command
  at <- response
  OK <- response

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Bjarki Arge Andreasen
e878024a3d modem: drivers: add user pipes to cellular modem driver
Add two DLCI channels to the cellular modem driver, and expose
them using the modem pipelink module.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-10 15:12:34 -05:00
Alessandro Manganaro
57044d2d61 drivers: bluetooth: hci: STM32WBA driver updates according Cube FW 1.3.1
STM32WBA Bluetooth HCI driver updates according Cube FW 1.3.1

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-06-10 15:04:36 -05:00
Lucas Tamborrino
604ea9243a drivers: spi: esp32: Fix clock initialization
The clock should be initialised only once at the
drivers init function.

Check wether the subsys needs to be disabled in
peripheral initialization according to reset reason
in clock control.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-06-10 14:56:24 -05:00
Ali Hozhabri
569183bbad drivers: bluetooth: hci: Add BlueNRG reset API to ST HCI SPI BT driver
Add API to perform hardware reset optionally entering firmware updater
mode.

Remove redundant declaration for bt_spi_send_aci_config; otherwise, we will
have compiler warning if CONFIG_BT_BLUENRG_ACI is not set.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Marcio Ribeiro
19d8ade5fa drivers: adc: esp32: dma enable
adc dma mode operation on ESP32S3 and ESP32C3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-06-10 07:02:19 -07:00
François Baldassari
e94af5b153 Litex: clock: Undefined behavior due to unchecked return code
Found via static analysis. Two separate error paths where failing to
check the return code leads to undefined behavior:
1. In `litex_clk_get_phase`, the divider stays set to 0 when
   `litex_clk_get_clkout_divider` errors out, which leads to a division
by 0.
2. In `litex_clk_calc_duty_normal`, the `duty` struct is used
   uninitialized if `litex_clk_get_duty_cycle` errors out.

In both case, checking the return code and returning early resolves the
issue.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-06-10 15:00:33 +03:00
Piotr Koziar
9037a708ee drivers: ieee802154_nrf5: Use BLE.ADDR instead of FICR to create EUI64.
Use BLE.ADDR to create unique (to some extent) EUI64
on nRF54H20 in some cases inside the IEEE 802.15.4 driver.

The amount of EUI64-s available in such a way is very limited
(~16 million).
However, currently there does not seem to be another feasible way to
get device identifiers on nRF54H20 (such are kept in SICR, to which the
radio core has no access).

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Georgij Cernysiov
6be31f5243 drivers: flash: stm32: move memmap config
Move STM32_MEMMAP outside of SOC_FLASH_STM32.

That allows memory-mapped application to
be built without internal flash controller.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-06-10 14:58:52 +03:00
Ioannis Karachalios
c8b2f2e2b6 drivers: dma: smartbond: Add missing direction case
This commit should deal with adding a missing
direction case  as memory-to-peripheral
and peripheral-to-memory transfers
should be considered the same.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-10 14:58:38 +03:00
Krzysztof Chruściński
79c93dd5ec drivers: serial: Add gpio management to low power mode
When low power mode is enabled then whenever UARTE is not active,
driver attempts to put the peripheral into the lowest power state
by stopping and disabling UARTE. However, it did not put pins into
sleep state which could lead to increased current consumption.
Adding pins state handling to the low power mode.

Pins are put into sleep state only if CONFIG_PM_DEVICE=y.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-07 19:07:56 -04:00
Vincent Geneves
e21a021ed6 drivers: gpio: pcal64xxa: give semaphore in case of error
In function pcal64xxa_process_input, lock was not released in case of
error when calling inputs_read.
This was causing an infinite wait in the following calls of functions
using I2C bus.

Signed-off-by: Vincent Geneves <vgeneves@kalray.eu>
2024-06-07 19:06:42 -04:00
Adrien Ricciardi
9f6451d086 drivers: gpio: gecko: Use SIZEOF_FIELD() macro
Use the utility macro instead of bare code.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-07 21:43:07 +02:00
Aurelien Jarno
34f4a0f6bc drivers: rtc: rtc_shell: Add devices as sub commands
This commit adds support for <device> entry tab completion and device
lookup if enabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-07 21:42:54 +02:00
Daniel DeGrasse
d18cbb60b2 drivers: disk: add DISK_IOCTL_CTRL_DEINIT command to supported IOCTLs
Add DISK_IOCTL_CTRL_DEINIT ioctl command to disk subsystem. When
disk_access_ioctl() is called with this command, the disk will be
de-initialized. After this IOCTL completes, the disk can safely be
reinitialized.

Fixes #60628

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
fb2d5c338b drivers: disk: add DISK_IOCTL_CTRL_INIT macro to initialize a disk
Add DISK_IOCTL_CTRL_INIT IOCTL to initialize a disk. This IOCTL is
intended to replace disk_access_init() for new applications, but
disk_access_init() is kept for legacy compatibility. The INIT IOCTL is
added to better match the path that will be used for disk
de-initialization. Like the disk_access_init() calls,
DISK_IOCTL_CTRL_INIT calls are reference counted

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Daniel DeGrasse
3386a43a51 disk_access: reference count initialization calls for disks
Reference count initialization calls for disks. This changes the
behavior of the disk_access_init() function, such that disks will no
longer be initialized again if the first disk access init call
succeeds.

Disk access is reference counted in preparation for supporting disk
de-initialization, where a balanced number of disk de-initialization
calls with disk initialization calls will de-initialize the disk.

Also, remove code in disk drivers that was already checking against
duplicate disk_access_init() calls.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00
Reto Schneider
3ceed632f9 drivers: hwinfo: Prevent conflicts
By sorting the lines alphabetically, conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-07 18:08:04 +01:00
Tahsin Mutlugun
f037b95549 drivers: i2c: Add MAX32690 I2C driver
Add I2C driver for Analog Devices MAX32690 MCU. Supports target mode.

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Co-Authored-By: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-06-07 13:01:50 +02:00
Francois Ramu
f55391745b drivers: ethernet: stm32 eth hal driver align PTP Config Status
Align the name of the ETH PTP Config Status values
depending on the stm32HAL serie
to be the HAL_ETH_PTP_NOT_CONFIGURATED/HAL_ETH_PTP_CONFIGURATED
or HAL_ETH_PTP_NOT_CONFIGURED/HAL_ETH_PTP_CONFIGURED

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-07 13:00:44 +02:00
Vinayak Kariappa Chettimada
0e7c25fee4 drivers: flash: flash_shell: Fix unused variables
Fix unused variable compilation warnings.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-07 12:59:07 +02:00
Anke Xiao
37e8c47650 drivers: clock_control: add a macro for mke17z9 to wrap flexbus clock
The flexbus clock-related macro is not defined in mke17z9 clock.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-07 09:55:56 +02:00
Stanislav Poboril
d124eec3c9 drivers: ethernet: phy: Add Realtek RTL8211F PHY driver
Add driver for Realtek RTL8211F 10/100/1000M ethernet PHY.
This driver implements vendor specific behaviour like
detecting link state change by GPIO interrupt, which is not
present in the generic MII driver.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
cbb5c5b444 drivers: nxp_enet: Support RGMII mode for ENET_1G
- Added nxp,enet1g compatible to distinguish between ENET (nxp,enet)
and ENET_1G (nxp,enet1g) peripherals within the same driver.
- Added config ETH_NXP_ENET_1G to enable 1G mode of operation on ENET_1G.
- Support RGMII mode of connection between MDIO and PHY to be
able to work with ENET_1G peripheral and support 1000M speed.
- Removed performing of PHY reset before configuring link - it is
not desirable for RTL8211F PHY connected to ENET_1G on RT1170.
Reset of other PHYs can be performed by PHY driver itself if required.

Fixes: #66348

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Stanislav Poboril
6b0a4b0c85 drivers: clock_control: mcux_ccm_rev2: Add ENET_1G clock
Add ENET_1G clock value to the RT11XX CCM version.
Implemented enabling ENET_1G clock and getting its frequency.

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-06-06 20:08:27 -04:00
Daniel DeGrasse
3ce3ed38ba drivers: video: ov7670: introduce driver for ov7670 camera
Introduce driver for ov7670 camera, supporting QCIF,QVGA,CIF, and VGA
resolution in YUV and RGB mode.

Support was verified on the FRDM-MCXN947, using the SmartDMA camera
engine, which is enabled in the following PR:
https://github.com/zephyrproject-rtos/zephyr/pull/72827

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-06 20:07:57 -04:00
Anas Nashif
5df1df2e7a Revert "drivers/console/xtensa_sim_console: force \r\n byte sequence"
This reverts commit 99aa65c725.

With this change, various simulators fail with no output with this
change.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-06 20:06:26 -04:00
Peter van der Perk
e017006be4 drivers: input: sbus remote controller support
Add support SBUS RC controller connected through UART

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-06-06 15:56:38 -05:00
Francois Ramu
f6a9e0aef2 drivers: flash: stm32 qspi driver in Dual Flash Mode when MemoryMapped
Configure the quad-spi in DualFlash Mode when enabling the MemoryMapped
then reading is possible with memcopy.
DUAL flash mode is possible on stm32 series with QUADSPI_CR_DFM

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-06 15:22:06 -05:00
Marcin Niestroj
f726905969 drivers: nsos: handle connect() blocking call
Use poll() to wait for connect attempt to complete or timeout. That way
connect() does not block Native Simulator on host syscall.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
66c966f0bd drivers: nsos: handle setsockopt(SO_SNDTIMEO)
Handle SO_SNDTIMEO similar to how SO_RCVTIMEO is handled.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
a150458d35 drivers: nsos: handle sendmsg() blocking call
Use poll(), similar to sendto() and accept() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
b5e16b1380 drivers: nsos: handle sendto() blocking call
Use poll(), similar to accept() and recvfrom() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
f45d3c81cc drivers: nsos: handle multiple blocking APIs on single socket
So far only a single blocking API could be handled simultaneously, due to
epoll_ctl(..., EPOLL_CTL_ADD, ...) returning -EEXIST when same file
descriptor was added twice.

Follow 'man epoll' advice about using dup() syscall to create a duplicate
file descriptor, which can be used with different events masks. Use such
duplicate for each blocking API except ioctl() (for handling Zephyr poll()
syscall).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Marcin Niestroj
59a2d84f45 drivers: nsos: introduce nsos_poll_if_blocking() helper function
Introduce nsos_poll_if_blocking(), which replaces common code in:
 * nsos_accept_with_poll()
 * nsos_recvfrom_with_poll()

This will allow to introduce similar behavior for other blocking APIs in
subsequent commits.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-06-06 15:20:15 -05:00
Henrik Brix Andersen
f9c630f7c4 drivers: clock control: mcux: syscon: add FlexCAN clock support
Add support for FlexCAN0 and FlexCAN1 clocks present on the MCXN94x.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-06 15:46:57 +01:00
Tomasz Moń
e2afcafca5 drivers: udc_dwc2: Abort wait when PHY is not clocked
On nRF54H20DK the USB PHY is powered from VBUS. When the USB cable is
not connected, the PHY is not powered and the PHY clock disappears.

Because the GOUTNAKEFF and INEPNAKEFF can only ever be set when PHY
clock is active, the waits for these bits do timeout if cable is
disconnected. Workaround the issue by aborting the wait if vendor quirk
indicates that PHY clock has abruptly vanished.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-06 07:53:17 -04:00
Tomáš Juřena
5ac6335505 drivers: pinctrl: esp32: Use BIT macro when writing pin value
GPIO registers w1ts and w1tc expects bitfield of pins to set/clean.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-06-06 07:52:55 -04:00