Commit graph

25,525 commits

Author SHA1 Message Date
Fin Maaß
239df9ce69 drivers: ethernet: litex: more instances
be able to use multiple instances of the
litex ethernet (liteeth) driver.

add support for vlan.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
6ba5f6db60 drivers: ethernet: litex: rename driver
For more consistency, rename the liteeth driver to litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
4ab40f442e drivers: intc: litex: add helper for interrupts
add helper for interrupts, so multiple
instances of peripherals work.

this way out-off-tree peripherals are supported.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Gerard Marull-Paretas
7123f142c3 drivers: clock_control: nrf: use SOC_NRF53_CPUNET_ENABLE
Board level option is deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
ffe10833ea drivers: bluetooth: hci: nrf53: use nrf_spu_extdomain_set
Instead of hardcoded values and device instances.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
8bc461ebe0 drivers: bluetooth: hci: nrf53: simplify DEBUG_SETUP code
debug.h module provides dummy implementation when necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Fabio Baltieri
716fa268f4 input: add a user_data pointer to the callback
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Manuel Argüelles
6c7d836b0c drivers: nxp: convert SIUL2 drivers to native
Convert pin control, GPIO and external interrupt controller drivers
based on SIUL2 peripheral to native drivers. This must be done in a
single commit to preserve atomicity, as these drivers depend on each
other.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-07-31 10:08:24 +02:00
Bjarki Arge Andreasen
279f241e2f drivers: gnss: update drivers to select reference frame
Update in-tree device drivers to depend on the reference frame
datums they support.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Bjarki Arge Andreasen
b9fbc4f936 drivers: gnss: add choice for GNSS reference frame datum
Add choice symbol for reference frame datum from which GNSS will
produce navigation data. All in-tree device drivers use WGS84 by
default, for now, this is the only available option until support
for other datums are added.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Rahul Arasikere
6c4136812c drivers: ethernet: Update STM32 Ethernet driver to support MDIO if enabled.
Moved the definition of the phy device from depending on stm32hx
series SOC to its own #if...#else...#endif. This way mdio support
can be enabled on any stm32 soc that supports it by defining the
mdio node in the devicetree.

I have tested this in a custom board.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-07-30 18:31:02 +01:00
Johann Fischer
043aa837fd drivers: udc_stm32: remove wrong header and fix udc_ep_enable()
Driver includes wrong header zephyr/usb/usb_device.h and uses defines
from include/zephyr/drivers/usb/usb_dc.h.
Also fix udc_ep_enable() implementation in general. HAL_PCD_EP_Open()
takes the ep_type parameter as uint8_t integer type and the shim driver
should not just pass int type.
It is recommended that drivers use ep_cfg or cfg for struct
udc_ep_config, fix this as well.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:29:26 +01:00
Francois Ramu
9ec7697bdb drivers: usb: stm32 udc driver get the global otg interrupt
The global otg interrupt hs/fs is enabled by the udc_stm32
driver. Get it in the list of interrupts of the OTG node.
Use UDC_STM32_IRQ naming.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-30 18:29:17 +01:00
Pieter De Gendt
92019b1dac emul: Support UART device emulation
Add support to the existing UART emulated bus, to have a client device
emulator.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Murali Karicheri
d2d0289750 drivers: flash : stm32h7: Fix the offset for get_sector()
The offset is wrong when the second bank is used by M4 as the
offset is relative to the base which is 0. So add the least
significant 6 nibbles from the CONFIG_FLASH_BASE_ADDRESS to
find the sector.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Murali Karicheri
188fe4d5d1 drivers: flash: stm32h7: support flash controller driver on M4
Currently flash controller driver builds and runs only on M7.
This patch supports enablement of the driver on M4 CPUs. The
main issue in using the driver on M4 is that LL_GetFlashSize()
to read the flash size works only on M7 as the internal register
is not accessible from M4. So to use the driver on M4, add a dt
property, bank2-flash-size, to configure flash size of bank2.
this will allow gradual support of flash controller driver
on M4 of all supported STMH7 boards by defining the above
dt property and testing it. Currently this is verified only
on STM32H747i-disco board.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Johann Fischer
76fadf90f7 drivers: udc_dwc2: enable Internal DMA support by default
Remove BUILD_ASSERT for Internal DMA and DCACHE if both are enabled, and
enable Internal DMA support by default.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Johann Fischer
9bf32320f2 drivers: udc_mcux_ehci: remove bounce buffer
UDC_BUF_POOL_*_DEFINE macro will place buffer pool in __nocache
section if NOCACHE_MEMORY is enabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Johann Fischer
67caae3aca usb: device_next: introduce UDC_BUF_POOL_*_DEFINE macros
Introduce UDC_BUF_POOL_*_DEFINE macros based on NET_BUF_POOL_*_DEFINE
macros but use our own version of alloc and unref callbacks to get
buffers with specific alignment and granularity. Also, do not use ref
callback because it breaks alignment.
Also introduces helper macros for defining and checking UDC
driver-compliant static buffers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Jordan Yates
e2549cc3c9 lora: rylrxxx: add missing timeout
Add the missing timeout parameter to `modem_pipe_open`. 10 seconds
appears to be the default value added to other in-tree drivers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-30 11:44:04 +02:00
Martin Åberg
7dbc5f09ed drivers/gpio: Add support for GRLIB GRGPIO2
This adds support for the GRLIB GRGPIO2 controller used in
LEON and NOEL-V systems.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-07-29 14:27:15 +02:00
Ryan McClelland
147df87fa4 drivers: i3c: add ddr, ibi tir, direct ccc def byte support
Revision 1p7 of the silicon added support for IBI TIR, full word fifo
while target usage, defining byte with direct CCCs. This also adds
support of HDR-DDR.

