Commit graph

18156 commits

Author SHA1 Message Date
Karol Lasończyk 3ca3131a7d 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-05-15 15:33:41 +01:00
Ioannis Karachalios 6771e79729 drivers: entropy: smartbond: Add support for PM
This commit should add all the functionality needed for the entropy
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-15 16:09:32 +02:00
Hao Luo a64b069785 drivers: gpio: Add support for Apollo3 SoCs GPIO
This commit adds support for the GPIO which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-15 16:08:29 +02:00
Fin Maaß 2b496759eb drivers: ethernet: eth_liteeth: add set_config
Add set_config to set the mac address.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-15 16:07:21 +02:00
Armando Visconti 8e13268439 drivers/sensor: lps25hb: Fix int32 overflow in the val2 part
The val2 calculation was done using (1000000 / 40960) as
multiplying factor, which was sometimes leading to a
int32 overflow. So, let's use the equivalent (but smaller)
(3125 / 128).

Fix #46615

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-05-15 15:01:15 +02:00
John Johnson 15a1b6d5c2 drivers: esp_at: make esp_pull_quoted() to only return -EAGAIN
If no " character is found in buffer by esp_pull_quoted() it
returns -EAGAIN which causes a loop that never ends. This is because
the buffer dont get filled up with new data so no " chrachter will be
found. This commit changes esp_pull_quoted() to only return -EAGAIN,
so the buffer can get filled with new data and thus the loop can come
to an end.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-05-15 14:59:03 +02:00
Tomasz Moń 3a8c9b8ac3 drivers: udc_dwc2: Fix debug logging bus fault
Pass DIEPTXF address instead of value to sys_read32() to prevent bus
fault when debug logging is enabled.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-15 12:28:08 +02:00
Henrik Brix Andersen b989920c1b drivers: can: transceiver: gpio: add build assert for GPIO properties
Add a build-time assert for verifying that at least one of the supported
devicetree GPIO properties is present on each compatible devicetree node.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-15 11:17:43 +02:00
Francois Ramu 182c5475e2 drivers: flash: stm32 flash driver for xspi instance
Introduce a XSPI driver to cover the common XSPI peripherals
of the stm32 mcu: X is for single or quad or octo or hexa
SPI bus access to external memories
DMA not supported in this version

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-15 10:56:04 +02:00
Andrzej Głąbek 41786a6477 drivers: sensor: Add driver for nRF temperature sensor accessed via nrfs
Add driver, together with the corresponding dts binding and node in
the nRF54H20 SoC definiton, for the nRF temperature sensor that cannot
be accessed directly but only through nRF Services (nrfs) layer.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-15 09:25:30 +01:00
Filip Kokosinski 99aa65c725 drivers/console/xtensa_sim_console: force \r\n byte sequence
Force `\r\n` byte sequence for newline for the Xtensa simulator console
driver. This effectively mirrors the behavior of the UART console driver.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-05-15 09:33:27 +02:00
Fin Maaß 3b87a0b939 drivers: esp32: i2c: configure clock frequency
Be able to configure the clock frequency during runtime
using `i2c_configure()` and be able to use `i2c_get_config()`
of the i2c api for the esp32.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-15 09:29:31 +02:00
Benjamin Perseghetti daaf06db94 drivers: pwm: pwm_mcux: make thread safe with mutex.
Fixes a bug where more than one thread trying to access
different PWM devices can cause erroneous behavior.

Co-authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2024-05-15 09:27:38 +02:00
Dawid Niedzwiecki 27c3378285 drivers: flash: stm32: select extended operations correctly
Select that the STM32 driver has extended operations feature when
the FLASH_STM32_BLOCK_REGISTERS is set.

