Commit graph

18156 commits

Author SHA1 Message Date
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
Nick Ward 3718b515bd drivers: sensor: adxl362: fix temperature conversion
It was missing the test condition for the temperature sensor.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-05-08 09:24:42 -04:00
Nick Ward 7602c4f386 drivers: gpio: shell: add toggle command
Usage:
gpio toggle [device] [pin]

Also added Kconfig option so this command can be removed if
resources need to be conserved.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-05-08 09:24:20 -04:00
Armando Visconti dd42501a60 drivers/sensor: lsm6dsl: use sensor APIs to convert to units
Make use of sensor_ug_to_ms2() and sensor_10udegrees_to_rad() APIs
to convert from raw values into proper units (i.e. m/s^2 for accel
and rad/s for gyro). It also improves measurement precision.

Fixes #63980

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-05-08 09:23:50 -04:00
Benjamin Cabé 30ce8b1b18 drivers: fix bad SPDX-License-Identifier header
fix typo in SPDX header

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-08 09:23:16 -04:00
Fabio Baltieri d8476170bf input: it8xxx2_kbd: mask out KSOL and KSOH1 register access
KSOL and KSOH1 registers are used not only by the kbd driver, but
potentially by other GPIOs attached to the keyboard scanning pins. Mask
write access to those registers to ensure drivers don't step over each
other.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-08 12:03:15 +02:00
Fabio Baltieri 2e36c898c9 input: it8xxx2_kbd: fix col_size build warning range
Fix the range check for col_size to allow a configuration with less than
16 columns. Not sure why the minimum was set so high but there's no
reason I can tell for it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-08 12:03:15 +02:00
Abderrahmane Jarmouni 98342107fe drivers: rtc: stm32: INF log msg to DBG
Turn INF log msg to DBG.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-08 11:59:51 +02:00
Abderrahmane Jarmouni 0398b2a3d9 drivers: rtc: stm32: check for NULL pointer
Check for NULL rtc_time pointer in get_time() function.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-08 11:59:51 +02:00
Jerzy Kasenberg 0a60adc333 drivers: regulator: Smartbond: Fix current and voltage get functions
Argument to FIELD_GET macro was mixed up resulting in
incorrect values being reported for voltage and current

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-08 11:59:43 +02:00
Nicolas Pitre 13f2f2cca0 arm_arch_timer: fix maximum allowed cycles between reports
The code currently clamps timeout length so not to overflow the computed
cycle difference variable or the sys_clock_announce() argument's range.
But this completely fails to take into account the case where two
successive timeouts with enough time between them will still overflow the
cycle difference and/or the tick count.

Fix this by clamping the actual number of cycles to wait for based on
the previous report occurrence rather than clamping the timeout ticks.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-07 21:22:12 -04:00
Nicolas Pitre a99185fa8e arm_arch_timer: properly fix cycles overflow with GDB stub
In commit 6068255512 ("drivers/timer/arm_arch_timer: Fix cycles
overflow with GDB stub") an extra TO_CYCLE_DIFF() macro was introduced
to bypass the cycle_diff_t type cast in some cases.

The actual fix consists in defining that type properly in the first
place. That's the very reason why such type was abstracted.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-07 21:22:12 -04:00
Nicolas Pitre 0ea64b3ecb riscv_machine_timer: fix maximum allowed cycles between reports
There are two issues being fixed here:

1) The code currently clamps timeout length so not to overflow the
   computed cycle difference variable or the sys_clock_announce()
   argument's range. But this completely fails to take into account
   the case where two successive timeouts with enough time between them
   will still overflow the cycle difference and/or the tick count.

2) If a timeout with K_TICKS_FOREVER is provided then the comparator is
   set with UINT64_MAX which is bogus. Not only this value doesn't make
   much sense in the context of a running cycle counter, but it also
   opens the possibility for the same cycle diff and/or ticks overflow
   as above.

Fix both of those by clamping the actual number of cycles to wait for
based on the previous report occurrence rather than clamping the timeout
ticks.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-07 21:22:12 -04:00
Matthias Alleman 8ae0934470 drivers: ethernet: ksz8863 Fix wrong register for tail tag enable
A wrong register address was used to enable tail tagging for
the ksz8863 device.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2024-05-07 15:23:01 -05:00
Romain Pelletant bb0277da16 pinctrl: stm32: add remap support for STM32C0
Add remap11 and remap12 support for STM32C0 series