This also fixes short ccc commands where multiple targets in a
payload for the same ccc.

Modification of the i3c_target_tx_write had to be done in order to
distinguish the difference for each fifo to be written to.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-07-29 14:23:43 +02:00
Miguel Gazquez
26be1da3e7 drivers: sensor: add driver for lsm9ds1 sensor
The LSM9DS1 is a system-in-package featuring
a 3D digital linear acceleration sensor, a 3D digital angular rate
sensor and a 3D digital magnetic sensor.

This driver implements only the linear acceleration sensor and the
angular rate sensor, on the I2C bus.

This driver is without trigger support.

The driver is based on the stmemsc HAL.

link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Tomasz Leman
44464c4d4f drivers: dai: intel: ssp: Introduce DMA control set API
This commit adds a new API function, `dai_ssp_dma_control_set`, to the
Intel SSP DAI driver. This function is designed to set DMA control
parameters specifically for the SSP interface.

The addition of this API function allows for more granular control of
DMA settings, which can be beneficial in scenarios where DMA
configuration needs to be modified independently of other DAI settings.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-07-29 14:20:18 +02:00
Tomasz Leman
5084decbc4 drivers: dai: intel: ssp: Refactor TLV parsing into a separate function
Refactor the TLV parsing code from the dai_ssp_parse_aux_data function
into a new, separate function called dai_ssp_parse_tlv. This change
improves the modularity of the code and allows for the TLV parsing logic
to be reused in other contexts where only TLV data needs to be parsed
without the entire configuration blob.

The new dai_ssp_parse_tlv function takes a pointer to the TLV data and
its length as parameters, enabling it to process a buffer containing
multiple TLV entries. The original dai_ssp_parse_aux_data function is
now simplified to prepare the TLV data and call the new parsing
function.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-07-29 14:20:18 +02:00
Daniel Kampert
73c05e2079 drivers: rtc: Add support for Micro Crystal RV-8263-C8
Remove redundant code

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-07-29 14:19:47 +02:00
Daniel Kampert
37d6bc0827 drivers: rtc: Add support for Micro Crystal RV-8263-C8
- Add Micro Crystal RV-8263-C8 RTC driver

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-07-29 14:19:47 +02:00
Bjarki Arge Andreasen
372c7183ef modem: pipe: Add explicit timeout to sync APIs
The modem pipe APIs include synchronous calls to open/close,
which internally use a fixed timeout of 10 seconds. The timeout
should be configurable through the APIs, anywhere from K_NO_WAIT
to K_FOREVER.

This commit adds timeout parameters to the open/close APIs, and
updates in-tree usage of the open/close APIs to explicitly
provide the previously implicit timeout of 10 seconds.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-07-29 14:14:42 +02:00
Sreeram Tatapudi
eebc998a5a drivers: flash: Support for IFX QSPI Flash driver
Initial version

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-29 14:14:10 +02:00
Jordan Yates
5f3ff52b6b gnss: gnss_u_blox_protocol: fix typos
Fix several typos in define names.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-29 14:12:53 +02:00
Tomasz Moń
f0677e5a3b drivers: udc_dwc2: Respect maximum fifo depth
When dynamic fifo sizing is enabled the driver can assign fifo size
lower or equal to the reset value. Software must respect the maximum
sizes because fifo width registers are optimized during synthesis and
the larger values simply get discarded.