It allows using only block registers extended operation.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-05-15 09:26:55 +02:00
Daniel DeGrasse bf61a47887 drivers: sdhc: imx_usdhc: extend reset timeout duration
Some instances of the USDHC peripheral take longer to reset, and will
timeout with the previous delay of 100 cycles. Extend this delay to 1000
cycles to resolve this.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 20:23:28 -04:00
Daniel DeGrasse da9361e544 drivers: sdhc: imx_usdhc: remove dead code for waiting for clock gate
Remove function for waiting for clock gate, as this is not used anywhere
within the USDHC driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 20:23:28 -04:00
Daniel DeGrasse bd17c86299 drivers: sdhc: imx_usdhc: move voltage selection to separate function
Some USDHC IP instances do not have the voltage control bit present, as
they can only operate at 3.3V. Move code to select 1.8V mode into a
separate helper, and guard the call to UDSHC_SelectVoltage() behind a
feature macro from MCUX SDK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 20:23:28 -04:00
Phi Bang Nguyen ba1565b46d drivers: video: csi: Rename sensor to source
The CSI can connect to either a camera sensor (as on i.MX RT10xx) or
a MIPI CSI-2 receiver (as on i.MX RT11xx). To be generic, change the
naming from sensor to source.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-14 20:23:15 -04:00
Pisit Sawangvonganan eff80ae5bc modem: modem_cellular: make modem_cellular_config structure constant
Remove redundant `const` qualifiers in `struct modem_cellular_config` and
add `const` to the declaration to ensure the structure resides
in read-only memory (rodata).

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-14 20:22:45 -04:00
Aurelien Jarno 09fc2dab43 drivers: sensor: stm32_vref: get rid of floating point computation
Instead of using floating point operations to compute the vref voltage,
it is possible to use the sensor_value_from_milli() function.

On a STM32G0, this saves 130 bytes of flash, excluding the FP library
needed on a FPU less MCU.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-14 20:22:18 -04:00
Aurelien Jarno 99804c77c4 drivers: sensor: stm32_vbat: get rid of floating point computation
Instead of using floating point operations to compute the vbat voltage,
it is possible to do the computation using 32-bit variables by
reordering operations and using the sensor_value_from_milli() function.

On a STM32G0, this saves 140 bytes of flash, excluding the FP library
needed on a FPU less MCU.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-14 20:22:18 -04:00
Declan Snyder fa990a7639 drivers: dac: Add driver for NXP GAU DAC
Add driver for NXP GAU DAC using MCUX HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder b9e89ef688 drivers: adc: Add NXP GAU ADC Driver
Add driver for NXP GAU ADC using MCUX HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Ioannis Karachalios 75a3c5b848 drivers: display: smartbond: Add support for PM
This commit should add all the functionality needed for the DISPLAY
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-14 18:22:54 -04:00
Daniel DeGrasse 558c2916b9 drivers: display: mcux_elcdif: add additional documentation around PXP
Add additional documentation and warnings around PXP usage. PXP rotation
is only intended to be used when framebuffers passed to the eLCDIF
display driver are equal in size to the screen.

Moreover, PXP rotation is flipped versus LVGL rotation. So a LVGL
rotation of 90 degrees requires the PXP to be set to rotate 270 degrees
to function as expected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:22:28 -04:00
Daniel DeGrasse 4f65595b24 drivers: flash: flash_mcux_flexspi_nor: reduce LUT usage
FLEXSPI nor driver uses several LUTs for "scratch" commands during the
SFDP probe phase that are not needed once the flash is configured. Set a
second "end" marker we can use to configure the FLEXSPI MEMC driver, so
that we can indicate the true number of LUTs needed by this driver when
init is completed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse ef8b8a2983 drivers: memc: memc_mcux_flexspi_is66wvq8m4: do not reset FLEXSPI
Do not reset the FLEXSPI during init, as this will crash the chip if we
are running the MEMC driver in XIP mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 372cf92060 drivers: memc: memc_mcux_flexspi: support initializing FLEXSPI when XIP
Add support for initializing the FLEXSPI when using a flash attached to
the FLEXSPI for XIP. This option is guarded behind a Kconfig, as
enabling it is dangerous and requires special care be taken by the user
to ensure that the configuration of pins and FLEXSPI settings will not
break support for reading the attached flash, as this will break XIP
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse c4eac60982 drivers: memc: use custom initialization priority for FLEXSPI
Use custom initialization priority for FLEXSPI MEMC driver. This may be
needed when the MEMC driver must initialize before a flash driver, and
before another MEMC driver (for an attached device, like PSRAM)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse ba98dfd976 drivers: memc: memc_mcux_flexspi: correctly handle multi-device usage
When multiple devices are used, the FLEXSPI will place their address
spaces sequentially (based on the chip select port used). Additionally,
each device must use different sections of the FLEXSPI LUT table.