Signed-off-by: Romain Pelletant <romainp@kickmaker.net>
2024-05-07 15:19:23 -05:00
Daniel DeGrasse 23bb8fc6ae drivers: memc: add driver for is66wvq8m4 PSRAM using MCUX FlexSPI
Add driver for IS66WVQ8M4 PSRAM, using the MCUX FlexSPI interface to
write data to the PSRAM device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-07 15:06:25 -05:00
Daniel DeGrasse 88802acf78 drivers: memc: memc_mcux_flexspi: support diff RX clock source on port B
Some instances of the FlexSPI IP support a different clock source being
used for port B of the FlexSPI instance. Add a devicetree property and
driver support to enable configuring this property of the hardware.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-07 15:06:25 -05:00
Hao Luo 638f1d58df drivers: timer: Add support for Apollo3 SoCs system timer (STIMER)
This commit adds support for the system timer peripheral which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Hao Luo 3c1fd19d96 drivers: serial: pl011: Add support for Ambiq Apollo3 SoCs UART
Apollo3 SoCs have different UART register design compared with
that of Apollo4 SoCs, we need to change the offset and mask for
the power status check

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Hao Luo d71c97f072 drivers: pinctrl: Add pinctrl driver for Apollo3 SoCs
This commit adds pinctrl support for Apollo3 SoCs.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Théo Battrel b2e235d530 Bluetooth: Remove legacy debug symbols
The `BT_DEBUG_*` Kconfig symbols have been deprecated for more than 2
versions, remove them.

Update code that was still using them.

Remove the Bluetooth specific `Kconfig.template.log_config_bt` and use
`Kconfig.template.log_config_inherit` from the logging subsystem
instead, now that the legacy symbols can be removed.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-05-07 09:49:27 +02:00
Angelo Dureghello dc376a8bd9 drivers: eth: phy: adin2111: add support for adin1100 phy
Add support for similar adin1100 phy, boath are 10Base-T1L,
only difference is that adin1100 connects through r/mii.

Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
2024-05-07 09:41:46 +02:00
Angelo Dureghello ac165f663e drivers: eth: eth_stm32: use phy api support for h5/h7
Use PHY apis to access the PHY, to avoid any kind of collisions
with other tasks using the PHY apis.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-05-07 09:41:46 +02:00
Angelo Dureghello fe29929c91 drivers: mdio: add stm32 mdio support
MDIO is part of the ETH IP, but some phy chip may need a
specific phy driver to set up certain vendor registers enabling
particular features.

Add support for stm32 mdio access.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-05-07 09:41:46 +02:00
Pierre-Louis Bossart 3a044aea80 drivers: dai: ssp: fix MN_MDIVCTRL_M_DIV_ENABLE for ACE+ platform
In previous generations, each MCLK divider could be enabled separately.

Starting with ACE, there is a single-bit MDE field to enable a single
divider. The existing code would not enable MDE in case MCLK1 is used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-05-07 09:35:21 +02:00
Thibo Verheyde 8e07777d52 drivers: modem: modem_cellular: Add Sequans GM02S Modem
Adds the necessary defines with init, dial and periodic chat scripts to
support the Sequans GM02S Modem.
Modification to cxreg handler to process GM02S +CEREG response.

Signed-off-by: Thibo Verheyde <thibo@dptechnics.com>
2024-05-06 22:51:28 +01:00
Jeronimo Agullo 7ae9a16ca6 drivers: gnss: Air530z: Add new driver
Intial driver adding intial script to receive only GGA, RMC and GSV
NMEA messages, configuring fix rate, setting enabled system and adding
power management with the module on-off pin.

Signed-off-by: Jeronimo Agullo <jeronimoagullo97@gmail.com>
2024-05-06 22:50:30 +01:00
Ioannis Karachalios 58b9facbd1 drivers: mipi dbi: smartbond: Add support for PM
This commit should add all the functionality needed for the MIPI DBI
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-06 21:55:03 +03:00
Juliane Schulze 26a8a20542 drivers: tmag5273 add missing ifdef around CRC support
Fixes an error causing build issues if CRC support is not set to active.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-06 17:31:57 +01:00
Hess Nathan 1486259139 coding guidelines: comply with MISRA Rule 20.9
- avoid to use undefined macros in #if expressions

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-06 17:30:26 +01:00
Aurelien Jarno 3da656388d drivers: hwinfo: shell: fix error message when no hardware support
When there is no implementation for a particular hardware information
device, the API return -ENOSYS, while the hardware information shell
checks for -ENOTSUP. This returns a non-user friendly message:

  uart:~$ hwinfo devid
  Error: -88

