Commit graph

23353 commits

Author SHA1 Message Date
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