Fix the following calculation issues with multi-device usage:
- correct calculation of LUT sequence indices for AHB commands
- correctly add address and sequence offset when submitting FLEXSPI IP
  transfer

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 481462d4a6 drivers: memc: memc_mcux_flexspi: update documentation for flash_config
Update documentation for flash_config memc function, to correctly
reflect usage of the "lut_count" parameter

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Ayush Kothari 13dfd86616 Driver: Add pin inversion to Esp32 Uart
Additional properties are added to esp32 uart to allow
for signal inversion.

Signed-off-by: Ayush Kothari <ayush@croxel.com>
2024-05-14 18:21:27 -04:00
Alberto Escolar Piedras c1a39f31b2 driver: uart: native: fix stop_bits/databits mix
Correct a trivial bug and doxygen documentation error
in which data_bits was missused instead of stop_bits.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Mateusz Grzywacz <amateusz.grzywacz@gmail.com>
2024-05-14 18:19:11 -04:00
Jerzy Kasenberg f2e3d3f951 soc: smartbond: Move PM_DEVICE dependency to soc
For DA1469x if PM config is selected PM_DEVICE must also
be selected for GPIO to work when device enters/exists
deep sleep.

Previously GPIO and regulator drivers selected PM_DEVICE
when PM was enabled.
Now it is moved to SOC instead.

PM_DEVICE selection in GPIO could result in circular dependency
for mcux if MEMC_MCUX_FLEXSPI (which is already dependent on PM_DEVICE)
was to be additionally dependent on GPIO.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-14 17:05:03 +02:00
Armin Brauns 3ca157e76f drivers: usb: stm32: fix logic for USB clock configuration
- If the peripheral is OTG_HS with ULPI, enable the OTG_HS ULPI clock
  - The constant has a slightly different name on stm32h7
- Otherwise, if the peripheral is OTG_HS:
  - Disable the OTG_HS ULPI clock in sleep/low power mode,
  - If the peripheral is OTG_HS with PHYC[1], enable the PHYC clock.
- Otherwise, if the peripheral is OTG_FS[2] on stm32h7, also disable the
  OTG_FS ULPI clock in sleep mode (in the device/ driver, this is done in
  usb_dc_stm32_init()),

[1]: Internal HS PHY in stm32f7x2xx and (some) stm32f730xx
[2]: "OTG_FS" on stm32h7 is really just another OTG_HS peripheral, but
without any way to actually connect a HS PHY

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-14 17:04:49 +02:00
Jun Lin 71b71015a9 driver: espi: npcx: enable the Serial Port
Initialize and enable the Serial Port/Host UART when
CONFIG_ESPI_PERIPHERAL_UART=y.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-05-14 13:25:43 +02:00
Tomasz Moń 25229b2fce drivers: udc_dwc2: Submit reset after chirp sequence
DWC USB 2.0 HS OTG Controller sets USB Reset interrupt after Reset
signalling starts, but before the High-Speed Detection Handshake. This
allows software to perform most of the reset handling even before the
connection speed is known. The device controller indicates High-Speed
Detection Handshake result is available in DSTS register by setting
Enumeration Done interrupt.

USB stack expects that the connection speed is known immediately after
UDC_EVT_RESET is submitted. Due to this expectation, it is important to
submit UDC_EVT_RESET only after Enumeration Done interrupt to prevent
the USB stack from reading (and storing) actual device speed before
it is known.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-14 12:16:06 +01:00
Jamie McCrae 7a4f4711af drivers: led_strip: Make update channels function optional
Makes the update channels function optional, this is only
implemented in one driver so can be safely omitted from most
drivers

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 50b7d61c91 drivers: led_strip: Check length before updating LED strip
Checks that the supplied length is valid for the given driver
before passing it to the update function

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 4bea96b68b drivers: led_strip: Add length function
Adds a length function which returns the length of the LED strip

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Samuel Kleiser d796c117ce stm32: ospi: make all clk, dqs, ncs pins configurable
The clk, dqs and ncs pins can be remapped between OSPI instances, but the
driver doesn't support it, yet. Therefore replace hard coded numbers to
device tree optional properties.