Use 16-bit values for FIFO depths because maximum FIFO depth the vendor
can configure the DWC2 otg is 32768.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-07-29 14:12:02 +02:00
Jiafei Pan
fa9a131029 drivers: clock_control: mcux_ccm_rev2: add ENET clk for imx93
Add ENET clock support in the ccm driver for imx93.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-28 07:31:32 +03:00
Saravanan Sekar
c143cbaa7c drivers: crypto: use reset api for crypto peripheral reset
Replace direct HAL api by zephyr reset api framework for crypto
peripheral block reset.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2024-07-28 07:31:25 +03:00
Dean Sellers
dfe7cb58cb drivers: ethernet: enc28j60: Add DT property to set random mac
Use the DT property zephyr,random-mac-address to set a boot time
random mac address.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2024-07-28 07:30:39 +03:00
Sadik Ozer
915ce7548a drivers: trng: Add TRNG driver for MAX32xxx MCUs
Added TRNG driver for MAX32xxx MCUs

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Kacper Dalach
52197b515a drivers: eth: native_posix: if_name from cmd line
Iface name which is used by native posix ethernet driver can only be
specified at compile-time. I wanted to run two instances of the same
program on native posix but did not want to make two separate builds only
to change the iface name. I have implemented getting the iface name from
command line.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2024-07-28 07:30:02 +03:00
Cong Nguyen Huu
f9dddbe0ac drivers: nxp_s32_canxl: improve CANXL error report
Update to enable CANXL_INT_RXSMB_OVER and
CAN_INT_ERR_FAST(ERR for CAN-FD).

Statistic CAN errors and count CAN TX and RX errors via
BCANXL that uses CANXL MRU to exchange informations with CAN host.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-07-28 07:29:39 +03:00
Hao Luo
6ed058887e drivers: spi: simplified spi_ambiq_xfer function
Simplified spi transfer process to make it more readable

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-28 07:29:28 +03:00
Hao Luo
8379f64393 drivers: bluetooth: hci_ambiq: get the spi cfg from the device
Use the SPI configuration from the SPI device for data transaction.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-28 07:29:28 +03:00
Hao Luo
3faaaaba59 drivers: spi: Change to use software controlled cs in default
Added support for software controlled cs in Ambiq SPI drivers

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-28 07:29:28 +03:00
Kacper Dalach
32eb346e05 posix: can: if name from command-line
This commit introduces the ability to set the CAN
interface from command-line. This is helpful
if we want to run multiple instances of the app
with different CAN interfaces without making
separate compilations for each instance.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2024-07-27 20:49:38 +03:00
Pieter De Gendt
ad63ca284e kconfig: replace known integer constants with variables
Make the intent of the value clear and avoid invalid ranges with typos.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-27 20:49:15 +03:00
Pisit Sawangvonganan
a2e0b1d366 drivers: serial: remove '&' when assigning init_fn
Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/serial`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:48:34 +03:00
Stefan Petersen
840e93fd60 drivers: flash: spi_nor: Print flash size properly when < 1 MiByte
When using SPI-NOR SFDP autodeteection, the flash size printed to
the log is rounded to 1 MiByte. If flash is smaller than 1 MiByte
it is printed as 0 MiByte.

With this patch smaller flash sizes are printed in kiByte, for instance
512 kiByte is printed correctly.

Signed-off-by: Stefan Petersen <spe@ciellt.se>
2024-07-27 20:47:39 +03:00
Fabio Baltieri
32fafc7176 input: analog_axis: add output inversion
The driver right now only allows inverting the input value, which can be
useful for differential channels but is quite confusing for single ended
ones. Implement a simple output inversion flag instead to make up for
that.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 20:47:18 +03:00
Chun-Chieh Li
f77023e649 drivers: hwinfo: add NuMaker support for device id
Add device id for Nuvoton NuMaker series

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-07-27 15:19:23 +03:00
Jordan Yates
5e2a4bca06 disk: flashdisk: init in POST_KERNEL
Initialise flashdisk devices in `POST_KERNEL` instead of `APPLICATION`.
This aligns with the other disk drivers, which are all `POST_KERNEL`,
and causes no problems as `disk_access_register` is a purely software
action and does not perform any operations on the underlying device.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Jordan Yates
9cb58cf53a disk: flashdisk: default enable if dts exists
Enable `DISK_DRIVER_FLASH` by default if the devicetree node exists, as
the other disk drivers do.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Jordan Yates
6bd77c848c disk: use standard DT kconfig dependencies
Use `depends on DT_HAS_* default y` instead of `default y if DT_HAS_*`
as the driver depends on devicetree instance.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Ryan McClelland
ec41afaa5d drivers: i3c: add KConfig to perform rstact during bus init
Sometimes, performing a rstact which will reset all devices during init
on the bus may not be ideal. Add a KConfig to easily turn off.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-07-27 15:18:18 +03:00