The API can't be changed easily without breaking things, so let's change
the shell instead. This gives:

  uart:~$ hwinfo devid
  Not supported by hardware

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-06 17:30:14 +01:00
Peter Ujfalusi 5f81652b2d drivers: dai: intel: ssp: Only setup mclk/bclk when it is needed by role
When SSP is consumer for FS and BCLK then it does not needs MCLK as the
shifting and rate is derived form the I2S bus directly.
When SSP provides FS only then the BCLK setup is not needed.
When SSP provides BCLK only then both MCLK and BCLK setup is needed.

In hardware multiple SSPs share the same MCLK source, in case of one
SSP port is used as clock provider while other is used as clock consumer
then the consumer SSP should not need to depend on the provider SSP
configuration, the ports can run in different clock rates.

In this example the consumer SSP should not try to configure and lock the
MCLK frequency to some arbitrary rate (as it does not need MCLK at all)
which might be different than the frequency needed by the provider port.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-05-06 17:29:41 +01:00
Pieter De Gendt f147a5fec2 spelling: Replace occurrences of "iff" with "if and only if"
Spell checking tools do not recognize "iff", replace with "if and only if".
See https://en.wikipedia.org/wiki/If_and_only_if

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-06 14:58:08 +01:00
Juliane Schulze de0dfc3145 drivers: allow lis2dh anymotion triggers if no anymotion latching is active
Since the interrupt state of the IA bit (interrupt source register) is
checked, it needs to be read out everytime, not only on latching.

Fixes #71245

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-06 14:54:46 +01:00
Charles Dias bdd4e61a25 drivers: video: Add support for STM32 DCMI
Add Kconfig, DCMI driver, Yaml, and CMakeLists files

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-05-06 14:54:35 +01:00
Fabio Baltieri 06236ba883 drivers: ht16k33: convert from kscan to input
Convert the ht16k33 to use the input subsystem. This can still be used
with the kscan API with the zephyr,kscan-input driver, or use the
input-keymap one to generate input codes instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-06 14:53:36 +01:00
Alberto Escolar Piedras 0b87cb1545 Revert "drivers: timer: tsc: retrieve clock frequency of system timer at runtime"
This reverts commit d82f4a9258.

https://github.com/zephyrproject-rtos/zephyr/pull/69705
Introduced a regression in main in which
tests/subsys/logging/log_timestamp
started failing. (See
https://github.com/zephyrproject-rtos/zephyr/issues/72344
for more info).
Let's revert the PR. It can be submitted after with the issue
fixed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-06 14:52:29 +03:00
Najumon B.A d82f4a9258 drivers: timer: tsc: retrieve clock frequency of system timer at runtime
add support for retrieve clock frequency (HW clock cycle per sec) of
system timer at runtime by reading cpu clock via cpuid

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-05-04 13:24:12 +03:00
Tom Burdick cb384cd5a9 i2c: LPI2C selects HAS_I2C_RTIO
LPI2C from NXP supports the RTIO interface and therefore now selects the
HAS_I2C_RTIO Kconfig.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-04 13:23:22 +03:00
Tom Burdick 804a4faf3d i2c: sam twihs driver supports rtio
select HAS_I2C_RTIO when sam twihs is selected

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-04 13:23:22 +03:00
Tom Burdick 06e025aeee i2c: Add Kconfig HAS_I2C_RTIO
This config should be selected by any driver that supports the RTIO
interface and can then be checked on by things like tests or drivers
that subsequently require the feature exist.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-04 13:23:22 +03:00
Tomi Fontanilles 9bbff1ac84 drivers: crypto: mbedtls: fix dependency
Explicitly enable SHA-512 now that it is not enabled by default
anymore.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-03 14:47:52 -07:00
Pieter De Gendt 10dafbfcf4 drivers: bbram: Rename emul_bbram_backend_api to emul_bbram_driver_api
Structs with a __subsystem tag are required to have a _driver_api suffix.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-03 14:44:41 +01:00
Pieter De Gendt e5a126ae0e drivers: usbc_ppc: Rename usbc_ppc_drv to usbc_ppc_driver_api
Structs with a __subsystem tag are required to have a _driver_api suffix.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-03 14:44:41 +01:00
Pieter De Gendt 8a2bece9af drivers: sensor: Rename emul_sensor_backend_api to emul_sensor_driver_api
Structs with a __subsystem tag are required to have a _driver_api suffix.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-03 14:44:41 +01:00
Wei-Tai Lee 29043c9ead driver: hwinfo: andes: add missing Kconfig dependency
Add Kconfig dependency to the Andes hwinfo driver.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-05-03 14:44:16 +01:00
Mikhail Skobov 7d362e0a77 drivers: i2c: i2c_ll_stm32_v1
In rare cases, the I2C driver runs the N==2 logic
for I2C receives when N>2. This change breaks early
when handling the last 2 bytes for transactions with N>2