Signed-off-by: Samuel Kleiser <s.kleiser@vega.com>
2024-05-14 09:32:57 +02:00
Luis Ubieda 413518e0c8 serial: bt: Set configurable options for the NUS Work-queue
Default priority set to Main Thread's and Stack-size set to 1KiB. This
should still allow for the System work-queue, considering this
Work-queue could be temporarily blocked on BT TX commands.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-13 16:17:58 -04:00
Luis Ubieda b1913fb47e drivers: serial: bt: Use dedicated Workqueue
Stop relying on the system workqueue, as the BT TX APIs should
potentially block and now by design this will not work with the
Bluetooth Stack (for good reasons). Now the UART NUS driver has a
dedicated workqueue, which all NUS instances share.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-13 16:17:58 -04:00
Abderrahmane Jarmouni e783aafdd0 drivers: uart_stm32: add DCache support in async DMA mode
Adapt the driver to verify if DMA buffers are located in noncacheable
memory when DCache is activated, in order to avoid cache coherency issues.
This is required until manual cache coherency management is implemented.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Fredrik Gihl 2d31d45429 drivers: sensors: Add support for ds18s20
Added support for the older ds18s20 inside the (newer) ds18b20.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-13 16:06:35 -04:00
Hess Nathan 958a4505bd coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-13 16:05:53 -04:00
Grzegorz Swiderski 24ce3f4182 drivers: serial: nrfx: Update Kconfig dependencies for RX cache
Two Kconfig symbols were tied to a board-specific DT nodelabel - namely
the `NRFX_UARTE_CONFIG_RX_CACHE_ENABLED` and `UART_<n>_RX_CACHE_SIZE`
were tied to `shared_ram3x_region` - but this is not necessary.

That DT node is where the UARTE driver RX/TX cache buffers are placed
in the default nRF54H20 DK memory map, but on another board, they could
be located somewhere else.

The exact memory sub-regions used for this purpose are indicated using
the `memory-regions` property on each UARTE instance, which should be
generic enough already, so let's use that instead.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 16:05:39 -04:00
Balaji Srinivasan d9b3ffa5ea drivers: regulator: npm6001: Fix compiler warning
This patch fixes a compiler warning about the val being used
uninitialized. The previously present if check did not seem to satisfy
compiler. Hence the val is now explictly initialized.

Signed-off-by: Balaji Srinivasan <balaji.srinivasan@nordicsemi.no>
2024-05-13 09:54:48 -05:00
Mateusz Michalek a859191413 drivers: flash: RRAMC regions
Adding definition of regions granularity to Kconfig.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-05-13 09:53:05 -05:00
IBEN EL HADJ MESSAOUD Marwa 23a03b7a0a drivers: counter: ll_stm32_timer: G4X changes
Use "const LL_TIM_OC_GetCompareCHx" & "const LL_TIM_IsEnabledIT_CCx" with
STM32G4X series, following changes in stm32cube:stm32g4xx:drivers:
include:stm32g4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 99fd91bf1c drivers: pwm: pwm_stm32: G4X changes
Use "const LL_TIM_IC_GetCaptureCHx" & "const LL_TIM_IsActiveFlag_CCx"
with STM32G4X series, following changes in stm32cube:stm32g4xx:drivers:
include:stm32g4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa ccd1019f80 drivers: dma: G0X changes
Use "const LL_DMA_IsActiveFlag_HTx", "const LL_DMA_IsActiveFlag_TEx",
"const LL_DMA_IsActiveFlag_TCx" and "const LL_DMA_IsActiveFlag_GIx" with
STM32G0X series, following changes in stm32cube:stm32g0xx:drivers:
include:stm32g0xx_ll_dma.h

Use "const LL_DMAMUX_IsActiveFlag_SOx","const LL_DMAMUX_IsActiveFlag_RGOx"
"const LL_DMAMUX_ClearFlag_SOx" and "const LL_DMAMUX_ClearFlag_RGOx" with
STM32G0X series, following changes in stm32cube:stm32g0xx:drivers:
include:stm32g0xx_ll_dmamux.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 1f16e9c44c drivers: counter: ll_stm32_timer: F4X changes
Use "const LL_TIM_OC_GetCompareCHx" & "const LL_TIM_IsEnabledIT_CCx" with
STM32F4X series, following changes in stm32cube:stm32f4xx:drivers:
include:stm32f4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 820cf4d639 drivers: pwm: pwm_stm32: F4X changes
Use "const LL_TIM_IC_GetCaptureCHx" & "const LL_TIM_IsActiveFlag_CCx"
with STM32F4X series, following changes in stm32cube:stm32f4xx:drivers:
include:stm32f4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
Marcin Niestroj 3111261940 drivers: nsos: fcntl: prefer Zephyr-specific macros over libc
Definitions of fcntl flags are different between native libc and Zephyr. In
order to correctly map those values to the host, include Zephyr's fcntl.h
header, instead of the one bundled with libc.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-13 14:22:46 +02:00
Johann Fischer b501278237 drivers: udc_dwc2: handle interrupt IEPINT before the RXFLVL
During a control read transfer host is able to start status stage as
soon as it receives last data packet. The time between last data packet
and status stage can be approximately 1 us at High-Speed and 8 us at
Full-Speed (exact timing depends on host but it is mostly constrained by
bus turnaround time).

With sufficient interrupt latency it is therefore possible that both
IEPINT (raised at end of Data Stage) and RXFLVL (raised at Status Stage)
would be set when dwc2 interrupt handler reads GINTSTS register. When
device is operating at High-Speed, the latency introduced by UART logger
backend is enough to trigger this condition. If the RXFLVL is handled
before IEPINT the stack will trigger "Cannot determine the next stage"
error.

Handle IEPINT before RXFLVL to make the handler immune to increased
interrupt latencies.

Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-13 11:46:39 +01:00
Jędrzej Ciupis b457645423 drivers: ieee802154: nrf5: fix default value for nRF54H20
The default value of IEEE802154_NRF5_DELAY_TRX_ACC Kconfig option is
based on a symbol that is undefined for nRF54H20. It evaluates as empty,
which leads to compilation errors with very cryptic logs.

This commit assures that a sane value for IEEE802154_NRF5_DELAY_TRX_ACC
is selected at all times, avoiding the compilation errors.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Abderrahmane Jarmouni 4682e10e2a drivers: rtc: stm32: subsecond not supported by F2x
subsecond counting is not supported by STM32F2x SoC series.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni 83b5d65d57 drivers: rtc: stm32: make it clean again
Make driver clean again.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni b1f878f7a5 drivers: rtc: stm32: fix clk enable call
On STM32WBAX series, there is no bit in BCDR register to enable RTC.
Enabling RTC is done directly via the RCC APB register bit.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni c085177af5 drivers: rtc_stm32: add support for alarms A & B
Add support for STM32 RTC Alarms A & B for all series except F1X.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Jerzy Kasenberg 961959fc5f drivers: serial: Smartbond: add support DTR line wakeup
This change allows to use DTR line driven from external serial port
that when active (low) will prevent UART device from going to sleep.
It will also wake up platform when DTR line becomes active.

DTR line is often activated in serial port connected to host computer
when operating system opens serial device like COMx for Windows
or /dev/ttyACMx /dev/ttyUSBx for Linux based systems.

DTR line (specified in device tree) will be used by WAKEUP and PDC
controllers (via GPIO driver) to handle DTR line changes.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00
Jerzy Kasenberg f10b77364a drivers: serial: Smartbond: add support RX line wakeup
This change allows to wake up UART from sleep mode when
low level on inactive UART is detected during platform sleep.

Timeout can be specified for each UART separately in device tree.
If one of the UARTs is selected as console sleep timeout is taken
from Kconfig same way other platform configure same functionality
using CONFIG_UART_CONSOLE_INPUT_EXPIRED_TIMEOUT

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00
Andrzej Kaczmarek e24c6ce721 drivers: serial: smartbond: Add PM for UART
This is initial version that implements device power
management support when configured in Kconfig files.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-12 17:03:17 -04:00
Dino Li f76f2928f1 espi/it8xxx2: enable EC to accept port 81 cycle
This allows EC to accept 2 bytes of port 80 data written from the Host.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-05-10 20:25:13 -04:00
Peter van der Perk 7adc4b689b drivers: serial: mcux lpuart add (tx/rx)invert and single wire
Adds device tree definitions to enable tx/rx invert and singlewire modes

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-05-10 18:25:03 -04:00
Phi Bang Nguyen 249159f531 drivers: video: csi: Drop pixel format config
The pixel format config is not used in the low level driver. Drop it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Phi Bang Nguyen 46eb7e2b65 drivers: video: csi: Fix get_fmt
The CSI should always propagate the get_fmt request down to the sensor.
It should not return a format by it own unless it contains a test
pattern generator inside it.