Signed-off-by: Mikhail Skobov <skobovm@meta.com>
2024-05-03 07:53:31 -04:00
Jeppe Odgaard 5d44ebfa7d drivers: i2s: stm32: use length from i2s_write
The length parameter from `i2s_write` is not used correctly by
i2s_ll_stm32.c. E.g. `i2s_write(dev, block, 0)` would work.

Use the length from `i2s_write` in `dma_reload` to fix the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-03 07:53:05 -04:00
Simon Guinot ea47ef0ac0 drivers: ncp5623: check led_info for all LEDs
With the current code, when three separate monochrome LEDs are defined
in DT, only the information from the first LED is checked during driver
initialization. This patch fixes the code to verify the information of
each LED.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-05-03 07:29:45 -04:00
Benjamin Cabé 003f145314 drivers: gpio: fix bug with Px15 pins
Fix condition in pin number check so that PA15, PB15, etc. can be properly
accessed..

Co-authored-by: Денис <baden.i.ua@gmail.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-03 07:29:13 -04:00
Bjarki Arge Andreasen 15fa7f79da drivers: gnss: gnss_publish: Use sem for locking
The gnss_publish incorrectly uses a spinlock for mutual
exclusion when publishing data and satellites. Update it to
use a binary semaphore.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-02 22:44:19 +01:00
Bjarki Arge Andreasen 2ff1ed7804 drivers: gnss: gnss_lcx6g: replace spinlock with sem
Use semaphore instead of spinlock for mutual exclusion. The
spinlock is improperly used for mutual exclusion, leading to
timeouts and other unintended behavior as ISRs are disabled.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-02 22:43:11 +01:00
Daniel DeGrasse 6290d18c13 drivers: display: display_hx8394: use MIPI LPM during init commands
Although not documented in the HX8394 datasheet, it seems that the
display fails to initialize if MIPI HS mode is used to send
configuration commands. Therefore, we must make sure all initialization
commands are sent with the MIPI_DSI_MSG_USE_LPM flag set.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-02 21:26:32 +03:00
Jose Alberto Meza 30eda2058b treewide: drivers: espi: Adjust terms per eSPI specification 1.5
1) Replace master/slave in API for new terms in eSPI spec 1.5
2) Reflect eSPI VW change and macro changes across eSPI drivers
3) Update terms in eSPI driver sample and eSPI test driver

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-05-02 13:56:46 -04:00
Tomi Fontanilles 43651979fc drivers: entropy: fix TF-M enabled build with MbedTLS 3.6.0
This fixes the compilation of entropy_psa_crypto.c that failed
when trying to include the MbedTLS configuration.

Inherit the needed include folders and definitions from tfm_api.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
cyliang tw 0190ed2713 drivers: adc: support Nuvoton numaker m2l31x
Update m2l31x.dtsi for adc support and update adc_numaker.c
to support acquisition time in 0~255 ADC ticks.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-02 09:58:43 +01:00
Fabio Baltieri 37c23f69f2 input: analog_axis: use k_sem for locking
Swap the mutex with a semaphore for locking the calibration data.
Lighter data structure, no need to use a mutex here.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-01 22:56:07 +01:00
Mykola Kvach b8f7fc3cc3 drivers: sdhc: add support of Renesas MMC driver
Add basic functionality of Renesas SD/MMC driver. It can be used
for both gen3 and gen4 R-car boards, but tested only with H3ULCB,
Salvator XS M3 and Spider boards. This driver working with SDHC
subsystem.