The problem with the legacy code is that this code snippet is never
reached if the sensor could return a format. In case the sensor failed
to return a format, these codes are reached but the returned format
makes no sense and its value was not initialized.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Phi Bang Nguyen 1a40d1fd5a drivers: video: csi: Run clang format
Run clang format before making any changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Phi Bang Nguyen f621407d50 modules: mcux: Drop HAS_MCUX_CSI config
The HAS_MCUX_CSI (as well as all the HAS_MCUX_XXX) config was obsolete
and has been replaced by the DT_HAS_NXP_IMX_CSI_ENABLED (i.e.
DT_HAS_XXX_ENABLED). Drop it as well as all the dependencies on it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
cyliang tw de58070fa4 drivers: pinctrl: support digital-path-disable for Numaker
Add new property digital-path-disable for Nuvoton numaker pinctrl driver.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-10 18:06:15 -04:00
Declan Snyder 385c6874ef drivers: nxp_pit: check if top cb is null
check if top cb is null to avoid hard fault
top cb is allowed to be null in api so this is required

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-10 18:05:32 -04:00
Luis Ubieda 215cdb65df drivers: i2c: rtio: Remove extra clear of RTIO_SQE_TRANSACTION
Already handled within `i2c_rtio_copy()`. Not needed.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-10 14:41:34 -05:00
Aaron Ye 6d4ed7e192 drivers: flash: flash_ambiq: add Apollo3 SOC support
This commit adapts the Ambiq flash controller to support the Apollo3
SOC (e.g. Apollo3 Blue, Apollo3 Blue Plus).
Also uses the Zephyr common IRQ API to replace the Ambiq HAL ones.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-10 13:30:33 +02:00
Richard Wheatley e1e78a5f08 drivers: hwinfo: Adds Ambiq hwinfo support
This commit adds support for the hwinfo for Apollo4P SoCs

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-05-10 12:32:02 +02:00
Mike J. Chen d371a0f9ad drivers: regulator: shell: fix strcmp usage bug in cmd_adset
Bug in "enable/disable" argument parsing would cause
the oppostive of the requested setting to get
passed to active discharge API invocation.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-10 11:50:15 +02:00
cyliang tw 796fc9d54f drivers: gpio: Update Numaker driver init function
To update Numaker driver to turn on clock in init function.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-10 11:52:22 +03:00
Dinesh Kumar K 6a746dc012 drivers: sensor: grow_r502a: add RX packet validation
Add RX packet validator where header, address, pid
and checksum bytes are verified and validated on
every functions.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K e08ce0ed71 drivers: sensor: grow_r502a: add upload and download template
1. Add functionality for upload and download fingerprint
template data of the R502A fingerprint sensor device.
2. change data type for data_len parameter of
transceive_packet function to uint16_t as it may hold
value 256 for dowload template data to sensor.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 7ae0158e35 drivers: sensor: grow_r502a: add set/read system parameter
Add functionality for read and set system
parameter of sensor device.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K b63fe1c368 drivers: sensor: grow_r502a: modified Tx and Rx data handling
improvised uart tx and rx handler functions to handle
large chunk of fingerprint data from/to the sensor.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 3c8bd0bc2b drivers: sensor: grow_r502a: add built-in LED control
Add LED control attribute for sensor device's
built-in LED using zephyr's led driver APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K e57c6f9d2b drivers: sensor: grow_r502a: move enroll, search, delete to application
Removed fps_enroll, fps_search and fps_delete from
driver code, since they did application usage inside
driver. add the following attributes to achieve the
above functionality from application.
1. SENSOR_ATTR_R502A_CAPTURE
2. SENSOR_ATTR_R502A_TEMPLATE_CREATE
3. SENSOR_ATTR_R502A_RECORD_ADD
4. SENSOR_ATTR_R502A_RECORD_LOAD
5. SENSOR_ATTR_R502A_COMPARE

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 378034c66a drivers: sensor: grow_r502a: fix in fps_read_template_table
consuming sensor_value struct instead of local device
driver variable.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 63c48bba91 drivers: sensor: grow_r502a: fix in checksum calculation
change checksum calculation to consider 2 bytes in pkg_len.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 476a3982af drivers: sensor: grow_r502a: fix in fps_empty_db
return ret; on goto unlock in fps_empty_db function.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K d33bf33b66 drivers: sensor: grow_r502a: fix in fps_search
return -ENOENT; when no record found on getting
attribute SENSOR_ATTR_R502A_FIND and fix array indexing
for tx data in fps_search.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Aurelien Jarno 7a2a4ff6ec drivers: sensor: tmp112: only show options when device enabled
Only show the tmp112 runtime options when the tmp112 driver is enabled,
otherwise the option is confusing and does not appear hierarchically in
menuconfig.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-09 12:40:54 -04:00
Mayank Mahajan d1687a557c ADD: Driver for Sensor INA226
INA226 - Bidirectional Current and Power Monitor w/ I2C
Boards Tested: mr_canhubk3

Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-05-09 15:46:31 +02:00
Bjarki Arge Andreasen 3769648793 drivers: gnss: Add emulated GNSS device driver
The emulated GNSS driver behaves like a GNSS, implementing
device pm and the GNSS APIs, using only kernel features (
zephyr work queue and uptime) making it buildable on all
zephyr targets.

The purpose of this device driver is to tailor and validate
the gnss api test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-09 15:45:34 +02:00
Sebastian Głąb 2f17c46fb1 drivers: wdt: nrf: Add WDT instances that exist in nrf54h20
Add WDT instances no. 010, 011, 131, 132.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-09 15:44:40 +02:00
Mike J. Chen 6c244cf440 drivers: regulator: shell: print all 6-digits of micro values
Previously only the upper/first 3 digits of a micro value
would be printed, dropping the last 3 digits. This could cause
misleading output for cmds like vlist.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-09 10:29:18 +02:00
Abderrahmane Jarmouni c09f1ec91a drivers: counter: stm32_rtc: fix clk disable for WBAX
clock_control_on() was called instead of clock_control_off().

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-09 10:29:05 +02:00
Ali Hozhabri fae32ac0b8 drivers: bluetooth: hci: Fix int conversion warning
Fix int conversion warning (-Wint-conversion), which is caused by
parallel PRs.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-05-09 10:28:58 +02:00
Chekhov Ma ad2745471c drivers: mfd: add new driver "mfd_adp5585"
Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-05-08 16:09:08 -04:00
Dominik Ermel d954060626 drivers: flash: rram: Select NRFX_RRAMC
Select NRFX_RRAMC for RRAM driver.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-08 14:59:56 -05:00
Alberto Escolar Piedras 4ccfeb7669 drivers: counter_nrfx_timer.c: Check max-frequency DT property
Check that the max-frequency DT property matches the
one provided by the nrfx HAL.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-08 15:58:16 -04:00
Alberto Escolar Piedras dede897035 drivers: counter_nrfx_timer.c: Get frequency directly from DT
Instead of working it from a macro from the HAL
based on the DT address, let's just get the maximum
frequency directly from DT.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-08 15:58:16 -04:00
Rafael Laya a55ebe1377 drivers: Fixes Controller Mode for I2C DW Driver
4996a9be262ca81bae717bdd8c2939db2a6876b7 adds Target Support for the
Designware I2C Driver

But the change missed guarding some places with
CONFIG_I2C_TARGET

This commit fixes regressions caused by such change

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com>
2024-05-08 09:30:45 -04:00
Eran Gal a3660d178c drivers: i2c_shell: Add direct_read sub command
Adds a direct_read subcommand to the I2C command.
Usage: I2C direct_read <device> <addr> [<nbytes>].
This command reads directly from the I2C device without first writing
a register address.

Signed-off-by: Eran Gal <erang@google.com>
2024-05-08 09:29:58 -04:00