The driver supports regularal reading/writing throught SD/MMC
controller buffer, DMA mode w/o interrupts and timing tuning.

Add gpio5 and sd0 nodes to h3ulcb and salvator xs which are needed
for working with SD cards. The GPIO node is needed for switching
voltage on SD card through gpio regulator driver.

Notes:
    * the driver doesn't support SPI mode;
    * SCC tuning and DMA mode based on IRQs are enabled by default;
    * an address of a data buffer has to be aligned to 128 bytes if it
      is not, driver will use non-DMA mode automatically;
    * Renesas MMC DMAC doesn't support 64-bit DMA addresses, so for
      case when we have 64-bit xref data address we use non-DMA mode;
    * SD/MMC controller supports block size between 512 and 1 with
      a lot of restrictions, more details you can find in code;
    * support of HS400 mode isn't implemented inside driver.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-05-01 10:55:11 -04:00
Mike J. Chen 40a8022e4a drivers: regulator: shell: add is_enabled cmd
Reports whether regulator is enabled or disabled

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-01 13:12:24 +02:00
Pisit Sawangvonganan 3d39926f94 bluetooth: hci: refactored bluetooth hci packet type indicators
Introduced a unified definition for HCI packet type indicators in
'bluetooth/hci_types.h. This change streamlines the code in
'drivers/bluetooth/hci/', reducing redundancy.
Enhances maintainability and consistency across all HCI drivers.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-01 10:33:12 +02:00
Reto Schneider 776af7ea39 drivers: gpio: kconfig: Prevent conflicts
By sorting the lines alphabetically, conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-01 10:29:10 +02:00
Reto Schneider 998d51a090 drivers: gpio: cmake: Prevent conflicts
By sorting the lines alphabetically, conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-01 10:29:10 +02:00
Wei-Tai Lee 5b83b7a472 drivers: flash: andes_qspi: fix accessing error variable
Fix accessing error variable when using FLASH_ANDES_QSPI_SFDP_RUNTIME.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-05-01 10:26:21 +02:00
Wei-Tai Lee 71f4d1b98e drivers: flash: andes_qspi: fix shadow variable error
Make the variables naming more specific.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-05-01 10:26:21 +02:00
Aurelien Jarno ce29e275c9 drivers: hwinfo: shell: add support for displaying device EUI64 ID
This adds a 'deveui64' command to display the just added EUI64 device
id. Display "Not supported by hardware" on devices that do not have it.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Aurelien Jarno 185edca797 drivers: hwinfo: stm32: Add support for reading EUI64 on STM32W*
The STM32WB, STM32WB and STM32WBA families devices include a EUI64 ID
(called "IEEE 64-bit unique device ID register" in the reference manual
that is distinct from the standard device ID. Add support for reading
it, noting that it is stored in little endian format in the registers.

On other families the weak implementation takes over and returns
-ENOSYS.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Aurelien Jarno ada2c78235 drivers: hwinfo: Add device EUI64 ID support
Some devices, mostly with radio support, have an EUI64 ID (unique and
attributed by IEEE), in addition to the standard device ID.

Add support for reading it through the hwinfo API. As the size is always
the same (8 bytes), there is no need to pass the size in the function,
nor return the number of bytes copied.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Luis Ubieda 971491b5a4 sensor: decoder: Use helper API to compute header size
To be consistent with the computed offset on sensor_submit_fallback()
implementation. This prevents falling in misalignment issues when the
number of sensor channels changes.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-30 19:28:02 -05:00
Luis Ubieda 45ae829791 sensor: rtio_default: Remove log when device does not contain channel
Since this loops over all listed sensor channels, this makes more
difficult catching other debug log messages that might be of interest
(e.g: Decoding results).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-30 19:27:15 -05:00
Luis Ubieda fcb5d768a2 sensor: rtio_default: Add shift to sensor_submit_fallback DBG printout
To facilitate calculation verification between Q-number and value
obtained through fetch/get APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-30 19:27:15 -05:00
Charles Dias fa19161527 drivers: video: ov2640: add clock rate control property
Add Clock Rate Control property to OV2640 CMOS video sensor

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-05-01 00:14:18 +02:00
Francois Ramu f9d04d0958 drivers: watchdog stm32 independent wdg when enable at boot
When the CONFIG_WDT_DISABLE_AT_BOOT is not set, the iwdg
should be configured by iwdg_stm32_install_timeout
and started by iwdg_stm32_setup

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-04-30 14:31:43 -04:00
cyliang tw 183edd2549 drivers: rtc: support for Nuvoton numaker m46x
Add Nuvoton numaker RTC driver including RTC alarm feature.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-04-30 14:31:29 -04:00
Fredrik Gihl be25e34a7c drivers: sensor: Add TI TMP114 temperature sensors
Add device driver for TI TMP114 I2C temperature sensor.
The driver only support basic functionality, i.e. fetch temperature
using default values.

Datasheet:
	https://www.ti.com/lit/ds/symlink/tmp114.pdf

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-04-30 14:31:07 -04:00
Nathan Collins acc2b51959 drivers: display: sdl: Fix asserts in sdl_display_write
The asserts and validation code were incorrectly mixing pitch and
width.  These incorrect checks were preventing rendering code from
re-using a smaller section of a buffer allocated to fit the full
screen. We expect to be able to update a portion of the display from a
portion of the buffer, in which case pitch must remain the screen
width. Expecting x + pitch to be smaller than the screen width is
incorrect.

Signed-off-by: Nathan Collins <nathan.collins@kdab.com>
2024-04-30 18:23:30 +02:00
Raffael Rostagno f4a6fd1f3f drivers: esp32: SDHC implementation
Implementation of SDHC driver for ESP32

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-04-30 18:23:06 +02:00
Fin Maaß 6801ec0e30 drivers: flash: esp32: correct return values
The esp_flash*() functions don't return
negative errno codes, so it's return value
should not be used for the flash api functions.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-30 18:01:59 +02:00
Jiafei Pan 91c081833e drivers: clock_control: imx_ccm_rev2: add tpm clock
Add TPM clock support on i.MX 93 platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Marouen Ghodhbane 3fb0e784ff drivers: counter: mcux: add support for TPM
Add TPM native Zephyr driver. It's mainly inspired from the GPT
counter implementation.

Signed-off-by: Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Declan Snyder 9320907fdf drivers: uart_mcux_lpuart: Fix APIs used together
Handle controller instances wanting to use different
API instances, need to change init flow so that they dont
interfere with each other, trick for now is returning
either the interrupt driven or async apis as not enabled
if the other has already been used on that controller.

Previously, there was an issue where enabling CONFIG_UART_ASYNC_API
would overwrite the init even if controller was meant to use
interrupt driven (as kconfig is global to affect all the controllers)

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-30 08:53:02 +02:00
Declan Snyder dfe4991a2c Revert "drivers: serial: uart_mcux_lpuart: fix IRQ-driven API with ASYNC_API"
This reverts commit a80fa5163b.

That commit broke the polling API when used with the interrupt driven,
it is completely wrong to disable the receiver from irq_rx_disable,
the uart_basic_api test has been broken on all lpuart platforms because
of this bug.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-30 08:53:02 +02:00
Declan Snyder e3ef4e3f09 drivers: mdio: Remove empty functions
Remove empty functions that were "implementing" the
mdio bus_enable and bus_disable apis.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-29 22:31:16 +01:00
Rafał Kuźnia 8ec1e0cdaf drivers: spi_dw: add HSSI register layout
The Synopsys Designware SPI peripheral exists in two versions with
slightly different register layouts. Added a Kconfig option that makes the
driver compatible with the HSSI register layout.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-04-29 15:44:22 +02:00
Chen Xingyu 979cd1dfe8 drivers: display: st7789v: Add support to disable inversion mode
For historical reasons, inversion mode is enabled by default in the
current implementation. This commit introduces an `inversion-off`
boolean DTS property, allowing it to be disabled if necessary.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-04-29 11:02:20 +02:00
Patryk Duda 8c6e801250 soc: xlnx: zynq7000: Select SYSCON in SoC config
The pinctrl driver actually uses SYSCON, so 'depends on' should be used
instead of 'select'. SYSCON should be selected in SoC config instead,
just like other SoC do.

This breaks Kconfig dependency loop for configs that indirectly depends
on SYSCON and causes PINCTRL to be selected.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-04-29 09:56:58 +01:00
Robert Hancock 1ad4b5c617 i2c: i2c_xilinx_axi: Fix for target mode interrupt handling
When a target was registered with the controller but a controller-mode
request was performed, the driver failed to mask the interrupts that
were occurring as a result of the controller-mode transfer, causing an
interrupt flood. Ensure that all interrupts not handled by target mode
are handled as potential controller-mode events and acknowledged
properly.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-04-29 07:11:16 +03:00
Robert Hancock 083a42d734 i2c: i2c_xilinx_axi: Fix switching from controller to target mode
It appears that a controller re-initialization is sometimes needed for
proper operation when handling target mode requests after a request from
the core is completed in controller mode. Add this re-initialization as
was already done between controller mode requests.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-04-29 07:11:16 +03:00
Krzysztof Chruściński 4e880e62dc drivers: cache: nrf: Use CONFIG_DCACHE_LINE_SIZE
Use Kconfig instead of fixed value in the driver code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 9f6567b87a drivers: cache: nrf: Optimize operation
Apply changes which significantly speed up cache operations.
Removed k_busy_wait from function which polls for cache busyness.
Removed spinlock from cache operation. Lock taking and releasing
takes time and it is faster to check if LINEADDR changed
after performing the operation. If LINEADDR changed then it
indicates that current context was preempted by another cache
operation. If such state is detected current operation is
repeated.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński b83a11281d drivers: cache: nrf: Fix case when driver may hang
Driver was disabling cache before full range operations and that
was causing hanging on polling for cache busy status since
state was never changing (because cache was disabled).

Additionally, added flushing to data cache disabling. If flushing
is not performed then execution fails since data in cache is lost.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 73d4f58b98 drivers: cache: nrf: Handle issue with LINEADDR on secure builds
nrf54h20 has a bug that requires to manually set 28th bit in the line
address. 28th bit indicates secure memory space. Add handling to the
cache driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Benedikt Schmidt 10bbf7cd57 drivers: sensor: add driver for temperature sensor NCT75
Add a driver for the ON Semiconductor temperature sensor NCT75.

Signed-off-by: Benedikt Schmidt <benediktibk@gmail.com>
2024-04-26 19:22:09 -04:00
Yong Cong Sin 0291c551a2 drivers: use DT_INST_NODE_HAS_COMPAT
Replace occurances of:

  DT_NODE_HAS_COMPAT\(DT_DRV_INST\((.*)\), (.*)\)

With:

  DT_INST_NODE_HAS_COMPAT($1, $2)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-26 20:04:38 +01:00
Alberto Escolar Piedras 076594fc1c USB_NATIVE_POSIX: Correct dependencies
USB_NATIVE_POSIX dependencies were partially broken for
native_sim as the option was duplicated in the boards
defconfigas.
Let's not define it also in the board Kconfig.defconfig
but instead default it to y in its main definition if
building for either native_posix[//64] or native_sim[//64]

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 19:48:49 +01:00
Benjamin Cabé d9c40856ea drivers: counter: fix leaking NXP counter Kconfigs
fix conditions for COUNTER_NXP_PIT and COUNTER_NXP_MRT Kconfigs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé 388c0aa68f drivers: udc: fix leaking Kconfig
UDC_DWC2_MAX_QMESSAGES was leaking.
Added proper dependency to UDC_DWC2

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé a761c55144 drivers: regulator: fix NXP VREF Kconfig leakage
Properly guard NXP VREF driver Kconfig options.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé b7bef3f8ff drivers: grove_lcd: lcd fix Kconfig leakage
Kconfig for Seeed Grove LCD RGB Backlight was looking.
Make it depend on DT_HAS_SEEED_GROVE_LCD_RGB_ENABLED.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé dce214eb3f drivers: timer: fix gRTC Kconfig leak
Add proper dependency to DT_HAS_NORDIC_NRF_GRTC_ENABLED to avoid leakage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé 8304e82328 drivers: i2c: fix leaking Kconfig option for dw driver
Fix leaking I2C_DW_LPSS_DMA option that was showing up for all I2C
drivers

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé c165446993 drivers: i2c: fix leaking Kconfig option for mcux driver
Fix leaking I2C_NXP_TRANSFER_TIMEOUT option. It was showing up for all
I2C drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00